@soleur/opencode 3.407.4 → 3.407.5

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.407.4",
3
+ "version": "3.407.5",
4
4
  "description": "Soleur AI organization plugin for OpenCode",
5
5
  "type": "module",
6
6
  "bin": {
@@ -99,14 +99,18 @@
99
99
  # A ssl-mode figure value=<value>; Records ok when value is strict (the runbook claim), bad on any other value.
100
100
  # An A ok NEVER stands alone for a flip go: read it together with B.
101
101
  # B config-entrypoint figures rule_count, enabled_ssl_rules (the count of rules that are enabled, i.e. `enabled != false`,
102
- # with a non-null ssl) and per rule ref, enabled, ssl and two host booleans. The host booleans are
103
- # LITERAL SUBSTRING figures only and are not a verdict input: a wildcard such as
104
- # ends_with(http.host, ".soleur.ai") or an expression of true defeats them. Records ok ONLY when
102
+ # with a non-null ssl) and per rule ref, enabled, ssl, two host booleans and host_literal_only. The
103
+ # host booleans are LITERAL SUBSTRING figures only and are not a verdict input: a wildcard such as
104
+ # ends_with(http.host, ".soleur.ai") or an expression of true defeats them. host_literal_only is a
105
+ # value-free whole-expression shape boolean (#12742): true ONLY when the expression is exactly
106
+ # `(http.host eq "<h>")` or `(http.host in {"<h1>" "<h2>" ...})`, single spaces, each host 1 to 253
107
+ # of a-z 0-9 . - (anchored \A and \z), so a negation, a path or other clause, a wildcard, any added
108
+ # byte or a vendor re-spelling of the text makes it false. It is not a Records input either; the
109
+ # public-sdk_url preflight (tests/scripts/lib/inngest-public-sdk-url-preflight.sh) reads it. Records ok ONLY when
105
110
  # enabled_ssl_rules is 2 AND one of those rules has ref dcb85b75bc3c4f4aa2a8c13a080bf854 with ssl=strict (the
106
111
  # other is the `ssl = "full"` rule on soleur.ai and www) AND rule_count is 3; anything else is
107
- # recorded not ok with the figures. The wrapper CANNOT verify that
108
- # the rule's expression is host-scoped (it never prints the expression), so Records ok does not depend
109
- # on the host booleans; the owner compares the live expression with
112
+ # recorded not ok with the figures. The wrapper never prints the expression, so Records ok does not
113
+ # depend on the host booleans or host_literal_only; the owner compares the live expression with
110
114
  # apps/web-platform/infra/seo-config-rules.tf (the adopted rule is `(http.host eq "app.soleur.ai")`).
111
115
  # The 3, the 2, the ref and the ssl value are a DATED SNAPSHOT (2026-11-13, the ADR-321 item 13
112
116
  # cleanup, #10479; history in git and ADR-321): they are re-derived from that file at read time, and
@@ -223,7 +227,9 @@ def tkey: sub("Z$"; "") | if contains(".") then . else . + ".0" end;
223
227
  def dur: . == null or (type == "number" and . >= 0 and . <= 1e7);
224
228
  def cnt: type == "number" and . == floor and . >= 0 and . <= 1e12;
225
229
  def r1: if . == null then null else ((. * 10 | round) / 10) end;
226
- def verstr: if . == null then null elif (type == "string" or type == "number") and (tostring | test("\\A[0-9]{1,10}\\z")) then tostring else "invalid" end;'
230
+ def verstr: if . == null then null elif (type == "string" or type == "number") and (tostring | test("\\A[0-9]{1,10}\\z")) then tostring else "invalid" end;
231
+ def hn: "[a-z0-9.-]{1,253}";
232
+ def hostlit: type == "string" and test("\\A\\(http\\.host (eq \"" + hn + "\"|in \\{\"" + hn + "\"( \"" + hn + "\")*\\})\\)\\z");'
227
233
 
228
234
  # guard_body <jq condition>: type guard on the whole body. success:false is an api-error, anything
229
235
  # that is not the expected shape (including a jq failure) is bad-response. Never keyed on `.result | length`.
@@ -423,7 +429,7 @@ sub_ssl_mode() {
423
429
  sub_config_entrypoint() {
424
430
  cf_get "$BASE/zones/$CF_ZONE_ID/rulesets/phases/http_config_settings/entrypoint"
425
431
  guard_body '.success == true and (.result | type) == "object" and ((.result.rules // []) | type) == "array" and all((.result.rules // [])[]; type == "object")'
426
- project '.result as $r | ($r.rules // []) as $rules | [$rules[] | {ref: (.ref | idv), enabled: (.enabled != false), ssl: ((.action_parameters | if type == "object" then .ssl else null end) | sslv), mentions_app_host: ((.expression // "") | type == "string" and contains("\"app.soleur.ai\"")), mentions_lb_staging_host: ((.expression // "") | type == "string" and contains("\"lb-staging.soleur.ai\""))}] as $rr | {subcommand: "config-entrypoint", id: ($r.id | idv), version: ($r.version | verstr), last_updated: ($r.last_updated | tsn), rule_count: ($rules | length), enabled_ssl_rules: ([$rr[] | select(.enabled and .ssl != null)] | length), rules: $rr}'
432
+ project '.result as $r | ($r.rules // []) as $rules | [$rules[] | {ref: (.ref | idv), enabled: (.enabled != false), ssl: ((.action_parameters | if type == "object" then .ssl else null end) | sslv), mentions_app_host: ((.expression // "") | type == "string" and contains("\"app.soleur.ai\"")), mentions_lb_staging_host: ((.expression // "") | type == "string" and contains("\"lb-staging.soleur.ai\"")), host_literal_only: (.expression | hostlit)}] as $rr | {subcommand: "config-entrypoint", id: ($r.id | idv), version: ($r.version | verstr), last_updated: ($r.last_updated | tsn), rule_count: ($rules | length), enabled_ssl_rules: ([$rr[] | select(.enabled and .ssl != null)] | length), rules: $rr}'
427
433
  }
428
434
  sub_pagerules_ssl() {
429
435
  cf_get "$BASE/zones/$CF_ZONE_ID/pagerules?status=active"
@@ -227,7 +227,7 @@ NEVER CODE! Just research and write the plan.
227
227
  - **A plan that changes what an Inngest step RETURNS (or renames its id) must say how the new code reads the OLD memoized value.** Step output is persisted state that outlives the code that wrote it: a run memoized under the old code resumes on the new code after the deploy (the deploy drain waits only for a live child process), so a reader that assumes the new shape crashes outside every catch. Specify a shape-tolerant reader plus a harness test that seeds the old memo. **Why:** #8726 — both returned-verdict migrations would have crashed the in-flight cron runs of their own deploy; caught only by the review panel. See `knowledge-base/project/learnings/integration-issues/2026-09-24-changing-a-step-return-shape-strands-in-flight-runs-and-a-boundary-redaction-blinds-the-detector.md`.
228
228
  - **An AC that sweeps the repo for a retired phrase must exclude the plan that quotes it** (`git grep -n '<phrase>' -- ':!knowledge-base/project/plans'`), or the AC is unsatisfiable by construction. **Why:** #8630 — AC10 matched the plan's own reconciliation table and its own AC line.
229
229
  - **A plan that changes a Terraform resource must enumerate EVERY workflow that can apply it — not only the one it routes through.** For each push-triggered workflow whose `paths:` include a file the diff edits, ask whether its `-target` graph reaches the resource (dependencies are pulled in transitively) and whether its guard counts that change class. A comment-only edit to a shared `.tf` file can trigger a second apply workflow whose plan performs the change without the intended gate. **Why:** #8705 — a "required" `server.tf` comment edit would have let `apply-deploy-pipeline-fix.yml` (which reaches `hcloud_server.web` and, through its user_data, the rotated token) rotate the credential with no `[ack-destroy]` and no installer re-fire. See `knowledge-base/project/learnings/security-issues/2026-09-24-a-second-apply-workflow-could-perform-the-rotation-without-its-gate.md`.
230
- - **A gate on a change to a resource's boot payload (`user_data`, an image, a cloud-init arg) must cover every path that BOOTS that payload, not only the workflow you edited.** List the replace job, the birth/create job and any operator-local untargeted `terraform apply` (OPERATOR_APPLIED_EXCLUSIONS break-glass); gate each workflow path with one shared script, and document an abort for the path no workflow can gate. **Why:** #10479/PR #12737 — the `PUBLIC-SDK-URL` confirm sat on `inngest_host_replace` only, while `inngest_host` birth and an untargeted apply both boot the public sdk_url (`hcloud_server.inngest` has no `ignore_changes=[user_data]`). See `knowledge-base/project/learnings/2026-11-15-a-gate-on-one-boot-path-and-a-stripper-that-ate-live-claims.md`.
230
+ - **A gate on a change to a resource's boot payload (`user_data`, an image, a cloud-init arg) must cover every path that BOOTS that payload, not only the workflow you edited.** List the replace job, the birth/create job and any operator-local untargeted `terraform apply` (OPERATOR_APPLIED_EXCLUSIONS break-glass); gate each workflow path with one shared script, and document an abort for the path no workflow can gate. **Why:** #10479/PR #12737 — the typed confirm token sat on `inngest_host_replace` only, while `inngest_host` birth and an untargeted apply both boot the public sdk_url (`hcloud_server.inngest` has no `ignore_changes=[user_data]`). See `knowledge-base/project/learnings/2026-11-15-a-gate-on-one-boot-path-and-a-stripper-that-ate-live-claims.md`.
231
231
  - **A privacy/sanitization claim worded "X never appears in the event" is about the WHOLE event, so the plan must enumerate the event's contributors before naming where the guarantee lives.** Contributors: the call's own args, middleware scope extras (`sentry-correlation`'s `inngest.event_data`), breadcrumbs, and free-text fields that embed other values (`err.message`). Prefer enforcing at the boundary every event passes (`server/sentry-scrub.ts`) over one call-site field, and write the AC's test against every sink, not the call args. **Why:** #8719/PR #8794 — the test checked `captureMessage` args while the founder id reached Sentry via the middleware extra and an error message, and a sanitized `extra.tool` sat beside the raw name in `err.message`. See `knowledge-base/project/learnings/security-issues/2026-09-25-a-no-raw-id-claim-tested-at-the-call-args-missed-three-sinks-on-the-same-event.md`.
232
232
  - **A gate's refusal message is an instruction the operator will execute in the TRANSITION state the change creates — plan it against that state.** When the change can refuse the value production currently uses (a pinned tag, an existing row, a live config), the message must branch on "is this the live value?" and never prescribe deleting or re-using it. **Why:** #8747 — "delete the tag and re-cut it" named main's own pinned tag right after merge. See `knowledge-base/project/learnings/2026-09-25-my-ancestry-gate-was-sound-and-its-harness-and-its-recovery-text-were-not.md`.
233
233
  - **A gate that picks WHICH object to check from a command string must bind to the real invocation, not to text.** Enumerate spellings that name the target without invoking it (`echo`, a `#` comment, a `||`/`;` sibling, a quoted or suffixed argument) and spellings that retarget it (short/attached/combined flags, env vars, a `cd`); require the parse to agree between the raw and quote-stripped command. **Why:** #8778/PR #8779 — "first digits after `gh pr merge`" let a MERGED donor PR's evidence approve a different merge; see `knowledge-base/project/learnings/2026-09-24-the-gate-resolved-its-target-from-text-that-was-not-the-invocation.md`.
@@ -89,6 +89,7 @@ Two lessons from #9448 belong in every fix-agent and review-seat brief (full acc
89
89
  - **Fix agents obey the same rule as seats: finish in the foreground.** Brief a fix agent to run its suites with `timeout` in the foreground and to report only after it has the exit code; one that ended a turn "waiting on its own monitor" left unfinished work and a stale exact floor (`EXPECTED_PASSES` 96, real 131) and sat idle about 45 minutes until the lead resumed it with `SendMessage`. Check the exact-floor constant against a green run before committing a fix batch. See `knowledge-base/project/learnings/2026-11-07-a-guard-must-equal-the-platforms-own-reader-not-yaml-semantics.md` (#12295).
90
90
  - **A brief that asks a seat (or the lead's own battery) to flip a line inside a helper that sends signals or removes files carries the PID-namespace rule.** Run every mutant through `bash "$ROOT/scripts/soleur-sandbox.sh" run-isolated "$SBX" -- <command>` under `timeout -k 5 120` (a mutant that cannot start there, exit 125 with `RUN_IN_PID_NAMESPACE_REFUSED` or any missing script or verb, is `UNVERIFIED-NO-NAMESPACE`, never run on the host); a report-only seat reasons about the line and reports, and the lead mutation-tests the named gap through the verb. The command, the refusal rule and the limits: [work-scratch-sandboxes.md](../../work/references/work-scratch-sandboxes.md).
91
91
  - **Verify the lead's own fix edits the way you verify a seat's.** After any splice or prune of a test file, run `git diff origin/main --numstat` and read the DELETED lines unfiltered (a `grep '^[-+]'` hides the context lines an enclosing marker-to-marker splice also removes, and a floor that moves by less than its itemisation is the tell). When a change adds a call inside an extracted unit, `grep -rln` every extractor of that unit by sentinel and by function name before writing "no edit expected". **Why:** #10210 — a splice deleted an unchanged job-budget arm that three seats then found, and a sibling loopback suite extracting the same unit lacked the new helper. See `knowledge-base/project/learnings/2026-10-13-my-review-fix-spliced-away-a-guard-i-never-read-and-a-wait-claimed-300-seconds-it-did-not-wait.md`.
92
+ - **Select a fix agent's suites by the NAMES it edits, not the lines it changes.** When a fix edits a workflow job or step, brief it to run every suite `git grep -l '<job_id>\|<target-name>\|<step-name>' -- '*.test.*' 'tests/scripts/test-*'` returns (`bash` for a `.sh` hit, the owning package's vitest for a `.ts` hit; check the tracker before reading a red as caused by the fix). Leave the workflow path out of the pattern: on #12876 it matched 118 files. **Why:** #12876 — a confirm step's error text contained `-replace`, which `inngest-host-replace-preflight.test.sh`'s step-order regex read as a terraform step; no brief listed that suite, and the same grep returned 15 more. See `knowledge-base/project/learnings/2026-11-19-the-suite-that-caught-my-fix-was-one-no-fix-agent-selected.md`.
92
93
  - **A diff under `docs/legal/` or `knowledge-base/legal/` has no seat arm in `fix-round-seats.sh`, and a legal-wording fix needs the CLO agent, not a vote.** Add `soleur:legal:legal-compliance-auditor` to the panel and to every fix round by hand (the script prints `unknown-seat:` for it), brief the history seat to check published-baseline claims against `origin/main` rather than the panel SHA (a fix round that re-dates an entry reads as an overwrite against the panel SHA), and send every wording doubt to the CLO agent as one batched spawn with the seat reports attached. **Why:** PR #10326 -- see `knowledge-base/project/learnings/2026-10-15-my-correction-pr-wrote-only-and-no-where-the-code-read-showed-more.md`.
93
94
  - **A seat's "simulate an inherited `GIT_DIR`" experiment must target a throwaway repo, never the live worktree.** On #12198 a seat exported `GIT_DIR`/`GIT_INDEX_FILE` at the live worktree and ran a suite whose fixtures do not unset them: a stray commit landed on local `main`, HEAD was repointed, and `user.name`/`user.email` were written into the shared `.git/config` (every later commit would have authored as `Test User`). Brief seats to build the repo for that experiment inside their own sandbox, and after the panel returns check `git rev-parse HEAD`, `main`'s reflog and `git config --local --list | grep '^user'`. See `knowledge-base/project/learnings/2026-11-05-a-review-seat-simulating-an-inherited-git-dir-wrote-into-the-live-repo-and-the-shared-config.md`.
94
95
  - **The lead does not edit the live tree while a fix-round seat may run suites on it — or the seats run suites only on a `git archive` of the pinned SHA.** On #12655 the lead had an uncommitted fix-round regex in the live tree that briefly refused production's `--update-shallow`. Two seats running the live suite saw 4 red rows, and one recorded an unattributed failure. Brief seats to allocate `SBX=$(bash "$ROOT/scripts/soleur-sandbox.sh" new <seat> --link-node-modules)` (review/SKILL.md, the mutating-seat sandbox rule), then run `git archive <pinned> | tar -x -C "$SBX"` so the archive overwrites the copied live edit, and run suites there; add `git init -q && git add -A` in `$SBX` when a suite reads the repo's own git state (an archive tree is not a repo). Or hold edits until the seats return. See `knowledge-base/project/learnings/test-failures/2026-11-11-the-fake-transport-raced-the-push-and-the-guard-rows-sampled-one-push.md`.