Repository navigation
One shared "claim that can go stale" for the install lock and mutation runs #2042
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 21 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
26d47ee
Extract the stripe-mock install lock into a shared stale-claim module
claude 98bc37e
Hold each mutation run with its supervisor's claim instead of a file …
claude 363bc9e
Fold the shared holds onto one LockBody and one withClaim
claude e9a77fc
Drop the three TODO entries the shared claim closes
claude 1a567bd
Keep the claim module's public surface to what production uses
claude 212d2d2
Share the hold-until-released scaffold between the waiting tests
claude 72f515c
Test statNumberOrNull directly, not through whoever happens to call it
claude 6f53473
Kill the claim module's mutation survivors with direct timing tests
claude 72f9ffb
Answer the Codex review: fail loudly, guard the sweep, protect the child
claude 3152944
Keep the claim tests within the line rules CI checks
claude 48beeea
Answer the second Codex review: a touch may only land on its own claim
claude b7317d3
Merge remote-tracking branch 'origin/main' into claude/unify-stale-cl…
claude ede81f3
Answer the third review round: exits, clocks, pids, and file sizes
claude 8dcc362
Sort the record test's imports
claude 4306cac
Cover the claim tests' own never-run paths
claude ebeb422
Keep the strict lint and reviewers happy with the claim watcher
claude ae066a2
Answer the fourth review round: guarded first looks and loud aging
claude 853d2e5
Pin the smallest real process id as a valid supervisor
claude 7df062f
Let the healed-touch test step the clock until the touch lands
claude 18035e6
Sharpen three tests and note the supervisor-mediated kill idea
claude 2eba463
Take the run's claim down before a forced exit
claude c6238d7
Hold the takers' guard while force-removing the run's claim
claude 1f1f6d0
Prove the pid leaves the written record the moment the child ends
claude 3d4226b
Answer the last three isolation survivors
claude 25302f2
Bind the stop listener once before delivering the two signals
claude fd82baa
Split the interrupt tests out of the snapshot-run suite
claude File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
This file was deleted.
Oops, something went wrong.
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This path now depends on
runMutationTestingreturning sorunSnapshotChildcan stop touching and, when the supervisor is gone, age the claim; howeverrunMutationTestingstill has process-exit paths (Deno's default SIGTERM duringwithTestHarnesssetup, andDeno.exit(130)on a repeated signal inmutate). When an orphaned child is killed in either window, it exits withoutsnapshot-child.ts'sfinally, leaving the last fresh claim on arunningrecord for 30 seconds; during that window--cleanskips the dead run and--killcan signal a reused pid. Make those signal paths return/throw through the wrapper or age the claim before exiting.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not actionable as suggested — both remaining windows are the designed fallback, not gaps in it. The first signal already unwinds through every
finally, includingrunSnapshotChild's claim cleanup; the second-signalDeno.exit(130)in the runner exists precisely for an unwind that has stalled, so routing it back through the unwind would defeat it, and aging the claim there would mean threading the isolation layer's claim context deep into the runner. A signal during harness setup is the same story as SIGKILL, which no code can intercept: the stale window exists exactly so any untidy death — however it happens — resolves itself in a bounded 30 seconds on a local tool. The child's aging is a tidy-exit acceleration, not the safety mechanism.Generated by Claude Code