@soleur/opencode 3.388.0 → 3.388.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
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
#
|
|
13
13
|
# ── THE FIXTURES ─────────────────────────────────────────────────────────────────────────────
|
|
14
14
|
# Every row is a jq edit of ONE real-shape base captured read-only from GitHub
|
|
15
|
-
# (test/fixtures/admin-merge-ready/, provenance in its README):
|
|
16
|
-
# rulesets (the 16 folded names swapped for the 3 umbrella contexts, #12276),
|
|
15
|
+
# (test/fixtures/admin-merge-ready/, provenance in its README): 15 required contexts across two
|
|
16
|
+
# rulesets (the 16 folded names swapped for the 3 umbrella contexts, #12276), 68 check runs,
|
|
17
17
|
# all required contexts green. No hand-written required set exists.
|
|
18
18
|
#
|
|
19
19
|
# ── MUTATION ROWS ────────────────────────────────────────────────────────────────────────────
|
|
@@ -241,7 +241,7 @@ PY
|
|
|
241
241
|
rowdir() { printf '%s' "$SANDBOX/rows/$1"; }
|
|
242
242
|
rc_of() { cat "$(rowdir "$1")/rc"; }
|
|
243
243
|
|
|
244
|
-
READY_TAIL="required=
|
|
244
|
+
READY_TAIL="required=15 absent=[] pending=[] failed=[]"
|
|
245
245
|
|
|
246
246
|
# ── rows ────────────────────────────────────────────────────────────────────────────────────
|
|
247
247
|
row_H1() { local d; d=$(mkrow H1); assert_fixture_dir "$d"; run "$d" "$PR" "$SHA"
|
|
@@ -255,17 +255,17 @@ row_H2() { local d; d=$(mkrow H2); assert_fixture_dir "$d"
|
|
|
255
255
|
run "$d" "$PR" "$SHA"; rc_is "$d" 0 && nomiss "$d" && tailis "$d" "$READY_TAIL"; }
|
|
256
256
|
row_R1() { local d; d=$(mkrow R1); assert_fixture_dir "$d"; drop "$d" test; run "$d" "$PR" "$SHA"
|
|
257
257
|
rc_is "$d" 1 && nomiss "$d" && line "$d" "ABSENT test" && verdict "$d" not-ready && reason "$d" not-green \
|
|
258
|
-
&& tailis "$d" 'required=
|
|
258
|
+
&& tailis "$d" 'required=15 absent=["test"] pending=[] failed=[]'; }
|
|
259
259
|
row_R3() { local d; d=$(mkrow R3); assert_fixture_dir "$d"; drop "$d" tenant-integration-required; drop "$d" cla-evidence; run "$d" "$PR" "$SHA"
|
|
260
260
|
rc_is "$d" 1 && nomiss "$d" && line "$d" "ABSENT tenant-integration-required" && line "$d" "ABSENT cla-evidence" \
|
|
261
|
-
&& noline "$d" " quality-guards" && tailis "$d" 'required=
|
|
261
|
+
&& noline "$d" " quality-guards" && tailis "$d" 'required=15 absent=["tenant-integration-required","cla-evidence"] pending=[] failed=[]'; }
|
|
262
262
|
row_R4() { local d; d=$(mkrow R4); assert_fixture_dir "$d"
|
|
263
263
|
setrun "$d" quality-guards '.id = 99999999999'
|
|
264
264
|
runs "$d" '. + [(.[] | select(.name == "quality-guards") | .id = 100000000000 | .status = "queued" | .conclusion = null | .started_at = null)]'
|
|
265
265
|
run "$d" "$PR" "$SHA"; rc_is "$d" 1 && nomiss "$d" && line "$d" "PENDING quality-guards (queued)" \
|
|
266
|
-
&& tailis "$d" 'required=
|
|
266
|
+
&& tailis "$d" 'required=15 absent=[] pending=["quality-guards"] failed=[]'; }
|
|
267
267
|
row_R5() { local d; d=$(mkrow R5); assert_fixture_dir "$d"; setrun "$d" test '.conclusion = "failure"'; run "$d" "$PR" "$SHA"
|
|
268
|
-
rc_is "$d" 1 && nomiss "$d" && line "$d" "FAILED test (failure)" && tailis "$d" 'required=
|
|
268
|
+
rc_is "$d" 1 && nomiss "$d" && line "$d" "FAILED test (failure)" && tailis "$d" 'required=15 absent=[] pending=[] failed=["test"]'; }
|
|
269
269
|
row_R6() { local c d; for c in stale cancelled bogus-conclusion; do d=$(mkrow "R6-$c"); assert_fixture_dir "$d"
|
|
270
270
|
setrun "$d" test ".conclusion = \"$c\""; run "$d" "$PR" "$SHA"
|
|
271
271
|
rc_is "$d" 1 && nomiss "$d" && line "$d" "FAILED test ($c)" || return 1; done; }
|
|
@@ -321,7 +321,7 @@ row_R18() { local d; d=$(mkrow R18); assert_fixture_dir "$d"; drop "$d" test run
|
|
|
321
321
|
run "$d" "$PR" "$SHA" --wait; rc_is "$d" 4 && nomiss "$d" && polls "$d" 2 && verdict "$d" stale; }
|
|
322
322
|
row_R19() { local d; d=$(mkrow R19); assert_fixture_dir "$d"; drop "$d" test
|
|
323
323
|
run "$d" "$PR" "$SHA" --wait --timeout 180; rc_is "$d" 1 && nomiss "$d" && polls "$d" 3 && sleeps "$d" 2 && verdict "$d" timeout \
|
|
324
|
-
&& tailis "$d" 'required=
|
|
324
|
+
&& tailis "$d" 'required=15 absent=["test"] pending=[] failed=[]' || return 1
|
|
325
325
|
# A timeout that is not a multiple of 60 rounds UP: 90 s is two polls, never one or zero.
|
|
326
326
|
run "$d" "$PR" "$SHA" --wait --timeout 90; rc_is "$d" 1 && polls "$d" 2 && verdict "$d" timeout; }
|
|
327
327
|
row_R20() { local d; d=$(mkrow R20); assert_fixture_dir "$d"; drop "$d" test runs.1.json; touch "$d/rules.fail.2"
|
|
@@ -334,7 +334,7 @@ row_R22() { local d; d=$(mkrow R22); assert_fixture_dir "$d"; setrun "$d" CodeQL
|
|
|
334
334
|
run "$d" "$PR" "$SHA"; rc_is "$d" 1 && nomiss "$d" && line "$d" "FAILED CodeQL (failure)"; }
|
|
335
335
|
row_R23() { local d; d=$(mkrow R23); assert_fixture_dir "$d"; drop "$d" test
|
|
336
336
|
jqf "$d" rules.json '.[0] |= map(if .ruleset_id == 13304872 and .type == "required_status_checks" then .parameters.required_status_checks += [{context: "test", integration_id: 15368}] else . end)'
|
|
337
|
-
run "$d" "$PR" "$SHA"; rc_is "$d" 1 && nomiss "$d" && count "$d" '^ABSENT test$' 1 && tailis "$d" 'required=
|
|
337
|
+
run "$d" "$PR" "$SHA"; rc_is "$d" 1 && nomiss "$d" && count "$d" '^ABSENT test$' 1 && tailis "$d" 'required=15 absent=["test"] pending=[] failed=[]'; }
|
|
338
338
|
row_R24() { local d; d=$(mkrow R24); assert_fixture_dir "$d"; setrun "$d" test '.status = "mystery" | .conclusion = null'; run "$d" "$PR" "$SHA"
|
|
339
339
|
rc_is "$d" 1 && nomiss "$d" && line "$d" "FAILED test (unknown status mystery)"; }
|
|
340
340
|
row_R25() { local d i; d=$(mkrow R25); assert_fixture_dir "$d"
|
|
@@ -387,14 +387,14 @@ row_R34() { local d; d=$(mkrow R34); assert_fixture_dir "$d"; drop "$d" test run
|
|
|
387
387
|
row_R35() { local d; d=$(mkrow R35); assert_fixture_dir "$d"
|
|
388
388
|
# The same context required from two different apps: both entries must be satisfied.
|
|
389
389
|
jqf "$d" rules.json '.[0] |= map(if .ruleset_id == 13304872 and .type == "required_status_checks" then .parameters.required_status_checks += [{context: "CodeQL", integration_id: 15368}] else . end)'
|
|
390
|
-
run "$d" "$PR" "$SHA"; rc_is "$d" 1 && nomiss "$d" && line "$d" "ABSENT CodeQL" && tailis "$d" 'required=
|
|
390
|
+
run "$d" "$PR" "$SHA"; rc_is "$d" 1 && nomiss "$d" && line "$d" "ABSENT CodeQL" && tailis "$d" 'required=16 absent=["CodeQL"] pending=[] failed=[]'; }
|
|
391
391
|
# R36/R37 (#9454): the POST-ADOPTION live rule shape -- the CI Required ruleset gains a
|
|
392
392
|
# `merge_queue` rule and LOSES its `CodeQL` required context (CodeQL is advisory: it cannot report on
|
|
393
|
-
# `merge_group`). The base capture above is the PRE-adoption shape (
|
|
393
|
+
# `merge_group`). The base capture above is the PRE-adoption shape (15 contexts incl. CodeQL/57789 —
|
|
394
394
|
# the 16 folded names already swapped for the 3 umbrella contexts per #12276), so
|
|
395
395
|
# these rows derive the new shape from it rather than hand-writing a required set.
|
|
396
|
-
# R36: merge_queue present + CodeQL not required -> READY with required=
|
|
397
|
-
# CodeQL =
|
|
396
|
+
# R36: merge_queue present + CodeQL not required -> READY with required=14 (13 CI Required minus
|
|
397
|
+
# CodeQL = 12, plus the 2 CLA contexts); a FAILED advisory CodeQL run must not block.
|
|
398
398
|
# Before the fix the script errored `unsupported-rule` on the `merge_queue` type, so every
|
|
399
399
|
# admin-merge gate would have failed closed the moment the queue went live.
|
|
400
400
|
# R37: the allowlist stayed SPECIFIC -- merge_queue present alongside an unevaluated type
|
|
@@ -406,7 +406,7 @@ _post_adoption_rules() { # <dir>
|
|
|
406
406
|
row_R36() { local d; d=$(mkrow R36); assert_fixture_dir "$d"; _post_adoption_rules "$d"
|
|
407
407
|
setrun "$d" CodeQL '.conclusion = "failure"'
|
|
408
408
|
run "$d" "$PR" "$SHA"; rc_is "$d" 0 && nomiss "$d" && verdict "$d" ready \
|
|
409
|
-
&& tailis "$d" 'required=
|
|
409
|
+
&& tailis "$d" 'required=14 absent=[] pending=[] failed=[]'; }
|
|
410
410
|
row_R37() { local d; d=$(mkrow R37); assert_fixture_dir "$d"; _post_adoption_rules "$d"
|
|
411
411
|
jqf "$d" rules.json '.[0] += [{type: "workflows", ruleset_id: 1}]'
|
|
412
412
|
run "$d" "$PR" "$SHA"; rc_is "$d" 3 && nomiss "$d" && verdict "$d" error && reason "$d" unsupported-rule; }
|
|
@@ -588,42 +588,42 @@ row_L15() { local d; d=$(mkrow L15); assert_fixture_dir "$d"
|
|
|
588
588
|
# `test` is FAILED at the graded head, and can only move the context to PENDING or ABSENT, never to green.
|
|
589
589
|
row_S1() { local d; d=$(mkrow S1); assert_fixture_dir "$d"; setrun "$d" test '.conclusion = "failure"'; setv "$d" pending-full 8
|
|
590
590
|
run "$d" "$PR" "$SHA"; rc_is "$d" 1 && nomiss "$d" && line "$d" "PENDING test (draft-era-row-while-ready-run-pending)" && verdict "$d" not-ready && reason "$d" not-green \
|
|
591
|
-
&& tailis "$d" 'required=
|
|
591
|
+
&& tailis "$d" 'required=15 absent=[] pending=["test"] failed=[]' && vcalled "$d" 1 && grep -Fxq "verdict $PR" "$d/vlog" || why "S1: $(tail -2 "$d/out" | tr '\n' '|')"; }
|
|
592
592
|
row_S2() { local d; d=$(mkrow S2); assert_fixture_dir "$d"; setrun "$d" test '.conclusion = "failure"' runs.1.json; setv "$d" pending-full 8
|
|
593
593
|
run "$d" "$PR" "$SHA" --wait; rc_is "$d" 0 && nomiss "$d" && polls "$d" 2 && verdict "$d" ready && sleeps "$d" 1 && count "$d" '^WAIT ' 1 && line "$d" 'WAIT poll=1/60 absent=[] pending=["test"]'; }
|
|
594
594
|
row_S3() { local d; d=$(mkrow S3); assert_fixture_dir "$d"; setrun "$d" test '.conclusion = "failure"'
|
|
595
595
|
runs "$d" '. + [(.[] | select(.name == "test") | .id = (.id + 100) | .status = "queued" | .conclusion = null | .started_at = null)]'; setv "$d" pending-full 8
|
|
596
|
-
run "$d" "$PR" "$SHA"; rc_is "$d" 1 && nomiss "$d" && line "$d" "PENDING test (queued)" && tailis "$d" 'required=
|
|
596
|
+
run "$d" "$PR" "$SHA"; rc_is "$d" 1 && nomiss "$d" && line "$d" "PENDING test (queued)" && tailis "$d" 'required=15 absent=[] pending=["test"] failed=[]' && vcalled "$d" 0; }
|
|
597
597
|
row_S4() { local d; d=$(mkrow S4); assert_fixture_dir "$d"
|
|
598
598
|
runs "$d" '. + [(.[] | select(.name == "test") | .id = (.id - 100) | .conclusion = "failure")]'; setv "$d" no-run
|
|
599
599
|
run "$d" "$PR" "$SHA"; rc_is "$d" 0 && nomiss "$d" && verdict "$d" ready && tailis "$d" "$READY_TAIL" && vcalled "$d" 0; }
|
|
600
600
|
row_S5() { local d; d=$(mkrow S5); assert_fixture_dir "$d"; setrun "$d" test '.conclusion = "failure"'; setv "$d" no-run
|
|
601
601
|
run "$d" "$PR" "$SHA"; rc_is "$d" 1 && nomiss "$d" && line "$d" "PENDING test (no-ready-run)" && reason "$d" not-green || return 1
|
|
602
|
-
run "$d" "$PR" "$SHA" --wait --timeout 120; rc_is "$d" 1 && polls "$d" 2 && verdict "$d" timeout && tailis "$d" 'required=
|
|
602
|
+
run "$d" "$PR" "$SHA" --wait --timeout 120; rc_is "$d" 1 && polls "$d" 2 && verdict "$d" timeout && tailis "$d" 'required=15 absent=[] pending=["test"] failed=[]'; }
|
|
603
603
|
row_S6() { local d; d=$(mkrow S6); assert_fixture_dir "$d"; setrun "$d" test '.conclusion = "failure"'; setv "$d" stalled
|
|
604
604
|
run "$d" "$PR" "$SHA"; rc_is "$d" 1 && nomiss "$d" && verdict "$d" not-ready && reason "$d" stalled && line "$d" "ABSENT test (stalled: no full CI run decided after the ready event)" \
|
|
605
|
-
&& tailis "$d" 'required=
|
|
605
|
+
&& tailis "$d" 'required=15 absent=["test"] pending=[] failed=[]' && grep -Fq "gh pr ready --undo $PR" "$d/out" && grep -Fq "gh pr ready $PR" "$d/out" \
|
|
606
606
|
&& ! grep -Fq 'gh run rerun' "$d/out" || return 1
|
|
607
607
|
run "$d" "$PR" "$SHA" --wait; rc_is "$d" 1 && polls "$d" 1 && reason "$d" stalled; }
|
|
608
608
|
row_S7() { local d; d=$(mkrow S7); assert_fixture_dir "$d"; setrun "$d" test '.conclusion = "failure"'; setv "$d" awaiting-approval 8
|
|
609
609
|
run "$d" "$PR" "$SHA"; rc_is "$d" 1 && nomiss "$d" && reason "$d" awaiting-approval && line "$d" "PENDING test (awaiting-approval: a maintainer must approve the fork workflow run)" \
|
|
610
|
-
&& tailis "$d" 'required=
|
|
610
|
+
&& tailis "$d" 'required=15 absent=[] pending=["test"] failed=[]' || return 1
|
|
611
611
|
run "$d" "$PR" "$SHA" --wait; rc_is "$d" 1 && polls "$d" 1 && reason "$d" awaiting-approval; }
|
|
612
612
|
row_S8() { local d; d=$(mkrow S8); assert_fixture_dir "$d"; setrun "$d" test ".conclusion = \"failure\" | .details_url = \"$TEST_URL_RUN8\""; setv "$d" full-decided 8
|
|
613
|
-
run "$d" "$PR" "$SHA"; rc_is "$d" 1 && nomiss "$d" && line "$d" "FAILED test (failure)" && reason "$d" not-green && tailis "$d" 'required=
|
|
613
|
+
run "$d" "$PR" "$SHA"; rc_is "$d" 1 && nomiss "$d" && line "$d" "FAILED test (failure)" && reason "$d" not-green && tailis "$d" 'required=15 absent=[] pending=[] failed=["test"]' || return 1
|
|
614
614
|
run "$d" "$PR" "$SHA" --wait; rc_is "$d" 1 && polls "$d" 1 && verdict "$d" not-ready; }
|
|
615
615
|
row_S9() { local d; d=$(mkrow S9); assert_fixture_dir "$d"
|
|
616
616
|
setrun "$d" test ".details_url = \"$TEST_URL_RUN8\""
|
|
617
617
|
runs "$d" ". + [(.[] | select(.name == \"test\") | .id = (.id + 1) | .conclusion = \"failure\" | .details_url = \"$TEST_URL_RUN6\")]"; setv "$d" full-decided 8
|
|
618
618
|
run "$d" "$PR" "$SHA"; rc_is "$d" 1 && nomiss "$d" && verdict "$d" not-ready && reason "$d" stale-row && line "$d" "FAILED test (stale-row: the newest test row belongs to run 6, not the deciding run 8)" \
|
|
619
|
-
&& tailis "$d" 'required=
|
|
619
|
+
&& tailis "$d" 'required=15 absent=[] pending=[] failed=["test"]' && grep -Fq "gh pr ready --undo $PR" "$d/out" || return 1
|
|
620
620
|
run "$d" "$PR" "$SHA" --wait; rc_is "$d" 1 && polls "$d" 1 && reason "$d" stale-row; }
|
|
621
621
|
row_S10() { local d; d=$(mkrow S10); assert_fixture_dir "$d"; setrun "$d" test '.conclusion = "failure"'; setv "$d" n/a
|
|
622
622
|
run "$d" "$PR" "$SHA"; rc_is "$d" 1 && nomiss "$d" && line "$d" "FAILED test (failure)" && reason "$d" not-green && vcalled "$d" 1; }
|
|
623
623
|
row_S11() { local d; d=$(mkrow S11); assert_fixture_dir "$d"; setrun "$d" test '.conclusion = "failure"'; setv "$d" pending-full 8; touch "$d/vstate.fail"
|
|
624
624
|
run "$d" "$PR" "$SHA"; rc_is "$d" 1 && nomiss "$d" && line "$d" "FAILED test (failure)" && reason "$d" not-green && vcalled "$d" 1; }
|
|
625
625
|
row_S12() { local d; d=$(mkrow S12); assert_fixture_dir "$d"; drop "$d" test; setv "$d" pending-full 8
|
|
626
|
-
run "$d" "$PR" "$SHA"; rc_is "$d" 1 && nomiss "$d" && line "$d" "ABSENT test" && tailis "$d" 'required=
|
|
626
|
+
run "$d" "$PR" "$SHA"; rc_is "$d" 1 && nomiss "$d" && line "$d" "ABSENT test" && tailis "$d" 'required=15 absent=["test"] pending=[] failed=[]' && vcalled "$d" 0; }
|
|
627
627
|
row_S13() { local d; d=$(mkrow S13); assert_fixture_dir "$d"
|
|
628
628
|
jqf "$d" runs.json "map(.check_runs[].head_sha = \"$GREEN\")"; setrun "$d" test '.conclusion = "failure"'; setv "$d" pending-full 8
|
|
629
629
|
run "$d" "$PR" "$SHA" --green-sha "$GREEN"; rc_is "$d" 1 && nomiss "$d" && line "$d" "FAILED test (failure)" && vcalled "$d" 0; }
|