Repository navigation
module-pack: the --bind-to-image probe captures the tester's usage before judging it (no grep -q on a live pipe) - #3364
Conversation
…fore judging it `docker run … build-project --help 2>&1 | grep -q -- '--bind-to-image'` under `set -o pipefail` is a coin toss: grep -q exits on its first match and closes the pipe, docker dies with EPIPE on its next write, and the pipeline reports failure although the flag was printed. Plugins#1371's first run passed the probe and its second failed it, same tester, same image — and both print the flag when run by hand (measured on 3.1.0-ci.7835's tester inside its portal image). The probe also swallowed the output it judged, so a failure could not say why. Now the usage is captured first; a non-zero exit prints the tail and names the tester app / image (the cache-entry shape reads exactly like this), and only a clean run without the flag names the pin to move. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JuXoLRvG9TfKh5mgnjGfmo
There was a problem hiding this comment.
🟢 Approval recommended
The change is a targeted workflow robustness fix consistent with the stated failure mode, and only raises an optional maintainability nit.
Pull request overview
This PR fixes a flaky CI probe in the node-repo-module-pack workflow where docker run … | grep -q could fail under set -euo pipefail due to grep -q closing the pipe early (SIGPIPE/EPIPE), even when the probed flag is present. It changes the probe to capture the tester’s --help output first and only then evaluate it, while also emitting actionable diagnostics when the probe cannot run.
Changes:
- Capture
build-project --helpoutput into a variable (no live pipe) before checking for--bind-to-image. - Add clearer error reporting for the “tester cannot run in pinned image” case, including a tail of output and pin/cache hints.
- Print a snippet of usage when the flag is absent, so failures explain what was actually observed.
File summaries
| File | Description |
|---|---|
| .github/workflows/node-repo-module-pack.yml | Makes the --bind-to-image capability probe deterministic under pipefail and improves failure diagnostics. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Test Results (shard 1)475 tests 475 ✅ 42s ⏱️ Results for commit 8e756f7. ♻️ This comment has been updated with latest results. |
Test Results (shard 0)251 tests 251 ✅ 2m 10s ⏱️ Results for commit 8e756f7. ♻️ This comment has been updated with latest results. |
Test Results (shard 3)962 tests 962 ✅ 1m 3s ⏱️ Results for commit 8e756f7. ♻️ This comment has been updated with latest results. |
Test Results (shard 5) 5 files 5 suites 1m 21s ⏱️ Results for commit 8e756f7. ♻️ This comment has been updated with latest results. |
Test Results (shard 4)1 571 tests 1 377 ✅ 1m 44s ⏱️ Results for commit 8e756f7. ♻️ This comment has been updated with latest results. |
Test Results (shard 2)986 tests 986 ✅ 3m 28s ⏱️ Results for commit 8e756f7. ♻️ This comment has been updated with latest results. |
Test Results 16 files 16 suites 10m 32s ⏱️ Results for commit 8e756f7. ♻️ This comment has been updated with latest results. |
…rrexit Copilot on #3364: the workflow's own shape (the framework-identity probe) captures output and exit status without set +e/-e, so a later edit cannot slip a command in with errexit off. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JuXoLRvG9TfKh5mgnjGfmo
Summary
The
--bind-to-imageprobe added in #3358 was written asdocker run … build-project --help 2>&1 | grep -q -- '--bind-to-image'inside a step that runs underset -euo pipefail.grep -qexits on its first match and closes the pipe;docker runthen dies with EPIPE on its next write andpipefailreports the pipeline as failed although the flag was printed. It is a coin toss on timing: MeshWeaver.Plugins#1371's first run passed the probe and its second failed it with the same tester and the same image, and both print the flag when run by hand (3.1.0-ci.7835's tester inside its own portal image). The probe also swallowed the output it judged, so the failure could not say why.Now the usage is captured first (
usage=$(docker run …), no live pipe). A non-zero exit prints the tail and names the tester app and platform image, saying that a cache entry restored broken reads exactly like this; only a clean run whose usage lacks the flag names the pin to move.Verification
actionlint: the same 7 pre-existing shellcheck infos as main, nothing new;check-workflow-shell.py --root .0 live findings;check-workflow-timeouts.py65 jobs, 0 violations.pipefailpipeline intogrep -qreturns 141 (SIGPIPE) on a producer that keeps writing after the match.No What's New entry: CI lane plumbing, nothing a user can notice.
Pairs-with: none — a workflow-only change.
🤖 Generated with Claude Code
https://claude.ai/code/session_01JuXoLRvG9TfKh5mgnjGfmo