The container harness ran nothing, and exited 0 doing it - #13
Merged
Conversation
scripts/linux-check.sh inlined the script the container was to run into the
docker command line inside single quotes. One of its own comments contains
"another platform's". The apostrophe closed the quoting, so what docker was
handed was:
argv[17]='-c'
argv[18]='\n # The host target directory is another platforms'
argv[19]='and'
argv[20]='can'
argv[21]='be'
argv[22]='gigabytes.'
bash runs a comment successfully and silently, and `-- "$@"` -- the caller's
own arguments -- was among the words that fell out of the string. The harness
returned 0 in under a second having built and tested nothing.
The Linux tracer cannot be built on macOS or Windows, so this script is the
only gate the two Linux backends pass through on a developer machine. Every
claim of a container run made through it is void.
The fix is structural. The container script is now scripts/linux-check-inner.sh,
named on the command line as a path, so no quoting of the outer command can
truncate it; escaping the apostrophe would have fixed this instance and left
the next comment free to do it again. scripts/linux-verify.sh, already a file
for the full fixed pipeline, was the pattern -- the inline copy was a leftover
of a half-finished extraction. The inner script also sets the three git config
values several tests need and the inline version never had.
Seen red first: all four cases in crates/arc-cli/tests/harness.rs failed
against the old script, printing the argv above. They put a `docker` that
records its arguments on PATH, so they need neither Docker nor Linux and run
on every platform.
Recorded as docs/BUGS.md #13, because a harness reporting success while doing
nothing is the same silent-failure shape the rest of that file is about, and
the worst instance of it: it is what the others were caught by.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Sep 5, 2026
macOS ships bash 3.2, where an empty array expanded under `set -u` is an unbound
variable rather than nothing at all. "${TTY[@]}" therefore killed the script
before it reached docker, and all four new harness tests failed on the macOS
runner with `TTY[@]: unbound variable` while Linux and the container were green.
Reproduced on this machine with /bin/bash 3.2.57 before the change and fixed
with ${TTY[@]+"${TTY[@]}"}; the four tests pass after it, and the fake docker
now receives `bash /src/scripts/linux-check-inner.sh test --workspace`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Both sides add to the unreleased section; keep both entries. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Both sides add an entry: 13 for the harness that ran nothing, 14 for the concurrent database lock. Keep both, and make the opening count say fourteen with 10 and 13 as the test defects and 11, 12 and 14 as the unexplained ones. 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.
What was wrong
scripts/linux-check.shinlined the script the container was to run into thedocker runcommand line inside single quotes. One of its own comments reads:The apostrophe in
platform'sclosed the quoting. Substituting adockerthat prints its argv shows what was actually asked for:The container ran
bash -con a single comment.bashexecutes a comment successfully and silently, so the exit status was 0. Thetar, therustup component addandexec cargo "$@"were never in the string — and neither were the caller's own arguments, which-- "$@"should have delivered.scripts/linux-check.sh test --workspacereturned success in under a second, having built and tested nothing.Why it is the worst shape of defect in
docs/BUGS.mdEvery other silent failure in that file is Arc reporting success while not doing its job. This is the harness doing it, which is strictly worse, because the harness is what the other twelve were caught by. The Linux tracer cannot be built on macOS or Windows, so this script is the only gate the two Linux backends pass through on a developer machine. Every claim of a container run made through it is void.
I have not established how long it stood, and I am not going to guess a date I have not verified.
The fix is structural, not an escape
The container script is now
scripts/linux-check-inner.sh, named on the command line as a path. No quoting of the outer command can truncate a file. Escaping the apostrophe would have fixed this instance and left the next comment free to do it again.scripts/linux-verify.shwas already a file, for the full fixed pipeline, and is described as "run inside the container bylinux-check.sh" — which it never was. The inline copy was a leftover of a half-finished extraction.The inner script also sets
user.email,user.nameandinit.defaultBranch, which several tests need and CI sets; the inline version never did, so the first genuinely-executed run would have failed on that instead.Seen red first
All four cases in
crates/arc-cli/tests/harness.rsfailed against the old script, printing the argv above. They put adockerthat records its arguments first onPATH, so they need neither Docker nor Linux and run on every platform. They assert that the caller's arguments arrive, that what is named is a script file rather than a comment, that no fragment of a comment appears as an argument, and that every script named exists and passesbash -n.Gates run
Host (macOS):
cargo fmt --all,cargo clippy --workspace --all-targets --all-features -- -D warningsclean, harness suite 4 passed.Container, for the first time genuinely:
bash scripts/linux-check.sh test --workspace --no-fail-fastinrust:1on Docker Desktop (arm64, 12 CPUs). It now builds and runs the whole workspace, which takes minutes and prints hundreds of lines. 150 passed, 2 failed.The two failures are on
main's code and are not caused by anything here — they are concurrency tests, and both are of the shapedocs/BUGS.md#12 already records for a contended container:Both fail on
assert!(c.wait().unwrap().success())and neither says anything more, because that assertion discards the child's status and output. That is the first thing the working harness found, and I am reporting it rather than folding it into this branch.🤖 Generated with Claude Code