@soleur/opencode 3.407.5 → 3.408.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soleur/opencode",
3
- "version": "3.407.5",
3
+ "version": "3.408.0",
4
4
  "description": "Soleur AI organization plugin for OpenCode",
5
5
  "type": "module",
6
6
  "bin": {
@@ -978,7 +978,7 @@ if [ -d "$INFRA" ]; then
978
978
  TABLE_ROLES="$(awk '/^readonly ROLE_TABLE=/{t=1} t{ line=$0; sub(/^readonly ROLE_TABLE=./,"",line); sub(/.$/,"",line); if (line ~ /^[a-z0-9-]+\|/) { split(line,a,"|"); print a[1] } } /^grok-dogfood\|/{t=0}' "$TREE/h/host-state.sh" | sort -u | tr '\n' ' ')"
979
979
  eq "role table lists the six roles" "$TABLE_ROLES" "git-data grok-dogfood inngest registry web-1 web-2 "
980
980
  BLOCKS="$(git -C "$REPO_TOP" ls-files 'apps/web-platform/infra/*.tf' | grep -v rehearsal | while IFS= read -r f; do grep -hE '^resource[[:space:]]+"hcloud_server"[[:space:]]+"[a-z0-9_]+"' "$REPO_TOP/$f"; done | sed -E 's/.*"hcloud_server"[[:space:]]+"([a-z0-9_]+)".*/\1/' | sort | tr '\n' ' ')"
981
- eq "census: hcloud_server blocks outside rehearsal roots" "$BLOCKS" "git_data grok_dogfood inngest registry web "
981
+ eq "census: hcloud_server blocks outside rehearsal roots" "$BLOCKS" "bastion git_data grok_dogfood inngest registry web "
982
982
  # every block maps to at least one role; web expands by var.web_hosts, one role per key
983
983
  WEB_KEYS="$(sed -n '/^variable "web_hosts"/,/^}/p' "$INFRA/variables.tf" | grep -oE '^\s+"web-[0-9]+" = \{' | grep -oE 'web-[0-9]+' | sort | tr '\n' ' ')"
984
984
  eq "census: web_hosts keys equal the web roles" "$WEB_KEYS" "web-1 web-2 "
@@ -986,6 +986,10 @@ if [ -d "$INFRA" ]; then
986
986
  b="${blk%%:*}"; r="${blk##*:}"
987
987
  case " $TABLE_ROLES " in *" $r "*) ok ;; *) bad "census: block $b has no role row $r" ;; esac
988
988
  done
989
+ # bastion (#12866, ADR-327 step 2a) has NO role row on purpose: 2a declares it and births it by a gated
990
+ # dispatch, and it ships no log source or kernel marker (no Vector, no heartbeat). Its role row lands with
991
+ # #12879's heartbeat. Ratchet: once host-state.sh names a bastion role, this exemption must go.
992
+ case " $TABLE_ROLES " in *" bastion "*) bad "census: bastion now has a role row; drop its exemption here" ;; *) ok ;; esac
989
993
  fi
990
994
 
991
995
  # ===========================================================================================================
@@ -1019,6 +1023,9 @@ km_census() { # km_census <infra-dir> -> findings, one per line; empty means cle
1019
1023
  [ -f "$d/cloud-init-registry.yml" ] || echo "NO-REGISTRY-CLOUD-INIT"
1020
1024
  grep -qE 'host-kernel-marker|SOLEUR_HOST_KERNEL' "$d/cloud-init-registry.yml" 2> /dev/null && echo "STALE-REGISTRY-EXEMPTION" ;;
1021
1025
  git_data) : ;; # exempt: separate Logs source, tracked in the git-data follow-up issue
1026
+ bastion) # exempt (#12866, ADR-327 2a): no shipper and no marker until #12879's heartbeat. Ratchet: once
1027
+ # bastion-cloud-init.yml mentions the marker, the exemption must flip to emits on purpose.
1028
+ grep -qE 'host-kernel-marker|SOLEUR_HOST_KERNEL' "$d/bastion-cloud-init.yml" 2> /dev/null && echo "STALE-BASTION-EXEMPTION" ;;
1022
1029
  grok_dogfood) # exempt: default-off, no shipper; the exemption ends when the variable flips
1023
1030
  grep -qE 'default[[:space:]]*=[[:space:]]*false' < <(sed -n '/^variable "enable_grok_dogfood"/,/^}/p' "$d/variables.tf" 2> /dev/null) || echo "STALE-EXEMPTION grok_dogfood" ;;
1024
1031
  *) echo "UNCLASSIFIED $b" ;;
@@ -369,7 +369,9 @@ NEVER CODE! Just research and write the plan.
369
369
  - **A plan that proposes a flag or argv as an implementation lever on a repo script must read the script's actual argv first — "the flag that should exist" is a capability claim verified against the parser, not inferred from the suite's shape.** Grep the script's argument handling (`--only`, `getopts`, the `usage`/help text) or run `--help`; it settles in seconds what a wrong claim costs a ruling cycle to catch. **Why:** #12626 — the plan prescribed a `--rows` row-splitting lever on `approval-guard1-mutation`; the battery's argv is `[--only|--list|--check-anchors]`, and only the batched CTO ruling caught it. See `knowledge-base/project/learnings/2026-11-11-a-completed-but-failing-leg-filed-as-did-not-complete.md` SE#4.
370
370
  - **A plan that pins a Terraform forget (`removed { destroy = false }`) must state the property in the provider's DELETE key (an email, a name) and pin a CLOSED SET over every file Terraform would load — every tracked `.tf`/`.tf.json` in the repo, minus dotfiles Terraform ignores, with heredocs found by a raw scan — never a search for the bad label or literal.** When the property is "no managed resource of type T", the set is the allowed occurrences of the type token (only the forget's `from` line); when other instances of T stay managed, enumerate the allowed addresses instead. Reuse the `FIX B handed` describe in `plugins/soleur/test/terraform-target-parity.test.ts` and its mirror, Guard G4a in `tests/scripts/test-infra-privileged-tier-census.sh`, rather than rebuilding the scan from prose. Labels miss `import`, `local.`/`var.` values, case, unquoted labels, modules and other roots; and a second guard that shares the first one's file reader and string stripper shares its blind spots. **Why:** #12813 — a dotfile `.tf` and a quote-confused heredoc each kept the test and that census guard green while Terraform planned a DELETE of the sole Better Stack Admin. See `knowledge-base/project/learnings/2026-11-16-my-forget-pin-checked-labels-while-the-provider-deletes-by-email.md`.
371
371
  - **A plan that adds a rule to a gate which reads text another interpreter will expand (a Bash PreToolUse hook, a CI shell lint) must list that interpreter's whole expansion and quoting set first, and close each class in one place rather than deny-listing spellings.** For bash: brace, tilde, parameter/`$[…]`, command, process substitution, pathname/extglob, backslash and `$'…'` quoting, and the target tool's own argv parsing (git long-option prefixes, commit pathspecs). Brief the first fix-round security seat to sweep that whole list, not to find one more instance. **Why:** #12806 — seven fix rounds each found the next form the cron hook read differently from bash; see `knowledge-base/project/learnings/2026-11-16-seven-fix-rounds-each-found-the-next-bash-expansion-the-hook-read-differently.md`.
372
+ - **Before a plan assigns a resource to one PR of a split (a heartbeat, a host create, a replace target), grep the parity test and manifest that pair that resource type with a route, and put the resource in the PR that carries the paired route.** A `betteruptime_heartbeat` armed by host boot needs a `<host>-host-replace` option and a `-replace` line (`heartbeat-reprovision-parity.test.ts`, `heartbeat-manifest.ts`), even when paused. A new route that reads `fresh-host-boot-trail.sh` must decide from a positive `fresh_boot_ready`, not the exit code, which is 0 on a skipped read. **Why:** #12866, where a heartbeat ruled into PR 2a needed PR 2b's replace route; see `knowledge-base/project/learnings/2026-11-17-a-split-pr-cannot-ship-a-boot-armed-heartbeat-before-its-replace-route.md`.
372
373
  - **A test scenario that checks a discriminator with a live stand-in must keep the production filter and vary only the data. Never invert the filter.** Swapping `= 'Object'` for `= 'String'` measures a different predicate over the rows that do match it. Conjoin the production filter with an impossible clause to get the empty-window value, and use a split count (`countIf` in ClickHouse, `COUNT(*) FILTER (WHERE …)` in Postgres) to show what the discriminator excludes. **Why:** #12726/PR #12865 — the inverted stand-in window held 42 string rows and read value 0 where the plan expected 1. See `knowledge-base/project/learnings/2026-11-18-the-guard-lexer-kept-desyncing-until-the-guarded-file-was-confined-to-the-subset-it-models.md`.
373
374
  - **An acceptance criterion that says "additions only" / "no `-` line" must be checked against every edit the plan itself prescribes in that file: an in-cell table append or an in-field frontmatter change is a one-line rewrite, so `git diff` shows a `-` line and the AC is unsatisfiable as written.** Write the carve-out into the AC by naming each rewritten line's content anchor (the table row's first cells, the frontmatter key), with the exact grep that drops only those lines, e.g. `git diff -U0 origin/main...HEAD -- <file> | grep -E '^-' | grep -vE '^--- (a/|/dev/null)' | grep -vF '<row anchor>'` printing nothing. Do not state it as "the `-` line is a prefix of its `+` line": a table row's closing pipe (space then `|`) and a replaced frontmatter value both break that. Do not match `^-[^-]` either: it misses a deleted `- item` line, which the diff shows as `-- item`. **Why:** #12742/PR #12884 — AC7 forbade any `-` line while Phase 4 step 2 prescribed an in-cell append to the runbook's #10538 row; the task was ticked anyway and review flagged it. See `knowledge-base/project/learnings/2026-11-18-an-ac-that-contradicts-the-prescribed-edit.md`.
375
+ - **A plan that moves a job body into a reusable workflow (`uses: ./.github/workflows/<file>.yml`) must list every suite that reads that caller's `jobs.<id>.steps`, and must make each one follow the call into the reusable file.** A thin caller has no `steps:`, so a suite keyed on caller + job id + steps sees nothing. A "present" assertion goes red, but an "every step that does X also does Y" assertion passes vacuously. Find them repo-wide (most infra suites live under `apps/`) with `git grep -l '<caller>.yml' -- ':!knowledge-base' ':!.github' ':!*.md' | xargs grep -lE '<job_id>|\.jobs\b|\.steps\b|jobs\[|\bsteps:'`, then read each hit: it must follow the call when it reads the caller's jobs by id, by `apply_target`, or by an extracted `^ <job_id>:` block. On #12873 this listed 54 files, four of which read the moved job. Suites that walk every workflow file see the moved body as a file of its own. **Why:** #12866/PR #12873 — `stock-preflight-coverage.test.ts` went red only on CI after `bastion_host_create` moved into `bastion-host-create.yml`. See `knowledge-base/project/learnings/2026-11-19-a-reusable-workflow-hides-its-steps-from-every-suite-that-reads-the-caller.md`.
374
376
  - **A plan that adds agent-prompt text on a degraded path must check each clause against the tool list the SDK receives on that path, and must prescribe its positive (`toContain`) asserts on that section's body, not the whole prompt; absence asserts may read the whole prompt.** Read `mcpServers`/`allowedTools`/`disallowedTools` where the prompt is built, not only the sibling prompt text; and grep every fragment you prescribe for `toContain` against the base prompt, because a composite prompt already carries common words. **Why:** #12598/PR #12957 — "no GitHub claim" left the agent told it had no web access while its `github_*` read tools stayed registered, and `toContain("failed to start")` matched `BASH_UNAVAILABLE_PROMPT_DIRECTIVE`, so a body-gutting mutation stayed green. See `knowledge-base/project/learnings/2026-11-19-a-prompt-line-is-a-claim-about-the-tool-list-and-its-asserts-must-read-its-own-body.md`.
375
377
  - **A plan that revokes a grant (a toggle-off, a consent withdrawal, a token revoke) must list every await between the point where the grant is READ and the point where the resource is REGISTERED, and every path that tears the resource down. The revocation check (an epoch, a flag) is read at the grant read, not at the start of the spawn helper. Every abort sets the revoked state, and every new attempt clears it.** **Why:** #12585/PR #12897 — the R4 epoch was read inside `spawnEgressForwarder`, which missed about 22 dispatcher awaits (the repo clone included). Aborts during the gateway probe were never marked, a stale mark hid a real spawn failure, and the warm re-resolve's teardown never marked. A targeted fix round found all four. See `knowledge-base/project/learnings/2026-11-18-a-revocation-fix-closed-the-window-i-named-not-the-windows-between-grant-read-and-register.md`.