@soleur/opencode 3.383.1 → 3.383.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soleur/opencode",
3
- "version": "3.383.1",
3
+ "version": "3.383.2",
4
4
  "description": "Soleur AI organization plugin for OpenCode",
5
5
  "type": "module",
6
6
  "bin": {
@@ -32,13 +32,15 @@
32
32
  # 1 a selected test failed, the delegated runner was signal-killed (rc 3
33
33
  # maps to 1 reason=runner-signal), or the content-trigger command failed
34
34
  # (reason=content-trigger-failed); a failure seen before budget expiry
35
- # wins over deferral
35
+ # wins over deferral: a budget kill (runner rc 124/137) after the runner
36
+ # recorded a red (a runner-classed `failed` rc, stamped before the deadline) in its
37
+ # SOLEUR_PJ_PROVISIONAL_FILE sidecar exits 1 reason=failed-before-budget
36
38
  # 4 AFFECTED_GATE_REFUSED — no-stack, bad-config key=<k>,
37
39
  # vacuous-test-command, no-base-ref, not-a-repo (--self-check outside a
38
40
  # repository), toolchain-missing, runner-refused,
39
41
  # foreign-runner (a foreign scripts/test-all.sh AND no adapter resolves)
40
42
  # 6 AFFECTED_GATE_BUDGET_DEFERRED — budget expired AND a CI test workflow was
41
- # detected; CI stays the authoritative gate
43
+ # detected AND no red was seen before the kill; CI stays the authoritative gate
42
44
  # 7 no test suite detected at all — disclosed note, never labelled passed
43
45
  #
44
46
  # Output contract:
@@ -147,6 +149,11 @@ trap 'affected_scratch_clean' EXIT
147
149
  trap 'affected_scratch_clean; exit 130' INT
148
150
  trap 'affected_scratch_clean; exit 143' TERM
149
151
 
152
+ # (#12013) The sidecar channel belongs to the delegated-runner arm, which sets it itself on the runner
153
+ # call. A value inherited from the caller's environment must never reach the custom-command arm, the
154
+ # adapters or the content-trigger command, so it is dropped before any arm runs.
155
+ unset SOLEUR_PJ_PROVISIONAL_FILE
156
+
150
157
  usage() {
151
158
  sed -n '1,20p' "$0" | grep -E '^#' | sed 's/^# \{0,1\}//'
152
159
  cat <<'EOF'
@@ -577,14 +584,20 @@ if [[ -n "$RUNNER" ]]; then
577
584
  echo "affected-tests: no CI test workflow detected — wall-clock budget not enforced; running to completion."
578
585
  fi
579
586
  rc=0
587
+ # (#12013) The provisional-red sidecar: a runner that knows the variable appends one
588
+ # `label<TAB>rc<TAB>epoch` record per red it has already seen; an unknown variable is inert, so a
589
+ # customer runner needs no capability probe. The gate owns the file (fresh mktemp, removed on
590
+ # every exit), so a stale file at a guessable path is never read. Read only at the 124|137 arm.
591
+ PROVISIONAL_FILE=""
592
+ if affected_mktemp provisional; then PROVISIONAL_FILE="$AFFECTED_TMP"; fi
580
593
  # (#12013, ADR-242 addendum) Hand the runner's parallel pool a width of 4 for a local --affected
581
594
  # run: not --full, not under CI, not over a width the operator set (SOLEUR_TEST_JOBS=1 is the serial
582
595
  # override), and only when the runner itself mentions the knob. The prefix scopes it to this call.
583
596
  # Pinned by plugins/soleur/test/affected-tests-pool-default.test.sh.
584
597
  if (( ! ARG_FULL )) && [[ -z "${CI:-}" ]] && grep -q SOLEUR_TEST_JOBS "$RUNNER"; then
585
- SOLEUR_TEST_JOBS="${SOLEUR_TEST_JOBS:-4}" affected_bound bash "$RUNNER" "$_flag" || rc=$?
598
+ SOLEUR_PJ_PROVISIONAL_FILE="$PROVISIONAL_FILE" SOLEUR_TEST_JOBS="${SOLEUR_TEST_JOBS:-4}" affected_bound bash "$RUNNER" "$_flag" || rc=$?
586
599
  else
587
- affected_bound bash "$RUNNER" "$_flag" || rc=$?
600
+ SOLEUR_PJ_PROVISIONAL_FILE="$PROVISIONAL_FILE" affected_bound bash "$RUNNER" "$_flag" || rc=$?
588
601
  fi
589
602
  # A delegated verdict is eligible for the content trigger unless the operator
590
603
  # passed --full; finish() runs it only when this run passed.
@@ -599,6 +612,13 @@ if [[ -n "$RUNNER" ]]; then
599
612
  124|137)
600
613
  (( rc == 137 )) && echo "affected-tests: the runner exited 137 (SIGKILL — OOM or kill escalation), not necessarily budget expiry; deferral still applies." >&2
601
614
  if [[ "$AFFECTED_BUDGET_ACTIVE" == 1 && "$CI_NAME" != none ]]; then
615
+ # (#12013) A red the runner printed before the kill is still a red: a non-zero rc the runner
616
+ # classed `failed` (it never records a named-signal exit, ADR-177), stamped strictly before the
617
+ # deadline (a worker that turns the kill's TERM into exit 1 lands after it). Malformed or
618
+ # missing records resolve to nothing, so the deferral below is the unchanged default.
619
+ if affected_sidecar_red "$PROVISIONAL_FILE" "$AFFECTED_DEADLINE"; then
620
+ finish 1 "$_dmode" failed-before-budget runner "$CI_NAME" - - -
621
+ fi
602
622
  finish 6 "$_dmode" budget-deferred runner "$CI_NAME" - - -
603
623
  fi
604
624
  finish 1 "$_dmode" failed runner "$CI_NAME" - - - ;;
@@ -596,11 +596,17 @@ Usage: bash scripts/test-all.sh [--affected] [--full]
596
596
  --print-selection print the suites this diff selects; runs nothing
597
597
  USAGE
598
598
  }
599
+ fake_sidecar() { # F4: record the hand-over, and write FAKE_RUNNER_SIDECAR (@NOW / @LATE epochs) into it
600
+ [[ -n "${SOLEUR_PJ_PROVISIONAL_FILE:-}" ]] && printf '%s\n' "$SOLEUR_PJ_PROVISIONAL_FILE" >> "${FAKE_DIR:?}/sidecar-path.log"
601
+ [[ -n "${FAKE_RUNNER_SIDECAR:-}" && -n "${SOLEUR_PJ_PROVISIONAL_FILE:-}" ]] || return 0
602
+ local now late; now="$(date +%s)"; late=$((now + 100000))
603
+ printf '%b' "$FAKE_RUNNER_SIDECAR" | sed "s/@NOW/$now/g; s/@LATE/$late/g" >> "$SOLEUR_PJ_PROVISIONAL_FILE"
604
+ }
599
605
  for a in "$@"; do
600
606
  case "$a" in
601
607
  --print-selection) printf 'AFFECTED_SELECTED\tsuite\taffected\n'; exit 0 ;;
602
- --affected) exit "${FAKE_RUNNER_AFFECTED_RC:-${FAKE_RUNNER_RC:-0}}" ;;
603
- --full) exit "${FAKE_RUNNER_FULL_RC:-${FAKE_RUNNER_RC:-0}}" ;;
608
+ --affected) fake_sidecar; exit "${FAKE_RUNNER_AFFECTED_RC:-${FAKE_RUNNER_RC:-0}}" ;;
609
+ --full) fake_sidecar; exit "${FAKE_RUNNER_FULL_RC:-${FAKE_RUNNER_RC:-0}}" ;;
604
610
  --capacity) printf 'measured_runs=0\n'; exit 0 ;;
605
611
  --help|-h) usage; exit 0 ;;
606
612
  *) echo "runner stub: unexpected argv: $a" >&2; exit 64 ;;
@@ -689,6 +695,8 @@ reset_fakes() {
689
695
  export FAKE_PYTEST_COLLECTED="" FAKE_PYTEST_DESELECTED=""
690
696
  export FAKE_TURBO_RC=0 FAKE_TURBO_EXPECT=""
691
697
  export FAKE_RUNNER_RC=0 FAKE_RUNNER_AFFECTED_RC="" FAKE_RUNNER_FULL_RC=""
698
+ export FAKE_RUNNER_SIDECAR=""
699
+ : > "$TESTROOT/sidecar-path.log"
692
700
  export FAKE_PM_TEST_RC=0
693
701
  export FAKE_GIT_FAIL_OTHERS=0 FAKE_GIT_FAIL_VERB=""
694
702
  export FAKE_CT_RC=0 FAKE_CT_SLEEP="" FAKE_CT_NOLEDGER=0
@@ -698,9 +706,9 @@ RSEQ=0; RC=0; OUT=""
698
706
  _run_gate() { # <PATH> <repo> <kind:gate|explain|selfcheck> [gate args…]
699
707
  local p="$1" repo="$2" kind="$3"; shift 3
700
708
  RSEQ=$((RSEQ + 1))
701
- ( cd "$repo" && env -u CLAUDE_PLUGIN_ROOT \
709
+ ( cd "$repo" && env -u CLAUDE_PLUGIN_ROOT ${RUN_UNSET_CI:+-u CI} \
702
710
  PATH="$p" \
703
- FAKE_LOG="$CALLS" FAKE_DIR="$TESTROOT" \
711
+ FAKE_LOG="$CALLS" FAKE_DIR="$TESTROOT" ${RUN_TMPDIR:+TMPDIR="$RUN_TMPDIR"} \
704
712
  REAL_NODE="$REAL_NODE" REAL_PY="$REAL_PY" REAL_GIT="$REAL_GIT" \
705
713
  bash "$SUT" "$@" ) > "$TESTROOT/outs/$RSEQ.out" 2>&1
706
714
  RC=$?
@@ -2334,6 +2342,105 @@ reset_fakes; run_gate "$R_H3" gate
2334
2342
  want_marker "H3: unarmed marker is unchanged" "$CT_RUN"
2335
2343
  unset R_CTE1 R_A1 R_A4 R_A5 R_P1 R_P2 R_D1 R_I1 R_I2 R_U1 R_U2 R_U3 R_U4 R_X1 R_X1U R_X2 R_B1 R_R1 R_V1 R_W1 R_W2 R_W3 R_W4 R_W5 R_W6 R_W7 R_W8 R_W9 R_W10 R_W11 R_W12 R_W13 R_W14 R_W15 R_T12C R_T1 R_T2 R_T3 R_T4 R_T5 R_T6 R_T7 R_T8 R_T9 R_T10A R_T10B R_T10C R_T11 R_T11B R_T12 R_T12B R_T14 R_T15 R_T15B R_H1 R_H2 R_H3
2336
2344
 
2345
+ # ============================ F4: a budget kill reports a visible red (#12013) ===
2346
+ # The runner appends one `label<TAB>rc<TAB>epoch` record per provisional red to the sidecar the gate
2347
+ # hands it (SOLEUR_PJ_PROVISIONAL_FILE). On a budget kill (124/137) a record with a non-zero rc (1..255)
2348
+ # stamped BEFORE the deadline means the run was already red: rc 1 reason=failed-before-budget. Anything
2349
+ # else stays rc 6. The expected pairs below are literals, independent of the implementation.
2350
+ mk_f4_repo() { # <name> [pool] — delegated runner, CI detected, 60 s budget
2351
+ local r; r="$(mk_repo "$1")"; write_runner_capable "$r"; seed_js "$r"; seed_ci "$r"
2352
+ write_config "$r" '{"budget_seconds": 60}'
2353
+ [[ "${2:-}" == pool ]] && printf '# SOLEUR_TEST_JOBS\n' >> "$r/scripts/test-all.sh"
2354
+ seal_base "$r"; commit_chg "$r" src/f4.js "f4"
2355
+ printf '%s' "$r"
2356
+ }
2357
+ f4_run() { # <repo> <sidecar-text> [runner-rc]
2358
+ reset_fakes; export FAKE_RUNNER_RC="${3:-124}" FAKE_RUNNER_SIDECAR="$2"; run_gate "$1" gate
2359
+ }
2360
+ R_F4="$(mk_f4_repo f4)"
2361
+ f4_run "$R_F4" ''
2362
+ want_rc 6 "F4a: control - kill with no sidecar record keeps the deferral"
2363
+ want_field "F4a: reason stays budget-deferred" reason 'budget-deferred'
2364
+ f4_run "$R_F4" 'suite-a\t1\t@NOW\n'
2365
+ want_rc 1 "F4b: control - a real red before the kill is a failure, not a deferral"
2366
+ want_field "F4b: reason is failed-before-budget" reason 'failed-before-budget'
2367
+ f4_run "$R_F4" 'suite-a\t1\t@NOW\n' 137
2368
+ want_rc 1 "F4b2: the same holds for a 137 kill"
2369
+ # The runner records only its own `failed` class (rc 128 and 193..255 are reds, a named signal never
2370
+ # reaches the file); the gate reader therefore accepts any numeric rc in 1..255.
2371
+ f4_run "$R_F4" 'suite-a\t255\t@NOW\n'
2372
+ want_rc 1 "F4c: a runner-classed failure above 127 (255) is a red"
2373
+ f4_run "$R_F4" 'suite-a\t128\t@NOW\n'
2374
+ want_rc 1 "F4c2: rc 128 (a plain failure under ADR-177) is a red"
2375
+ f4_run "$R_F4" 'suite-a\t1000\t@NOW\nsuite-b\t18446744073709551617\t@NOW\n'
2376
+ want_rc 6 "F4c3: an rc above 255 or too long for an exit status is malformed, never a red"
2377
+ f4_run "$R_F4" 'suite-a\t256\t@NOW\n'
2378
+ want_rc 6 "F4c4: rc 256 (three digits, above an exit status) is not a red - the numeric bound is load-bearing"
2379
+ f4_run "$R_F4" 'suite-a\t1\t18446744073709551617\n'
2380
+ want_rc 6 "F4c5: a 20-digit epoch that would wrap in bash arithmetic is malformed - the length bound is load-bearing"
2381
+ f4_run "$R_F4" 'suite-a\t0\t@NOW\nsuite-b\t2\t@NOW\n'
2382
+ want_rc 1 "F4d: a benign record first and a real red second is a failure"
2383
+ f4_run "$R_F4" 'suite-a\t1\t@NOW\nsuite-b\t0\t@NOW\n'
2384
+ want_rc 1 "F4d2: a real red first and a benign record last is still a failure (not last-record-only)"
2385
+ f4_run "$R_F4" 'suite-a\t1\t@LATE\nsuite-b\t1\t@NOW\n'
2386
+ want_rc 1 "F4d3: a late record first does not disable a timely red after it"
2387
+ f4_run "$R_F4" 'suite-a\t1\t@NOW\nsuite-b\t1\t@LATE\n'
2388
+ want_rc 1 "F4d4: a timely red first is not cancelled by a late record after it"
2389
+ f4_run "$R_F4" 'suite-a\t1\t@LATE\n'
2390
+ want_rc 6 "F4e: a record stamped after the deadline (kill-induced exit) is ignored"
2391
+ f4_run "$R_F4" 'garbage line\nsuite-a\tabc\t@NOW\nsuite-b\t1\tnotanumber\nsuite-c\t\t@NOW\n'
2392
+ want_rc 6 "F4f: malformed records are unresolved, never a red"
2393
+ f4_run "$R_F4" 'suite-a\t08\t@NOW\n'
2394
+ want_rc 1 "F4g: a leading-zero rc is parsed as decimal (10#) and counts as a red"
2395
+ f4_run "$R_F4" 'suite-a\t0\t@NOW\n'
2396
+ want_rc 6 "F4g2: rc 0 is not a red"
2397
+ f4_run "$R_F4" 'suite-a\t1\t@NOW\n' 0
2398
+ want_rc 0 "F4h: a runner that exited 0 is untouched by a sidecar record"
2399
+ f4_run "$R_F4" 'suite-a\t1\t@NOW\n' 1
2400
+ want_rc 1 "F4h2: a plain runner failure keeps rc 1"
2401
+ want_field "F4h2: with the ordinary reason" reason 'failed'
2402
+ # the stale-file arm: the gate reads ITS OWN fresh mktemp, never a guessable path.
2403
+ # The planted files must sit in the directory the gate's own mktemp uses (its TMPDIR), or the arm could
2404
+ # never fail: the gate is run with TMPDIR pointed at a directory holding the guessable names.
2405
+ assert_fixture_dir "$TESTROOT"
2406
+ _f4tmp="$TESTROOT/f4tmp"; mkdir -p "$_f4tmp"; assert_fixture_dir "$_f4tmp"
2407
+ _now="$(date +%s)"
2408
+ printf 'suite-a\t1\t%s\n' "$_now" > "$_f4tmp/affected-provisional"
2409
+ printf 'suite-a\t1\t%s\n' "$_now" > "$_f4tmp/affected-provisional.stale"
2410
+ printf 'suite-a\t1\t%s\n' "$_now" > "$_f4tmp/sidecar"
2411
+ printf 'suite-a\t1\t%s\n' "$_now" > "$_f4tmp/provisional"
2412
+ RUN_TMPDIR="$_f4tmp" f4_run "$R_F4" ''
2413
+ want_rc 6 "F4i: a stale red left at a guessable path in the gate's TMPDIR is never read"
2414
+ unset _now _f4tmp
2415
+ # hand-over: the gate sets the variable in BOTH branches of the delegated call, to its own path,
2416
+ # and removes that file afterwards (the gate owns it).
2417
+ f4_run "$R_F4" ''
2418
+ _p1="$(head -n 1 "$TESTROOT/sidecar-path.log")"
2419
+ if [[ -n "$_p1" ]]; then pass "F4j: the plain branch hands the runner a sidecar path"; else fail "F4j: the plain branch handed no SOLEUR_PJ_PROVISIONAL_FILE"; fi
2420
+ if [[ -n "$_p1" && ! -e "$_p1" ]]; then pass "F4j2: the gate removed its sidecar on exit"; else fail "F4j2: sidecar left behind: '$_p1'"; fi
2421
+ R_F4P="$(mk_f4_repo f4pool pool)"
2422
+ RUN_UNSET_CI=1 f4_run "$R_F4P" 'suite-a\t1\t@NOW\n'
2423
+ want_rc 1 "F4k: the pool-width branch hands the path over too (red before kill -> 1)"
2424
+ if [[ -n "$(head -n 1 "$TESTROOT/sidecar-path.log")" ]]; then pass "F4k2: pool branch recorded a sidecar path"; else fail "F4k2: pool branch handed no sidecar path"; fi
2425
+ unset _p1
2426
+ # a caller's exported value never reaches an arm other than the delegated runner call (custom command here).
2427
+ R_F4E="$(mk_repo f4env)"; seed_js "$R_F4E"; mkdir -p "$R_F4E/scripts"
2428
+ cat > "$R_F4E/scripts/envprobe.sh" <<'FIX'
2429
+ #!/usr/bin/env bash
2430
+ printf '%s' "${SOLEUR_PJ_PROVISIONAL_FILE-unset}" > "${FAKE_DIR:?}/pj-env.txt"
2431
+ exit 0
2432
+ FIX
2433
+ chmod +x "$R_F4E/scripts/envprobe.sh"
2434
+ write_config "$R_F4E" '{"test_command": "bash scripts/envprobe.sh"}'
2435
+ seal_base "$R_F4E"; commit_chg "$R_F4E" src/util.ts 'export const u = 2;'
2436
+ reset_fakes; rm -f "$TESTROOT/pj-env.txt"
2437
+ export SOLEUR_PJ_PROVISIONAL_FILE=/caller/leaked-sidecar; run_gate "$R_F4E" gate; unset SOLEUR_PJ_PROVISIONAL_FILE
2438
+ if [[ "$(cat "$TESTROOT/pj-env.txt" 2>/dev/null)" == "unset" ]]; then pass "F4m: a caller's SOLEUR_PJ_PROVISIONAL_FILE is not inherited by the custom command"; else fail "F4m: custom command saw '$(cat "$TESTROOT/pj-env.txt" 2>/dev/null || echo '<no reading>')'"; fi
2439
+ unset R_F4 R_F4P R_F4E
2440
+ # header contract: the new reason is named where the other reasons are (parity with the code).
2441
+ if grep -q 'failed-before-budget' "$SUT"; then pass "F4l: the gate header documents failed-before-budget"; else fail "F4l: header lacks failed-before-budget"; fi
2442
+ if grep -q 'failed-before-budget' "$(dirname "$SUT")/lib/affected-tests/common.sh"; then pass "F4l2: the reason catalog lists failed-before-budget"; else fail "F4l2: catalog lacks failed-before-budget"; fi
2443
+
2337
2444
  # ============================ cross-run contract ===============================
2338
2445
  # G1-10: every run path emits the marker — a second exit site that fires before the
2339
2446
  # emit leaves a run with no AFFECTED_GATE line, and these loops catch it.
@@ -2371,6 +2478,6 @@ unset _kind _rc _of _xfail _badword
2371
2478
 
2372
2479
  # Floor = the full count less a little slack for the rows that
2373
2480
  # depend on a host binary (jq): it is a floor, so a deleted block of rows reddens it.
2374
- print_results "${AFFECTED_TESTS_MIN_ASSERTIONS:-467}"
2481
+ print_results "${AFFECTED_TESTS_MIN_ASSERTIONS:-496}"
2375
2482
 
2376
2483
 
@@ -230,6 +230,22 @@ affected_mktemp() { # <tag> — sets AFFECTED_TMP to a fresh registered scratch
230
230
  AFFECTED_TMP="$(mktemp "${TMPDIR:-/tmp}/affected-$1.XXXXXX")" || return 1 # lint-trap-ownership: ok — owning `trap affected_scratch_clean EXIT INT TERM` is installed by the sourcing gate (affected-tests.sh); a sourced lib cannot own an EXIT trap without clobbering the importer's
231
231
  AFFECTED_SCRATCH+=("$AFFECTED_TMP")
232
232
  }
233
+ # affected_sidecar_red <file> <deadline-epoch> — 0 iff the runner's provisional-red sidecar holds a
234
+ # record `label<TAB>rc<TAB>epoch` with a non-zero rc (1..255) and an epoch strictly before the deadline.
235
+ # The runner decides what is a red (it records only its `failed` class and never a named-signal exit), so
236
+ # the reader does not mirror that classification. Every other shape (missing/empty/unreadable file,
237
+ # short or non-numeric fields, rc 0 or above 255, a late stamp) is "no red seen": the caller keeps its
238
+ # deferral. Numbers are parsed with 10# so a leading
239
+ # zero is decimal, never an octal arithmetic error.
240
+ affected_sidecar_red() {
241
+ local f="${1:-}" deadline="${2:-}" label rc ep extra
242
+ [[ -n "$f" && -f "$f" && -r "$f" && "$deadline" =~ ^[0-9]+$ ]] || return 1
243
+ while IFS=$'\t' read -r label rc ep extra || [[ -n "$label$rc$ep" ]]; do
244
+ [[ -z "$extra" && "$rc" =~ ^[0-9]{1,3}$ && "$ep" =~ ^[0-9]{1,15}$ ]] || continue
245
+ (( 10#$rc >= 1 && 10#$rc <= 255 && 10#$ep < deadline )) && return 0
246
+ done < "$f"
247
+ return 1
248
+ }
233
249
  affected_scratch_clean() {
234
250
  ((${#AFFECTED_SCRATCH[@]} > 0)) && rm -f "${AFFECTED_SCRATCH[@]}"
235
251
  return 0
@@ -303,7 +319,7 @@ _affected_cmd_vacuous() { # <command string> → rc 0 when it certifies nothing
303
319
  # global-paths | full-requested |
304
320
  # custom-command | delegated | runner-refused | runner-signal | foreign-runner |
305
321
  # no-stack | bad-config key=<k> | vacuous-test-command | no-base-ref |
306
- # toolchain-missing | no-tests | budget-deferred | bad-usage | help |
322
+ # toolchain-missing | no-tests | budget-deferred | failed-before-budget | bad-usage | help |
307
323
  # content-trigger-failed | inert-content-trigger
308
324
  # Counts are decimal, or `-` when the path does not produce a count
309
325
  # (delegated runner, opaque test_command, refused runs).
@@ -52,9 +52,9 @@ gate probes registration, not presence.
52
52
  | rc | Meaning | Skill action |
53
53
  |----|---------|--------------|
54
54
  | 0 | Selected tests passed, or `NO_TESTS_AFFECTED` (all-inert diff) | proceed |
55
- | 1 | A selected test failed / runner signal-killed / the content-trigger command failed (`reason=content-trigger-failed`) | stop; report failures (for `content-trigger-failed`, re-run the `content_trigger_command` directly) |
55
+ | 1 | A selected test failed / runner signal-killed / the content-trigger command failed (`reason=content-trigger-failed`) / the budget killed the runner AFTER it printed a red (`reason=failed-before-budget`) | stop; report failures (for `content-trigger-failed`, re-run the `content_trigger_command` directly; for `failed-before-budget`, re-run each suite whose `[run] … done (rc=N` line shows a non-zero rc in the log (pool mode), or whose `[FAIL]` line printed (serial mode)) |
56
56
  | 4 | `AFFECTED_GATE_REFUSED reason=<no-stack\|bad-config\|vacuous-test-command\|no-base-ref\|not-a-repo\|toolchain-missing\|runner-refused>` + a `remedy:` line | stop; fix the named cause — never retry blindly |
57
- | 6 | `AFFECTED_GATE_BUDGET_DEFERRED` — budget expired AND a CI test workflow exists (with `content_trigger=deferred` the selected tests passed and only the content-trigger command is owed to CI) | proceed to CI; record CI as the authoritative gate; never label the run passed |
57
+ | 6 | `AFFECTED_GATE_BUDGET_DEFERRED` — budget expired AND a CI test workflow exists AND the runner had recorded no red before the kill (with `content_trigger=deferred` the selected tests passed and only the content-trigger command is owed to CI) | proceed to CI; record CI as the authoritative gate; never label the run passed |
58
58
  | 7 | No test suite detected at all | proceed with the disclosed note; never label passed |
59
59
 
60
60
  Multi-stack aggregation: worst-of `1 > 4 > 6 > 0`; `7` only when every adapter