Skip to content

module-pack: the --bind-to-image probe captures the tester's usage before judging it (no grep -q on a live pipe) - #3364

Merged
meshweaver-cloud[bot] merged 2 commits into
mainfrom
fix/bind-to-image-probe-epipe
Sep 5, 2026
Merged

meshweaver-cloud[bot] merged 2 commits into
mainfrom
fix/bind-to-image-probe-epipe

Conversation

@rbuergi

@rbuergi rbuergi commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Summary

The --bind-to-image probe added in #3358 was written as docker run … build-project --help 2>&1 | grep -q -- '--bind-to-image' inside a step that runs under set -euo pipefail. grep -q exits on its first match and closes the pipe; docker run then dies with EPIPE on its next write and pipefail reports 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.py 65 jobs, 0 violations.
  • Shape proven locally: a pipefail pipeline into grep -q returns 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

…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
Copilot AI lite review requested due to automatic review settings September 5, 2026 19:48
@meshweaver-cloud
meshweaver-cloud Bot enabled auto-merge September 5, 2026 19:49

Copilot AI 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.

🟢 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 --help output 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.

Comment thread .github/workflows/node-repo-module-pack.yml
@github-actions

github-actions Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 1)

475 tests   475 ✅  42s ⏱️
  1 suites    0 💤
  1 files      0 ❌

Results for commit 8e756f7.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 0)

251 tests   251 ✅  2m 10s ⏱️
  1 suites    0 💤
  1 files      0 ❌

Results for commit 8e756f7.

♻️ This comment has been updated with latest results.

@rbuergi rbuergi mentioned this pull request Sep 5, 2026
6 of 26 tasks
@github-actions

github-actions Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 3)

962 tests   962 ✅  1m 3s ⏱️
  2 suites    0 💤
  2 files      0 ❌

Results for commit 8e756f7.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 5)

    5 files      5 suites   1m 21s ⏱️
1 283 tests 1 283 ✅ 0 💤 0 ❌
1 284 runs  1 284 ✅ 0 💤 0 ❌

Results for commit 8e756f7.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 4)

1 571 tests   1 377 ✅  1m 44s ⏱️
    4 suites    194 💤
    4 files        0 ❌

Results for commit 8e756f7.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 2)

986 tests   986 ✅  3m 28s ⏱️
  3 suites    0 💤
  3 files      0 ❌

Results for commit 8e756f7.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

   16 files     16 suites   10m 32s ⏱️
5 528 tests 5 334 ✅ 194 💤 0 ❌
5 529 runs  5 335 ✅ 194 💤 0 ❌

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
@meshweaver-cloud
meshweaver-cloud Bot added this pull request to the merge queue Sep 5, 2026
Merged via the queue into main with commit b3936a2 Sep 5, 2026
27 checks passed
@rbuergi
rbuergi deleted the fix/bind-to-image-probe-epipe branch October 10, 2026 13:10
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