Repository navigation
[DRAFT RDTE] Model two competing session writers, stale epoch and admission fencing - #182
Conversation
Add bounded two-actor blue epoch fencing and mandatory stale-commit negative control, offline deterministic search, and a source-bound admission/refinement plan. This is a modeled design gap; no production lock, CAS, Wine process or hardware gate is claimed as implemented.
The blue two-writer TLC run passed but the mandatory expected red counterexample was not observed in CI. Print only filtered public-model TLC errors to identify the exact first cause. Keep the negative gate fail-closed; no waiver, bypass or log artifact upload.
2026-11-21 — blue model PASS, mandatory red negative first failure under diagnosisFirst exact head Corrective action, fail-closed: new exact |
… control Exact-head TLC #44912828275 identified an underdetermined successor: without grouping the expression, an OR branch failed to assign the primed staleCommit variable. Correct only operator grouping; retain mandatory expected NoStaleWrite counterexample and green-model checks.
2026-11-21 — first-failure root cause and corrective action (public TLC)The diagnostic-only rerun formal #44912828275 FAILED as intended until the issue was isolated. Exact public source contained Correction: commit Root DLE finding remains: process-local |
2026-11-21 — terminal two-writer formal proof receipt and refinement boundaryExact model SHA: Refinement/red-team finding: |
Why this work is on the MVP acceptance path
At combined source #181,
api/routers/lifecycle.py::session_transition_lockis a process-localasyncio.Lock. Two Python mutator workers attached to the same shared session root may read the same old owner and independently write pointer/marker/profile/broker state. The existing single-writer TLA+ handover model andfsyncsemantics cannot prove cross-process atomicity. No real two-worker production incident is claimed.The WineBot repository currently has GitHub Issues disabled (create attempt returned 410), so this PR is the DLE home for the gap, exact model receipts and a bounded implementation plan.
Source changes (no runtime mutation)
Based on #181 exact
eda01696f297b930185546993a2f5184e340603c, one atomic seven-path tree commit1ab002da96733b1e1ade37403898330425b13c5e:formal/tla/SessionWriterFence.tla+ cfg: proposed two-process exclusive admission, bounded epochs, one holder, stale-commit rejection invariants.formal/tla/SessionWriterFenceUnsafe.tla+ cfg: deliberately unfenced two-worker stale last-write-wins race; TLC must find the expectedNoStaleWriteinvariant counterexample.formal/tests/test_session_writer_fence.py: three stdlib deterministic red/blue enumerations (executed locally: 3/3 PASS, no Wine/users/network).formal/SESSION_WRITER_FENCING.md: exact source seam, SW invariants, lock/mount/fencing limitations and executable sequential implementation/qualification plan..github/workflows/formal-cross-layer-tlc.yml: extends current public $0 TLC loop to run the additional blue model and explicitly prove the new red counterexample; retains three prior models and two prior negative controls.Gate
RUN NEW HEAD public free GitHub-hosted [Formal Cross-Layer Safety (TLC)] and full CI/source safety. Any parse/check failure is a real blocker; fix in this branch without reducing tests or merely checking exit status. Do not merge as a production fix. This is abstract design qualification only, not real process admission, epoch CAS, distributed consensus, or native host/guest transaction atomicity.
Next production work: secure singleton mutator admission on explicitly shared persistent root, real two-process race and SIGKILL tests, durable generation CAS and restart handling, exact-head Wine11 failure injection, then review/owner promotion. No paid cloud, private GHA minutes, local/sovereign hardware, unreviewed private WinInspect source or release.