@soleur/opencode 3.390.2 → 3.391.0

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.
@@ -356,6 +356,7 @@ NEVER CODE! Just research and write the plan.
356
356
  - **A plan that waives, skips or reorders a gate step must grep for downstream steps whose own skip rests on "because X ran".** A sibling script's comment-level assumption (`grok-fidelity-gate.sh` skipping the AGENTS rule-budget lint because the affected gate ran test-all) silently loses coverage when X is waived, and the banner still says the other steps passed. **Why:** #12294 — found by one architecture seat, missed by design, plan review and the CTO ruling. See `knowledge-base/project/learnings/2026-11-07-a-waived-gate-step-took-a-sibling-steps-skip-optimization-with-it.md`.
357
357
 
358
358
  - **A plan sentence about an open sibling PR (its base, its diff, its counts) is a time-stamped observation: re-read it with `gh` at every re-sync and write the date next to it.** A cleanup PR that waits in review also owes every pinned count to a full suite run on the merged tree after each `origin/main` move. **Why:** #12306 — "#12292 is on a pre-retirement base" was wrong when written, and the PR merged mid-review; main moved three more times before the push. See `knowledge-base/project/learnings/workflow-patterns/2026-11-07-a-cleanup-pr-owes-its-counts-to-the-merged-tree-and-its-premises-to-a-fresh-read.md`.
359
+ - **A plan sentence about what a MERGE does to production must be derived from every workflow whose `on.push.paths` matches the changed files, not from the one apply workflow you read.** `grep -l` each changed infra basename across `.github/workflows/*.yml`, read each match's `on:` block and body, and write what it does on merge into the plan. A delivery dispatcher can fire a production host replace from the merge itself (`registry-host-replace-dispatch.yml`: any `cloud-init-registry.yml`/`zot-registry.tf`/`variables.tf` render change, no reviewer gate), which breaks a run's no-unauthorized-production-mutation constraint. **Why:** #12007/PR #12379 - three review rounds repeated 'a merge replaces nothing' before a fix-round seat read the dispatcher. See `knowledge-base/project/learnings/2026-11-08-a-merge-that-edits-registry-cloud-init-auto-replaces-the-registry-host-and-the-plan-checked-only-the-apply-workflow.md`.
359
360
 
360
361
  - **A producer check for a gated registration is evaluated over the REGISTERED population, not the system.** For a hook, guard or note registered under a predicate (a flag AND a capability such as web egress), write the producer check as rows of (cited fact, file, still true when the predicate holds?) and run the grep for each row; a predicate that turns on one capability can turn off the credential or tool the cited producer needs, and the two facts live in different files. **Why:** #12435 — the plan cited `GH_TOKEN` minted into the sandbox, true of the system and false in web-egress sessions where the env deny census removes it, so the hook registered only where `gh` fails at auth. See `knowledge-base/project/learnings/2026-11-09-a-producer-check-was-true-of-the-system-and-false-of-the-population-the-hook-registered-in.md`.
361
362
  - **A suite ledger's per-site cost is ARM cost (pristine + every mutant rep + the give_up boundary), not pristine cost — measure the pristine site before prescribing fixture surgery.** When the arm is expensive and pristine is cheap, the pathology is mutant-side runaway and the remedy is pacing (per-scan give_up that returns over-bound, cheapest-condemner ordering, a shrink-only per-invocation timeout), never smaller fixtures, which cut coverage to treat a cost the SUT never had. The same rule covers every bound a ruling asserts: derive caps/floors from a measured pristine rate, not arithmetic — a `12*len+5000` line-event cap was one event under pristine `hb`'s measured 485,001 events at 40,000 bytes (12.125/byte) and would have condemned the pristine run. **Why:** #12016/PR #12419 — `row_scan_ops` reported 47.3 s site cost; pristine was ~4.8 s. See `knowledge-base/project/learnings/performance-issues/mutant-side-runaway-read-as-pristine-site-cost-ci-replay-20261108.md`.
@@ -26,6 +26,7 @@ Envelope: <path>[#<title>]
26
26
  Gate: pr-merged <N>
27
27
  Gate: no-inflight-run <workflow-file>
28
28
  - Hold: Operator-reserved: <a decision only the operator may make, in their words>
29
+ - Hold: Operator-authorizes: <an act the agent can run once the operator types a go>
29
30
  - Hold: <the operator's words> [Text name (added by the plan's author): <key>]
30
31
  Gate: web-acceptance <key> <64 lowercase hex>
31
32
  ```
@@ -40,6 +41,21 @@ evaluator prints `Reserved for you: <words> - only you can clear this`, does not
40
41
  only by the operator saying so, and the CTO then removes or rewrites the line. Words in the middle of a hold do not reserve
41
42
  it.
42
43
 
44
+ **`Operator-authorizes:` is the second prefix of the same family**, for an act the agent can run once the operator
45
+ authorizes it: it is outside the delegation grammar and the Excluded list, the agent can name a concrete command path
46
+ for it, and it is lawful under the section-9 hard limits of standing-delegation.md. A hold whose words BEGIN with
47
+ `Operator-authorizes:` always STANDS under the same spelling rules and the same guarantee: the evaluator prints
48
+ `Say go and I run it: <words> - only you can say go`, does not probe its gates, and exits 2. It is cleared only by the
49
+ operator's typed go in the session naming the exact command (hr-menu-option-ack-not-prod-write-auth — a menu click or a
50
+ bare go is not a go, and a key-rotation workflow is never run without a typed go naming the exact command); the agent
51
+ then runs the act and the line is removed or rewritten. The split, stated identically everywhere it applies: a hold
52
+ that reserves a founder DECISION, or one needing the operator's hands (the closed physical list — console-only,
53
+ credential entry, payment, 2FA/CAPTCHA, signing a record, closing a tracker, arming a pull request on an epic's behalf,
54
+ the webhook-secret change, credential minting), is `Operator-reserved:` and the operator executes; a hold on an act the
55
+ agent can run after authorization is `Operator-authorizes:` and the agent executes after the go. A never-authorizable
56
+ act (force-push to main, bypassing required checks, editing the delegation, a money/scope/legal/brand decision) is
57
+ neither and `Operator-authorizes:` never covers it.
58
+
43
59
  The grammar has three kinds, `pr-merged`, `no-inflight-run` and `web-acceptance`. `command` and `run-green` are deferred: the
44
60
  first real consumer re-adds them, and only by CTO ruling. A `Gate:` line of any other kind is an unknown kind, and the hold
45
61
  stands.
@@ -160,7 +176,7 @@ bash "${CLAUDE_PLUGIN_ROOT}/skills/ship/scripts/hold-gate-eval.sh" --plan <plan
160
176
  |---|---|---|
161
177
  | 0 | Every hold is discharged, or none is recorded (an absent or empty section is a no-op) | Continue to Phase 6.45 and the arming in Phase 6.5 |
162
178
  | 1 | At least one hold STANDS (a gate is false, a web acceptance is undecided, declined or changes-requested, or the delegation is invalid) | Stop and name that condition, in one plain sentence to the operator; for a web acceptance, follow "What ship does with each" in section 1 |
163
- | 2 | A hold could not be evaluated or is reserved to the operator (unknown gate kind, unreadable probe, unreadable delegation, no `Envelope:` line, two `Delegation:` lines, a hold outside a readable section, a section that parses to zero holds, no time-limit tool, an `Operator-reserved:` hold, a web acceptance mixed with other kinds and no delegation, a web acceptance that could not be asked) | It STANDS. Say so in one plain sentence; never retry it into a pass |
179
+ | 2 | A hold could not be evaluated or is reserved to the operator (unknown gate kind, unreadable probe, unreadable delegation, no `Envelope:` line, two `Delegation:` lines, a hold outside a readable section, a section that parses to zero holds, no time-limit tool, an `Operator-reserved:` or `Operator-authorizes:` hold, a web acceptance mixed with other kinds and no delegation, a web acceptance that could not be asked) | It STANDS. Say so in one plain sentence; never retry it into a pass |
164
180
  | 3 | No `Delegation:` line is recorded and no non-reserved hold carries a `web-acceptance` gate: legacy prose holds | Evaluate by hand per section 3 |
165
181
  | any other status (127 script not found, 124 timed out, 137 killed) | The check did not run | Treat it as 2: the hold STANDS and was not checked. Say so; never read it as a no-op |
166
182
 
@@ -206,9 +222,10 @@ the turn on "Paused: awaiting merge approval": the Stop hook can reject it, and
206
222
  merge. Record the instruction as a hold under `## Operator Holds` in the plan (section 1), then, when this section is entered
207
223
  (Phase 6 step 5, before arming; the merge itself still waits for the required checks):
208
224
 
209
- 1. **What this does not cover.** A hold that begins `Operator-reserved:` (section 1), or that names another person's approval,
210
- stands, and the question below never discharges it. A sibling change or a state change is judged by its own condition
211
- (section 3 above), not by this question.
225
+ 1. **What this does not cover.** A hold that begins `Operator-reserved:` or `Operator-authorizes:` (section 1), or
226
+ that names another person's approval, stands, and the question below never discharges it — an `Operator-authorizes:`
227
+ hold waits on the operator's typed go naming the exact command, not on a standing approval. A sibling change or a
228
+ state change is judged by its own condition (section 3 above), not by this question.
212
229
  2. **Ask.** Put the epic-start question of
213
230
  [standing-delegation.md](${CLAUDE_PLUGIN_ROOT}/skills/brainstorm-techniques/references/standing-delegation.md) section 6 to
214
231
  the person as a real question (AskUserQuestion, options labelled `Yes ...` and `No ...`), once per delegation. Its Scope
@@ -285,7 +302,8 @@ exists because prose re-evaluation by the model is the failure mode a hold guard
285
302
  ## 5. What the evaluator prints
286
303
 
287
304
  When a delegation was checked, its verdict line comes first (`delegation: valid reason=ok`, or the failing state and
288
- reason). Then one plain line per hold (`Done:`, `Still waiting:`, `Needs a person:` or `Could not check:`, each with the
305
+ reason). Then one plain line per hold (`Done:`, `Still waiting:`, `Needs a person:`, `Reserved for you:`,
306
+ `Say go and I run it:` or `Could not check:`, each with the
289
307
  hold's own words and a plain reason) and a final machine line `holds: N discharged: M standing: K`. The human lines carry no
290
308
  jargon; the evaluator's suite checks them against a jargon denylist (the two machine lines are excluded). Control characters,
291
309
  bidi marks and line separators in a hold's words are stripped before they are printed.
@@ -66,7 +66,10 @@
66
66
  # invisible characters are ignored, so `Operator reserved:` and `**Operator-reserved:**` count) marks a hold that reserves the decision to the
67
67
  # operator (pricing approval, brand copy, spend). A gate only says WHEN a condition is true, never WHO may clear the
68
68
  # hold, so such a hold always STANDS: it is printed `Reserved for you: ... - only you can clear this`, its gates are
69
- # not probed, and the run exits 2. Every `Hold:` or `Gate:` line must sit inside a readable hold section; one that does
69
+ # not probed, and the run exits 2. `Operator-authorizes:` is the second always-standing prefix, for an act the agent
70
+ # CAN run once the operator types a go naming it in-session: printed `Say go and I run it: ... - only you can say go`,
71
+ # gates never probed, exit 2. It never covers a hold that reserves a founder decision or needs the operator's hands.
72
+ # Every `Hold:` or `Gate:` line must sit inside a readable hold section; one that does
70
73
  # not (a misspelt second heading, text after the next heading) is exit 2, never silently dropped. --file mode reads the
71
74
  # COMMITTED blob (HEAD), exactly as the verifier does, never the working tree: an untracked, symlinked or dirty file
72
75
  # cannot change the answer. Test seam: HGE_VERIFY_TIMEOUT (seconds, 1-59) can only SHORTEN the 60 s verifier limit.
@@ -403,6 +406,7 @@ print_result_line() { # <verdict> <text> <why> <gate text> <notes>
403
406
  NEEDS) if [ -n "${3:-}" ]; then printf 'Needs a person: %s - only a person can settle this (%s)\n' "$(clean_text "$2")" "$3"
404
407
  else printf 'Needs a person: %s - only a person can settle this\n' "$(clean_text "$2")"; fi ;;
405
408
  RESERVED) printf 'Reserved for you: %s - only you can clear this\n' "$(clean_text "$2")" ;;
409
+ AUTHORIZE) printf 'Say go and I run it: %s - only you can say go\n' "$(clean_text "$2")" ;;
406
410
  *) printf 'Could not check: %s - %s\n' "$(clean_text "$2")" "$3" ;;
407
411
  esac
408
412
  }
@@ -410,11 +414,21 @@ print_result_line() { # <verdict> <text> <why> <gate text> <notes>
410
414
  # reserved_hold <the hold's words>: 0 when they BEGIN with `Operator-reserved:` however it is spelt (see the header).
411
415
  reserved_hold() {
412
416
  local lt rn
413
- lt="$(printf '%s' "$1" | tr 'A-Z' 'a-z')"
417
+ lt="$(printf '%s' "$1" | sed 's/<!--.*-->//g; s/<!--.*//' | tr 'A-Z' 'a-z')"
414
418
  rn="$(printf '%s' "$lt" | tr -cd 'a-z0-9' | cut -c1-16)" # mut:reserved-norm
415
419
  [ "$rn" = operatorreserved ]
416
420
  }
417
421
 
422
+ # authorizes_hold <the hold's words>: 0 when they BEGIN with `Operator-authorizes:` however it is spelt (see the header).
423
+ # The pinned token is `operatorauthorize` (17 normalized characters; the first-17 compare also keeps
424
+ # `Operator-authorization:` and `Operator-authoriz:` out — they are not this class).
425
+ authorizes_hold() {
426
+ local lt an
427
+ lt="$(printf '%s' "$1" | sed 's/<!--.*-->//g; s/<!--.*//' | tr 'A-Z' 'a-z')"
428
+ an="$(printf '%s' "$lt" | tr -cd 'a-z0-9' | cut -c1-17)" # mut:authorizes-norm
429
+ [ "$an" = operatorauthorize ]
430
+ }
431
+
418
432
  # stall_unchecked <sentence> <why>: every hold stays on hold because the record itself cannot be used (exit 2).
419
433
  stall_unchecked() {
420
434
  local i text
@@ -439,11 +453,13 @@ stand_all() {
439
453
  # every non-reserved hold carries at least one gate and ONLY `web-acceptance` gates. A plan that mixes a `web-acceptance` gate with
440
454
  # another kind of gate, or with a hold that has no gate, cannot ride the prose path and cannot be evaluated either: exit 2. A plan
441
455
  # with no `web-acceptance` gate on a non-reserved hold (reserved-only and gate-less plans included) leaves NODELEG=0: exit 3.
442
- # An `Operator-reserved:` hold is skipped here (its gates are never probed) and always stands in the evaluation loop.
456
+ # An `Operator-reserved:` or `Operator-authorizes:` hold is skipped here (its gates are never probed) and always
457
+ # stands in the evaluation loop.
443
458
  classify_no_delegation() {
444
459
  local i text g k wa=0 other=0 ng
445
460
  while IFS=$'\t' read -r _ i text; do
446
461
  reserved_hold "$text" && continue # mut:wa-reserved-skip
462
+ authorizes_hold "$text" && continue # mut:wa-authorizes-skip
447
463
  ng=0
448
464
  while IFS= read -r g; do
449
465
  ng=$((ng + 1)); k="${g%%[[:space:]]*}"
@@ -570,6 +586,7 @@ fi
570
586
  DISCHARGED=0; STANDING=0; ANY_UNEVAL=0
571
587
  while IFS=$'\t' read -r _ i text; do
572
588
  if reserved_hold "$text"; then print_result_line RESERVED "$text" ""; STANDING=$((STANDING + 1)); ANY_UNEVAL=1; continue; fi # mut:reserved
589
+ if authorizes_hold "$text"; then print_result_line AUTHORIZE "$text" ""; STANDING=$((STANDING + 1)); ANY_UNEVAL=1; continue; fi # mut:authorize
573
590
  awk -F'\t' -v i="$i" '$1 == "GATE" && $2 == i { print $3 }' "$WORK/items" > "$WORK/g.$i"
574
591
  ng="$(wc -l < "$WORK/g.$i" | tr -d ' ')"
575
592
  HV=OK; WHY=""; GTXT=""; GNOTES=""; HLINE=""