Repository navigation
true-check: skip non-regular *.json in gate-passes without blocking (D11) - #87
Merged
Merged
Conversation
…D11) A FIFO named *.json in the gate dir hung eval and verify: os.open(O_RDONLY|O_NOFOLLOW) blocks on a FIFO before the S_ISREG check runs. Now each entry is lstat'ed first and anything that is not a plain file is skipped with the reason "NAME is not a plain file; skipped". The record open and the consumed.log open add O_NONBLOCK, and fstat re-checks S_ISREG after the open, so a swap after lstat cannot block either. Tests: a FIFO 0.json alone holds with that reason; a FIFO before a valid record still allows, and verify consumes once; a FIFO consumed.log is refused. Both run under a 20 s cap so a hang fails instead of stalling CI. Builder: Grok Bot (Code Cole executor session); underlying model unknown
The flag is not a Linux fix: POSIX leaves O_RDWR on a FIFO undefined, and on Linux the open already returns without blocking while fstat already refuses a non-file. Comment only; no behavior change. Builder: Grok Bot (Code Cole executor session); underlying model unknown
rymiwe
marked this pull request as ready for review
November 24, 2026 21:33
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.
Follow-up to #86. Paul's cc6d61c probe D11: a FIFO named
*.jsonin the gate-passes dir hangstrue-check evalandverify.os.open(O_RDONLY|O_NOFOLLOW)blocks on the FIFO before theS_ISREGcheck runs.Change
gate_pass:lstateach*.jsonentry first. Anything that is not a plain file (FIFO, device, link, dir) is skipped with the reasonenforced_by GATE: NAME is not a plain file; skipped.O_NONBLOCK.fstatre-checksS_ISREGafter the open, so swapping in a FIFO after thelstatcannot block either.consumed.logopen also addsO_NONBLOCK, as a defensive portability guard, not a Linux fix. POSIX leavesO_RDWRon a FIFO undefined; on Linux that open already returns without blocking, andfstatalready refuses anything that is not a plain file.Evidence
Fail-first, new tests on main d2cbaa2 (no fix):
The consumed.log FIFO test already passes on main, because on Linux O_RDWR does not block on a FIFO and main already refuses it via fstat. That O_NONBLOCK hunk and its test stay as a portability guard.
Same tests on this branch:
Full
tests/test_true_check.py:Ran 113 testsOK.tests/test_lint_scorecard.py:Ran 35 testsOK. Localunittest discover: 281 tests, 3 setUpClass errors (test_guild_update, test_pr_gate_contract, test_release_lifecycle). All three need~/code/bridgekeeper, which this box doesn't have, and they error the same way on main. CI runs them.Paul's probes (2026-11-24-guild86-5071246-probes.sh rev 2), on a /tmp ledger copy with wes-colleague-approve set to approved. Diff from main to branch, the only two lines that change:
D7 still holds. Only the reason is more specific.
Paul's re-audit (2026-11-24, 10:55 AM PT) passed. The one nit was to label the consumed.log O_NONBLOCK hunk as a guard; that is a comment-only follow-up on this branch, with no behavior change.
Scans on the diff: gitleaks
no leaks found, name-guard rc 0, secret-guard rc 0, employer-name grep: no hits.Builder: Grok Bot (Code Cole executor session); underlying model unknown.