From 625c11319a93b01c7822300ca3e0c1fb714c06b2 Mon Sep 17 00:00:00 2001 From: Edward Langley Date: Tue, 22 Sep 2026 21:09:46 -0700 Subject: [PATCH] fmt-workspaces: exit 2 means no verdict, not no output (improvise-ximf) The unreached-package arm exits 2 and names the package's Cargo.toml, so the usage text's "NO file is named" was false for it. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01VdfEGXA7aJ6ftMsCc9PJze --- context/test-evidence/tooling.md | 8 +++++--- scripts/fmt-workspaces.sh | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/context/test-evidence/tooling.md b/context/test-evidence/tooling.md index bda78aae..c49691d2 100644 --- a/context/test-evidence/tooling.md +++ b/context/test-evidence/tooling.md @@ -417,9 +417,11 @@ getting wrong. The line the split actually needs is **"did the gate run"**: - exit 1 — rustfmt did not certify a root clean. A diff or a refusal to parse; either way **a file is named** and the tree is what is wrong. - exit 2 — the gate did not run. Usage, no cargo, no rustfmt, `cargo metadata` - failed, no `[workspace]` root. **No file is named.** Every such cause is - checked *above* the loop, which is what makes the narrowing true rather than - hopeful. + failed, no `[workspace]` root. **No source file is named.** Every such cause + is checked *above* the loop, which is what makes the narrowing true rather + than hopeful. (Since improvise-90ea, a package no root reaches is also exit 2, + and it names that package's `Cargo.toml`, which is the reason no verdict + exists. The line is "no verdict", not "no output"; improvise-ximf.) Both directions are now pinned, and two further rivals were injected: diff --git a/scripts/fmt-workspaces.sh b/scripts/fmt-workspaces.sh index 982d2211..98bc8370 100755 --- a/scripts/fmt-workspaces.sh +++ b/scripts/fmt-workspaces.sh @@ -19,7 +19,8 @@ exit 1 rustfmt did not certify a root clean: a file differs from rustfmt's and the tree is what is wrong. exit 2 the gate did not run: usage error, no cargo, no rustfmt, cargo metadata failed, no [workspace] root found, or a [package] that no - root has as a member. NO verdict was produced and NO file is named. + root has as a member. NO verdict was produced. No SOURCE file is + named; the unreached-package case names its Cargo.toml. The split is "did the gate run", not "is every exit-1 cause a diff". That is narrower than it sounds and it is deliberate -- see the note on rc=1 below.