Fence each driver run so a timed-out driver cannot act, and trust its last stage #66
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
x/ego-chat!66
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/per-run-driver-fence"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Stacked on #65. A timed-out driver can no longer act, and its last stage becomes evidence.
Verified live on 2026-09-23 (Ego Lite 0.5.1.11):
a driver script keeps running inside Ego Lite's service after the adapter's timeout kills its client;
its output is not streamed, so a killed driver's stage never reached the adapter;
within one broker generation, only the lease fenced it.
Per-run fence (
src/driver-run-fence.mjs,src/ego-adapter.mjs).${mailbox}-fences, 0700, owner and symlink checked). A sibling keeps the 0.2.37 mailbox scanner untouched.{ runFenceRevoked, driverStage, sendClickStarted }only when revocation really happened and the record is complete.Stage before every mutation (
src/ego-driver-source.mjs).{ stage, phase, sendClickStarted }atomically before its authority check, and refuses the mutation if the write fails or the fence is gone.Proven pre-send (
src/broker.mjs).provenPreSendDriverFailureaccepts a fenced pre-click stage whose click never started.driverTimeoutRetryLimit(default 3). The third timeout in a row ends as an interrupted run that keeps its fenced evidence, so reconcile can prove absence at once.Receipts. The fence and the account scan are now in
RECEIPT_RELEVANT_RUNTIME_PATHS, because their evidence decides signedPROVEN_NOT_DISPATCHEDreceipts. A new test keeps every adapter-loaded module attested.Browser contract 29, runtime generation 2026-09-23.6.
Verification
npm test1100 tests, 1099 pass, 1 skipped; lint clean; receipt suite 16/16;cargo test33 + 1.Not yet done
Not merged, released or installed: held until the operator's go. To be confirmed live after install: a genuinely timed-out driver is refused at its next mutation, and a fenced pre-click timeout retries and clears its own draft in the real composer.