Repository navigation
Two guard steps carried a literal backslash-n and ran nothing - #223
Merged
Merged
Conversation
`.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>
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.
Two
run:blocks in.github/workflows/ci.ymlhad their line continuations written as the two characters\ninstead of a backslash at end of line. YAML's|block keeps them literal, so each guard collapsed onto one line andcargo testwas handed extra positional arguments:cargo refuses that before running a single test:
So nothing ran,
/tmp/guard.lognever got atest result:line, and thegrep -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:Why it survived four merges.
format and rollback guardshas been red on main since #219 (runs 40090253399, 40119348577, 40138273184, 40146198194);build & docswas 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