Repository navigation
test(reference): scope cleanup faults to the owned source file - #2430
Merged
Merged
Conversation
Keep Git metadata reads independent of source-file close failure injection. Cover an enclosing repository and verify the retained real handle stays live until the same cleanup owner successfully closes it. Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
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.
Reference cleanup tests fail when their temporary source directory belongs to an enclosing Git repository: the broad
fs.openmock counts legitimate metadata probes as source opens and injects the source close failure into.git/HEAD. Latest main CI passes in its clean environment, while the same source fails locally withopenCalls: 8instead of1.Scope counters and close-failure injection to the exact owned source file. Retain both an ordinary-directory control and a deterministic enclosing-Git fixture. Existing partial-byte, resource-identity, blocked-new-work and 1/2/3 retry assertions remain; native descriptor observations additionally prove the retained source handle stays live until cleanup succeeds. Production Git discovery and resource ownership are unchanged.
Closes #2428.
Validation:
.git/HEADowner (1 failed / 4 passed).npm run check:ci, test discovery (1,003 files exactly once), andnpm run docs:checkpassed.4f4f6cd7bon final head43d9b86741913b6747697b2662f557247d4ecc9e; the PR diff remains one test file. Post-integration cleanup/EVM checks passed 17 cases; the current Python command passed 15 cases (9 LLDB + 6 context-receipt tests).Review: traced source traversal and VCS reads from
ReferenceSourceImportthrough their independent file owners. The production nearest-enclosing-repository behavior is intentional. The test injector now owns one precise fault instead of poisoning unrelated metadata handles; no related product refactor is needed.