Wire pure Player parsing and strict qualification planning through a compiled-in kind/version registry. Fail closed before discovery requests when the required module is absent or mismatched. Require sealed module-bound v2 evidence for new writes while preserving fresh trusted v1 apply eligibility and historical rollback. Keep legacy SOCKS5h routing, separate suffix/asset policy and public configuration unchanged; generic controller cutover and field acceptance remain pending. Co-authored-by: GPT-6 <gpt-6@openai.com>
53 KiB
Resource compatibility planner and isolated qualifier
First collector migration (shared-core parity verified; managed v2 scoped observations)
Private typed response contracts now select generic GET/HEAD, full decoded image, or bounded MP4 range validation inside the existing shared HTTPS transfer core. The redundant legacy forwarding wrapper and media boolean are removed; image and media adapters retain their measurements and GooglevideoPass DTOs. Generic v1 status/MIME/byte expectations use the same validation entry, with a distinct completed-mismatch result retaining the same measured facts. No public Range config, schema, proof importer, registry or dependency was added.
Injected-wire tests exercise the real generic producer and legacy callers, both
TLS versions, normalized byte/hash/timing facts, private stdin/pinning, origin,
redirect, framing, bounds and strict range/ftyp/image decoder rejection. Direct
core tests ensure strict validation is not an unused legacy-only helper.
MP4 requests use Range 0-65535 (a 64 KiB upper bound, not an exact response
size requirement). The core accepts validated 16–65536-byte ranges; the existing
producer additionally requires at least 1024 measured bytes. Content-Range end
and total must parse without overflow, with total greater than end; rejected or
unknown totals cannot produce a media PASS DTO.
This is collector migration only: public schemas and the legacy YouTube producer
remain unchanged, including three discovered CDNs, adaptive A/E, warmup then 3/3
samples on each TLS version, explicit googlevideo.com suffix authorization, fresh
discovery, and independent qualification of image/avatar assets. The legacy path
is retained. Generic GET success is never full YouTube qualification.
Recorded local verification: archived 2149a4a versus current source passed 86
parity subcases; 14 new integration cases, 11 focused EUID-0 serial/race tests and
full Go tests passed (full Go about 55s). Python static/config/startup checks passed;
the long supervision check timed out at 18s and again at 120s and is unresolved.
Do not call all tests green or infer a regression from that timeout: entrypoint
code was unchanged and later full Go entry tests passed. These are prior results,
not reruns in this docs-only update.
Scoped remote shared-core parity (2026-10-15)
Privileged-read evidence: /home/agent/core-runtime-parity-45d28e3-20261015/report.md.
Exact-source baseline 2149a4a and current
45d28e37330069ddf0efa3120fec8a558d37ba7f each passed 48 real curl/HTTPS/SOCKS5h
fixture subtests (24 cases × TLS1.2/1.3). Of the normalized rows, 46 matched and
two intentionally differed: overflowing Content-Range total, formerly saturated
by ParseInt, now rejects without a PASS DTO. Known negative classifications are
preserved; invalid/unknown/overflow totals are not proof.
Coverage includes GET/HEAD expectations and retained mismatch facts, bounds, redirect/framing/trust rejection, real PNG/JPEG/GIF decode and rejection, strict 206 range/ftyp checks, and stdin/argv/result privacy sentinels. Real 65536-byte and 1024-byte media responses passed the same Range request. Each version made 60 SOCKS5h connections/SNI handshakes and 58 authenticated HTTP requests, including 18 actual Range requests; two untrusted-certificate attempts stopped before HTTP. Original hostname/SNI was retained; curl verified a fresh private fixture CA, without TLS bypass. Timing/speed were positive but excluded from exact normalized parity hashes; this is not a performance comparison or fatal-reason-tree parity.
The proxy maps only allowlisted fixture names to a loopback TLS listener: it is not an SS proxy or DoH resolver. NOT RUN: normal public CLI under owned PID1 SS/DoH, managed ownership/guard checks and probe orchestration, NFQ/native behavior, real YouTube discovery/three-CDN qualification, or candidate/apply/monitor flow. No DoH validation or production qualification follows from helper tests. No candidate/PASS/DB/JSON proof imports occurred. Helpers exited and joined listeners; no owned containers/networks were created. Root-private artifacts, keys, manifests and hashes remain retained. Selected foreign identity/running/start facts matched before/after, not arbitrary foreign application-data hashes.
Public typed checks (v2; scoped managed field verification)
resource-check-v2.example.json adds closed kind values http, image and
mp4_range; omitted v2 kind canonicalizes to http. V1 still requires explicit
http and retains its serialization/fingerprints. V2 requires explicit statuses,
content_type, min_bytes and max_bytes. HTTP retains GET/HEAD semantics; typed
checks require GET. Image requires exactly [200] and image/png or image/jpeg,
full decoding, positive dimensions at most 16 MiPixels and a configured body
ceiling at most 5 MiB. Public GIF/omitted image MIME are deliberately deferred
until a decoder with an aggregate frame/pixel budget exists; legacy GIF remains.
MP4 requires exactly [206], video/mp4 or audio/mp4, and 16 <= min <= max <= 65536.
The core always requests bytes 0-65535, even with a smaller max_bytes; actual
returned bytes must fit that smaller bound and the validated Content-Range/ftyp.
This proves a bounded MP4 prefix, not playback or YouTube qualification.
All kinds use configured 100–30000 ms timeouts and byte ceilings, private stdin, strict framing/TLS/origin and all-answer DNS policy through the same public check, periodic monitor, isolated M=3 qualifier and apply-health path. Wire-valid typed semantic failures are complete expectation negatives; unsafe output, malformed metrics/framing, cancellation and ownership failures cannot become benign proof. V2 source and row HMACs bind version, normalized kind and expectations, so old plain-HTTP evidence/state cannot promote typed checks. V1 historical journal reconstruction is unchanged. No public proof import or module framework exists.
Local verification for this v2 slice: full Go tests (-p 1 -parallel 1), affected
resource race tests, vet, CGO-disabled build, four managed-target Python fixtures
and shell syntax passed. Current and archived 45d28e3 each passed the existing
86 legacy adapter/generic-mismatch parity subtests. Privileged tests ran as EUID 0
inside the current user namespace (UID 0 maps to host UID 100000), not host-initial
root. These are local injected-wire/fixture results, not remote network acceptance.
Next let the YouTube adapter supply qualified exact endpoints/dynamic inventory into the generic registry, preserving fresh discovery and the three-CDN contract. Keep measured endpoint proof separate from explicit suffix/adaptive-learning authorization: both capabilities are prerequisites to complete managed migration. No plugin framework, legacy deletion or full controller/journal/profile migration is implied. Full runtime acceptance remains incomplete; avatars and legacy exit78 remain unresolved. No production READY claim.
Managed v2 SCOPED_PASS observations (2026-10-15)
Source cd05e75189f90c32e1346536c50f0973e7105cb3. Privileged reads of
/home/agent/managed-v2-cd05e75-20261015/report.md and
field-private/independent-audit.safe.json record independent closeout at
2026-10-15T12:28:52Z, verdict SCOPED_PASS, with
runtime_state_changed_by_audit: false. These are bounded positive observations,
not unequivocal whole-criterion acceptance, full safety or READY. The static test
binary/image is not a deployment to the user's working SS service. The audit
matched 137 archived product files and the pinned native NFQ engine (1.0.2).
- Official public v2 CLI under owned PID1 SS/DoH exercised PNG/JPEG full decode and video/mp4 + audio/mp4 bounded prefixes, each over TLS1.2/1.3 with verified fixture CA/SNI. Two candidates × four resources × both TLS versions produced 16 M=3 cells / 48 real qualification TLS transfers. Queue-200 worker argv and PID/start matched; exact-payload registry/matrix HMACs, v2 source and semantic row fingerprints were independently recomputed, not imported PASS evidence.
- Official apply reused that proof without requalification: queue 300, canonical
multidisorder, three exact fixture hosts, journal v4 / generation 1 / committed generic. Eight actual typed apply checks and eight initial monitor checks passed. Source fingerprint:cc5a2622133daed58df0b2c22254f6112a3d9da7fbd9391ce7d1c6f467761886; committed config SHA-256:27f9a8ffd56a4c19d4bd522dd9f5a5e8b49b18b0ae48d41431ef9b22975ea772. - Five authenticated monitor snapshots (including initial state) showed truncated
PNG and overflowing video MP4 Content-Range each degrading only its affected
row to
DEGRADED / expectation_failed, then repair restoring all four HEALTHY. Host fixture changes produced real responses; controller PID 379/start 62777447, journal/config/proofs/key/input hashes stayed the same, without requalification. Apply/monitor wire evidence totals 48 transfers (33 healthy-mode, 7 PNG-fault, 8 MP4-fault); fixture timing/size/status is not durable product DTO telemetry. - Dated closeout independently rechecked both official target stops exited 0;
all five recorded owned containers, owned network and 174 recorded PID/start
identities/namespaces were absent. Three foreign raw Docker inspect snapshots
remained byte-identical:
f6c9d42858e1running,4ad54175a54cand8cc36c813d6fstopped. Historical Xray inventory equality is a harness assertion only: its initial raw process inventory was not retained, so it is not independently proved.
Evidence limits: production strict validation, authenticated outcomes and actual fixture metadata establish this scoped typed-response observation. Bodies were intentionally not retained to avoid data exposure and were not independently re-decoded. Actual PID/start/parent/netns/native argv were independently checked; live executable/held-FD snapshots were not retained. ACK/snapshot guards are reviewed code/log enforcement, not a durable live-FD certificate. These missing body/live-FD certificates prevent an unqualified full acceptance claim.
The initial observer misclassified the intentionally live DoH forwarder as an unjoined worker. Original logs/harness remain; the corrected continuation used the SAME proof, with no new qualification. This is a harness assertion correction, not an observed product bug.
NOT RUN in this field campaign: public v1 managed GET/HEAD (86 current/old local parity cases passed, not a remote v1 run); negative M3 qualification, cancellation, freshness/24h expiry or old-matrix rejection; actual YouTube discovery/three-CDN, suffix authorization, adaptive learning, warmup, avatar or playback. New kind/version cannot promote old proofs by local unit coverage, not a fresh remote rejection campaign. MP4 proves a prefix, not playback or an exact 64-KiB body; public GIF remains deferred and legacy GIF retained. Prior full Go/race/Python results are recorded above, not rerun for this docs-only change.
Next minimum slice (design, NOT implemented): a real YouTube/core adapter boundary wrapping existing discovery and strict qualification calls, not a full framework. Core owns networking, limits, proof, persistence and apply; YouTube owns fresh URLs, three-CDN warmup/sampling, per-host adaptive learning and explicit suffix policy. Plan a minimal compiled-in Go registry keyed by kind + version, fail closed for unknown contracts; bind module/policy version into source/proof and preserve authenticated historical restore under its original contract. No dynamic plugin/RPC API exists. Do not generalize public POST/discovery until an actual adapter needs that request contract. Retain legacy functionality until parity and the remaining acceptance gaps are closed before full adapter cutover.
plan remains proposal-only and never changes runtime or config.
Explicit generic startup apply/replay and the per-PID-1 failure latch have passed
bounded remote acceptance with independent privileged verification (see below).
This is not automatic recovery, full concurrency acceptance or production READY.
Explicit isolated qualification temporarily installs an owned NFQ worker and
queue rules, but never changes legacy SQL groups, renderer or apply journals.
Monitor HEALTHY, old SQL measurements and public check JSON are not proof.
Without a completed owned qualification batch, compatibility is UNKNOWN and
hosts are unassigned. No PASS/evidence import is exposed.
Commands require root and the existing managed-test target settings:
zapret-autotune strategy-import --strategies /private/strategies.json
zapret-autotune plan --config /private/resources.json
zapret-autotune qualify --config /private/resources.json --strategies /private/strategies.json --isolated
strategy-import requires an owned, regular, single-link 0600 file. Only
definitions are accepted; duplicate keys, unknown fields and evidence fields
are rejected. Example:
{
"version": 1,
"strategies": [
{
"id": "split-one",
"args": "--payload=tls_client_hello --lua-desync=multisplit:pos=1",
"selectors": {"transport":"tcp","ports":"443","l7":"tls","tls":"both"}
}
]
}
The registry is one immutable batch (1–32 unique IDs). This conservative slice
accepts only TCP/443/TLS selectors and tls12, tls13, or both policy.
Argument whitespace is canonicalized; option/Lua stage order is preserved.
Existing payload/range validation is reused. Lua stages are restricted to
fake, multisplit, multidisorder, fakeddisorder, split and disorder; parameters
to pos, repeats, tcp_ts, tcp_flags_set, seqovl and blob=fake_default_tls.
File/inline Lua, queue/user/fwmark/filter options and arbitrary stages are
rejected. Acceptance of a definition is not runtime verification.
The private target directory holds .resource-plan-key (32 random bytes),
.resource-plan-strategies.json and, when an owned producer exists,
.resource-plan-matrix.json. JSON envelopes have payload and an HMAC-SHA256
mac. Each file is write-once, owned, 0600, no-follow, single-link and bounded
to 64 KiB. Held directory/file identities and exact snapshots are checked;
foreign entries, replacement inodes and modified bytes are never clobbered or
silently adopted. Interrupted writes remain blocked for explicit operator
repair. There is no automatic rotation/update/repair in this slice. The private
key and same-UID/root boundary must be protected: HMAC is not protection from an
actor who can read the key and replace the whole target state between processes.
Matrix v1 binds the registry digest and at most one completed run per candidate. Each run binds ID, definition digest (canonical args and selectors), keyed config fingerprint, start/completion milliseconds, resource/TLS outcomes and keyed resource fingerprints. Its attestation records collector/runtime, definition digest, composite executable/Lua input hash, installed rules hash, actual worker-argv hash, queue and worker PID/start identity, plus restored/joined completion. No URLs, headers, resolved IPs, bodies or raw errors are persisted. A nonserialized producer seal protects the completed in-memory snapshot against mutation before publication. Only the owned producer and test-internal fixtures create seals; JSON DTOs cannot authorize publication. Every resource/protocol cell records exactly three actual attempts; any nonpass in those attempts makes the cell negative (never an average or partial PASS).
plan loads only authenticated private state and the existing resource-config
snapshot (including resolved environment secrets, DNS/proxy and private headers
in keyed fingerprints). Every resource on an exact host, across all services
and input group labels, must have matching complete results for every required
TLS protocol. Complete failed checks are negative; missing, expired (24 hours),
future, mismatched or partial checks are unknown. Changed config invalidates old
run evidence. Malformed/unauthenticated state yields blocked, unassigned output
and exit 78; valid missing evidence yields unknown output and exit 0.
Output contains proposal_only, evidence (authentication status, not
health), per-host validated/negative/unknown candidate alternatives,
assignments and unassigned. Compatible equal args/selectors merge coverage
across input labels. Greedy greatest-uncovered coverage, then lexical candidate
ID, produces deterministic disjoint exact-host assignments. It does not claim
global optimality or suffix coverage. Explicit legacy YouTube suffix policy is
unchanged.
INTRUSIVE / ISOLATED startup only
Set both ZAPRET_AUTOTUNE_QUALIFY_CONFIG and
ZAPRET_AUTOTUNE_STRATEGY_CONFIG to container paths on a dedicated target.
Do not send working user traffic to this target's published SOCKS port. This is
not noninterrupting background search. Provision the private resource and 0600
strategy files separately; compose forwards paths but does not mount files for
you. Start with the managed disabled baseline, not an existing active profile.
Qualification v1 accepts lowercase DNS hostnames, not literal IP targets; the
ordinary resource-check command's broader literal-IP policy is unchanged.
PID 1 starts its owned SS+DoH services, initializes/reconciles known state, then
launches one finite qualify ... --isolated session instead of starting the
live zapret daemon or monitor. Qualifier checks root/target namespace, PID 1's
actual entrypoint/environment, direct-child executable/arguments/session ACK,
owned SS and DNS readiness anchors. A flag or docker-exec environment alone
does not authorize qualification. Missing either startup path fails closed.
Without --isolated, qualify remains UNKNOWN/exit 78 without runtime changes.
The shared monitor singleton excludes legacy and generic controllers. Any existing NFQ worker/queue, active profile, unknown config/journal or existing immutable matrix is refused. Known baseline config/journal/backup/identity inodes and bytes remain held unchanged throughout the job. This first producer does not pause/stop/restart existing active profiles; job-bound maintenance rollback is deferred rather than pretending a path-only daemon stop is safe.
Each candidate uses the existing worker-before-nft/queue-ready lifecycle on
queue 200, fixed Lua imports and fwmark 0x10000000, plus native
--filter-l7=tls. The actual child executable, argv, parent, start identity,
queue socket ownership, executable/Lua hashes, native --version output 1.0.2
and installed nft rule bytes are attested before capture and checked again at
each collector guard. DoH's existing 0x50000000 socket mark bypass remains.
TLS policy is collector/eligibility policy, not a nonexistent native TLS-version
filter. All configured protocols are measured; incompatible selector policies
remain UNKNOWN in the proposal.
The existing GET/HEAD generic collector preserves TLS origin verification, configured body/status/content-type expectations, private stdin and IP pinning. Completed expectation failures and typed peer response/TLS/transport negatives do not stop the remaining repeats/cells. Guard/source/unknown infrastructure or batch cancellation veto the entire batch; no partial positive matrix is saved. Config (including resolved environment/header secrets) and strategy-source snapshots are checked after DNS/before transfer and before sealing/publication. Workers are joined and temporary nft queues removed before verifying unchanged disabled baseline/runtime and sealing. The batch has a fixed 15-minute deadline with separate bounded cleanup; PID 1 keeps SS+DoH alive through cleanup. The bounded 64 KiB matrix size (including its authenticated envelope and worst-case field widths) is checked before any worker/nft operation; excessive catalogue/resource combinations return UNKNOWN/exit 64 even within individual count caps (32 strategies, 64 resources).
Successful batches, including complete negatives, return the assignment proposal. Incomplete/unsafe jobs return UNKNOWN/blocked exit 78 without proof. PID 1 then stays safe-idle with SS+DoH for inspection, for either success or blocked completion: no qualification retry loop, duplicate controller or automatic generic monitor start. Retests require future explicit immutable snapshot rotation, not overwriting prior evidence.
Completed controller cleanup is acknowledged separately from qualification in
an exclusive, 0600 HMAC-authenticated qualification-completed.json on the
current boot's SS tmpfs. It binds the launched PID, exit outcome (0 or 78) and
verified cleanup; it is not strategy proof. PID 1 checks that ACK against its
private session launch and revalidates the disabled baseline, singleton,
SS/DoH ownership and absence of NFQ workers/temporary nft queues before shutting
down dependencies. Thus TERM after a clean blocked qualifier has exited but
before its parent reaps it can exit cleanly. Worker/nft/join/restoration failure,
missing/foreign/mutated ACK or unverified early failure still veto clean shutdown
with exit 78. Ordinary legacy/generic monitor exit 78 remains a safety veto.
No unsupported --filter-mark or blockcheck embedded/stream/progress/deadline
flags are used. Background noninterrupting search, active-profile maintenance
and immutable snapshot rotation for repeated runs remain deferred.
Explicit generic transactional startup apply (local implementation)
On the target with its already completed private qualification batch, unset both qualification startup paths and set:
ZAPRET_AUTOTUNE_RESOURCE_CONFIG=/private/resources.json
ZAPRET_AUTOTUNE_RESOURCE_APPLY=1
ZAPRET_AUTOTUNE_STOP_GRACE_PERIOD=90s
Compose forwards the apply flag and configurable stop grace (legacy default
remains 240s). Generic PID 1 cleanup has one shared 80-second budget. No external
manager, new proof importer, SQL frontend surrogate or parallel journal exists.
PID 1 starts owned SS/DoH, reconciles known bytes, launches the acknowledged
managed resource-apply --resource-config FILE child before the checks-only
monitor, and starts the native daemon only with verified committed config.
This is at most one apply launch per PID 1 lifetime. A RAM latch is marked failed
before launch and succeeds only after child wait=0 and owned-session cleanup.
Launch/ACK failure, nonzero/signal exit, SS/DoH loss, or incomplete cleanup leaves
it failed: after authoritative cleanup PID 1 remains cancellably BLOCKED, without
restarting SS/DoH, native zapret, apply or monitoring, even across former 60s retry
windows. Cleanup still stops SS/DoH (DNS last); BLOCKED does not keep them alive.
Successful apply is skipped on later monitor/SS restarts, but every runtime cycle
still reconciles committed refs before native start. Qualification and legacy
retry behavior are unchanged.
Ceiling: this is not a durable manual-intent latch. A fresh PID 1 (including
an external Docker restart policy) resets authorization and, with flag=1, permits
one new attempt. Operators must disable unattended external restart/recreation
for this workflow. Set ZAPRET_AUTOTUNE_RESOURCE_APPLY=0 for explicit repair-only
startup: prepared state is reconciled, never promoted or reapplied. Identical
committed requests still resume by authenticated refs without a new transaction.
The command refuses standalone/docker-exec callers: actual PID 1 environment,
entrypoint, namespace, direct-child executable/argv and held launch ACK are
required, plus the existing controller singleton and no pre-existing NFQ worker.
First apply supports disabled baseline → generic. Explicit PID 1 startup
selection also permits generic → generic rotation among already verified
alternatives in the same immutable authenticated registry/matrix/source.
Active legacy profiles, changed source/catalogue/proofs and uninterrupted live
rotation remain unsupported. Every configured resource must require both TLS protocols and
every assigned exact host must have complete, candidate-bound passing proof for
all its resources across all input labels. New apply requires completion within
24 hours, never in the future. Negative/unknown/unassigned hosts cannot authorize
apply. Registry definitions may still describe single-TLS proposals, but native
apply rejects them instead of widening unsupported TLS-version selectors.
Canonical ordered args/selectors define profiles separated by --new; each
contains --filter-tcp=443 --filter-l7=tls --hostlist-domains=^a,^b. Exact-host
semantics use the pinned native source
https://raw.githubusercontent.com/bol-van/zapret2/4df94497869e18ed4fdf1272141427b2fbfc6604/nfq2/hostlist.c:
inline AppendHostlistItem uses addpool, leading ^ sets
HOSTLIST_POOL_FLAG_STRICT_MATCH, and SearchHostList rejects suffix fallback
when that flag is set and !bHostFull. Existing YouTube suffix policy is unchanged.
The packaged executable/Lua hash must match private attestation; held native,
Lua, source, marker and proof identities/bytes are guarded through the transaction.
No active queue version probe or mark/filter change is made (DoH500/probe100/live400).
The existing journal gains v4 independently tagged committed/pending refs
(baseline, legacy, generic). Generic refs exclude legacy IDs/scopes and bind
exact authenticated registry/matrix envelope hashes, source fingerprint,
internally derived canonical assignment digest and complete config hash.
Optional scalar strategy_ids retains the canonical selection policy on each
generic ref; missing/empty means the original default greedy policy. No policy
is permitted on baseline/legacy refs. This remains v4: older strict-decoding
engines reject the new field, so downgrade is blocked, not silently reinterpreted.
Unknown versions/tags, mixed refs and unresolved historical reconstruction block
without adopting or erasing foreign state; v1–v3 legacy behavior remains.
Staging/backup/prepared/replace/fixed restart/health/commit reuse the same engine.
All required resources/TLS are checked through the existing synchronous owned
SS/DoH collector (all-answer SSRF validation, CONNECT pin, SNI/cert validation,
private stdin). No Player API health or public check JSON authorizes commit.
Committed identical requests are idempotent: historical proof expiry alone does
not trigger reload, reapply or rejection on restart. Authenticated integrity,
source and native drift still block. Prepared recovery never promotes pending
bytes, including after successful health: it restores prior bytes and reloads.
Generic rollback additionally checks all resources before finalizing the journal.
Strict first-slice ceiling: a DPI-broken disabled baseline can legitimately
fail these checks; restored bytes then remain prepared/BLOCKED until operator
repair. Physical restoration is not falsely reported as healthy rollback.
Legacy rollback has no new health requirement. Cancellation joins synchronous
checks before rollback; PID 1 bounds the owned session and retains prepared state
on unsafe/unfinished cleanup. ActiveCandidates refuses generic deployments;
managed/resource status validates generic refs without inventing legacy groups.
Explicit startup selection (implemented; bounded positive field observations)
Set ZAPRET_AUTOTUNE_RESOURCE_STRATEGY_IDS=s1,s2 with
ZAPRET_AUTOTUNE_RESOURCE_CONFIG and ZAPRET_AUTOTUNE_RESOURCE_APPLY=1 on a
fresh container PID 1. Empty retains default greedy selection. The bounded list
accepts at most 32 unique registry IDs, canonicalized in lexical order; malformed,
duplicate, unknown or incomplete-coverage requests cannot authorize a transaction.
Eligibility is filtered before equal-args/selectors coverage merging; excluded
candidates cannot lend proof to a selected profile. Compatibility evidence and
all alternatives remain visible; the policy is not proof or a new qualification.
No registry/matrix files are written by rotation. Exact hosts, both TLS versions,
all required cells/M=3, native/source integrity and the 24-hour freshness gate
remain required for every new selection. Identical committed selection replays
without reload even after expiry. Distinct redundant allowlists are distinct
policies and may create a transaction even if rendered bytes coincide.
PID 1 forwards the setting in environment only; the apply child authenticates it against PID 1's original environment, not CLI arguments. Syntax is validated even with APPLY=0; nonempty policy requires generic resource config. With APPLY=0 selection is ignored for reconciliation/monitoring (registry membership is not resolved): committed and pending refs reconstruct independently from their own stored policies and historical completion horizon, never the requested setting. Prepared recovery restores the old generic bytes and policy, never promotes the pending side; failed rollback health retains prepared state for repair. Startup still allows just one attempt per PID 1; external restart policies reset that authorization. There is no monitor autotuning, new qualification, proof import, snapshot overwrite or uninterrupted maintenance in this slice.
Local root fixture tests cover the production snapshot factory and shared engine; independent local review and deterministic 180-second retry-window fixtures passed. The earlier bounded baseline gates below cover guarded apply/replay, strict rollback, prepared repair and the per-PID-1 failure latch; they do not establish rotation fault acceptance or authorize live rollout.
Verified-profile rotation observations — source 8d43dd9
Positive field observations only; partial native acceptance, not full rotation safety acceptance or READY. Saved-artifact privileged audits observed default A generation 1 → selected multisplit B generation 2 → identical B replay generation 2 → A return generation 3. No repeat positive sequence is required for the next gate.
- A config SHA-256 was
27f9a8ffd56a4c19d4bd522dd9f5a5e8b49b18b0ae48d41431ef9b22975ea772; B was51faacf53e76fa0ce95fead1f02da3846c1706ecb9edc8ddaba095c089ea2c82. Replay retained transaction09dfd03e9741abdf8e6b9f3bd44b2118; A return used49a29d560f086a11f9de770913777e07and restored the exact original A bytes. Historical prepared snapshots held actual old-A backup before B and actual old-B backup before A. Sampled old-committed → prepared → new-committed transitions demonstrate these observations, not crash safety or failed-rotation rollback. - Fourteen saved registry/matrix snapshots passed exact-payload HMAC and byte invariance checks; source fingerprint was unchanged. The two original runs, 16 M=3 cells and 48 prior both-TLS qualification transfers were reused, about 12 hours old at startup, not requalified. Native A/B argument hashes differed; A return matched original A, with native queue 300 socket-inode/PID linkage observed. Early A-return process inventory is missing; full phase-path native argv acceptance is not established.
- Six authenticated monitor snapshots each showed four HEALTHY resources and zero failures. Saved fixture records showed 64 successful GETs, TLS 32/32, matching SNI/Host and expected-header presence; A return contributed 32, TLS 16/16. This proves fixture compatibility, not causal DPI benefit or continuously live change. Original A-return official stop exited 0; fixture stop exited 2, not an observed product failure in this run.
- Evidence base:
/home/agent/rotation-8d43dd9/field-private/(root-private).report.safe.jsoncovers only generations 1/2/2, not final completion. Generation 3 is supported separately bya-return-timeline.private.json, retained state andfinal-passive-evidence/{before,stopped}/snapshots. The initial harness ended with KeyboardInterrupt; two continuation-construction bugs and observer filename alias corrections are disclosed inharness-path-alias.safe.json. Corrections affected host observer artifacts only, not proof inputs. - Final saved cleanup verification is
final-passive-evidence/final-cleanup-verification.safe.json, timestamp1792051407108: both exact owned stage containers and the owned network absent, eight recorded PID paths absent, both known network namespaces without PIDs, and three foreign full-inspect hashes unchanged. Owned containers/network were explicitly removed with orchestrator approval; private state/evidence/keys were retained. Foreign SS remained running and the two older containers unchanged. Xray was not mutated; no fresh Xray inventory or exhaustive process audit is claimed. - The first independent forensic audit passed the bounded 14-HMAC positive evidence, but the automated grader rejected missing independently refreshed dated evidence and exact native argv phase paths. Do not upgrade this to full native/safety acceptance. Unknown-ID refusal and old-profile fault/repair observations were subsequently recorded below, with narrower attribution than a branch-specific refusal proof. Crash safety remains untested. Natural 24-hour expiry remains unit-only, without a 24-hour wait.
- Prior local verification recorded 17 EUID-0 fixtures in one race/parallel pass with 57 subrecords; namespace UID 0 mapped to host UID 100000, not host-initial root. Full producer Go/race and four Python checks passed serially after parallel resource-contention failures; this does not establish a contention-free baseline. These are prior checks, not tests rerun for this documentation-only update.
Subsequent old-generic rotation faults (bounded saved-artifact acceptance)
Actual remote source was 8d43dd9, not shared-core 45d28e3; these separate
results do not establish end-to-end acceptance of a combined release. Privileged
reads verified /home/agent/rotation-fault-8d43dd9/field-private/ACCEPTANCE.safe.md
and standaloneprivilegedaudit.safe.json, dated 1792054235151
(2026-10-15 08:50:35.151 UTC), verdict
PASS_BOUNDED_SAVED_ARTIFACTS_AND_CURRENT_CLEANUP.
- All 13 snapshots passed exact-serialized-payload HMAC/immutable proof checks. Old A is generic with empty/default policy, not baseline; B selects multisplit. Historical old/new refs reconstruct independently.
- One-shot: eight B apply checks (one HTTP500), eight successful A rollback checks, A committed/pending clear, no automatic reapply through 80s; official stop0.
- Persistent: 24 checks across apply/rollback/cleanup reconciliation, three HTTP500; A bytes physically restored with PREPARED old-A/pending-B retained, no reapply through 80s; stop78 retained the unsafe-cleanup latch. Healthy fixture plus only APPLY=1→0 (requested B still set) gave eight reconcile + eight monitor successes, old A committed/pending clear and four HEALTHY resources; stop0.
- Total: 56 authenticated requests, TLS28/28, four controlled HTTP500. At the dated audit all 150 recorded owned PID/start identities were gone, recorded netns had no processes, five owned containers and network were removed, and three foreign raw-inspect hashes were unchanged. Root-private evidence was retained; sampled identities are not an exhaustive all-helper inventory.
- Valid-syntax
unknown-safe-idreached the actual CLI apply entry, which exited 78 and latched BLOCKED, with zero requests. Before/stopped config, journal, backup and proof bytes were unchanged; no staging was sampled. This is an observed refusal with an unknown-ID request, not uniquely attributed to the unknown-ID branch: the generic diagnostic cannot exclude another trust error. Source validation order supports an inference, not a specific logged reason or complete pre-mutation proof. Official stop0 is separate from CLI exit78.
Startup remains one-shot per PID1, without automatic apply retry. These fixture faults do not establish crash/cancellation safety, continuously live rotation, causal DPI benefit or READY. Next migration work is the minimal typed generic image/media capability above; owned managed v2 scoped observations are recorded above, with full runtime acceptance still incomplete. New-batch/versioned stores, uninterrupted rotation, strategy breadth and Prometheus are separate future work, not prerequisites to documenting this collector slice.
Bounded generic apply/replay and failure-latch acceptance
DONE within the stated bounds, not full generic autotuning or service READY.
Fault acceptance used source 643d0c6; the earlier healthy committed replay used
36aace0 after the atomic launch-ACK correction. Independent privileged audit
returned PASS_BOUNDED_GENERIC_APPLY_FAULTS for the observed A/B/C safety gates.
Root-private evidence references (no private payloads reproduced here):
/home/agent/generic-latch-643d0c6/field-private/field-report.md/home/agent/generic-latch-643d0c6/field-private/independent-audit.safe.json/home/agent/ack-recreate-36aace0/field-private/field-report.md
Observed acceptance
- Real apply health reused authentic, still-fresh qualification: 16 M=3 cells, 48 prior TLS transfers, two strategies and four resources. No new qualification, timestamp rewrite, fake ACK or imported proof was used. Pinned native 1.0.2/Lua stayed unchanged. The earlier healthy start/recreate each made eight TLS checks with four authenticated HEALTHY resources; v4 committed generation 1, refs, config and proof bytes remained unchanged. Both official stops exited 0.
- A — one HTTP 500: eight apply plus eight rollback requests, one 500 total. Rollback committed prior baseline generation 1 and cleared pending. Request count, journal and config stayed frozen at 45.096/90.084/135.124 seconds; one apply only, no automatic retry. PID 1 stayed alive/BLOCKED with SS/DNS and other owned runtime stopped. Official stop exited 0.
- B — persistent HTTP 500: 24 requests and three 500s: eight apply, eight rollback and eight cleanup-reconcile checks, not a second apply. Prior baseline bytes were physically restored, but failed health retained PREPARED committed baseline/pending generic refs. State stayed unchanged for 80.097 seconds with no reapply; official stop exited 78. After repairing only fixture behavior and changing startup APPLY=1 to APPLY=0, the same state/source/environment completed eight reconcile and eight monitor checks. Baseline became committed, pending cleared, and generic was never promoted; official stop exited 0.
- C — TERM during a real slow request: one canceled request plus eight passing
rollback checks. The canceled curl was joined before the first rollback request;
baseline generation 1 committed and pending cleared, with no false generic
commit. Actual PID 1 exit was 78, with
monitor cleanup status 78, not 0. Apply health cancellation is collapsed intoerrPlan/CLI 78; outside the qualification-specific completion path, the supervisor accepts only 0/143 and retains a sticky failure even after verified rollback. This is conservative outcome conflation, not an observed rollback-health failure or cleanup defect. Do not blanket-allow 78 or manufacture a completion ACK. A normal-0 path would require authenticated completion plus fresh guards; that optional future refinement is not a blocker for this bounded P0 safety slice.
Bounds and remaining work
- A/B/repair/C totalled 65 actual HTTPS requests. All 171 observed owned PID/start identities disappeared, owned netns were empty, and owned targets/network were removed. Foreign SS/container full-inspect hashes stayed unchanged. Passive 100ms inventories do not cover every shorter-lived helper; no exhaustive argv or packet-level privacy audit is claimed. Same-root HMAC-key mutation is outside the trust boundary.
- The latch is one RAM authorization per PID 1, not durable manual intent. Fresh startup/external restart policy reauthorizes ENV=1; keep unattended external restart/recreation disabled. ENV=0 repairs/reconciles only. Historical committed replay/repair allows proof expiry; a new apply still requires fresh, complete source-bound qualification within 24 hours. Natural remote 24-hour expiry remains unit-covered only; remote qualifier singleton conflict is still untested.
- Use an execution-free remote harness: stage inputs before startup; no target
exec,cpornsenterduring active guards. Observe host metadata/private files and Docker logs/inspect; official stop is the cancellation operation. Earlier scan EACCES nonrecurrence does not establish its cause. - No production READY, causal DPI benefit, active-profile maintenance, plan or snapshot rotation, automatic recovery or monitor autotuning is accepted here. Next roadmap work is the missing rotation fault/repair gate above, then dynamic profile/plan rotation and compatible selectors, generic resource tuning and bounded strategy-DB collections; bounded-ID Prometheus remains a separate planned function. No new framework, probes or native/live upgrade was introduced. Legacy YouTube exit 78 and unfinished images/avatars remain NOT READY.
Bounded remote acceptance — source 5cdc0cd
The isolated producer/registry/matrix/planner slice is bounded-qualified. Independent privileged evidence audits passed the observed positive, fault and active-state refusal gates. Full remote concurrency acceptance is PARTIAL; this is not generic apply, active-profile maintenance or service READY.
Root-private proof references (retained reports, not logs copied into this doc):
/home/agent/zapret2-autotune-matrix-5cdc0cd/execution-free-private/execution-free-report.md/home/agent/zapret2-autotune-matrix-5cdc0cd/fault-final-private/qualification-fault-report.md/home/agent/zapret2-autotune-matrix-5cdc0cd/refusal-gap-private/remaining-refusal-reports.md
Observed positive and fault gates
- The execution-free private batch made 60 actual transfers: two candidates,
five resources, both TLS protocols, three attempts per cell. Its 20 aggregated
cells contain 16 PASS and four
expectation_failed: mandatory resource d's HTTP 500 fails for both candidates/protocols, leaving d unassigned. Exact hosts a/b/c receive the greedy multidisorder proposal with authentic multisplit alternatives. Input groups remain metadata, not assignment boundaries; there is no generic suffix coverage or automatic apply. - Independent verification authenticated the exact stored payload HMAC, not a reserialized JSON equivalent. Distinct native arguments/worker-argv hashes, executable/Lua/rules evidence, queue 200 and NFQ 1.0.2 attestations bind the two joined/restored runs. Disabled baseline bytes stayed unchanged; sampled workers, queue and temporary NFT rules were gone. Official PID 1 shutdown exited 0 in 1.31s; foreign inspect hashes stayed unchanged.
- Mid-batch cancellation and effective semantic config drift each stopped after two requests, published no matrix and preserved the native baseline. Official PID 1 exits were 0 in 2.46s and 0.44s respectively; the deliberately changed config source was retained, not silently rolled back.
- Unsafe Lua/queue/fwmark/user/file definitions and evidence/schema imports were rejected without transfers. Oversized capacity was rejected before worker launch; unauthorized isolated startup was refused. Corrupt MAC blocked planning while preserving payload bytes; changed effective config produced unknown/unassigned output without changing the original authenticated matrix. Immutable catalogue replacement and completed-matrix retest were refused without transfers or overwriting original state.
- A genuine archived v3 committed journal with two candidates passed official
reconcile/ActiveCandidatesvalidation before qualification refused active profile state. Profile/config, journal, last-good and target identity remained byte-identical; zero transfers/workers and no matrix. Actual PID 1 exit 78 was an expected early preflight refusal, not an exit-0 cleanup ACK. This did not activate or maintain a running active-profile NFQ daemon; that remains unsupported. Whole-DB byte preservation is not claimed.
Explicit limits and testing lesson
- Remote qualifier singleton conflict is NOT RUN. The earlier planted-lock
fixture failed initialization before that branch and does not count. The
shared-lock unit second-acquire
EWOULDBLOCKcheck passed, but is not remote qualifier concurrency acceptance. No deterministic official lifecycle seam exists for this bounded test; no test framework or racy injection was added. - Natural 24-hour remote expiry is NOT RUN. The existing unit check rejects a structurally valid 25-hour-old proof; this is not observed remote expiry.
- Privacy sentinel absence was checked in tested logs/state and sampled fault/ refusal argv. Positive active argv and exhaustive DNS packet-level privacy were not proved. Configured/observed encrypted DNS is not exhaustive proof against transient fallback.
- Compatibility on this baseline is not causal DPI-desync benefit. Historical worker-scan EACCES origin remains unknown; nonrecurrence in the execution-free batch does not identify its cause. Earlier harness failures remain recorded in the referenced reports, not erased or relabeled as product acceptance.
- Stage all inputs before target startup. From startup through qualification
completion, prohibit target
exec,cpandnsenter(even passive exec starts a process). Observe host/procmetadata and Docker logs/inspect only; inspect runtime and runplanafter finalization/cleanup. The explicit official stop used for cancellation is the documented exception, not an observer exec. - Owned test containers/network were removed and private evidence retained. Foreign SS1080 stayed running and legacy11082 stayed stopped with exit 78. No live upgrade or push occurred; unresolved legacy exit 78, YouTube/image readiness, transactional generic apply/profile-journal migration, immutable rotation and noninterrupting search remain outside this producer acceptance; the later bounded apply/replay gates are recorded separately above.
Internal YouTube adapter slice (local; field acceptance pending)
internal/adapter is a small closed compiled-in contract (Binding, ephemeral
Resource/Plan, Module); internal/adapter/youtube implements youtube/1.
The explicit kind/version registry in service_adapters.go has no init hooks,
dynamic loading, public configuration, HTTP fallback or module privileges.
Player media parsing (playerMediaResource) and owned native qualification
(verifyGooglevideo) actually call it. Discovery retry/rotation/cancellation and
representative selection remain in the legacy controller; signed MP4 freshness
and the host/TLS qualification plan are pure service semantics in the module.
Core origin/TLS validation, shared image/media transfer code, bounded worker
lifecycle and post-cleanup/join sealing remain authoritative. Legacy media and
metadata routing retains SOCKS5h with the owned encrypted-resolver guard and
exact origin/SNI/certificate/redirect checks. It does not use public generic
runResourceProtocol's all-A/AAAA approval and connect-to IP pinning. That inherited
ceiling is unchanged, not a pinning guarantee: full request-policy capabilities
(including future metadata POST) and parity are prerequisites to generic cutover.
No new DNS/IP routing policy is introduced by this extraction. Both TLS
versions must learn separately, then each has three measured MP4 samples per
representative host, minimum 1024 bytes (not an exact 64 KiB requirement).
Measured endpoints do not authorize a suffix: existing exact/suffix/experimental
policy and independent thumbnail/avatar qualification are unchanged. The module
cannot manufacture evidence, request wildcard apply or claim YouTube READY.
New adaptive proof v2 includes adapter kind/version/immutable policy SHA256 inside the producer seal. Public JSON cannot recreate that seal. Missing or mismatched binding/version/digest fails closed; v1 with v2 fields is rejected. Historical proof v1 explicitly uses the pinned legacy YouTube v1 contract, including historical freshness-independent journal reconstruction. Its config bytes/hash and journal refs remain stable. Fresh stored trusted v1 proofs retain their original apply/qualification eligibility, including unchanged attestation freshness and media gates. Expired v1 can reconstruct but cannot authorize fresh apply. Only new production/persistence requires sealed, module-bound v2; neither sealed-new-v1 nor public unsealed v1/v2 DTOs can publish new evidence. Cold v1 evidence, SQL schema 7, native arguments, public GET/HEAD v1/v2, state keys and HMAC formats are unchanged.
This slice is not full generic-controller migration, native-engine runtime acceptance, a security sandbox (including against same-UID actors), or a fix for unresolved avatars/legacy exit 78. No legacy path is deleted. Local tests and archived baseline parity are recorded separately; no remote validation or commit is part of this extraction review.
Discovery preflight resolves the required module identity and policy digest before any Player/WWW/avatar/front/media requests, including injected callbacks, legacy proposal discovery and managed discovery hooks. Missing/mismatched modules produce a fixed private sentinel wrapped as a fatal configuration failure, not retryable unavailable inventory, a transfer-negative or genuine no-strategy pause. The compiled production registry remains fixed; synchronized test replacement does not add public runtime module configuration or loading.
Local verification for this extraction (2026-10-15)
- Fresh serial
go test -json -p 1 ./... -parallel 1 -count=1 -timeout 600s: 399 top-level / 1737 including subtest PASS events, zero failures. - Affected serial race run (
-race -p 1 -parallel 1 -count=1) covers adapters, Player/discovery, owned qualification/proof gates, historical journal parity, independent assets and generic resource core: 61 top-level / 307 including subtest PASS events, zero failures. Full regex and logs are retained at/tmp/opencode/youtube-adapter-fixes/{full,race}.json. - Archived
d324b4137b2e95f1c5f4d6c8240470e3f8749f0cand current builds each passed 275 affected test/subtest events. The portable legacy parser/journal corpus ran unmodified on both: file SHA2567b8eea9c9bbcdd8f0fadde3f78596d41e9d032a0a4f7b2ca90d1223d106584d5. Both reconstructed historical config SHA256172c7377388334e4baa2dc1009270478dc271a7b2f00d28cfada631f44a35364, retaining journal bytes/refs after reconcile and ActiveCandidates validation. An additional unchanged portable v1 corpus passed 2 top-level / 8 including subtest events on each build: fresh stored v1 shortlist/apply eligibility, expired fresh-apply refusal, and staged/backup/prepared/replaced/reloaded/healthy crash rollback with expired historical proofs. Backup/config bytes and hashes are stable; pre-prepare journal bytes are unchanged and post-prepare generation/ reload/ref transitions follow the original contract. Corpus SHA256:6df53b12af5d80d164ea3201a614a5fd5723561dc7b2d6bc2d2aa37f845f053d. New negative tests separately reject even internally sealed NEW v1 writes and public unsealed DTOs; missing/changed module identity/policy makes zero Player, WWW/avatar/media/front/worker calls and does not become a two-hour absence. - All four
python3 deploy/managed-target/check_{static,config,startup_diagnostics,supervision}.pychecks passed serially; supervision was bounded withtimeout 600s, no retry.go vet ./...,CGO_ENABLED=0 go build,sh -non all three entrypoint/ supervision scripts, andgit diff --checkpassed. Build SHA256:8327faf86098145bb41306b3de895cdd622aeccdcda90f8ec73e19a759c8f98a. - Ownership-sensitive final runs used
sudo -nEUID 0 inside the existing user namespace, mapping UID 0 to parent/host UID 100000, not initial-host root. The initial extra single-UIDunshare -Urrun failed ownership fixtures (chown: invalid argument/invalid private qualification data); a stale test assertion also expected newly produced proof v1 and was updated to v2. Those prior extraction failures are retained in/tmp/opencode/youtube-adapter-review/go-full.json, not reported as passes. Vet's initial unkeyed shared-DTO literals were fixed before final successful checks.
Reproduction commands (run serially; root is only for offline ownership fixtures):
pattern='Test(YoutubeLegacy|ManagedGooglevideo|ManagedAdaptive|ExperimentalPromotion|Googlevideo|Resource(Core|Discovery|Contract)|Player|Discover|ManagedAsset|Asset)'
sudo -n env GOPROXY=off GOTOOLCHAIN=local GOMODCACHE="$(go env GOMODCACHE)" "$(command -v go)" test -json -p 1 ./... -parallel 1 -count=1 -timeout 600s
sudo -n env GOPROXY=off GOTOOLCHAIN=local GOMODCACHE="$(go env GOMODCACHE)" "$(command -v go)" test -race -json -p 1 ./internal/adapter/... ./cmd/zapret-autotune -parallel 1 -run "${pattern}|Test(ServiceAdapter|LegacyYoutubeV1|QualificationPlan|SignedSample|DiscoverResponse)" -count=1 -timeout 600s
# Baseline/current parity: the same $pattern, without -race, on both trees.
# Baseline tree: git archive d324b4137b2e95f1c5f4d6c8240470e3f8749f0c;
# add identical youtube_legacy_parity_test.go and youtube_legacy_apply_parity_test.go.
# The additional portable v1 corpus runs separately with -run '^TestLegacyYoutubeV1'.