What happened
make test fails intermittently in scripts/harness-jira-test.sh (2–4 of the same four assertions per run, a different set each time): triage-jira-token-in-runner, triage-jira-email-in-sandbox, triage-jira-base-url-in-sandbox, code-jira-email-in-sandbox. The harness files are correct; the test is racy.
Cause
The script runs under set -euo pipefail and those assertions are jira_overlay_field … | grep -qF KEY. grep -q exits on the first match while yq is still writing the rest of its multi-line output, so yq takes SIGPIPE (rc 141) and pipefail turns the assertion false. Instrumented: rc=141 pipestatus=[0] on 6 of 8 runs of the JIRA_TOKEN check. Only positive multi-line greps flake; the negative *-not-in-sandbox checks read to EOF and never do.
Fix
Capture the field first, then match (out="$(jira_overlay_field …)"; grep -qF KEY <<<"$out"). PR #1164.
What happened
make testfails intermittently inscripts/harness-jira-test.sh(2–4 of the same four assertions per run, a different set each time):triage-jira-token-in-runner,triage-jira-email-in-sandbox,triage-jira-base-url-in-sandbox,code-jira-email-in-sandbox. The harness files are correct; the test is racy.Cause
The script runs under
set -euo pipefailand those assertions arejira_overlay_field … | grep -qF KEY.grep -qexits on the first match whileyqis still writing the rest of its multi-line output, soyqtakes SIGPIPE (rc 141) andpipefailturns the assertion false. Instrumented:rc=141 pipestatus=[0]on 6 of 8 runs of the JIRA_TOKEN check. Only positive multi-line greps flake; the negative*-not-in-sandboxchecks read to EOF and never do.Fix
Capture the field first, then match (
out="$(jira_overlay_field …)"; grep -qF KEY <<<"$out"). PR #1164.