Skip to content

Two guard steps carried a literal backslash-n and ran nothing - #223

Merged
matrixarkai merged 1 commit into
mainfrom
fix/two-guard-steps-ran-nothing
Oct 25, 2026
Merged

matrixarkai merged 1 commit into
mainfrom
fix/two-guard-steps-ran-nothing

Conversation

@matrixarkai

Copy link
Copy Markdown
Owner

Two run: blocks in .github/workflows/ci.yml had their line continuations written as the two characters \n instead of a backslash at end of line. YAML's | block keeps them literal, so each guard collapsed onto one line and cargo test was handed extra positional arguments:

cargo test --locked --lib n tests::filing_... -- --exact n | tee /tmp/guard.log

cargo refuses that before running a single test:

error: unexpected argument 'tests::filing_a_record_over_an_existing_key_replaces_it' found
Usage: cargo test [OPTIONS] [TESTNAME] [-- [ARGS]...]

So nothing ran, /tmp/guard.log never got a test result: line, and the grep -q '^test result: ok. 1 passed' on the next line failed. The step was failing for the right reason -- its own "did not run" check was correct -- about a test that was never broken.

Both affected guards are restored to the shape the other guards in the file use. Verified locally at d08ce98, each named test runs and passes on its own:

running 1 test
test tests::filing_a_record_over_an_existing_key_replaces_it ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 459 filtered out

running 1 test
test tests::the_snapshot_decoder_accepts_the_version_before_this_one_and_refuses_the_one_after ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 459 filtered out

Why it survived four merges. format and rollback guards has been red on main since #219 (runs 40090253399, 40119348577, 40138273184, 40146198194); build & docs was green in every one of them. The code was fine and the step name named a passing test, so the red read as noise.

🤖 Generated with Claude Code

`.github/workflows/ci.yml` had two `run:` blocks whose line continuations were
written as the two characters `\n` instead of a backslash at end of line, so the
whole guard collapsed onto one line and `cargo test` was handed extra positional
arguments:

    cargo test --locked --lib n tests::filing_... -- --exact n | tee /tmp/guard.log

cargo refuses that before running anything:

    error: unexpected argument 'tests::filing_a_record_over_an_existing_key_replaces_it' found

So no test ran, `/tmp/guard.log` never got a `test result:` line, and the
`grep -q '^test result: ok. 1 passed'` that follows failed -- which is the step
failing for the right reason about the wrong thing. The guard was reporting
"did not run" and it was telling the truth.

Both affected guards are restored to the shape every other guard in the file
uses. Checked locally at this commit, each named test runs and passes on its own:

    running 1 test
    test tests::filing_a_record_over_an_existing_key_replaces_it ... ok
    test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 459 filtered out

    running 1 test
    test tests::the_snapshot_decoder_accepts_the_version_before_this_one_and_refuses_the_one_after ... ok
    test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 459 filtered out

The `format and rollback guards` job has failed on main since #219 for this and
nothing else; `build & docs` was green throughout. The two tests themselves were
never broken, which is why the failure survived four merges: the job was red, the
code was fine, and the step name named a test that was passing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@matrixarkai
matrixarkai merged commit eb25073 into main Oct 25, 2026
3 checks passed
@matrixarkai
matrixarkai deleted the fix/two-guard-steps-ran-nothing branch October 25, 2026 06:46
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.

2 participants