feat(monitor): wire isolated target recovery
Co-authored-by: GPT-6 <gpt-6@openai.com>
This commit is contained in:
1 parent
2d4e4878ae
commit
5f3a6953ee
16 files changed
+1919
-73
No files matched your search
@@ -21,7 +21,11 @@ binding. It uses full target-local firewall/daemon restart and Player API post-c
|
||||
atomic rollback on failure. See [MANAGED_TARGET.md](MANAGED_TARGET.md) for guards
|
||||
and provisioning prerequisites. An isolated pinned deployment definition is in
|
||||
[deploy/managed-target](deploy/managed-target/README.md); build/run are deferred.
|
||||
No autonomous loop, remote activation or Xray changes are included. Image
|
||||
An injected bootstrap/saved-first recovery adapter now connects the persisted
|
||||
monitor foundation to blockcheck, immutable candidates and transactional apply.
|
||||
`managed monitor` and the dedicated target entrypoint now wire these adapters;
|
||||
this increment is not tested by the producer or live/runtime verified.
|
||||
No remote activation or Xray changes are included. Image
|
||||
compatibility and route/rollback gates are not yet remotely proven; adapter
|
||||
tests/build are deferred to the orchestrator.
|
||||
|
||||
@@ -35,6 +39,14 @@ and roll back together, including after a crash.
|
||||
|
||||
## One-shot Player API health
|
||||
|
||||
Internal recovery building blocks enumerate qualified immutable candidates
|
||||
newest-first with a 1–10 limit and recheck saved arguments on an exact endpoint
|
||||
through an injected combined TLS checker. Only complete, valid two-TLS 3-pass
|
||||
nonpassing evidence permits the nonpass result; malformed reports and runner,
|
||||
filesystem or context failures remain infrastructure errors. These helpers do
|
||||
not update stored evidence, apply configuration or wire managed recovery/monitor
|
||||
commands. Their local fixture tests/build are deferred to the orchestrator.
|
||||
|
||||
```sh
|
||||
zapret-autotune health youtube
|
||||
```
|
||||
@@ -60,9 +72,9 @@ Configuration is parsed once per health invocation. The proxy must use `socks5`
|
||||
with a loopback IP or `localhost`, port 1–65535, and no credentials/path/query.
|
||||
Video IDs must be 11 characters; durations and the failure threshold must be
|
||||
positive. Explicit empty values are invalid. Interval, consecutive-failure
|
||||
threshold and cooldown are validated future recovery policy settings only:
|
||||
**An injected autonomous scheduling core exists, but no monitor command, actual
|
||||
recovery callback or live managed target is wired yet**.
|
||||
threshold and cooldown configure `managed monitor` (the one-shot command still
|
||||
does not schedule anything). **CLI/entrypoint integration exists; tests/build
|
||||
and live target validation remain deferred.**
|
||||
|
||||
The future managed target is a **brand-new prod-like zapret2-ss container in the
|
||||
test environment only**, not the existing container. Its stable configurable
|
||||
@@ -105,9 +117,9 @@ their existing target constraint. Database failures emit no options.
|
||||
Signed URLs are not printed. Scanner diagnostics are retained in restricted
|
||||
artifact files rather than relayed to the terminal. No configuration is applied,
|
||||
no profile is marked active, and no service is restarted. The staged pipeline is
|
||||
scan/propose → guarded manual managed-test activation → future monitoring;
|
||||
the deployment definition exists but is not deployed; the monitor scheduling core
|
||||
is internal and **not wired to a command or actual recovery**. Manual
|
||||
scan/propose → guarded managed-test activation → dedicated target monitoring;
|
||||
the deployment definition exists but is not deployed. `managed monitor` wires
|
||||
the scheduler and recovery; live compatibility remains unverified. Manual
|
||||
proposal-only recovery is available below.
|
||||
No-argument `tune youtube` remains frontend-only and unchanged.
|
||||
|
||||
@@ -190,8 +202,8 @@ or duplicate completion is rejected without changing the lock, token or cooldown
|
||||
even after a newer acquisition starts. State survives reopening the database.
|
||||
The internal `runManagedMonitor` supervisor probes immediately and periodically,
|
||||
persists observations, and invokes injected recovery only at threshold outside
|
||||
cooldown. Recovery errors are reported without stopping monitoring; DB, lock and
|
||||
finalization errors are fatal. Cooldown starts when recovery returns, including
|
||||
cooldown. Unresolved GGC is reported without stopping monitoring; DB, safety,
|
||||
runner, lock and finalization errors are fatal. Cooldown starts when recovery returns, including
|
||||
failure or cancellation. Callbacks must honor cancellation and join their children.
|
||||
Existing target guards run before a lifetime nonblocking `flock` in the private
|
||||
target state directory. With that exclusive singleton held, one-shot startup
|
||||
@@ -201,8 +213,14 @@ A live owner remains busy; legacy or unverifiable owners fail closed. Probe
|
||||
history is preserved. The lock file is never unlinked.
|
||||
The scheduler core has fake-time tests for scheduling, reset, cooldown,
|
||||
cancellation, parallel starts, fatal DB errors, reopen and safe startup
|
||||
reconciliation. **There is no actual recovery adapter,
|
||||
monitor CLI/entrypoint wiring or live target yet**; container/Xray are untouched.
|
||||
reconciliation. Internal injected managed recovery and monitor callbacks now
|
||||
support saved-first frontend checks, scan fallback only for valid non-pass
|
||||
evidence, and fresh exact-host GGC recovery with a frontend-only rollback boundary.
|
||||
Checks remove prior combined reports; missing/malformed reports fail closed.
|
||||
Scan shortlists must be regular files no older than the scan start's whole second
|
||||
(production scans use unique temporary paths). Fake-only orchestration tests are
|
||||
added; verification is deferred. **Monitor CLI/entrypoint wiring exists but no
|
||||
live target has been deployed**; existing container/Xray are untouched.
|
||||
Manual managed activation remains separate. Verification of this increment is
|
||||
deferred to the orchestrator.
|
||||
|
||||
@@ -214,8 +232,8 @@ in the same transaction as the existing run. Qualification requires every declar
|
||||
endpoint to pass exactly 3/3 for both TLS1.2 and TLS1.3, with full success/coverage.
|
||||
Existing v2 history is unchanged and is not backfilled into independent candidates.
|
||||
Candidates have no DB active/installed state; managed activation uses its own
|
||||
durable config journal. Autonomous scheduling is internal only; actual recovery
|
||||
and live monitoring remain unwired.
|
||||
durable config journal. Scheduling and recovery are wired only to the dedicated
|
||||
managed target; live monitoring has not been verified or deployed.
|
||||
The explicit `tune googlevideo` path adds exact-cache proposals only.
|
||||
Proposed runs store a SHA-256 fingerprint of validated arguments with separator
|
||||
whitespace normalized and argument order preserved; repeated proposals retain
|
||||
|
||||
Reference in new issue
Block a user