Repository navigation
Conversation
added 4 commits
October 28, 2026 11:45
…(A1.4) A1 exits only with evidence from real processes under kills, a pause past the lease and a graceful handoff, so the drill compares each tenant's final ledger with what the replicas logged, and the RFC maps every #275 bullet to a passing suite. It also pins the one window mode D-a cannot close. Outside the kernel; engineering evidence only. Refs #674
…er cannot close the router's ledger While a handoff drains, this replica still holds the lease, so opening the tenant would only report it held by itself; it now says it is draining. The router owns the ledger's lifecycle, so close on the guarded view does nothing. Refs #674
The RFC said restore reads the prefix of the highest epoch the lease store records; what A1.2 builds is the newest verified snapshot of the newest lineage, pinned by the new owner's base, so the two now say the same thing. Refs #674
Keys pad the epoch to eight digits but the restore regex matched exactly eight, so a loop that burned a hundred million epochs would have hidden every copy; it now matches eight or more. Refs #674
Owner
Author
|
Local full regression on |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #674
A1.4 closes A1 of the AaaS charter. The exit evidence the RFC asks for is "offline concurrency and fault-injection suites on isolated state roots" and "every #275 checklist bullet mapped to a passing test or a recorded decision". This PR adds the first as a drill with real processes and records the second in the RFC. It lives outside the kernel and is not wired into a runtime path.
state-ledger.tsand the kernel manifest are untouched, and no dependency is added.Stacked on #680 (the base of this PR is its branch, so the diff shows only A1.4). When the stack below it merges I rebase onto
mainand retarget; there is nothing to decide in between.The drill (
tenant-state-drill-tests.ts, run-all §92, about 35 seconds)Four replica processes, each on its own state root, contend for two tenants through one lease file and one durable directory. They write numbered events, snapshot every 120 ms, and log what they did to files that survive their own death. The drill then:
SIGKILL, twice;SIGSTOPpast its lease, waits for a takeover and a pin, and resumes it;SIGTERM(the graceful path).A verifier then takes each tenant over and compares the ledger with the logs:
It is a simulated drill: it is engineering evidence for A1 and counts for nothing in A3 or A4.
Also in this PR
tenant-state-copies-testsX3 reproduces it: a frozen-clock owner lands a snapshot between its successor taking the lease and pinning its base, and that snapshot is restored. The test carries a note on how to flip it once the window is closed by D-b or by a seal on the previous epoch. RFC §4.3 states the limit.ledger.close()on the guarded view no longer closes the ledger the router owns. Durable keys pad the epoch to eight digits but the restore regex matched exactly eight, so a loop that burned a hundred million epochs would have hidden every copy; it now matches eight or more.Evidence on
3c08ed670d9139b0e7a8e32195d39b58bd78116e(local Node v26.9.0)cd ts && npx tsx scripts/tenant-state-drill-tests.ts: exit 0, 2,766 assertions in the recorded run (2SIGKILLs, 1SIGSTOPpast the lease, 1 graceful handoff, 2,734 acknowledged writes).tsc --noEmit,smoke.ts,g5-guard.ts,kernel-manifest-gate.ts: exit 0, with a zero-diff kernel manifest. All four tenant-state suites pass (28, 26, 21 checks and the drill).scripts/run-all-tests.sh: green on the A1.3 commit underneath (ALL SUITES GREEN, exit 0). On this head it was still running locally when I opened the PR, so CI on Node 22 and 24 is the first full result for it; this slice adds tests, docs and three small router and restore fixes.What is still open after A1
Review ask. Is A1 complete for you? If yes, the next step is A2.