v1.0.57 (MCPSTAB): stable gate transports — bounded retry, health probe, maintenance windows, checkpoint resume #90

Merged
ClaudiuSchuster merged 1 commit from oss-oo/pinky-mcpstab into main 2026-10-14 23:31:18 +00:00
Owner

The OWN stable solution for gate-transport stability (owner ask: "koennen wir dafuer keine eigene stabile Loesung implementieren?").Scope honesty (gen-3 correction): the original "30s gate death" was exec-cgroup turn-end teardown, NOT a transport failure — so the four mechanisms are GENERIC robustness, each earning its keep on its own merits, and the incident-specific mitigation is the documented detach law, now machine-findable (README section + PROMPT-APPENDIX pointer).## What shipsNew module gates.py — the gate/rig transport-resilience library:1. retry_transport — bounded retry with linear backoff + post-recovery settle for round-trip legs; terminal only after N honest tries (each with its reason); verify-then-retry STANDS DOWN without re-sending when the work already landed (the v1.0.44 KISS law applied to transports); TerminalOutcome stops the budget for legs that know they are terminal.2. probe_health — cheap pre-leg ping; a flapping transport means WAIT for stability (streak inside a bounded wait); SILENCE-NEVER-KILLS by construction (only ever calls ping).3. Maintenance windows — machine-readable freeze windows (~/.config/zcode-dispatch/maintenance-window.json, format contract published in docs/CONTRACTS.md for Astra/Root ops): defer-with-reason during, settle margin after, pre-window grace (a leg that cannot finish before the freeze does not start); defensive parse (VEE-6).4. GateCheckpoints — step + state-hash + payload records; an interrupted gate resumes from its last checkpoint (replayed results marked as such, never fresh); a state-hash mismatch honestly restarts; a completed+reported run finalizes — monitoring re-observes.Adopters: stream.py contract_watch (window deferral + pre-fire health probe before the canary fires); contract_tests.py (proto composite rides bounded retry with fresh revision harvest + orphan-session hygiene per attempt; full-mode group-level checkpoint resume with --no-resume escape; --probe never checkpoints).Suite: deterministic MCPSTAB legs (R1-R6) — fake transports, injected sleeps/clocks: flap-retry/verify-standdown/hard-down-terminal/TerminalOutcome/broken-verify; probe streak/down/unstable/never-kills; the full window matrix incl. defensive parse + ISO times; checkpoint kill-at-k/resume-skip/finalize-re-observes/state-tamper/payload replay; sweep-lane deferral (active window, expiry re-fire, flapping CLI waits-then-fires, down CLI defers without failing the tick); adoption drift guards. install.sh FILES + packaging guard now cover ALL runtime entries (dispatch/stream/contract_tests imports), gates.py carried.Docs: docs/CONTRACTS.md (the maintenance-window.json contract), USAGE § 23 (mechanisms + knobs), README detach-law section (scope-corrected, with the teardown-vs-time-blade family distinction), PROMPT-APPENDIX pointer line.## Evidence- Full offline suite GREEN on the rebased tree (both RECONCILER + MCPSTAB families): ~/.zcode/tmp/pinky-mcpstab/suite-rebased.log- make check GREEN; super-linter slim-v8.7.0 (BASH/BASH_EXEC/MARKDOWN/PYTHON_PYLINT/PYTHON_RUFF/YAML) ALL GREEN- Live proofs: seeded-checkpoint canary resume GREEN (replayed checks disclosed in report), plain full canary GREEN (56 pass, finalized checkpoint), quickrig sweep defer/expiry re-fire

The OWN stable solution for gate-transport stability (owner ask: "koennen wir dafuer keine eigene stabile Loesung implementieren?").Scope honesty (gen-3 correction): the original "30s gate death" was exec-cgroup turn-end teardown, NOT a transport failure — so the four mechanisms are GENERIC robustness, each earning its keep on its own merits, and the incident-specific mitigation is the documented detach law, now machine-findable (README section + PROMPT-APPENDIX pointer).## What ships**New module gates.py** — the gate/rig transport-resilience library:1. **retry_transport** — bounded retry with linear backoff + post-recovery settle for round-trip legs; terminal only after N honest tries (each with its reason); verify-then-retry STANDS DOWN without re-sending when the work already landed (the v1.0.44 KISS law applied to transports); TerminalOutcome stops the budget for legs that know they are terminal.2. **probe_health** — cheap pre-leg ping; a flapping transport means WAIT for stability (streak inside a bounded wait); SILENCE-NEVER-KILLS by construction (only ever calls ping).3. **Maintenance windows** — machine-readable freeze windows (~/.config/zcode-dispatch/maintenance-window.json, format contract published in docs/CONTRACTS.md for Astra/Root ops): defer-with-reason during, settle margin after, pre-window grace (a leg that cannot finish before the freeze does not start); defensive parse (VEE-6).4. **GateCheckpoints** — step + state-hash + payload records; an interrupted gate resumes from its last checkpoint (replayed results marked as such, never fresh); a state-hash mismatch honestly restarts; a completed+reported run finalizes — monitoring re-observes.**Adopters:** stream.py contract_watch (window deferral + pre-fire health probe before the canary fires); contract_tests.py (proto composite rides bounded retry with fresh revision harvest + orphan-session hygiene per attempt; full-mode group-level checkpoint resume with --no-resume escape; --probe never checkpoints).**Suite:** deterministic MCPSTAB legs (R1-R6) — fake transports, injected sleeps/clocks: flap-retry/verify-standdown/hard-down-terminal/TerminalOutcome/broken-verify; probe streak/down/unstable/never-kills; the full window matrix incl. defensive parse + ISO times; checkpoint kill-at-k/resume-skip/finalize-re-observes/state-tamper/payload replay; sweep-lane deferral (active window, expiry re-fire, flapping CLI waits-then-fires, down CLI defers without failing the tick); adoption drift guards. install.sh FILES + packaging guard now cover ALL runtime entries (dispatch/stream/contract_tests imports), gates.py carried.**Docs:** docs/CONTRACTS.md (the maintenance-window.json contract), USAGE § 23 (mechanisms + knobs), README detach-law section (scope-corrected, with the teardown-vs-time-blade family distinction), PROMPT-APPENDIX pointer line.## Evidence- Full offline suite GREEN on the rebased tree (both RECONCILER + MCPSTAB families): ~/.zcode/tmp/pinky-mcpstab/suite-rebased.log- make check GREEN; super-linter slim-v8.7.0 (BASH/BASH_EXEC/MARKDOWN/PYTHON_PYLINT/PYTHON_RUFF/YAML) ALL GREEN- Live proofs: seeded-checkpoint canary resume GREEN (replayed checks disclosed in report), plain full canary GREEN (56 pass, finalized checkpoint), quickrig sweep defer/expiry re-fire
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
OSS-Singularity/zcode-dispatch!90
No description provided.