# Прогресс реализации Срез на **2026-10-12**. Этот файл описывает фактическое состояние кода, а не весь объём требований из `Requirements.md` и `Architecture.md`. ## Текущий статус ### Googlevideo suffix RC — browser-verified experiment (2026-10-12) - Initial source RC `eade051c2bc335b71b1616d697326ca4c8019d70`, immutable image `sha256:fdb60593e29d7c337a413a47aaddfbcaaeabdeb877042c58f506d4abdc98a13b`, isolated host SOCKS `127.0.0.1:11082`. Historical initial journal: generation3, active candidates [1,2,3], scope `experimental_googlevideo_suffix`; `www.youtube.com` and `i.ytimg.com` profiles preserved. Older targets were unchanged. These are recorded field observations, not current candidate IDs or a new probe/deployment by this source update; its SHA is not the tested image source. - Fresh signed media on `rr16---sn-n8v7znsz.googlevideo.com` returned HTTP206, 65536 bytes, MP4 `ftyp`, TLS1.2. On **2026-10-12 the user confirmed browser videos work** with this live RC and accepted one shared profile for Googlevideo, including initial learning. Browser images also appeared, but that does not qualify every image route. - One suffix profile is a **composite native circular A/E profile with two strategies and per-host learning**, not one uniform static strategy. Explicit operator experimental policy is durable across restart with hash/rollback guards; it is neither family-qualified nor `READY`, and no all-host cold 3/3 result is claimed. - Source now wires autonomous experimental media recovery in either configured service mode. Healthy actual-resource probes short-circuit recovery; a validated media transfer failure permits one guarded restart of the same committed profiles and bounded native relearning in the persistent deployed daemon (10 attempts / 120s), followed by fresh signed media 3/3 on both TLS protocols. Learning stays in daemon RAM, not a temporary verification worker; expired inventory is refreshed, never rewritten or persisted. Missing inventory is degraded, not strategy absence; guard/infrastructure/cancellation and mixed failures remain fail-closed. No experimental candidate is replaced or promoted to qualified. - Status distinguishes active-profile coverage (`covered=` / JSON `covered_groups`, `googlevideo_scope`) from qualified `groups` and `unresolved_groups`. Experimental Googlevideo remains unresolved for qualification even when operational media is healthy; a thumbnail profile does not mean the full asset inventory is qualified. Status itself performs no live health check. New recovery/classifier/status code is pending field acceptance; no new deployment, network test, family-qualified/`READY` or production claim is made. Generic production media handling, signed-URL/SS privacy, persisted minimum two-hour strategy-absence pause and the separate 90-minute whole-job budget are unchanged. - Local source verification: fresh `go test ./... -count=1`, affected experimental/resource-classifier/status/monitor regression tests under `-race`, and `git diff --check` passed. These are unit/fixture checks only, not new field evidence. Remaining acceptance gates (not asserted defects): 1. Representative fresh signed media evidence: at least three unique hosts across at least two roots/prefixes, post-warmup 3/3 for both TLS protocols plus actual media transfer. Do not impose uniform static/cold behavior on the accepted learning experiment or label it normally qualified without evidence. 2. Qualify the avatar route/profile: only the thumbnail image profile is currently active; browser-visible images do not close this gate. 3. Field-accept actual restart/recreation recovery after the all-Googlevideo suffix change, including renewed native learning; older exact-host lifecycle PASS does not cover this RC. 4. Field-accept the new autonomous same-profile experimental recovery and resource-error classifier without replacing or promoting operator-approved scope. Automatic family qualification is not implemented. 5. Field-check the new covered-versus-qualified status fields against the live journal and asset inventory; no family-qualified/`READY` or blanket production claim yet. ### Earlier isolated-target acceptance (2026-10-11) - **2026-10-11 clean RC acceptance — PASS:** source RC `d8316e695bc36e1243c111e19bb1e527355907b6`, tag `zapret-autotune-managed-target:rc-d8316e6`, immutable image `sha256:5636aa9031fd0f6a0513f2e22cc0c39b1c806e9714b7f9ac040c8713d6a26c6c`, built from the source git archive with pinned inputs. These source/image identifiers predate this documentation update; a later docs commit is not the tested image source. Private source root: `/home/agent/zapret2-autotune-rc-d8316e6`. Additional clean target root: `/home/agent/zapret2-managed-clean-d8316e6-45bb14ba`, Compose project `zapret-autotune-clean-d8316e6-45bb14ba`, SOCKS TCP/UDP `127.0.0.1:11081`; left running for inspection. The existing target on `11080` was not replaced. - **Clean bootstrap/evidence:** state was empty before launch (root-owned directory mode `0700`, independent 64-hex secret, `.env` mode `0600`); real `blockcheckw` binary, no mocks or copied config/candidates. Fresh init was observed, but fast bootstrap prevented capturing an exact generation-0 status snapshot. Generation2 committed frontend ID1 and GGC ID2 for exact `rr17---sn-n8v7kn7d.googlevideo.com`; both candidates have valid raw TLS1.2/TLS1.3 evidence, 3/3 each. Actual root config uses the verified layout-safe fake + multidisorder frontend seed. Periodic `lastProbeAt` advanced with failure counter0 and idle recovery. - **Clean lifecycle gates:** monitor SIGKILL changed host PID522765→525271 inside the same container/PID1, DockerRestartCount0; IDs[1,2] and config hash `57e639c98420be73a8ec4754b20ba975d81aced44215ed547b1ac029c89c14de` unchanged. Graceful stop exited0 in 0.61s, with no worker leaks. Forced recreation (`5af686e2ad94…`, host PID525625) preserved generation2/IDs/hash. Initial post-recreation failure counters1 then2 are historical observations with unproven cause: a fresh-discovery GGC mismatch sample does not prove the actual probe error cause. The next default probe at 07:54 reset the counter to0 with no active recovery. Player API OK and host SOCKS curl to `www.youtube.com` HTTP200; no media playback/SABR claim. - **Scope/limits:** both older targets' images, container IDs, PIDs, start times and ports stayed unchanged (existing managed PID518298, old SS PID266922); no host-manager or Xray changes. Private final PASS report: `/home/agent/zapret2-managed-clean-d8316e6-45bb14ba/final-cleanrun-report.json`, raw artifacts in `final-evidence/`. This is isolated clean-run acceptance, not blanket production approval, a playback test, or a real 90-minute watchdog wait. The full 90-minute wall-clock expiry was not waited out; deadline behavior remains covered by shortened/injected tests. The working-target entry below describes the unchanged existing target, not the additional clean RC. - **2026-10-11 container-owned control, committed/deployed:** `5258ae2`, `6467108`, `fe23eec` replace external supervision with PID1-owned runtime-cycle retries (three starts per rolling six hours, cancellable 15s/30s backoff capped at 60s). Guard/config/DB/rollback/cleanup failures remain fail-closed. Reconciliation precedes activation; fresh-shell watchdogs avoid EXIT/TERM trap deadlock; private monitor sessions allow cleanup of orphaned scan workers before restart. SS uses private JSON, never exported password/argv. Graceful SIGTERM joins/restores before stopping owned daemons; Compose has no restart policy and 240s grace, monitor join 45s. Host/container-platform lifecycle belongs to the operator, not a generated host manager. Historical transient acceptance units were unloaded and the tracked systemd unit removed. - **2026-10-11 strategy absence:** genuine validated no-qualified-strategy results persist `max(2h, configured cooldown)` in SQLite, preserve longer existing deadlines and other leases, and survive monitor/container startup. Lightweight probes continue; heavy saved-first/scan/apply waits until expiry. Other ordinary outcomes retain 30m cooldown. Malformed reports and explicit nfqws2 infrastructure failures are vetoed before both positive and negative selection; they are never disguised as absence. Qualification remains both TLS protocols 3/3. The separate 90-minute whole-job watchdog plus bounded restoration remains abnormal, not normal absence. - **Verification:** full Go suite, targeted race tests and shell/static/Python fixtures pass. Negative-only checker fault injection demonstrated a persisted 7200-second pause, unchanged checker count 7→7 through internal monitor restart, same container/PID1, DockerRestartCount0, zero candidates and graceful exit0. Active-check crash fixture demonstrated old separate-PGID workers gone before replacement activation, unowned session peer preserved, direct unchanged PID1/container and exit0. Private reports: `/home/agent/container-absence-acceptance-roqcpxq1/actualreport.json`, `/home/agent/active-scan-crash-5z2a6xb_/actual-report.json`. These validate control flow, not new network qualification; real two-hour wall-clock expiry was not waited out (expiry covered by injected-clock tests). Numeric PID signalling retains the usual read/signal PID-reuse race; strict reuse-proof signalling would require pidfds. - **Working target:** immutable image `sha256:e28b3340126891686e7f3cf1fce6a651b37259fc3bd51be225b8864124a7c103` (`rc-fe23eec`), private `.env` selector and password preservation verified. Generation35, active[1,18], both groups committed, Player API OK, queue300 only. Main container `e31475d0f2a8528c54089097d2e0129bc29a07f3c9a9e8d15ac6966a573166ce`/host PID518298/start time unchanged during real child SIGKILL; monitor PID184→546, DockerRestartCount0. Old container PID266922/start time unchanged; Xray untouched. Current README/operator/deployment guides describe only container-owned supervision and retry policy; this remains an isolated production candidate, not a blanket playback/production-readiness claim. ## История реализации (не текущие инструкции) The dated facts below are historical snapshots. In particular, host-systemd unit installation/restart/start-limit guidance and its acceptance tests are **superseded** by container-owned control above; they impose no current deployment requirement. Earlier “not deployed/not verified” snapshots do not override later recorded isolated-target acceptance. Production acceptance of the new supervision/absence policy is recorded above; historical pending labels are superseded. - **2026-10-11 production-candidate update (remote checks dated 2026-10-10 UTC):** `ed4298d` adds one 90-minute budget per managed bootstrap/recovery job, shared across phases. Watchdog expiration is abnormal/fatal, never ordinary nonpass/cooldown continuation; clean timeout permits technical exit 75 only after worker join and bounded 30-second restoration. Any guard/DB/rollback/cleanup or mixed unknown error vetoes restart (78); configuration errors use 64, graceful shutdown 0. Independent review reproduced and closed mixed-timeout, fatal-discovery and fatal-health/deadline races. Preferred frontend seed is now the layout-safe alternative verified in prior 60/60 requests; cached definitions are not rewritten. - **2026-10-10 restart/startup hardening:** optional `deploy/managed-target/zapret-autotune.service` uses foreground Compose, no blanket Docker restart, systemd allowlisted 75 with bounded starts (3 per 6h); shutdown grace 120s / unit stop budget 180s. `61e6e00` adds guarded fixed-DB `managed reconcile` before initial activation; init/reconcile/start are bounded (45/45/30s plus 5s kill grace), all startup refusals map to 78. Unknown state is not sourced even by cleanup. Actual systemd tests: technical 75 retries bounded, 78 does not retry; killing monitor in final image caused one whole-target restart, preserving both groups and Player API OK. Permanent production service was not installed/enabled; transient acceptance units were stopped. - **2026-10-10 interrupted-apply acceptance:** real isolated fixtures from SQLite backup/qualified cached rows tested final image. Known prepared config (pending hash `507b2d…`) was restored to committed `1f9696…` before first real sysv restart/start; journal at first start was committed with old IDs [1,15]. Unknown config hash exited 78 with zero activations/restarts and preserved diagnostic state. No qualification evidence was fabricated; no main state was modified. Private report: `/home/agent/prepared-acceptance-g2p72yjt/acceptance-report.json`; disposable containers cleaned after validation. - **2026-10-10 build/docs/result:** Go builder and runtime are digest-pinned; `4824570` adds native BuildKit compilation-cache mounts. Built release candidate `zapret-autotune-managed-target:rc-4824570`, local immutable image ID `sha256:011b8e82422a83686322eafddbd4203f9117bf4d9830fa3ec900f0f31538c1ae`. Atomically persisted only its selector in private remote `.env`; image binding, env0600 and SS password preservation verified without printing credentials. New target runs this image, generation29 active[1,15], Player API OK, only queue300; old container PID/start-time unchanged, Xray untouched. README, MANAGED_TARGET and deployment README cover provisioning, actual config forwarding, immutable promotion, service install, backup/restore, failure handling and limitations. `go test ./...`, affected `-race`, shell/static checks and native unit syntax passed. No real server reboot or full 90-minute expiry wait was performed; expiry tested with shortened injected budgets. Registry publication, permanent service enablement and final production rollout remain operator decisions; this is a production candidate, not a blanket production-ready claim. - **2026-10-10 transport RCA:** captured packet/strace diagnostics only in disposable containers on the target bridge, fixed destination `142.251.153.4`. TCP establishment succeeds (~18ms); failed passes retransmit ClientHello without server ACK advancement or first TLS response, not an HTTP-body timeout. Full-snapshot, conflict-checked reassembly of 24 connections showed the old frontend seed passes all 22 non-final-SNI layouts and times out on both final-SNI layouts (one TLS1.2, one TLS1.3; zero bytes after SNI). Rustls extension order changes between requests. This strongly establishes observed strategy layout sensitivity, not a proven Rustls/Lua bug or exact network drop location. An independent heavy-tier review confirmed the conclusion/limits. - **2026-10-10 replacement candidate:** `--payload=tls_client_hello --lua-desync=fake:blob=fake_default_tls:tcp_ts=-1000:repeats=1 --lua-desync=multidisorder:pos=1,midsld` passed 24/24 diagnostic connections, including final-SNI in both protocols, then 10 standard checker jobs with 3/3 for TLS1.2 and TLS1.3 (60/60 requests using auto DNS). This is a tested replacement hypothesis, not a universal guarantee. Qualification/evidence rules are unchanged. No working profile/image was switched during this tracing task; target Player API remains OK, old target/Xray unchanged. Temporary trace containers were removed after copying private artifacts; raw captures/reports retained in `/home/agent/checker-transport-trace`, `/home/agent/checker-full-trace`, `/home/agent/checker-alternative-trace`, and `/home/agent/alternative-qualification-*.json/.stderr`. Next implementation step, if approved: prefer this candidate through the normal managed verify/save/apply pipeline instead of weakening checks or modifying TLS libraries/timeouts. - **2026-10-10 remaining-gates follow-up:** `24c29be` adds exact GGC scope comparison to healthy monitor probes and authenticated early-timeout rejection for saved candidates (qualification still requires both TLS protocols 3/3). `b965842`/`cb82436` correct actual upstream diagnostic metadata and validate DNS IP literals. Medium-tier independent review and actual remote-capture Go checks verified genuine one/two-protocol early timeouts authorize rejection, while a passing report does not; malformed/infrastructure diagnostics remain fail-closed. All local Go tests/build/static checks pass. Deployed final image includes `cb82436`. - **2026-10-10 runtime gates:** temporary target-only policy 15s/1/30s demonstrated successful saved frontend recheck/apply without a new frontend tune run and real GGC rotation (`rr17---sn-n8v7kn7d.googlevideo.com` ↔ `rr16---sn-n8v7znsz.googlevideo.com`) with newly qualified exact-host candidates. A later real saved rejection entered scan/seed fallback: tune run 9 was recorded FAILED when combined revalidation did not pass, and last-good was restored rather than applying insufficient evidence. Thus successful saved-first and safe fallback entry/restoration are verified; a newly applied frontend from that particular fallback attempt is not claimed. Final target generation 25, active IDs [1,13], both groups committed, Player API OK; only NFQUEUE 300 bound. Restored default policy 5m/3/30m; old target remains running and Xray unchanged. - **2026-10-10 full-corpus diagnostic:** clean disposable namespace scan tested 8648 TLS1.2 and 4330 TLS1.3 strategies, found 989/935 working respectively, zero scan errors. Diagnostic scan/check chain did not reach check; recovered 1923 intact candidate rows from captured stdout (one row corrupted by interleaved stderr), then independently checked shortlist: 20 passing scenarios, 10 per protocol, each 3/3. Current selector's combined winner passed both protocols 3/3 in two repeats, third repeat had TLS1.2 timeout at 2/3. Raising request timeout from 6s to 20s and fixing a single destination IP did not eliminate sporadic failures; checker Rust client also times out through stable SOCKS. Exact transport cause remains unproven; do not describe timeout as solved or weaken evidence. Safe continuation after validated early failure is implemented; upstream/client-level tracing is the remaining diagnostic work. - **2026-10-10 worker lifecycle acceptance:** `7b332f1` cleans only each blockcheck invocation's process group after success/failure, escalates TERM→KILL and checks live membership; target now has `CAP_KILL` for dropped-UID workers. Restored `--no-conflict-cleanup` to protect foreign processes. `23fbf6d` adds synchronized orphan/escalation and daemon-preservation regressions; `6bacca0` preserves private daemon diagnostics. Remote bootstrap qualified and applied frontend candidate 1 and exact-host GGC candidate 2 (`rr17---sn-n8v7kn7d.googlevideo.com`), committed generation 3, Player API OK. Queues 200–207 are empty; only active queue 300 remains. Recreated final image retains both groups. A controlled target-only daemon stop exposed a separate active-health timeout early-return bug; fixed with delegated, independently verified regressions in `8475934`. Old target and Xray were not modified. All new commits include Co-authored-by. - **2026-10-10 live recovery retest:** deployed final image `8475934`, stopped only target-local zapret without changing committed config and waited for normal failure threshold/cooldown. Monitor attempted saved frontend revalidation (no new scan or tune run). Blockcheck returned TLS 1.2 timeout at 1/2, TLS 1.3 3/3; incomplete evidence was correctly rejected, but recovery restoration restarted both last-good groups. Player API returned OK, queues 200–207 were free, and next periodic probe reset consecutive failures to 0; monitor remains alive. Same-IP `142.251.156.4` curl comparisons through old SOCKS 1080 and new SOCKS 11080 returned HTTP 200 for all 12 requests (3 per TLS 1.2/1.3 per proxy). Worker lifecycle, apply, restoration and periodic monitor are runtime-verified; a fully successful fresh saved-first revalidation remains unproven because blockcheck occasionally times out despite stable proxy requests. Do not weaken 3/3 or describe this as full recovery acceptance. Dedicated target is left running with both committed groups; old container/Xray untouched. - **2026-10-10 remote acceptance:** target image built from pinned base and started in a fresh directory/state volume; host SOCKS port `11080` was free, old container stayed untouched. Initial managed status confirmed generation `0`, `groups=none`, no active candidate IDs, and `NFQWS2_ENABLE=0`. Automated frontend scan of `youtube.com` completed with `total=4323, working=0`; candidate check produced an empty `strategies` array, recorded one failed run, and bootstrap error caused monitor/entrypoint exit. No strategy was applied. New target remains stopped with its fresh, strategy-free state preserved. This exposed that managed bootstrap should scan the actual Player API host (`www.youtube.com`) and ordinary no-candidate errors must not terminate ongoing monitoring. Updated code/tests are in progress; rerun required. Old container and Xray were not changed. - **2026-10-10 remote retry:** scanning the correct `www.youtube.com` host still produced `working=0`. Diagnosis: scan left NFQUEUE workers 200–207 in the isolated target namespace; the subsequent `check --no-conflict-cleanup` preserved those workers and every candidate immediately failed. A manual `check` after a standalone scan confirmed the queue-conflict failure. Stopped only the new target (old target/Xray untouched), preserving its empty state. Managed recovery now opts into blockcheck conflict cleanup because it runs only after stopping zapret in the dedicated isolated namespace; ordinary CLI callers retain `--no-conflict-cleanup`. Local test/build pass; remote rerun pending. - **2026-10-10 retry after worker-cleanup fix:** deployed commit `a762763` and recreated only the isolated target, retaining generation-0 empty strategy state. Managed `www.youtube.com` scan completed; subsequent shortlist check returned an empty `strategies` array, and the persistent monitor correctly continued into a later recovery scan instead of exiting. At the last reachable check the target was up, generation 0, no candidates, and 3 probe failures; SSH profile `dev` then disconnected during the next scan. Acceptance remains incomplete; reconnect and inspect current process/status/report before any further action. Old target and Xray remained untouched. - **2026-10-10 diagnostic follow-up:** SSH reconnected. Existing SOCKS `127.0.0.1:1080` returned HTTP 200 for `https://www.youtube.com/`; direct host curl and fresh target SOCKS `127.0.0.1:11080` timed out, as expected with the disabled baseline. Independently ran `blockcheckw check` in a clean disposable container on the same target bridge using the existing frontend profile; it passed TLS 1.2 and TLS 1.3, 3/3 each. The default scan corpus omitted this exact profile, while `blockcheckw scan --from-file` found it on the same host in under a second. Repeated strict checks showed intermittent TLS 1.3 timeouts (one protocol 3/3 while the other fell to 1/2); the managed seed now retries the tiny exact-host corpus up to five times before falling back to the hour-long default search. Stopped only the dedicated target to end repeated full scans; its state remains generation 0 with no applied candidates. `go test ./...`, build, static deploy guard, entrypoint syntax, and diff checks pass. Deploy and remote acceptance rerun pending. Old container/Xray untouched. - **2026-10-10 seed retry follow-up:** Repeated checks in one disposable namespace confirmed intermittent TLS 1.3 timeouts persist across attempts. Managed seed was changed to run `blockcheckw check` directly (not a scan that leaves NFQUEUE workers), retrying only the small seed; identical TLS 1.2/TLS 1.3 args are now de-duplicated before combined revalidation. The previous five-attempt seed-scan build is stopped; dedicated target state still has no committed candidates. Local tests/build/static checks pass; deploy and runtime verification of the direct-check seed remain pending. Old target/Xray untouched. - **2026-10-10 latest runtime check:** Deployed the direct-check seed build. It still fell through to the default full scan; process inspection showed a seed `nfqws2` worker holding queue 200 alongside the scan's workers on 201–207. This confirms managed checks leak workers into the target namespace, so retries/default scan can contend on NFQUEUE even though a clean disposable check can pass. Stopped only the managed target; verified it is exited while the old target remains up and the existing SOCKS still returns HTTP 200. Generation remains 0 with no candidates. Next fix must explicitly clean up only blockcheck-owned NFQWS workers before retry/scan checks, then rerun acceptance. Acceptance remains incomplete. - Added `managed monitor` and supervision only in the dedicated target entrypoint: guarded target-owned DB/identity before singleton, policy 5m/3/30m with bounded CLI/env validation, owned-loopback Player API probe/discovery without direct fallback, fixed blockcheck/zapret argv with context cancellation/join. Startup bootstraps only without a qualified active frontend, tries saved scenarios first, then scans; unresolved GGC keeps monitoring; safety/DB errors stop it. SIGTERM waits for monitor restoration before stopping target-local zapret/SS. Local fake CLI/entrypoint tests are present. - Hardened managed recovery artifacts: общий `revalidateCandidate` удаляет старый combined JSON перед каждым check, remove errors/missing/malformed report fail closed; scan shortlist проверяется на regular file и mtime не раньше whole-second scan start (production использует unique temp path). Добавлены fake-only regression tests stale/missing shortlist, stale combined, remove failure и infrastructure classification/restoration. Tests/build/network не запускались; verification deferred orchestrator, CLI/entrypoint не добавлены. - Добавлен injected `recoverManagedTarget` и callback wiring к persisted monitor: frontend bootstrap через scan/check/save/transaction, saved-first qualified IDs (до 10), strict valid non-pass fallback, target-local downtime и bounded restoration, frontend-only rollback boundary перед fresh exact-host GGC revalidation/scan. GGC failure отдельно unresolved, Player API не playback. Immutable candidates/committed IDs сохраняются; cleanup/rollback failure fatal. Fake-only tests добавлены; producer не запускал tests/build/network, verification deferred orchestrator. CLI/entrypoint/live runtime не подключены; старый target и Xray не менялись. - Добавлены только reusable recovery building blocks: `listQualifiedCandidates` (known groups, newest-first, limit 1–10, shared qualification rule) и injected exact-endpoint revalidation сохранённых args. Только полный валидный two-TLS 3-pass nonpass даёт `errCandidateNonpass`; malformed/incomplete evidence, scope/args mismatch и infrastructure failures fail closed. Definitions/evidence не меняются, fresh GGC остаётся exact-host. Existing proposal recovery использует общий revalidator; managed recovery adapter, monitor CLI/entrypoint и remote calls не добавлены. Focused local-fixture tests добавлены; producer tests/build/network не запускал, verification отложена orchestrator. - Group-wise managed activation: один или оба qualified frontend/exact-GGC candidate; full desired set (не patch), frontend-only bootstrap до Player API/GGC discovery. Journal v2 сохраняет committed/pending IDs вместе с hash; rollback/crash возвращает прежний список. `managed status` и JSON `managed active-ids` проверяют IDs/groups через DB и exact rendered hash; missing groups явно unresolved. Legacy v1 сохраняет deployment по exact hash без выдуманных IDs; unknown IDs fail closed для supervisor. Player API OK не означает GGC/video playback или full-profile health. Focused tests обновлены/добавлены; tests/build/network отложены orchestrator. Recovery callback, remote apply, текущий target и Xray не менялись. - Добавлен internal `runManagedMonitor(ctx, deps)`: immediate/periodic probe, durable streak/reset, threshold/cooldown recovery через injected callbacks, cooldown от completion при любом результате, fatal DB/lock/finalization errors и cancellable wait. Shared runtime guards выполняются до lifetime nonblocking `flock` в target-owned directory. Одноразовая startup reconciliation под singleton использует schema-v5 PID/starttime API: exact lease снимается только при доказанном dead/PID-reused owner и запускает crash cooldown; live owner остаётся busy, legacy/unverifiable owner — fail closed. Fake-time unit-тесты scheduler core, reset/cooldown, reopen, concurrent start, cancellation и DB/finalization failures добавлены; tests/build/network не запускались в этом increment — verification отложена orchestrator. Actual recovery adapter/monitor command/entrypoint wiring и развёрнутый live target пока отсутствуют; deploy, контейнер и Xray не затронуты. - Добавлены `Dockerfile.target`, ordered target entrypoint и `deploy/managed-target/compose.yaml`: pinned runtime digest, отдельная bridge-сеть, `cap_drop: ALL` и только `NET_ADMIN`, `NET_RAW`, `SETUID`, `SETGID` (nft/NFQUEUE, raw send и смена UID/GID nfqws2), новый private bind `./target-state`, отдельный gitignored `.env`, SOCKS TCP/UDP только на host loopback (default 11080), внутренний health proxy 1080; SS port не опубликован. Startup: ss-server/ss-local → listener → managed init (status при recreation) → zapret2 start; shutdown ограничен target-local процессами/firewall. Только deployment definition и process supervision, не autonomous monitor/recovery. Compose config/tests/build/pull/run/remote producer не выполнял; проверка отложена orchestrator, runtime gates открыты. - Усилен guarded manual CLI `managed init|status|apply`: exact role `managed-test`, fixed ID `zapret-autotune-managed-v1`, provisioned runtime marker/base executables и private dedicated mountpoint `/var/lib/zapret-autotune/target` обязательны для всех команд. `ZAPRET_CONFIG` допускает только `/var/lib/zapret-autotune/target/config`; standalone full config разрешён только в новом target-owned volume, не поверх существующего service config (include fragments не реализованы). Proxy обязан совпадать с `socks5://127.0.0.1:$SOCKS_PORT`; проверяется ownership listening socket процессом `ss-local`. Старый контейнер/произвольный каталог/loopback proxy не проходят guards. Добавлены injected unit-тесты отказов и fresh-target success; transaction engine и shell config safety не изменены. Tests/build/network этого increment отложены producer; контейнер, deploy, remote и Xray не затронуты, image/config-loading compatibility ещё не доказана. - Добавлена foundation schema v4 и owner identity schema v5: durable policy state по stable service ID, last probe/streak, recovery lock и cooldown. Операции с injected time атомарно записывают probe и захватывают recovery только при threshold/истёкшем cooldown/свободном lock; завершение требует точный ownership token и запускает cooldown от completion time. Stale/duplicate finish не меняет новую lease; crash сохраняет lease до PID/starttime-safe reconciliation под exclusive singleton, с новым crash cooldown. Проверка текущей v5 интеграции отложена orchestrator. - Добавлен одноразовый `health youtube`: bounded Player API-запрос только через loopback SOCKS (`ZAPRET_AUTOTUNE_SOCKS_PROXY`, default `socks5://127.0.0.1:11080`), без ambient proxy/direct fallback. Health требует `playabilityStatus.status=OK`, не streaming URL и не playback. Config валидирует video ID (default `dQw4w9WgXcQ`), interval `5m`, failure threshold `3`, cooldown `30m`. `go test ./...`, `go build` и `git diff --check` прошли для обоих последних increments. - Добавлена тестируемая transaction foundation для target-owned config: только квалифицированные stored candidates, separate frontend/exact-GGC profiles, versioned durable journal/backup, atomic replace, injected daemon reload + Player API post-check, rollback и crash reconciliation; external config drift fail-closed. Renderer не сохраняет wildcard GGC scope. На момент foundation CLI ещё не вызывал apply; теперь manual adapter есть, target config/runtime ещё не проверены. `go build` и повторный `go test ./...` прошли для foundation; первый test run поймал прежний flaky `TestRunBlockcheckCancellation/kill` process-state race. - Завершён удалённый ручной GGC scan для `rr16---sn-n8v7znsz.googlevideo.com`: TLS 1.2 — 1 525 рабочих стратегий, TLS 1.3 — 800. Shortlist check нашёл 20 проходящих вариантов; точная объединённая стратегия `--lua-init=fake_default_tls=tls_mod(fake_default_tls,'rnd') --payload=tls_client_hello --lua-desync=multidisorder:pos=2,midsld:seqovl=1:seqovl_pattern=fake_default_tls --in-range=-s1 --lua-desync=oob:urp=midsld` прошла по 3/3 для TLS 1.2 и TLS 1.3. Результат относится только к указанному hostname; не означает playback/SABR и не применялся. - Добавлена proposal-only команда `recover googlevideo --video-id ID --proxy socks5://HOST:PORT`: discovery одного свежего exact host → qualified schema-v3 сценарии newest-first → combined TLS1.2/1.3 3/3 точных сохранённых args. Первый успешный сценарий сохраняется новым immutable candidate/run и выдаётся как NOT ACTIVE без scan. Только отсутствие eligible candidates или валидные non-pass результаты разрешают обычный scan на уже найденном host; infrastructure/malformed-report ошибки fail closed. Apply/monitor и удалённый scan не затронуты. - Unit-тесты recovery порядка, fresh-host scope, short-circuit, fallback и fail-closed ошибок прошли; локальные `go test ./...`, `go build` и `git diff --check` успешны. - CLI на Go: `tune youtube`, `tune googlevideo --video-id ID --proxy socks5://HOST:PORT`, `recover googlevideo --video-id ID --proxy socks5://HOST:PORT`, `discover youtube`, `health youtube`, `status`, `history`, `strategies youtube`, `render`, `managed init|status|apply|monitor`. `check youtube` пока намеренно отказывает; managed activation/monitor только внутри designated target, rollback автоматический; command/entrypoint интегрированы, runtime verification отложена. - Proposal-only GGC pipeline: Android 21.02.35 discovery через явный proxy → scan TLS1.2/1.3 только одного найденного hostname → data-transfer shortlist (`--take 10 --passes 3`) → проверка точной комбинации 3/3 на обоих TLS → один инертный профиль с exact-host фильтром. Ранжирование по blockcheckw, не Selectel. SQLite v3 атомарно сохраняет googlevideo candidate и оба endpoint×TLS evidence; отдельный additive journal сохраняет failed runs. `history` и `strategies youtube` показывают точный endpoint/group; `status` пока относится только к frontend journal. - Добавлены injectable unit-тесты GGC success/order/scope/filter/persistence, обязательных флагов, discovery failure, неполной/неуспешной combined проверки и fail-closed DB. После исправления exact-host фильтра `go test ./...`, `go build` и `git diff --check` прошли локально. Полный новый `tune googlevideo` ещё не прогонялся удалённо. - `tune youtube` сканирует frontend `youtube.com`, проверяет shortlist через `blockcheckw` и выдаёт один TLS-профиль только после совместной проверки TLS 1.2 и 1.3 по 3/3. Это предложение конфигурации, оно ничего не применяет. - SQLite без CGO: миграции до схемы v3, атомарное сохранение успешных/неуспешных tune-запусков, SHA-256 fingerprint нормализованных аргументов, `status`, read-only `history` и список предложенных стратегий. v3 добавляет неизменяемые определения кандидатов и evidence по endpoint/protocol без active-состояния; старые предложения не переносятся в кандидаты. База и каталоги создаются с ограниченными правами. - `discover youtube --video-id ID --proxy socks5://HOST:PORT` делает запрос к YouTube Android Player API, валидирует `serverAbrStreamingUrl` и выдаёт только hostname из `googlevideo.com`; подписанный URL не выводится. - Проверки кода после последних изменений: локальные `go test ./...` и `go build` прошли. Docker build проходил после добавления SQLite-зависимости и исправления `.dockerignore`. ## Проверено удалённо - Read-only инвентаризация Docker-хоста: Docker 29.8.2, kernel 6.8.0-146-generic; используемый zapret2 image `vernette/ss-zapret2:v1.0.2` доступен по digest `sha256:ba158180f27cd71a291ee521c291490374fd3fcf2f81eb1434ddfb19d35de45b`. Текущий target остаётся отдельным и нетронутым. Новую сеть/контейнер ещё не создавали. - В этом image digest доступен `/usr/bin/blockcheckw` версии 0.9.0; это позволяет отдельно проверять его наличие/версию для нового target image, но пока не доказывает route equivalence или безопасную совместную работу scan с активным proxy. - Ранее frontend-комбинация прошла `blockcheckw check` на `youtube.com`: TLS 1.2 — 3/3, TLS 1.3 — 3/3. Ручная проверка YouTube oEmbed через SOCKS также прошла. - Player API-запрос через SOCKS `localhost:1080` вернул `playabilityStatus=OK` и динамический `googlevideo.com` hostname. - На одном найденном GGC hostname текущая статическая стратегия `fakeddisorder:pos=midsld:tcp_flags_set=SYN` прошла data-transfer check 3/3 для TLS 1.2 и TLS 1.3. Frontend-комбинация на этом GGC hostname не прошла; frontend и GGC требуют отдельных профилей. - Отдельный Selectel speedtest с SNI `googlevideo` был проверен экспериментально, но **не используется** для ранжирования: принято решение доверять TLS/data-transfer результатам `blockcheckw`. ## Исторические незавершённые работы (на момент записи) - Scan и shortlist check завершены, контейнер `zapret-autotune-googlevideo-scan` остановился с кодом 0. Проверка exact combined args прошла; `tune googlevideo` не запускался end-to-end и результаты вручную в SQLite не импортировались. - Новый отдельный `tune googlevideo` proposal-only и не меняет frontend-only `tune youtube`; удалённый end-to-end запуск команды ещё не выполнен. ## Исторические ограничения (на момент записи) - Проверка реального YouTube video-transfer/SABR. Прямой GET `serverAbrStreamingUrl` возвращает `sabr.malformed_config`; hostname discovery и `blockcheckw` data-transfer checks не равны проверке воспроизведения видео. - Guarded managed CLI/monitor интегрированы внутри designated target: transaction core, bootstrap/recovery callback и deployment definition есть, но нет proven image/runtime compatibility, выполненного container provisioning и реально запущенного managed target. Одноразовый Player API health сам не запускает live automation. Цель: новый отдельный prod-like zapret2-ss контейнер только в тестовой среде; существующий контейнер не трогать. Стабильный настраиваемый loopback SOCKS для Xray; Xray config вне scope. Перед runtime пройти route/rollback gates. - Полный сервис из требований: YAML-конфигурация сервисов, endpoint-история/покрытие, daemon/периодический мониторинг, API/метрики и multi-service режим. ## Исторические следующие шаги (текущие gates указаны выше) 1. Проверить новый `tune googlevideo` и `recover googlevideo` end-to-end на удалённом сервере; отдельно решить, как импортировать или переиспользовать уже полученные scan результаты без повторного перебора. 2. Воспроизводимое описание отдельного prod-like target добавлено в `deploy/managed-target`; orchestrator должен проверить Compose syntax. Build/run отложены. До запуска проверить baseline-конфиг и NFQUEUE внутри container network namespace; текущие mounts, сеть, порты и конфиг не переиспользовать. 3. Проверить готовый manual managed CLI на новом изолированном target; подтвердить shell config rendering, config binding, full firewall/daemon restart и pre/post health. 4. Проверить bootstrap/recovery callback и новую CLI/entrypoint интеграцию focused tests/build. Startup singleton reconciliation уже есть; live runtime ещё не проверен. До deployment проверить shutdown grace: bounded rollback/restoration может потребовать больше текущих 45s; Docker definition в этом increment не менялась. 5. До autonomous mode доказать safety gates из `Architecture.md`: изоляцию target, эквивалентность managed SOCKS пути, версионирование, atomic activation/rollback и crash recovery. 6. Отдельно определить реальную video/SABR-проверку и traffic budget; API health не равен playback и не обнаруживает все GGC playback failures.