Repository navigation
Avoid grep -q behind a pipe under pipefail in tests - #128
Merged
moodmosaic merged 1 commit intoNov 3, 2026
Merged
Conversation
10 of 12 tasks
Member
|
Thank you, @orsissimo! Can you rebase this? |
orsissimo
force-pushed
the
fix/test-grep-pipefail
branch
from
November 3, 2026 16:13
403fbb8 to
a011dc4
Compare
12 of 14 tasks
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.
Summary
pipefailwhengrep -qfound a match and exited before the writer finished, causing SIGPIPE. Pass text through here-strings to avoid these false failures.608c5c5), including Isolate runtime state and serialize engagement operations #125. Independent of Skip branches HEAD already contains when harvesting #129 and Clone the bare repo and mirrors without hardlinks #127.Changes
grep -qwith here-strings in test helpers and individual checks, including the runtime, launch and harvest checks added by Isolate runtime state and serialize engagement operations #125. Preserve command failures when capturing output before checking it.tests/runtime_signal_trap.sh, capturedocker logsbefore checking for session start, preserving failure handling if the command fails.CHANGELOG.md.Self-review checklist
Test plan
Validation after rebase onto
608c5c5(2026-11-03):git diff --checkpass.ANTHROPIC_API_KEYandCLAUDE_CODE_OAUTH_TOKENare not set in this session.Earlier validation, before this rebase:
$hunderpipefail: on Ubuntu 24.04 under CPU load,echo "$h" | grep -qgave 22 false negatives in 20,000 runs;grep -q ... <<< "$h"gave 0. On macOS, both gave 0 in 5,000 runs../tests/test.sh --unit: macOS Bash 3.2.57, 1388 tests; Ubuntu 24.04, 1400 tests as UID 501 and UID 1000. Each run covered 13 files with 0 failures in three full rounds../tests/test.sh --runtime: 16 passed on macOS and Ubuntu as UID 501 and UID 1000, in three rounds../tests/test.sh --oauth: passed with a real agent on macOS and Ubuntu as UID 501 and UID 1000.costs.sh,progress.sh, Cleanup andgit fsck. Results matched master at every step, including the object mode and Cleanup checks that fail on master and that Clone the bare repo and mirrors without hardlinks #127 fixes../tests/test.sh --all: not run; requires an API key.