@soleur/opencode 3.401.0 → 3.401.1

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.401.0",
3
+ "version": "3.401.1",
4
4
  "description": "Soleur AI organization plugin for OpenCode",
5
5
  "type": "module",
6
6
  "bin": {
@@ -116,7 +116,7 @@ is the closed operator-only list:
116
116
  the `<flag>-orgs` segment membership in `flag-list --json`.
117
117
  1. **LLM-free behaviour in trigger paths** (the conversation-in-rail flow): run the harness
118
118
  yourself with the `postmerge` Phase 5.5 step 2 command. Or read CI's verdict, but only from
119
- a run created AFTER the flip: `bash plugins/soleur/scripts/deploy-arm.sh find --wait
119
+ a run created AFTER the flip: `bash plugins/soleur/scripts/deploy-arm.sh find --wait 25
120
120
  <full-merge-sha>` prints `ARM=<digits>` (`ARM=none` or a skipped deploy means nothing ran),
121
121
  then `gh run view <digits> --json jobs,createdAt` for the `live-verify` job and `gh run view
122
122
  --job <id> --log` for its `RESULT:` line. **Only `RESULT: PASS` counts.** A green job is not
@@ -113,10 +113,10 @@ curl -sf --max-time 10 "<production-url>/health" | jq .
113
113
 
114
114
  Use `/health` (the public, middleware-/CSP-bypassed health route returning `{"status":"ok","version","build_sha","supabase","sentry",...}`), NOT `/api/health` — the latter is an authenticated API route that 307-redirects an unauthenticated probe to `/login`, so `curl -sf` fails and `HEALTH_VERIFIED` is left `false` even when production is healthy. For this repo, `build_sha` is judged by `deploy-arm.sh` below.
115
115
 
116
- **This repo (`web-platform-release.yml` present):** identify the deploy and what production serves, with literal arguments (no command substitution) and the FULL 40-hex merge sha (a short one matches nothing, #8135). First wait for `find` — it polls about once a minute for up to 120 polls and prints one line; watch it with the harness poller (**Claude:** Monitor tool, matching `^ARM=`; **Grok:** AwaitShell), never Bash `run_in_background`. Only once that line has arrived with rc ≠ 4, run `served`:
116
+ **This repo (`web-platform-release.yml` present):** identify the deploy and what production serves, with literal arguments (no command substitution) and the FULL 40-hex merge sha (a short one matches nothing, #8135). First wait for `find` (one line); watch it with the harness poller (**Claude:** Monitor tool, matching `^ARM=`, bounded and re-armed per Phase 2's Monitor rules; **Grok:** AwaitShell), never Bash `run_in_background` or a foreground call. Only once a final line has arrived, run `served`:
117
117
 
118
118
  ```bash
119
- bash plugins/soleur/scripts/deploy-arm.sh find --wait <full-merge-sha>
119
+ bash plugins/soleur/scripts/deploy-arm.sh find --wait 25 <full-merge-sha>
120
120
  bash plugins/soleur/scripts/deploy-arm.sh served <full-merge-sha>
121
121
  ```
122
122
 
@@ -247,7 +247,7 @@ selector that returned another merge's arm, or none, while the real arm had depl
247
247
  - `exact` + `success` → `GATE-VALIDATED`. `descendant` + `success` → `GATE-VALIDATED (via <DEPLOYED_SHA>, run <ARM>)`.
248
248
  - `DEPLOY=skipped` → `GATE-NOT-EXERCISED`: the arm clean-skipped (docs-only; `CI=failure` → `ci_not_green`) — the `workflow_run` trigger inherits neither `on.push.paths` nor `check_changed` (ADR-217). Neither a failure nor a validation; the watch stays open until a merge that deploys.
249
249
  - `DEPLOY=superseded|blocked` → `GATE-INDETERMINATE — <DEPLOY>` (lock-queue cancellation; a resolve/migrate/verify job failed).
250
- - `DEPLOY=blocked` from `resolve-target`: read its reason, which the annotation carries (job outputs are not readable through the API): `gh run view <ARM> --json jobs --jq '.jobs[] | select(.name=="resolve-target") | .databaseId'`, then `gh api repos/jikig-ai/soleur/check-runs/<id>/annotations --jq '.[].message'` and match `[skip_reason=<reason>]`. For `release_run_missing` or `github_api_unavailable` (a lookup failure, not a broken release) recover yourself: `gh run rerun <ARM> --failed` once, then re-arm `deploy-arm.sh find --wait`; if it fails the same way, wait ~15 minutes and retry once more. Never re-run the push-arm run. Any other reason (`release_failed`, `identity_mismatch`, `schema_mismatch`, …) is not a re-run case — report it.
250
+ - `DEPLOY=blocked` from `resolve-target`: read its reason, which the annotation carries (job outputs are not readable through the API): `gh run view <ARM> --json jobs --jq '.jobs[] | select(.name=="resolve-target") | .databaseId'`, then `gh api repos/jikig-ai/soleur/check-runs/<id>/annotations --jq '.[].message'` and match `[skip_reason=<reason>]`. For `release_run_missing` or `github_api_unavailable` (a lookup failure, not a broken release) recover yourself: `gh run rerun <ARM> --failed` once, then re-arm `find --wait 25`; if it fails the same way, wait ~15 minutes and retry once more. Never re-run the push-arm run. Any other reason (`release_failed`, `identity_mismatch`, `schema_mismatch`, …) is not a re-run case — report it.
251
251
  - rc 2/3 `ARM=none` (incl. `timeout`, `error`) → `GATE-INDETERMINATE — <REASON> <CAUSE>`: absence of evidence, never a pass. rc 4 → still pending; poll.
252
252
  - `descendant` + `failure` → `GATE-SUSPECT`: list `git log --oneline <merge>..<DEPLOYED_SHA>` beside this PR's gate diff — the failure may be the later merge's, so do not recommend an immediate revert.
253
253
  - `exact` + `failure` with a canary/sandbox rollback reason AND this PR changed gating logic: **suspect the gate, not the app.** A gating check that diverged from production reality (e.g. a synthetic probe that does not match what runs in prod) blocks every deploy. Recommended action: **revert the gating change immediately** (it is unvalidated by definition — its first real deploy rolled back), restore the prior known-good gate, and re-deploy; investigate the probe separately and re-introduce it NON-BLOCKING per `wg-dark-launch-deploy-gates`. Report `GATE-SUSPECT — revert recommended` and surface it at the top of the Phase 7 report.
@@ -579,6 +579,15 @@ arithmetic is `NET = FILED - EXEMPT - CLOSING`, and "opens more issues than it
579
579
  closes" is the *default* failure, not an invariant. Review findings are covered
580
580
  by neither exit: the disposition for those is fix-inline (below), and reaching
581
581
  for an override instead is the behaviour both gates exist to stop.
582
+ The gate counts a filed issue in any state (`--state all`) and reads `CLOSING`
583
+ only from close keywords (`Closes`/`Fixes`/`Resolves #N`) in the PR body, so
584
+ closing a filing on GitHub does not lower `NET` (and a mandated filing loses its
585
+ exemption once it is not OPEN). Write the exit when you file, not at ship
586
+ (PR #12645): for an override-class filing, the override marker and its
587
+ justification line in the PR body; for a mandated filing, `Mandated-By:
588
+ <rule-id>` on its own line of the issue body (the rule tagged
589
+ `[mandates-filing]` in `AGENTS.rules.md`), a `Tracks|Refs #N` line in the PR
590
+ body, and the issue left OPEN.
582
591
 
583
592
  **Mechanical pre-CONCUR auto-flip:**
584
593
 
@@ -23,7 +23,7 @@ description: "This skill should be used when preparing a feature for production
23
23
  **You own merge through production verification — never ask the operator to monitor.**
24
24
 
25
25
  1. Phase 7: poll PR merge to `MERGED` (auto-merge queue, BEHIND sync, required-check failure exit).
26
- 2. **After merge — gate on the SERVED sha, not a run's conclusion:** wait for the **deploy arm** (`bash plugins/soleur/scripts/deploy-arm.sh find --wait <full-merge-sha>` — never `head_sha=` alone, #8492; the push arm only builds) until `find` prints a final line (rc ≠ 4) — `DEPLOY=success` → require `CI=success` and `deploy-arm.sh served <merge>` → `CONTAINS` before ANY post-deploy action (cron trigger, marker read, live-verify); `skipped` → nothing deployed, go to step 3; any other `DEPLOY`/`ARM=none` → step 3 reports it. Job *presence* discriminates nothing (the push arm lists `deploy` as `skipped`). Predicate + bash: `postmerge/SKILL.md` Phase 3.7; topology: Phase 7 "RETIRED by #5806 / ADR-217". Run post-merge from a detached `origin/main` worktree (`git fetch origin main && git -C "$(git rev-parse --git-common-dir)/.." worktree add --detach .worktrees/postmerge-<PR> origin/main`), never the feature worktree — `cleanup-merged` reaps it once its lease lapses (#8136). **Why:** #8276 — push arm green, a production cron fired against the previous build, 50 min polling for a marker it could not emit. Arming a Monitor: [monitor-hygiene.md](./references/monitor-hygiene.md).
26
+ 2. **After merge — gate on the SERVED sha, not a run's conclusion:** wait for the **deploy arm** (`bash plugins/soleur/scripts/deploy-arm.sh find --wait 25 <full-merge-sha>` — never `head_sha=` alone, #8492; the push arm only builds) until `find` prints a final line (rc ≠ 4) — `DEPLOY=success` → require `CI=success` and `deploy-arm.sh served <merge>` → `CONTAINS` before ANY post-deploy action (cron trigger, marker read, live-verify); `skipped` → nothing deployed, go to step 3; any other `DEPLOY`/`ARM=none` → step 3 reports it. Job *presence* discriminates nothing (the push arm lists `deploy` as `skipped`). Predicate + bash: `postmerge/SKILL.md` Phase 3.7; topology: Phase 7 "RETIRED by #5806 / ADR-217". Run post-merge from a detached `origin/main` worktree (`git fetch origin main && git -C "$(git rev-parse --git-common-dir)/.." worktree add --detach .worktrees/postmerge-<PR> origin/main`), never the feature worktree — `cleanup-merged` reaps it once its lease lapses (#8136). **Why:** #8276 — push arm green, a production cron fired against the previous build, 50 min polling for a marker it could not emit. Arming a Monitor: [monitor-hygiene.md](./references/monitor-hygiene.md).
27
27
  3. Step 3.8: invoke `soleur:postmerge <PR-number>` (Grok) or `soleur:postmerge` (Claude) **before** Step 4 cleanup.
28
28
  4. **FORBIDDEN:** Ending the session at merge, at a red release run you did not investigate, or with "want me to watch CI?"
29
29
  5. **Harness polling:** `plugins/soleur/lib/harness.ts` → `pollInstructions()` — Claude uses **Monitor tool**; Grok uses **AwaitShell** (`pattern` for `MERGED`, `BEHIND detected`, `auto-sync.*pushed`, `\[ship\.phase7\.`, `\[pr-behind-sync\] kind=`, `postmerge verification complete`) or blocking Shell with `block_until_ms`.
@@ -9,3 +9,5 @@ Moved out of `ship/SKILL.md` Phase 7 to stay under the SKILL.md body ceiling (AD
9
9
  **The cause is almost always `--limit` truncation, not the branch filter — CORRECTED 2026-09-17 after measurement.** An earlier revision blamed `--branch main --commit <sha>` and prescribed dropping `--branch` — FALSE mechanism, no-op remedy: `gh run list` with and without `--branch` returned identical counts on two `main` commits (every run, `push` included, carries `headBranch: main`). What actually happens: newest-first ordering under a `--limit`, so on a busy commit the release runs are crowded off the end by unrelated `issues`/`issue_comment` traffic (measured: `--limit 100` → `push=0`, `--limit 300` → `push=8` of 131). Raise the limit, paginate, or filter `--event push` / `--event workflow_run`; dropping `--branch` under the same limit rebuilds the identical watcher. **Why:** #8233 — a release watch reported 10 release runs then 0, one poll short of declaring a deploy settled over nothing.
10
10
 
11
11
  **Run every POST-merge Monitor with its shell in a detached `origin/main` worktree (step 2 of the merge → deploy protocol at the top of `ship/SKILL.md`) or `/var/tmp`, never `cd`'d into the feature worktree.** The pre-merge Phase 7 poll in `ship/SKILL.md` is the exception: its BEHIND arm pushes the checked-out PR branch, so it runs from the PR worktree (from a detached HEAD it reports `kind=detached_head` and stops). After the merge any session's `cleanup-merged` can reap that worktree, and a monitor `cd`'d into it dies with `fatal: Unable to read current working directory`. **Why:** #8136 — the #8074 release watch died this way while the release was red.
12
+
13
+ **A watch lasts at most 30 minutes, so a longer wait is a chain of bounded watches.** Arm each with `timeout_ms: 1800000` (the default is 5 minutes) and give the watched command a bound meant to fit inside it (an overrun lands on the interrupted re-arm below). A read-only poll such as `deploy-arm.sh find` may run as the watch's own command: this is not hosting, because the deploy runs in GitHub Actions and `find` only reads it, so killing it loses nothing. Give it `find --wait 25 <full-merge-sha>` and re-arm a fresh watch when the line starts with `ARM=none REASON=timeout` (the 25 polls ran out), when it is `ARM=none REASON=error CAUSE=interrupted` (the watch expired and killed the call), or when the watch ends with no line, up to 5 times; any other line is final. After the fifth, report the deploy as unconfirmed and do not run `served`. Never run `find --wait` as a foreground Bash call: the default 120 polls can wait about two hours, past the Bash tool's 600 s cap. **Why:** PR #12645 — a foreground `find --wait` was killed at the Bash timeout (learning `knowledge-base/project/learnings/2026-11-11-a-census-keyed-on-the-client-name-missed-every-call-split-across-lines.md`, error 18).
@@ -14,11 +14,13 @@ When the local battery was deferred or refused (rc 4 or 6) and CI is draft-light
14
14
  ```bash
15
15
  bash "${CLAUDE_PLUGIN_ROOT}/test/fixture-relative-assert.test.sh"
16
16
  bash "${CLAUDE_PLUGIN_ROOT}/test/fixture-env-adoption.test.sh"
17
- bash .claude/hooks/grep-q-pipe-guard.test.sh
17
+ bash "$(git rev-parse --show-toplevel)/.claude/hooks/grep-q-pipe-guard.test.sh"
18
18
  python3 "${CLAUDE_PLUGIN_ROOT}/scripts/lint-ratchet.py" ruff --check
19
- (cd apps/web-platform && bunx tsc --noEmit && bunx vitest run test/repo-wide-containment.test.ts)
19
+ git fetch --no-tags --quiet origin main && python3 "$(git rev-parse --show-toplevel)/scripts/lint-skill-body-budget.py" --base "$(git merge-base origin/main HEAD)"
20
+ (cd apps/web-platform && bunx tsc --noEmit && bunx vitest run test/repo-wide-containment.test.ts test/plugin-root-anchoring.test.ts)
20
21
  ```
21
22
 
23
+ - Run the guards above on the head you ready, after the last review-fix commit, even when the battery ran and passed on an earlier head. A pass taken earlier says nothing about a row added since; `grep-q-pipe-guard.test.sh` sweeps every extension in its `SWEEP_EXTS`, not only test files. **Why:** PR #12645 — a review-fix commit the night before ready added a `producer | grep -q` row, and the ready run's CI was the first thing to fail on it (learning `knowledge-base/project/learnings/2026-11-11-a-census-keyed-on-the-client-name-missed-every-call-split-across-lines.md`, error 15).
22
24
  - Read CodeQL's open alerts even though it is not a required check: `gh api --paginate 'repos/{owner}/{repo}/code-scanning/alerts?ref=refs/pull/PR_NUMBER/merge&state=open&per_page=100' --jq '.[] | "\(.number) \(.rule.id) \(.most_recent_instance.location.path)"'` (no output: none open).
23
25
 
24
26
  **Why:** #12518 — eight repo-wide guards fired on a new spike tree, the orphan-suite lint had been red on two draft runs unread, and four red heads followed ready. See `knowledge-base/project/learnings/2026-11-11-a-deferred-battery-and-a-draft-light-ci-left-the-repo-wide-guards-for-the-ready-run.md`.