api#326 Числовые UTM и новый шум каждого перехода

This commit is contained in:
Panfilov Konstantin committed 2026-10-25 02:05:48 +03:00
1 parent f30742c2fb
commit 81e189ca67
16 files changed
+303 -160

No files matched your search

+5 -9
View File
@@ -32,14 +32,6 @@ if (!is_string($query)) {
parse_str($query, $params);
$config = json_decode((string) file_get_contents(dirname(__DIR__) . '/config.json'), true);
$expected = [
'indpic' => '1',
'theme' => 'dark',
'degr' => '1',
'registration' => 'after',
'bchoice' => 'a',
'cons' => '2',
'tp' => $config['utm']['tp']['default'] ?? null,
'focus' => 'face',
'utm_source' => 'stage-ad',
'subid' => 'click-42',
];
@@ -48,10 +40,14 @@ ksort($params);
ksort($expected);
if ($params !== $expected) {
fwrite(STDERR, "FAIL: claim URL обязан нести все resolved UTM и внешние параметры.\n");
fwrite(STDERR, "FAIL: foreign query обязан сохранить внешние параметры; собственные цифры хранятся отдельно.\n");
exit(1);
}
if ($redirect_digits !== ['indpic'=>'1','theme'=>'1','degr'=>'1','reg'=>'2','chob'=>'2','tp'=>'2','cons'=>'2','focus'=>'1']) {
throw new RuntimeException('Type-in обязан сохранить полный resolved numeric snapshot для handoff/recovery.');
}
if (isset($params['key'])) {
fwrite(STDERR, "FAIL: внешний key не должен подменять одноразовый ключ загрузки.\n");
exit(1);