Skip to content

fix(tri): --dir accepted two degenerate inputs and exited 0 (#2492) - #2510

Merged
gHashTag merged 2 commits into
masterfrom
fix/dir-degenerate
Aug 23, 2026
Merged

gHashTag merged 2 commits into
masterfrom
fix/dir-degenerate

Conversation

@gHashTag

Copy link
Copy Markdown
Collaborator

--dir shipped one iteration ago in #2509. Four degenerate inputs; two of them exited 0.

input before after
a directory that does not exist refused, names the flag unchanged
a file instead of a directory died with git status failed refused as not a directory
an empty directory header, no rows, exit 0 refused
a directory outside any git work tree ran, exit 0 refused

The 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 checkout can undo an interrupted run. Outside a repository there is no undo — and the dirty-tree guard that exists for exactly this passed silently, because git status fails 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 returned Ok(()) — 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_name asserts 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

@github-actions

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-23 07:29:08 UTC

Summary

Status Count
Total Open PRs 6
PRs with Failing Checks 2
PRs with All Checks Green 4
READY 3
FAILING 2
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=e905ba8eeb53 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-23 07:30:47 UTC

Summary

Status Count
Total Open PRs 6
PRs with Failing Checks 2
PRs with All Checks Green 4
READY 3
FAILING 2
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=e905ba8eeb53 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@gHashTag
gHashTag merged commit e685202 into master Aug 23, 2026
26 of 28 checks passed
@gHashTag
gHashTag deleted the fix/dir-degenerate branch August 23, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant