Skip to content

fix(pipefail): here-strings for the last grep -q pipelines in sync-project, review-module, conformance-check - #376

Closed
MendixMau wants to merge 1 commit into
masterfrom
fix/pipefail-owned-files
Closed

MendixMau wants to merge 1 commit into
masterfrom
fix/pipefail-owned-files

Conversation

@MendixMau

Copy link
Copy Markdown
Owner

Direct lane

What changed and why (one paragraph):
grep -q exits on its first match. If the producer on the left of the pipe is still writing, it dies of SIGPIPE, and under set -o pipefail the pipeline then reports failure, so "found" reads as "not found". I re-checked all eight sites on master d16f578 and rewrote each one 1:1 as a here-string (grep -q -- PAT <<<"$(producer)"), as #328 and #329 did elsewhere:

  • bin/sync-project.sh (set -euo pipefail), 5 sites:
    • 101: stub placeholder scan
    • 345: Q9 marker check
    • 361: | grep -v | head -1 | grep -q chain. The head -1 stays inside the command substitution, where its status is discarded.
    • 431: missing intake question check
    • 1371: wrapped-item needle check
  • project-bin/review-module.sh:284: SHOW MODULES output. On a large app this is over one pipe buffer, so a real module could be reported unknown.
  • project-bin/conformance-check.sh:285, 287: one short line each, so these cannot race. I changed them anyway so the static check can stay absolute.

tests/wave2/test-pipefail-grep-q.sh T3 now covers these three files as well (15 scripts). Run against master's versions, the same regex lists all eight sites.

Field evidence: none yet. This is a mechanical rewrite and was not run against a project.

  • No client data anywhere in the diff
  • Size cap: 5 files, about 20 lines
  • Test tier: fixtures only, all run locally. The sync-project fixtures need bin/sync-project.sh as their argument, the conformance fixtures project-bin/conformance-check.sh, and the review fixture project-bin/review-module.sh.
    • test-pipefail-grep-q.sh bin/lib/skill-routing.sh: 3/3
    • test-sync-past-stock: 22/22
    • test-sync-dup-heading-exit: 6/6
    • test-dryrun-writes-nothing: 6/6
    • test-ritual-slim: 17/17
    • test-bug12-sync: 61 checks. The first run showed one failure (60/1). Later runs of both this branch and master showed no FAIL lines, so I read it as flakiness under concurrent load.
    • test-conformance-baseline-scope: 7/7
    • test-conformance-per-brd-ledger: 19/19
    • test-review-conformance-per-brd: 6/6
    • check-portability: clean
    • render-routing --check: in sync, baseline 75,028 words before and after
  • Golden input, both layouts, both platforms: not applicable. There is no new instrument, and here-strings are bash 3.2-safe.
  • CHANGELOG.md line appended, credited

Source: r-eng-backlog item 2.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw


Generated by Claude Code

…oject, review-module, conformance-check

Eight producer | grep -q sites (one a | head -1 | grep -q chain) rewritten 1:1
as here-strings, as #328/#329 did elsewhere. review-module.sh read SHOW MODULES
output (over one pipe buffer on large apps) this way, so pipefail could report a
real module as unknown. test-pipefail-grep-q.sh T3 now covers the three files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
MendixMau pushed a commit that referenced this pull request Oct 14, 2026
…s in sync-project, review-module, conformance-check

Review: independent review MERGE — 8 producer|grep -q sites → here-strings verified equivalent (trailing newline, empty-$_q guard, inner pipeline status, `--` only helps); T3 static check flags exactly the 8 master sites; fixtures pipefail-grep-q 3/0, bug12-sync 61/0 ×3 (60/1 flake not reproduced), sync-dup-heading 6/0, sync-past-stock 22/0, conformance suites green; baseline 75,028 words; leak checks clean. Nit: CHANGELOG "one pipe buffer" (race can start ~4 KB).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
MendixMau added a commit that referenced this pull request Oct 15, 2026
…journey controls, fixes) (#385)

Lands #340 #363 #362 #355 #370 #368 #364 #365 #366 #372 #367 #371 #376 #369 #373 #377 #378 #380.

Review: each constituent PR independently reviewed by a fresh agent that did not write it; merged into integration/2026-10-15 only on a MERGE verdict with green CI (per-PR Review lines in the integration merge commits). After-fix rounds: #373 (env-var cap, rename/skip-loops freshness), #377 (inline URI fallback), #378 (full-pack double count, slice content). Stub diet (#369/#378/#380) behaviour A/B, 5 reps x 2 drafting tasks + 5 retrieval probes x 3 reps: trimmed context no worse than master on every scored metric (planted STOP refused 20/20, parse failures page 2/5 vs 3/5, probes 15/15); mdl Stage 5 56,236 -> 30,647 words, baseline 75,028 -> 73,233. Full suites on c9bc073: run-tests 33/0, wave2 111 fixtures 0 failing. Field evidence: none yet for the instruments (#355 warn-only, #373/#377 read-only).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
@MendixMau

Copy link
Copy Markdown
Owner Author

Landed on master in #385 (squash 868b3cb), after its own independent review on the night integration branch. Closing this PR.


Generated by Claude Code

@MendixMau MendixMau closed this Oct 15, 2026
@MendixMau
MendixMau deleted the fix/pipefail-owned-files branch October 15, 2026 10:47
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