From 31ccfe15f8c4e388c691ed8be5e7d4f1f94db910 Mon Sep 17 00:00:00 2001 From: cflmy Date: Wed, 25 Nov 2026 11:34:14 +0800 Subject: [PATCH] ci: make the stale-Analysis rejection step shell-safe The multiline if/printf block was truncated by the runner shell, so the contract lane aborted with a syntax error after all protocol consumers had already passed. Replace it with a single Python byte-append and an && guard; the assertion still requires the stale artifact to be rejected. --- .woodpecker/main.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.woodpecker/main.yml b/.woodpecker/main.yml index e8cccdf..9224de5 100644 --- a/.woodpecker/main.yml +++ b/.woodpecker/main.yml @@ -31,12 +31,11 @@ steps: - python3 tools/ci/verify_observation_stream.py /tmp/control-events.jsonl /tmp/control-observation.json - | set -eu - cp /tmp/control-analysis.json /tmp/analysis-stale.json - printf ' ' >> /tmp/analysis-stale.json - if python3 tests/consumers/observation_consumer.py --analysis /tmp/analysis-stale.json /tmp/control-events.jsonl; then + python3 -c 'import pathlib; p = pathlib.Path("/tmp/control-analysis.json"); pathlib.Path("/tmp/analysis-stale.json").write_bytes(p.read_bytes() + b" ")' + python3 tests/consumers/observation_consumer.py --analysis /tmp/analysis-stale.json /tmp/control-events.jsonl && { echo "stale Analysis was accepted" >&2 exit 1 - fi + } echo "stale Analysis rejected" test: