@soleur/opencode 3.405.0 → 3.405.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.405.0",
3
+ "version": "3.405.2",
4
4
  "description": "Soleur AI organization plugin for OpenCode",
5
5
  "type": "module",
6
6
  "bin": {
@@ -20,3 +20,5 @@ plugins/soleur/test/ship-battery-refusal-wait.test.sh P if (( n > 400 )); then k
20
20
  plugins/soleur/test/ship-battery-refusal-wait.test.sh P if [[ -f "$d/die_after" && "$n" -ge "$(cat "$d/die_after")" ]]; then kill -KILL "$PPID"; exit 0; fi
21
21
  scripts/followthroughs/pr-battery-gate-saving-9323.test.sh P [[ "$wp" =~ ^[0-9]+$ && "$wp" != "$SOLEUR_TEST_SUITE_PID" ]] && kill -KILL "$wp" 2>/dev/null
22
22
  scripts/followthroughs/pr-battery-gate-saving-9323.test.sh W hops=$((hops + 1)); wp="$(cut -d' ' -f4 "/proc/$wp/stat" 2>/dev/null)"
23
+ scripts/rotate-sentry-actions-ro-token.test.sh P kill -TERM "$PPID"
24
+ scripts/rotate-sentry-actions-ro-token.test.sh P kill -TERM "$spid"
@@ -2,7 +2,7 @@
2
2
  upstream: github.com/goSprinto/compliance-skills
3
3
  license: MIT
4
4
  pinned-commit: 7b58d68461cb1fc033a063e34cc9de63d0b4144b
5
- last-verified: 2026-10-26
5
+ last-verified: 2026-11-16
6
6
  registry: knowledge-base/engineering/policies/content-vendoring.md
7
7
  lifted-files:
8
8
  # Each entry pins TWO blob SHAs:
@@ -159,7 +159,7 @@ Query cron monitors:
159
159
  ```bash
160
160
  SENTRY_TOKEN=$(doppler secrets get SENTRY_AUTH_TOKEN -p soleur -c prd --plain 2>/dev/null || \
161
161
  doppler secrets get SENTRY_API_TOKEN -p soleur -c prd --plain)
162
- SENTRY_ORG=$(doppler secrets get SENTRY_ORG -p soleur -c prd --plain 2>/dev/null || echo "jikigai")
162
+ SENTRY_ORG=$(doppler secrets get SENTRY_ORG -p soleur -c prd --plain 2>/dev/null || echo "jikigai-eu")
163
163
  API_HOST="${SENTRY_ORG}.sentry.io"
164
164
 
165
165
  # argv shows in /proc/<pid>/cmdline, so the token rides curl's stdin config. Bash only; `bash -x` would print the token.
@@ -644,6 +644,6 @@ per-prerequisite behaviour (skip / warn / poll).
644
644
  ## Production Debugging
645
645
 
646
646
  - **A deploy-arm database step failing on an auth/connect timeout is a production database signal, not an isolated flake: read readiness before rerunning.** `/health` returns HTTP 200 `status: ok` whatever the database state (only `.supabase` flips to `error`), the Management API project `status` can read `ACTIVE_HEALTHY` while Postgres is down, and a rerun's `migrate` can go green through the pooler. Read `curl -sS <prod>/health | jq -r .supabase` and `GET /v1/projects/<ref>/health?services=db&services=auth&services=rest&services=pooler` first — the latter carries the account-level admin PAT, so call it the way [supabase-logs-query.sh](../../../../scripts/supabase-logs-query.sh) does (header on stdin via `--header @-`, `--disable --noproxy '*'`, under `doppler run`), never with the token in argv. **Why:** 2026-09-15 — prd Postgres was unreachable 89 min; a rerun looped on health verification and `/health` was read directly only ~16 min later (post-mortem `prd-supabase-database-unreachable-2026-09-15-postmortem.md`).
647
- - For production debugging use Sentry API (`SENTRY_API_TOKEN` in Doppler `prd`), Better Stack, or `/health` — never SSH for logs. SSH is for infra provisioning only. (ex-`cq-for-production-debugging-use`) To read a Sentry issue/event by id inline, use `doppler run -p soleur -c prd -- scripts/sentry-issue.sh <id>` (runbook `knowledge-base/engineering/operations/runbooks/sentry-issue-read.md`); for host/app logs use [betterstack-query.sh](../../../../scripts/betterstack-query.sh) (runbook `betterstack-log-query.md`).
647
+ - For production debugging use Sentry API (`SENTRY_ISSUE_RO_TOKEN` in Doppler `prd`), Better Stack, or `/health` — never SSH for logs. SSH is for infra provisioning only. (ex-`cq-for-production-debugging-use`) To read a Sentry issue/event by id inline, use `doppler run -p soleur -c prd -- scripts/sentry-issue.sh <id>` (runbook `knowledge-base/engineering/operations/runbooks/sentry-issue-read.md`); for host/app logs use [betterstack-query.sh](../../../../scripts/betterstack-query.sh) (runbook `betterstack-log-query.md`).
648
648
  - For deploy webhook debugging, fetch `WEBHOOK_DEPLOY_SECRET`/`CF_ACCESS_CLIENT_ID`/`CF_ACCESS_CLIENT_SECRET` from Doppler `prd_terraform` (not `prd`). GET `https://deploy.soleur.ai/hooks/deploy-status` with CF Access headers + HMAC-sha256 over empty body, all on curl's stdin config. Full runbook: [deploy-status-debugging.md](./references/deploy-status-debugging.md). (ex-`cq-deploy-webhook-observability-debug`)
649
649
  - Doppler env values on prd are baked into the container at start via `--env-file` (cloud-init.yml). Flipping a flag in Doppler does NOT affect the running container — POST-X gates that depend on a freshly-flipped flag must redeploy the current image tag (POST to `/hooks/deploy`) between the flip and the verification smoke. Full context: [2026-05-19-doppler-env-hot-reload-limitation.md](../../../../knowledge-base/project/learnings/2026-05-19-doppler-env-hot-reload-limitation.md).
@@ -8,8 +8,9 @@ carried in every `soleur:postmerge` body (ADR-229).
8
8
  | Missing Prerequisite | Behavior |
9
9
  |---------------------|----------|
10
10
  | No production URL | Skip health check with warning |
11
- | No `SENTRY_AUTH_TOKEN` | Skip Sentry cron monitor check AND error-count delta with warning |
12
- | No `SENTRY_ISSUE_RW_TOKEN` | Skip the entire error-count-delta + auto-resolve phase (the single-issue GET 403s on the `prd` `SENTRY_AUTH_TOKEN`, re-measured 2026-09-08); recommend manual resolution as today |
11
+ | No `SENTRY_AUTH_TOKEN` and no `SENTRY_API_TOKEN` | Skip the Sentry cron monitor check with warning (Phase 3.5 reads `SENTRY_AUTH_TOKEN`, falling back to `SENTRY_API_TOKEN`; both are monitors-only — the error-count delta does not use them, their issue GET 403s, re-measured 2026-11-13) |
12
+ | No `SENTRY_ISSUE_RW_TOKEN` | Skip the auto-resolve PUT only; the error-count-delta GET still runs on `SENTRY_ISSUE_RO_TOKEN`. With neither RO nor RW set, the error-count delta is `SKIPPED`; recommend manual resolution as today |
13
+ | No `SENTRY_ISSUE_RO_TOKEN` (RW set) | The error-count-delta GET falls back to `SENTRY_ISSUE_RW_TOKEN`, GET-only; the auto-resolve PUT still runs on RW |
13
14
  | Sentry API unreachable | Skip Sentry cron monitor check with warning |
14
15
  | No Sentry issue identified in PR/linked issue | Skip error-count delta silently (nothing to measure) |
15
16
  | Sentry issue not found via API | Skip error-count delta with warning |
@@ -23,6 +23,17 @@ Loaded by [postmerge SKILL.md](../SKILL.md) Phase 3.6 when the PR body or linked
23
23
  > least-privilege credential for it is `SENTRY_ISSUE_RO_TOKEN`
24
24
  > (`event:read`, `org:read`, Doppler `soleur/prd`), and [scripts/sentry-issue.sh](../../../../../scripts/sentry-issue.sh)
25
25
  > already implements the RO → RW ladder for this same URL.
26
+ >
27
+ > **Measured 2026-11-13 — which token reads issues.** HTTP codes only (bodies
28
+ > discarded) on `GET https://jikigai-eu.sentry.io/api/0/organizations/jikigai-eu/issues/?query=is:unresolved`,
29
+ > every token from Doppler `soleur/prd`: `SENTRY_ISSUE_RO_TOKEN` 200,
30
+ > `SENTRY_ISSUE_RW_TOKEN` 200, `SENTRY_IAC_AUTH_TOKEN` 200, `SENTRY_AUTH_TOKEN` 403,
31
+ > `SENTRY_API_TOKEN` 403; on `/monitors/` all five returned 200. So `SENTRY_AUTH_TOKEN`
32
+ > is the Phase 3.5 monitors-only token. This phase's GET stays on the RO → RW ladder
33
+ > below and is `SKIPPED` without them (the clarification above still holds: never widen it
34
+ > to an admin-scoped token). For a MANUAL org-level issue search outside this phase, use
35
+ > `SENTRY_ISSUE_RO_TOKEN` first; `SENTRY_IAC_AUTH_TOKEN` (admin-scoped, ADR-031) is the
36
+ > last-resort read only, never a write.
26
37
 
27
38
  ```bash
28
39
  # ISSUE_ID = the Sentry issue short-id or numeric id from the PR/issue body
@@ -32,7 +43,7 @@ Loaded by [postmerge SKILL.md](../SKILL.md) Phase 3.6 when the PR body or linked
32
43
  ISSUE_ID="<sentry-issue-id-from-pr-body>"
33
44
  DEPLOY_TS=$(git show -s --format=%cI "<merge-commit-sha-from-phase-1>" 2>/dev/null || true)
34
45
  # Same resolution as Phase 3.5 — this block runs on its own.
35
- SENTRY_ORG=$(doppler secrets get SENTRY_ORG -p soleur -c prd --plain 2>/dev/null || echo "jikigai")
46
+ SENTRY_ORG=$(doppler secrets get SENTRY_ORG -p soleur -c prd --plain 2>/dev/null || echo "jikigai-eu")
36
47
  API_HOST="${SENTRY_ORG}.sentry.io"
37
48
  # GET: least-privilege RO token, RW as a GET-only fallback (scripts/sentry-issue.sh's
38
49
  # ladder). The prd SENTRY_AUTH_TOKEN 403s on /issues/<id>/ (#7797) — never use it here.
@@ -7,3 +7,4 @@ Loaded from the Defect Classes list in [SKILL.md](../SKILL.md) (Defect Classes)
7
7
 
8
8
  - **A guard whose property is CONTROL FLOW cannot be pinned by pattern greps over the body — pin the flow skeleton, and refuse substitution inside the lines you drop.** Pattern checks (`if ! cmd; then`, `exit 1`, a ban on `|| true`) are satisfied by dead branches, `echo ... # exit 1`, `trap 'exit 0' EXIT`, `if: ${{ false }}`, an early unconditional `exit 0`, and by `env:` (`BASH_ENV`, `NODE_OPTIONS`, `PATH`) at step, job or workflow level. Reduce the body to its flow (drop only inert `echo "..."` lines with no `$(`, `${`, backtick or backslash) and compare to a pinned golden, count publishes of every spelling (`pnpm publish`, a `\`-continued `npm publish`, a `uses:` action), and pin the env and `working-directory` of the step. **Why:** #11688 — ten distinct bypasses of a pattern-based `diagnose-on-failure` member, then two P1s in its first skeleton (an echo dropper that accepted `echo "$(printf x >> .npmrc)"`, unconstrained env). See `knowledge-base/project/learnings/2026-10-31-a-pattern-grep-guard-is-satisfied-by-dead-branches-pin-the-control-flow-skeleton.md`.
9
9
  - **A leg that invokes a test battery DIRECTLY (not via `scripts/test-all.sh`) tees a capture carrying none of the runner's verdict tokens — check the leg's capture against the downstream classifier's token set per terminal state.** The issue filer's `cap_fail` gate recognizes only `"^RED "`, `"^UNACCOUNTED "`, a `=== N suites:` failed breakdown, or the `[FAIL]`+short-terminal pairing; a completed-but-failing direct-invocation leg contains none and files as "did not complete" (censored-leg semantics on a verdict-bearing capture). The fix is a CONDITIONAL verdict emit (`RED <path>` on `rc != 0`) at the step tail — an unconditional emit would file a censored leg as "tests failing" and erase the complete-vs-timeout split. **Why:** #12626/PR #12654 — P2 found in sequential-fallback review; the mut leg had to bypass `test-all.sh` because its `VITEST_SHARD`-gated `skip_suite` declines the registrations. See `knowledge-base/project/learnings/2026-11-11-a-completed-but-failing-leg-filed-as-did-not-complete.md`.
10
+ - **A gate that greps a run's LOG for a marker must be run against a real green AND a real red log first — GitHub prints each step's `run:` script into the log, so a marker that is also a literal in the workflow source matches on every run.** Fetch one of each (`gh run list -w <wf> -s success -L1` and `-s failure -L1`, then `gh run view <id> --log | grep -cE '<marker>'`) and require a non-zero count on only the log it should match. Match errors only in their rendered `##[error]…` form, require a positive line rather than an absence, and prefer strings built from a variable (`"… in $STACK_NAME"`): the echoed source shows it unexpanded, so the expanded text appears only when the line really runs. **Why:** #12736 — a runbook revoke gate blocked on `sentry_iac_token_absent`, which the echoed `echo "::error::…"` line put in every log. See `knowledge-base/project/learnings/2026-11-13-a-log-marker-gate-matched-the-echoed-workflow-source-and-a-trap-inherited-the-writes-redirect.md`.
@@ -103,3 +103,5 @@ Lint a `/var/tmp` copy with the pinned binary and `-c .markdownlint.json`, and
103
103
  confirm a known-bad copy fails, before reporting clean. **Why:** #12536 — see
104
104
  `knowledge-base/project/learnings/2026-11-10-a-verify-only-key-slot-guard-anchors-on-what-every-signer-needs.md`
105
105
  session error 5.
106
+
107
+ - **A signal trap runs inside the redirections of the command it interrupted, when bash applied them itself** (a shell function, a builtin or a `{ }` group; an external command's redirect lives in the child, so the trap's fd 2 is untouched) — a handler that reports to fd 2 while `my_fn >/dev/null 2>&1` is in flight writes into /dev/null. Take a private dup at startup (`exec 9>&2`) and report on it (`printf '...\n' >&9`); close it for children that may daemonize (`9>&-`). **Why:** #12736 — the rotation script's partial-store report was silently lost on SIGTERM until a stub-driven signal row caught it. See `knowledge-base/project/learnings/2026-11-13-a-log-marker-gate-matched-the-echoed-workflow-source-and-a-trap-inherited-the-writes-redirect.md`.