Repository navigation
fix(tri): --dir accepted two degenerate inputs and exited 0 (#2492) - #2510
Merged
Merged
Conversation
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
Contributor
PR DashboardGenerated at: 2026-08-23 07:30:47 UTC
Summary
Seal Status
|
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
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.
--dirshipped one iteration ago in #2509. Four degenerate inputs; two of them exited 0.git status failedThe empty directory is the vacuous pass, in the command whose subject is vacuous passes
A table with a header and no rows reads exactly like a clean suite. The file filter was widened the day before because a wrong filter produced this table — and the empty result was never made to say so, so the hazard survived the fix aimed at it.
The one outside a work tree has teeth
This command rewrites each gate file in place and restores it afterwards. That restore is only a promise because
git checkoutcan undo an interrupted run. Outside a repository there is no undo — and the dirty-tree guard that exists for exactly this passed silently, becausegit statusfails there and its empty stdout reads as clean.A guard whose failure mode is indistinguishable from its success.
And the bug was written into its own fix
The first version of the empty-directory refusal printed
FAIL: no gate scripts under …and returnedOk(())— announcing that nothing had been measured, and exiting 0. Caught by measuring rather than by reading: exit 0 before, exit 1 after. A message is not a verdict.Verified
every_degenerate_dir_is_refused_by_nameasserts all three refusals and the accepting direction, so the refusals cannot pass for a function that refuses everything. Verified RED on the restored defect (the out-of-repository branch returning Ok). Default behaviour unchanged: identical output on the 13-gate suite, 14 unit tests green.Refs #2492