232 lines
68 KiB
Markdown
232 lines
68 KiB
Markdown
# Прогресс реализации
|
||
|
||
Срез на **2026-10-14**. Этот файл описывает фактическое состояние кода, а не весь объём требований из `Requirements.md` и `Architecture.md`.
|
||
|
||
## Текущий статус
|
||
|
||
### Generic periodic monitor fault acceptance: narrow PASS, not autotuning/READY
|
||
|
||
- Supplied orchestrator-verified privileged read of `/home/agent/zapret2-autotune-monitor-5c85f3f/field-private/report.safe.json` covers `4efc066` plus **`5c85f3f0b9ef04e600f67593d02cae526fac901a`**. Not independently reread here; native full/race checks and independent security review were reported GO. This docs-only update performs no probes/deployment; later docs commits are not tested source.
|
||
- Actual periodic monitoring ran **without SIGSTOP**: latest window 21:50:22–21:54:30 retained PID132 and three rows across two services (alpha stable/flaky, beta slow). Healthy rows progressed while flaky was DEGRADED, then repair made all healthy; earlier `4efc066` ran stably for 305s with independent failure/retry and valid reload/removal.
|
||
- Snapshot/key inode replacement, wrong UID/mode, symlink, corrupt/missing files and readiness tampering yielded **BLOCKED, stale=true**; private DNS/SNI/server counters were unchanged during faults. Invalid source/wrong ownership made zero DNS requests. Foreign bytes/unknown files were preserved; original-inode/operator repair resumed the same PID. Root wrong-owner field test passed (local unit case skipped).
|
||
- Public state was authenticated with a private 32-byte root-owned mode0600 HMAC key; secret-marker/address scans were clean. Idle 30s left content/inode/mtime unchanged. Cancelling an actual active curl left the unfinished row's LastCompleted/Failures/NextDue untouched; completed rows remained durable.
|
||
- Graceful stop: **1.45s**, exit0, all owned PIDs joined and network namespace gone; restart PID121 accepted HMAC/prior rows, force-recreate PID126 retained the state-directory inode and accepted HMAC. Additional stops: 0.59s/0.57s. Offline native worst-case cleanup verifies bounded final reaps within 90s, not a measured remote 80s worst-case wait.
|
||
- Strategy config/journal hashes were unchanged. Old SS1080, stopped proxy and unrelated stopped RC11082/exit78 were unchanged; legacy YouTube exit78 is **not fixed**. HEALTHY means **CHECKS_ONLY**, not generic strategy recovery, whole-production READY or full P0 acceptance.
|
||
- Periodic controller/state/status/reload/independent retry foundations are DONE. Next P0: actual per-domain qualification matrix, then runtime coverage/profile groups, renderer transactions and saving multiple qualified candidates; generic strategy DB/migration/apply remain TODO. Prometheus P1 docs were researched, but no metrics code exists; future labels must stay bounded to configured IDs/enums.
|
||
|
||
### Declarative resource-check acceptance (2026-10-13): check-only PASS, not controller acceptance
|
||
|
||
- Supplied orchestrator-verified remote evidence binds source **`4d7c4b33c36186d43ea89fd24354b1834b21692c`** to image **`sha256:be5a1c45c6d40b390a29bfc9a5ab3975c3a8e0c015b98a524696312807dad9a4`**. Private report: `/home/agent/zapret2-autotune-resources-4d7c4b3/field-private/final.safe.json`; privileged-read by the orchestrator, **not independently reread here**. Reported `checker_gates_passed=true`; later documentation commits are not the tested source. No new network checks or deployment accompany this update.
|
||
- JSON v1 schema/loader and executable HTTPS GET/HEAD checks are unit-verified and now remotely accepted: public GET/HEAD on TLS1.2/1.3; private opt-in plus CIDR with a staging-only trusted test CA, original TLS/SNI hostname and numeric CONNECT pin. No `--insecure`, production trust-store pollution or DoH implementation change. Checks reuse the owned SS/configured wire-DNS backend; the earlier DoH outage acceptance recorded below remains separate evidence.
|
||
- Default/private-policy, mixed DNS answers, metadata/link-local/ULA/loopback denials made **zero destination connections**; rebinding used the first pinned address and denied the later answer. Ownership-negative cases made zero DNS/resource probes. Cancellation exited1 with joined workers in **0.38s**; the secret sentinel was absent from argv, output and persisted artifacts.
|
||
- **Check-only isolation:** staging YouTube monitor was SIGSTOP-isolated during checks, then SIGCONT-resumed **before** graceful stop; reported `monitor_resumed=true`, Docker exit0. Cleanup left zero owned host PIDs, no owned namespace or temporary containers/networks, and an unchanged foreign baseline. An earlier existing managed monitor **exit78** contributed before isolation: this does **not** prove whole-controller resilience, generic recovery or production availability. LIVE11082 was already **stopped** before the task and was **not upgraded or restarted**; old SS1080/Xray were untouched. Earlier LIVE snapshots below are historical, not current uptime claims.
|
||
- At this earlier check-only acceptance, periodic integration was pending; the narrow controller/BLOCKED foundations are now accepted above. Remaining P0: config/strategy DB integration, matrix and plugins/autotuning; maximum strategy collection and Prometheus P1 remain TODO. Three-CDN qualification belongs to the YouTube adapter, not every arbitrary service. See [MANAGED_TARGET.md](MANAGED_TARGET.md#declarative-https-resource-checks-v1-check-only) and the tracked [resource-check.example.json](resource-check.example.json).
|
||
|
||
### Managed DoH acceptance (2026-10-13): live DNS path and staged outage verified, NOT READY
|
||
|
||
- Managed target defaults to the stdlib Go UDP/TCP loopback DoH forwarder; PID 1 validates owned readiness before ss-server `-d 127.0.0.1:5353`. SOCKS remote-hostname traffic and managed `socks5h` checks share this path. Provider URL/bootstrap IPs/timeout are private-env configurable; explicit native mode alone preserves legacy DNS, never automatic fallback.
|
||
- DNS stays available during monitor restoration, zapret stop and SS joins, then is terminated/joined with a five-second watchdog and readiness cleanup. DNS child death uses existing bounded retries; upstream failures return SERVFAIL without stopping the forwarder. No host DNS port, global DNS changes, new dependency or capability.
|
||
- Security follow-up: PID 1 retains directory/readiness inode descriptors for validated owned cleanup after graceful exit or SIGKILL; foreign/stale/replaced markers are preserved and fail closed. Compose passes empty bootstrap by default, allowing Google defaults only for the exact Google URL; custom URLs require explicit IPs.
|
||
- Earlier offline shell lifecycle/static/config fixtures (real readiness CLI with inherited anchors), sh/bash syntax checks, full Go and targeted readiness/entrypoint race checks passed as previously reported. Coverage includes foreign regular/symlink preservation, SIGKILL owned cleanup/retry, custom-provider Compose validation, signal/cooldown cancellation and DNS-last cleanup. This docs-only update adds no source/runtime changes or probes and does not rerun the Go suite.
|
||
- Supplied verified reports bind DoH implementation `367d956`, TCP reply deadline fix `721cad4`, and explicit public-health `socks5h` fix **`544dda7c85965fc3200de3af17fca9ef9999b2ce`** to LIVE image **`sha256:b3085b7ceca4a629c28bd58f23bf97f02a34c2a38df08b57756e40594ba2d427`**, container **`4ad54175a54c`**, owned SOCKS **`127.0.0.1:11082`**. Private reports: `/home/agent/zapret2-autotune-rc-doh-721cad4/live-upgrade-private/`, then latest `/home/agent/zapret2-autotune-rc-doh-544dda7/live-upgrade-private/`; not independently reread here. Later documentation commits are not the tested source.
|
||
- Real isolated staging blocked **both** bootstrap IPs for **61 seconds**: UDP and TCP replies returned SERVFAIL (rcode2) at about **5000ms**; DNS, monitor, SS and root PIDs stayed unchanged, with zero external port53 traffic. After removal, DNS recovered immediately and WWW HTTP200 was verified after **46 seconds**, without process restart. Graceful stop took **1 second**, exit0, no survivors. This proves the tested DNS dependency outage, not every conceivable outage or nonconfiguration guard behavior. Staging-only nft fault rules were removed; no new runtime firewall policy was added beyond normal generated native rules.
|
||
- LIVE **303-second** measured snapshot: same root and children DNS22, SS59/60, monitor253, all children PPID1; owned readiness ACK and PID1-held FD8/9 anchors were positive. UDP/TCP DNS IDs and questions matched, rcode0, answer counts2/8. SOCKS greeting `0500`, WWW HTTP200/SSLVerifyResult0, and configured `health youtube` exit0 passed. Wire evidence counted **41 marked DoH connections**, zero external port53; direct HTTPS sockets use mark **`0x50000000`** to bypass live/probe NFQUEUE. Scope `suffix`, generation9, IDs `[1,9]`, config hash preserved versus staging are measured snapshot values, not universal constants: autonomous state has advanced since an earlier generation8 observation.
|
||
- Existing normal shared GGC qualification remains separate proof; no new 18-transfer qualification under DoH is claimed. Fresh media TLS1.3 returned HTTP206/65536 bytes/MP4 `ftyp`/SSLVerifyResult0; TLS1.2 timed out and is **not qualified**. Avatar and thumbnail qualification remain independent outstanding gates; no full-service READY claim. Maximum strategy collection and generic service integration remain future work, not a new framework.
|
||
- DNS configuration is the private mode0600 LIVE `/home/agent/zapret-autotune-cleanops-3fc8563-1791882112/.env`; the four public DNS keys and defaults are documented in the deployment guide. URL/bootstrap come from env, never argv; changing DNS requires official Compose recreation under the controlled PID1 lifecycle. Credentials/private env and state were preserved. Staging cleanup left no new running test containers; the old user SS1080 and user-stopped proxy were unchanged.
|
||
- Default `https://dns.google/dns-query` selects literal `8.8.8.8,8.8.4.4` bootstrap only when missing/empty; custom endpoints require explicit IPs. TLS is verified, with no system-DNS, proxy or plaintext fallback; native mode is manual and explicit only. The direct DoH resolver sees queries: they are **not SS-tunneled**. Plaintext UDP/TCP exists only at internal loopback5353. IP-transmitting SOCKS clients using local DNS are outside this guarantee; use remote DNS/`socks5h`. The existing Go binary supplies the stdlib forwarder, no dependency or extra container, bounded to 4096-byte queries, 65535-byte replies, 8192-byte HTTP headers and 16 workers, with no forwarder cache.
|
||
|
||
### Autonomous three-CDN field acceptance (2026-10-13): media qualified, NOT READY
|
||
|
||
- Supplied field results for source `3fc8563995e890310580ba8f78850b92fea42136`, managed `Dockerfile.target` image `sha256:a902e4efd949a7ffce4414fd99ab4a815a643b40cf9b9e30e2bd2db7b452817a`, container `4c6b34…`, Compose project `rc0398e6f…`, isolated SOCKS `127.0.0.1:11082`. This documentation update performs no deployment or network probes. Private sanitized artifact: `/home/agent/zapret2-autotune-rc-3fc8563/field-private/proof/final.safe.json`; its contents are reported by the orchestrator, not independently reread here. Later docs commits are not the tested image source.
|
||
- From the existing 08:01:50 cooldown state, native recovery ran naturally at 08:07–08:09 without resetting cooldown. Missing/blank `ZAPRET_AUTOTUNE_GOOGLEVIDEO_VIDEO_IDS` selected primary `dQw4w9WgXcQ`, `aqz-KE-bpKQ`, and `jNQXAC9IVRw`. The program discovered three actual ordinary signed-media hosts without manual domains; VideoIDs are inputs, not CDN evidence.
|
||
|
||
| Actual discovered host | TLS1.2 steady media | TLS1.3 steady media | Separate warm attempts / failures |
|
||
| --- | --- | --- | --- |
|
||
| `rr16---sn-n8v7znsz.googlevideo.com` | 3/3 | 3/3 | 2 / 0 |
|
||
| `rr18---sn-n8v7zns6.googlevideo.com` | 3/3 | 3/3 | 3 / 1 |
|
||
| `rr5---sn-n8v7kn76.googlevideo.com` | 3/3 | 3/3 | 3 / 1 |
|
||
|
||
All **18 post-warmup transfers** returned HTTP206, valid Range `0..65535`, 65536 bytes, MP4 `ftyp`, and valid SSL verification. Warm failures are separate, not cold qualification. Fresh version-1 `owned-nfq-media-range-v1` attestation in Adaptive mode retained actual host/endpoints, source IDs and native-owner Lua binding; proof checked at `2026-10-13T08:08:28.752Z`, with three roots and three prefixes. Native request statistics were not persisted: manual request count is unknown, not zero or an invented total.
|
||
- The operator automatically **PROMOTED** one newly qualified Adaptive candidate10: generation9→10, active IDs `[1,3,9]`→`[1,9,10]`, scope `experimental_googlevideo_suffix`→`suffix`, current config hash prefix `dc997ac91…`. Common hostlist `googlevideo.com`, frontend1 and thumbnail9 were retained. Qualification and fresh deployed checks used the transaction-bound apply safety path (asset/frontend hooks have source test coverage). This qualifies the measured representative three-CDN composite profile, not every Googlevideo host, cold behavior, or a maximum strategy catalogue. The shared profile remains two native strategies with per-host learning.
|
||
- Final reported snapshot at **08:21:48**: container running and monitor alive; whole-service health still false / **DEGRADED, NOT READY**. Probe failures reached405 at 08:20:37; their avatar-specific cause was not independently measured in this phase. The prior day's avatar timeouts are historical, not today's diagnosis. The orchestrator's fresh owned-SOCKS check returned `0500`; role-owned `socks5h` uses native SS DNS `8.8.8.8`. The passive SSH watch session vanished after about ten minutes: no normally completed 18-minute watch or interruption of the controller is claimed.
|
||
- Remaining: actual avatar/service health qualification, maximum strategy collection and broader search diversity, and controller security/global-failure stay-alive policy (current safety guards remain fatal). Generic periodic per-service failure isolation/controller integration remain future requirements; declarative check-only configuration is accepted above, not a new plugin framework. No further build, probes or cooldown changes accompany these docs.
|
||
|
||
### Autonomous three-CDN source behavior (2026-10-13)
|
||
|
||
- User reaffirmed **three actual CDN checks**, discovered by the program without
|
||
manual domains; the earlier single-CDN/version-2 proposal is withdrawn. Missing
|
||
or empty service-mode VideoID inventory selects primary (default `dQw4w9WgXcQ`)
|
||
plus `aqz-KE-bpKQ` and `jNQXAC9IVRw`, deduplicated. A nonempty 1..5 unique-ID
|
||
override is respected; three videos do not prove three CDN hosts.
|
||
- Fresh discovery runs up to three round-robin rounds, at most 15 requests in
|
||
three minutes; it deduplicates actual signed ordinary MP4 hosts, requires
|
||
twenty-minute remaining URL TTL, and selects three hosts across at least two
|
||
roots and two prefixes. The unchanged version-1 owned native proof factory
|
||
requires actual post-warmup media 3/3 on both TLS protocols at each endpoint.
|
||
Common Googlevideo suffix authorization is extrapolative, not all-host evidence.
|
||
- Existing experiments can now seek promotion through that shared qualification
|
||
path, then frontend and fresh deployed three-host media checks under the current
|
||
transaction/ownership guards. Insufficient inventory leaves the experiment
|
||
committed and retries at configured cooldown; genuine strategy exhaustion keeps
|
||
its minimum two-hour pause. Missing avatar does not block the media stage;
|
||
whole-service monitoring remains DEGRADED until actual avatar health passes.
|
||
Legacy service-off/exact-host behavior and cancellation safety remain unchanged.
|
||
- The source was unit/fixture-tested and subsequently field-accepted for the
|
||
representative media promotion recorded above; whole-service/avatar acceptance
|
||
remains open. Earlier statements below that automatic qualification is
|
||
unimplemented describe historical RCs, not this source; historical measurements
|
||
are not the new owned factory evidence.
|
||
- Maximum strategy collection and PID1 global-failure stay-alive are still future
|
||
increments; broad maximum-profile live staging is deferred. Declarative checks
|
||
are accepted above; generic service controller integration remains future work. Details:
|
||
[GOOGLEVIDEO_DISCOVERY.md](GOOGLEVIDEO_DISCOVERY.md).
|
||
|
||
### Final managed RC field acceptance (2026-10-12): DEGRADED, not READY
|
||
|
||
- Supplied final field results, not network checks rerun by this docs update: source `fd25cb89398300bb9849db4b5511af75bf86eccf`, correct managed image `sha256:73e955e7fdc6efaef88c62ebe4f7afeab71c29d29ba3c88b2a2b7547bb647da5`, active container `a4e845a6d7…`, official managed PID 1, isolated SOCKS `127.0.0.1:11082`. The earlier `37823…` prototype image is **not active** and is not this acceptance image. Private sanitized proof: `/home/agent/zapret2-autotune-rc-fd25cb8/proof/final.safe.json`. The later docs commit is not the tested image source.
|
||
- Watch started `2026-10-12T20:15:07.686Z`; check at `2026-10-12T20:30:54.826Z` completed over 15 minutes with DockerRestartCount0 and monitor alive. A fresh orchestrator check after the report returned SOCKS greeting `0500` and WWW HTTP200 with SSLVerifyResult0. Managed `socks5h` probes respect native SS DNS `-d 8.8.8.8`; no local-resolution bypass or certificate bypass is claimed.
|
||
- At this observation, experimental journal generation9, IDs [1,3,9], hash prefix `0e34…` and covered scope were retained unchanged. Saved candidate3 remains experimental, without qualification/evidence. These are snapshot values, not universal IDs/generation. Runtime recovery classification accepted validated peer-TLS/payload rejections as nonpass, with writable-store/ownership guards and the current job-bound transaction hooks intact. Genuine no-qualified-strategy recovery advanced its cooldown **naturally** while the monitor stayed alive; no cooldown reset or fabricated ERROR/source result was used. This validates degraded recovery continuation, not successful avatar repair or family promotion.
|
||
- Fresh actual Range media results, **post-warmup**, not cold qualification:
|
||
|
||
| Sampled hostname | TLS1.2 | TLS1.3 |
|
||
| --- | --- | --- |
|
||
| `rr4---sn-axq7sn7z.googlevideo.com` | 3/3 | 3/3 |
|
||
| `rr5---sn-n8v7kn76.googlevideo.com` | 3/3 | 3/3 |
|
||
| `rr18---sn-axq7sn7z.googlevideo.com` | 3/3 | 3/3 |
|
||
|
||
All **18** transfers verified HTTP206, 65536 bytes, MP4 `ftyp` and valid Range `0..65535`. Separately, initial TLS1.2 warmup had three timeouts; initial TLS1.3 warmup had three passes. Three hosts across two roots provide representative field transfer evidence only; no cold/all-host or durable family qualification was created. The older rr5 `sn-ixh` counterexample was **not tested** here and is not resolved by the new rr5 `sn-n8v7kn76` sample.
|
||
- Thumbnail `i.ytimg.com`: JPEG, 2888 bytes, SSLVerifyResult0, decoded 3/3 on each TLS protocol. Fresh watch metadata discovered an allowed exact `yt3.ggpht.com` avatar URL, but actual avatar transfers returned curl28 on both TLS protocols, zero samples. No saved avatar evidence or qualified avatar profile exists. Overall live health remains **DEGRADED / NOT READY**; URL discovery and successful media do not close the avatar gate.
|
||
- Other production/test targets on 1080/11080/11081 retained their IDs/start times; Xray was untouched. No further remote operations accompany this docs update. Build explicitly with `-f Dockerfile.target` and assert the managed entrypoint plus target marker **before promotion**: a tag alone previously mistook root `Dockerfile`'s prototype for the managed image.
|
||
|
||
Remaining work: actual avatar transfer/strategy qualification, then durable representative multi-host family qualification and mode acceptance. Automatic family qualification is not implemented; no experimental candidate was promoted. Restart/recreation observations from older RCs remain separate from this final 15-minute watch. The historical open-media/fallback/deployment labels below are superseded only by the specific final results above, not by blanket production approval.
|
||
|
||
### Earlier peer TLS rejection classification fix (2026-10-12)
|
||
|
||
- Follow-up independent production repro exposed a separate decoder rejection bug: a bounded/origin-verified truncated image degraded live health but failed owned verification as infrastructure before remaining seeds. Image decoding now emits typed payload rejections (invalid magic/dimensions, truncated PNG/JPEG/GIF, body budget and content-type mismatch); both live health and candidate verification share that class, without accepting any payload or fabricating evidence. Missing/corrupt normalized evidence, malformed transfer metrics/Player JSON, arbitrary same-text errors, explicit guards and mixed cancellation remain fatal; image rejection cannot become media absence. Permanent production monitor tests cover joined workers, seed exhaustion/two-hour pause and a later seed's fresh both-TLS 3/3 evidence with preserved frontend/GGC profiles. The independent overlay repro, affected Go tests and race tests, vet, CLI build and diff checks passed locally; no remote deployment was performed.
|
||
|
||
- Read-only field inspection: RC source `50a78608ce40dfc26289b5a63d01eeb3fc569ace`, image `sha256:1a97f34cfbe3bd606d5fb13599767f8a51273b374fa441f5e67802c74d814701`, container `d361b5d581bf710af28f14d3998d6a9a699661b827248c12c9352182df94f98d` is now exited78 (finished `2026-10-12T18:44:23.941802233Z`); host port11082 has no TCP listener. The earlier `proof-v2/final.safe.json` observation at 18:44:10 reported it running, so it is not current uptime evidence. Private artifacts: `/home/agent/zapret2-autotune-rc-50a7860/proof-v2/`.
|
||
- That safe collector evidence contains a fresh allowed avatar URL, avatar TLS1.2 curl60 and TLS1.3 curl35, both zero samples/FAIL with generic fatal wrappers; thumbnail and sampled media passed. Terminal safe logs subsequently show avatar degradation, **thumbnail** degradation, recovery failure, and the generic safety/database/runtime terminal branch. They do not identify the exact terminal underlying error: do not claim avatar TLS alone is proven to have caused exit78 or that a real local guard failed.
|
||
- Source fix distinguishes validated resource-curl peer TLS rejection (35/51/60) from process-wide operational safety. It remains rejected/unqualified, with certificate verification, origin checks and SSLVerifyResult=0 qualification unchanged. Probe/recovery can remain DEGRADED; genuine exhausted asset verification enters the existing minimum two-hour pause with workers joined and committed profiles preserved. Local proxy connection7, client-certificate configuration58, unknown/mixed cancellation and explicit guard/cleanup failures remain infrastructure/safety failures. No certificate bypass, host pinning, DNS change, family promotion or READY claim.
|
||
- The corrected source has not been deployed or image-qualified. Existing remote containers, profiles and other working ports were not restarted or modified by this fix; a tested new image and renewed actual-resource checks are the next dispatch.
|
||
- Local affected-area verification: managed/resource/experimental/asset/Googlevideo/monitor tests passed normally and under `-race`; local CLI build and `git diff --check` passed. Fixture checks cover production avatar35/60 degradation, owned verification exhaustion and post-apply rejection/rollback, joined workers, durable two-hour cooldown, experimental same-profile media35/60 recovery, and retained local/mixed safety failures. These are not live image acceptance.
|
||
|
||
### 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. 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.
|
||
- **Reported field follow-up for `a60f62d`:** privileged checks passed restart/recreation and covered-versus-qualified status checks. The live upgrade encountered a runner `BrokenPipe` and automatically rolled back to the same last-good image; this is not a successful autonomous media-recovery acceptance. Fresh Range media passed once on TLS1.2, then failed on repeat; no TLS1.3 media PASS is claimed. The underlying field failure remains unknown. These are supplied field results, not network checks rerun by this source update.
|
||
- Avatar discovery now conditionally falls back from a homepage with absent metadata/no allowed avatar to one fresh watch page for the validated configured video ID, on the same trusted HTTPS WWW origin and proxy. Malformed JSON, request failures, cancellation and safety failures do not authorize fallback. Reported watch metadata contained an allowed avatar URL where the homepage did not; the updated fallback has not been field-deployed or image-qualified. URL discovery alone does not qualify the avatar route/profile or close a family gate.
|
||
- Local source verification for the watch fallback: fresh `go test ./... -count=1 -timeout=180s`, focused avatar inventory/parser/classifier, experimental production-probe and private-inventory regression tests under `-race`, and `git diff --check` passed. These are unit/fixture checks only, not new field evidence.
|
||
|
||
Historical acceptance gates at that RC (updated by final field results above):
|
||
|
||
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. Restart/recreation checks are reported PASS for `a60f62d`; renewed learning with repeatable actual media success remains an open gate.
|
||
4. Field-accept the new autonomous same-profile experimental recovery and resource-error classifier without replacing or promoting operator-approved scope. Unit coverage exists; live upgrade/rollback observations do not prove successful recovery. Automatic family qualification is not implemented.
|
||
5. Covered-versus-qualified field checks are reported PASS for `a60f62d`; validate the new conditional watch fallback and qualify actual avatar image transfers separately. 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.
|