Conversation
test_build_context_records_non_regular_files_in_the_ledger checks hasattr(os, "mkfifo") before creating a named pipe. Its neighbour test_build_context_records_non_regular_entries_in_the_ledger calls os.mkfifo directly, so on a platform without named pipes it raises AttributeError during setup instead of reporting that it cannot run. Apply the guard the sibling case already uses. Signed-off-by: kevin9327 <[email protected]>
This was referenced Sep 10, 2026
rng1995
approved these changes
Sep 12, 2026
rng1995
left a comment
Collaborator
There was a problem hiding this comment.
[SkillSpector Review]
Approved at head 4aa133b00560a0515bdf237cc7656294e04b0dce.
The added mkfifo capability guard covers the remaining named-pipe test without weakening the assertion on platforms that support FIFOs. The focused change is consistent with the sibling test and required CI is green.
Merge gate: the PR is mergeable but BEHIND; update it to the protected branch's required head state before merging.
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.
Problem
tests/nodes/test_build_context.pyhas two adjacent cases that build a named pipe to prove theledger keeps non-regular entries. One guards the primitive, the other does not:
os.mkfifodoes not exist on Windows, so the second case raisesAttributeErrorduring setup.Its assertion — that a discovered FIFO is retained as failed ledger evidence rather than
silently dropped — is never evaluated, and the result is indistinguishable from a real
regression in that ledger behaviour.
Fix
Apply the guard the sibling case already uses, with the same wording. Two lines; no change on
any platform that has
os.mkfifo, so CI (ubuntu-latest) continues to execute the caseexactly as before.
Reproduction
Windows 11, Python 3.12.10, against unmodified
main(704bc95). Both cases selected togetherso the asymmetry is visible in one run:
With this change, same command:
What must still hold
tests/nodes/test_build_context.pyas a whole — exactly one case changes state, and the passingset is untouched:
The eleven that remain are unrelated to named pipes and are not touched here.
ruff check tests/—All checks passed!ruff format --check tests/—126 files already formattedDiff is
1 file changed, 2 insertions(+).