Skip to content

tests: assert FIFO failure outcomes without localized stderr - #367

Merged
juliankang4 merged 2 commits into
midagedev:mainfrom
Burntgogi:fix/card-tests-outcomes
Oct 16, 2026
Merged

juliankang4 merged 2 commits into
midagedev:mainfrom
Burntgogi:fix/card-tests-outcomes

Conversation

@Burntgogi

@Burntgogi Burntgogi commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

2026-10-16: Remove the localized mkfifo stderr assertion; retain exit 70, no cargo invocation, and an unchanged linked target. This removes an incidental wording assertion, not a consumer contract.

The replacement reuses the existing rc_is owner rather than duplicating status capture. No runner behavior, numeric threshold or lint level changes. Captured output remains available to the following linked-file/no-cargo assertion.

Exercised after helper reuse (a946fa6): full card-tests suite 781 tests, 0 failed. The earlier integrated complete recipe check also passed 61 tool self-tests and all test-ownership checks. This cleanup stays separate from the three source-correctness PRs.

@github-actions github-actions Bot added the tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo label Oct 16, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MUST_FIX: The replacement duplicates an existing assertion helper and removes an assertion clause without a dated reason.

Must fix

1. Reuse the existing exit-code assertion owner

tools/ref/card-tests/run.sh:1245 repeats rc_is at line 548, which already captures output, checks the status, and records pass or fail (R14).
This is a kind B duplicate. Reusing the helper removes three lines and preserves the output for the following assertion. Replace the four added lines with:

rc_is 'gate.sh: a FIFO it cannot make ends 70' 70 gs PATH="$GS/fifo:$GS/stub:$PATH"

2. Date the removal of the stderr assertion

tools/ref/card-tests/run.sh:1245 replaces the run call and removes its mkfifo.*File exists clause. The review contract requires a dated reason for a removed assertion clause. The PR body explains the locale failure but gives no date. This is a kind B coverage change.
Record the reason with the change so the removed coverage remains explained. Add this sentence to the PR description:

2026-10-16: Remove the localized mkfifo stderr assertion; retain exit 70, no cargo invocation, and an unchanged linked target.

Checked

Duplicates: 0 new functions, types, or constants; the added assertion block duplicates rc_is. No dryer pairs.
Complexity: no changed Rust functions or crapper results.
Silent failure: 1 status-capture site followed through fail() to the suite's final nonzero exit; no swallowed status.
Tests: bash syntax checks passed for the PR script and the inline replacement. Static mutation check: changing tools/gate.sh:93 from exit 70 to 0 fails the exit assertion; cargo output or a changed target fails the following assertion.
Gates: no numeric pins moved; the stderr clause was removed.
Escape catalog: none of C1–C4 matches the added lines.

Notes

dryer and crapper did not run because no Rust file changed. The full card-tests suite was not run.

🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)

Comment thread tools/ref/card-tests/run.sh Outdated
Comment on lines +1245 to +1248
gs PATH="$GS/fifo:$GS/stub:$PATH" > "$tmp/out" 2>&1
rc=$?
if [ "$rc" = 70 ]; then pass 'gate.sh: a FIFO it cannot make ends 70'
else fail 'gate.sh: a FIFO it cannot make ends 70' "rc $rc, want 70" "$tmp/out"; fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reuse the existing exit-only helper, which preserves the output for the following assertion.

Suggested change
gs PATH="$GS/fifo:$GS/stub:$PATH" > "$tmp/out" 2>&1
rc=$?
if [ "$rc" = 70 ]; then pass 'gate.sh: a FIFO it cannot make ends 70'
else fail 'gate.sh: a FIFO it cannot make ends 70' "rc $rc, want 70" "$tmp/out"; fi
rc_is 'gate.sh: a FIFO it cannot make ends 70' 70 gs PATH="$GS/fifo:$GS/stub:$PATH"

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the last review:

  • Exit-code assertion duplication: fixed by reusing rc_is at tools/ref/card-tests/run.sh:1245.
  • Removed stderr clause: fixed; the PR description gives the dated reason, 2026-10-16.

Verdict: CLEAN: Both earlier findings are resolved, and the helper preserves the exit-code and output checks.

Checked

Duplicates: 0 new functions, types, or constants; the existing rc_is owner replaces the duplicate. No dryer pairs.
Complexity: no changed Rust functions or crapper results.
Silent failure: 1 status-capture site followed through rc_is and fail() to the suite's nonzero exit; command output remains available to the next assertion.
Tests: bash syntax check passed. Static mutation check: changing tools/gate.sh:93 from exit 70 to exit 0 fails the status assertion. Cargo output or a changed linked target fails the following assertion.
Gates: no numeric pins moved; removal of the localized stderr clause has a dated reason.
Escape catalog: none of C1–C4 matches the added line.

Notes

dryer and crapper did not run because no Rust file changed. The full card-tests suite was not run during this review.

🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)

@Burntgogi

Copy link
Copy Markdown
Contributor Author

Addressed both blockers in a946fa6: the FIFO case now calls the existing rc_is owner, and the PR description records the 2026-10-16 reason for deleting the localized stderr assertion. Re-ran the complete card-tests suite: 781 tests, 0 failed; exit 70, no cargo and unchanged linked target are retained.

@juliankang4
juliankang4 merged commit dd7ef96 into midagedev:main Oct 16, 2026
8 checks passed
@juliankang4

Copy link
Copy Markdown
Collaborator

@Burntgogi Thanks for the contribution. The review is done, so I'm merging this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants