Files
codebase-memory-mcp/tests
Martin Vogel cbd241d7f1 fix(tests): venue-parity interface probes must not pipe into grep -q
The two layer-5 interface probes tested for a substring by piping the
captured output into `grep -q`. Under `set -o pipefail` (line 32) that
turns a SATISFIED contract into a probe failure whenever the payload is
larger than the pipe buffer: `grep -q` exits at the first match, and the
writer takes EPIPE on the remainder, so the pipeline reports the writer's
non-zero status even though the match succeeded.

Observed on macos-15-intel:

  test_venue_parity_contract.sh: line 404: printf: write error: Broken pipe
  INTERFACE CONTRACT: scripts/ci/smoke-artifact.sh --help must exit 0 and
    print a Usage: block (rc=0)
  VENUE PARITY CONTRACT VIOLATED — interface probes failed (layer 5)

rc=0 and the Usage: block was present — the match is exactly what made
grep exit early. `smoke-artifact.sh --help` is 698 bytes against a
512-byte PIPE_BUF, and prints `Usage:` on its first line, so the writer
is killed at the earliest possible moment. Whether the remaining write
lands before grep exits is a scheduling race, which is why this only
ever showed up on one runner.

Replace both pipelines with in-shell `case` matching: no subprocess, no
pipe, no race, and a strictly literal match (the second probe's "--help."
was previously a regex whose `.` matched any character).

Verified: the contract passes (18 --help entries, 8 strict-flag entries),
and the matcher still returns 0 for output with no Usage: block, so the
probe can still fail.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-08-28 16:41:38 +02:00
..
2026-06-28 13:05:05 +02:00