Repository navigation
test(org): stabilize the enrollment-close snapshot baseline - #553
Merged
Merged
Conversation
The root-add feed adoption updates the held head before its registration anchor write finishes. Wait for that anchor on disk and for atomic-write temporaries to disappear before the enrollment close baseline, retaining the complete snapshot equality assertion. Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Diagnosis: test-baseline race, not a product defect
The outstanding write is the version-3 anchor saved to
registration.jsonbysigningRoot()'s root-add feed adoption (org-session.test.ts:1601–1619).followHub()observes the in-memory head;HeldOrg.#commitwriteschain.json, updates that head, and only then awaitssaveAnchor(held.ts:392–397). The session'swriteAnchorsends the registration write through its commit queue (org-session.ts:841–847). NeitherenrollStarted()norpostKey()starts this disk write.close()already fences new work and joins the sync, held adoption queue, and commit tail (org-session.ts:2057–2097). The old pre-close snapshot could therefore include the temporary version-3 registration file and the old registration, even though the atomic rename completed before close resolved.Change
Before the existing pre-close snapshot, wait until registration's on-disk anchor matches the held head and no atomic-write temporary remains. Keep the full name/inode/mtime/content equality assertion and the assertion that close waits for the held enrollment read. This still detects both writes caused by close and writes after it resolves; no product code or fixed delays changed.
Audited the neighboring enrollment cases and every other
orgSnapshot()user: the other three baselines already follow an awaited close, so no parallel edits were needed.Validation
org-session.test.tsfile passed 20/20 sequential runs (160 tests each; 3,200 test executions). No local typecheck or multi-file lint/test run was performed../scripts/ci-gate.sh . --gates static,unit,probes --class1a linux --runner macos --peer none --label org-close-flake.Do not merge as part of this task.
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)