What happened
In PR #40, the triage pipeline was updated to support the question action and label-category consistency guards. The post-triage-test.sh test suite includes a test case prerequisites-creates-allowed-issue that sets up a config.yaml with an allowlist and expects the post-script to read it and create an issue in the allowed repo. However, the post-script reads config.yaml using yq, and when yq is not installed, it emits a warning and disables cross-repo issue creation entirely. The test does not account for this — it expects issue creation to succeed regardless of yq availability. Running bash scripts/post-triage-test.sh today produces:
FAIL: prerequisites-creates-allowed-issue — expected gh call pattern not found
All other tests pass (47/48).
What could go better
The test should either skip when yq is unavailable or provide a mock yq binary alongside the mock gh. The production code handles missing yq gracefully (line 141-142 of post-triage.sh emits a ::warning:: and falls through), but the test assumes yq is always present. This is likely an oversight rather than a design choice — the test fixture creates a config.yaml with allowlist entries specifically to exercise the allowed-target path, which requires yq to parse.
Confidence: High. The failure is reproducible and the root cause is clear.
Proposed change
In scripts/post-triage-test.sh, add a mock yq binary to ${MOCK_BIN} that reads the config.yaml and returns the allowlist values, similar to how the mock gh and fullsend binaries work. Alternatively, add a guard that skips the prerequisites-creates-allowed-issue and prerequisites-skips-disallowed-target tests when yq is not available, with a clear skip message:
if ! command -v yq &>/dev/null && [[ ! -x "${MOCK_BIN}/yq" ]]; then
echo "SKIP: ${test_name} — yq not available"
return
fi
The mock approach is preferred because it makes the test hermetic — it will pass regardless of the host environment.
Validation criteria
Running bash scripts/post-triage-test.sh in an environment without yq installed should produce 0 test failures. All 48 test cases should either PASS or show an explicit SKIP message.
Generated by retro agent from #40
What happened
In PR #40, the triage pipeline was updated to support the
questionaction and label-category consistency guards. Thepost-triage-test.shtest suite includes a test caseprerequisites-creates-allowed-issuethat sets up a config.yaml with an allowlist and expects the post-script to read it and create an issue in the allowed repo. However, the post-script readsconfig.yamlusingyq, and whenyqis not installed, it emits a warning and disables cross-repo issue creation entirely. The test does not account for this — it expects issue creation to succeed regardless ofyqavailability. Runningbash scripts/post-triage-test.shtoday produces:All other tests pass (47/48).
What could go better
The test should either skip when
yqis unavailable or provide a mockyqbinary alongside the mockgh. The production code handles missingyqgracefully (line 141-142 ofpost-triage.shemits a::warning::and falls through), but the test assumesyqis always present. This is likely an oversight rather than a design choice — the test fixture creates aconfig.yamlwith allowlist entries specifically to exercise the allowed-target path, which requiresyqto parse.Confidence: High. The failure is reproducible and the root cause is clear.
Proposed change
In
scripts/post-triage-test.sh, add a mockyqbinary to${MOCK_BIN}that reads the config.yaml and returns the allowlist values, similar to how the mockghandfullsendbinaries work. Alternatively, add a guard that skips theprerequisites-creates-allowed-issueandprerequisites-skips-disallowed-targettests whenyqis not available, with a clear skip message:The mock approach is preferred because it makes the test hermetic — it will pass regardless of the host environment.
Validation criteria
Running
bash scripts/post-triage-test.shin an environment withoutyqinstalled should produce 0 test failures. All 48 test cases should either PASS or show an explicit SKIP message.Generated by retro agent from #40