@soleur/opencode 3.379.0 → 3.379.3

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.379.0",
3
+ "version": "3.379.3",
4
4
  "description": "Soleur AI organization plugin for OpenCode",
5
5
  "type": "module",
6
6
  "bin": {
@@ -577,7 +577,15 @@ if [[ -n "$RUNNER" ]]; then
577
577
  echo "affected-tests: no CI test workflow detected — wall-clock budget not enforced; running to completion."
578
578
  fi
579
579
  rc=0
580
- affected_bound bash "$RUNNER" "$_flag" || rc=$?
580
+ # (#12013, ADR-242 addendum) Hand the runner's parallel pool a width of 4 for a local --affected
581
+ # run: not --full, not under CI, not over a width the operator set (SOLEUR_TEST_JOBS=1 is the serial
582
+ # override), and only when the runner itself mentions the knob. The prefix scopes it to this call.
583
+ # Pinned by plugins/soleur/test/affected-tests-pool-default.test.sh.
584
+ if (( ! ARG_FULL )) && [[ -z "${CI:-}" ]] && grep -q SOLEUR_TEST_JOBS "$RUNNER"; then
585
+ SOLEUR_TEST_JOBS="${SOLEUR_TEST_JOBS:-4}" affected_bound bash "$RUNNER" "$_flag" || rc=$?
586
+ else
587
+ affected_bound bash "$RUNNER" "$_flag" || rc=$?
588
+ fi
581
589
  # A delegated verdict is eligible for the content trigger unless the operator
582
590
  # passed --full; finish() runs it only when this run passed.
583
591
  (( ARG_FULL_REQUESTED )) || AFFECTED_CT_ELIGIBLE=1
@@ -458,7 +458,7 @@ npm ci --ignore-scripts --prefix apps/web-platform # needed by the webplat arm
458
458
  Note the default grant is 240 minutes: a long review-and-fix pass outlives it, so re-acquire rather than assuming the initial grant still covers you. Recovery when it is reaped: the commit objects survive unreferenced, so `git branch <name> <sha>` pins them before gc can prune, then re-push. Tell for the whole class — a test run whose failures read `fatal: Unable to read current working directory` or `getcwd: cannot access parent directories` is reporting its own environment being deleted, not defects. **Why:** 2026-08-10 (#7278) — reaped twice in one session, once on lease expiry and once with no lease at all; 2 of 3 full-suite "failures" were the deletion landing mid-run.
459
459
  - When lefthook hangs in a worktree (>60s), kill it (`pkill -f "lefthook run"`), verify checks manually, then commit with `LEFTHOOK=0 git commit`. This is a known lefthook/worktree interaction bug. (ex-`cq-when-lefthook-hangs-in-a-worktree-60s`; also guarded by `.claude/hooks/lib/incidents.sh` detect_bypass)
460
460
  - **`pkill -f <shared-script-name>` is NEVER correctly scoped in this repo — it kills the identical process in every sibling worktree.** Parallel worktrees are the documented workflow, so the same [scripts/test-all.sh](../../../../scripts/test-all.sh) (or lefthook, or any shared script) runs under a byte-identical command line in each one; a `-f` pattern match cannot distinguish yours. Kill by **PID** from the process listing, or resolve `readlink /proc/<pid>/cwd` and match the worktree before killing anything. The same `/proc` resolution is the only sound liveness test — a bare `pgrep -f "<script>"` matches its OWN command line, so it always finds ≥1 process and can never report "not running". **The read-only direction of that self-match is the more dangerous one and recurred on #7109: a polling loop whose condition was `! ps -ef | grep "<script>" | grep -v grep` reported `FINISHED` while a 40-minute suite was still 3,000 lines from its terminal marker** — `grep -v grep` does not filter the poller's own `/bin/bash -c` wrapper (it is not `grep`), so the check oscillates between matching itself and matching nothing, and "nothing" reads as done. Resolve liveness by **PID** (`[[ -d /proc/$PID ]]`) plus `readlink /proc/$PID/cwd` to confirm the process is yours, and confirm completion from the runner's own terminal marker (`=== N/M suites passed ===`) — a killed run and a finished run are indistinguishable from the process table. **Why:** #7086 — `pkill -f "bash scripts/test-all.sh"` terminated a parallel session's suite 4,274 lines in (its infra/terraform results had already landed and survived; only the `test-all` rc was lost), and a `pgrep` self-match was twice read as "my run is alive" while the run had been dead for hours. **The cwd filter above is necessary and NOT sufficient, and #5454 paid for the difference:** a scan that resolved `/proc/<pid>/cwd` and killed only pids whose cwd was the current worktree still killed the SCANNING shell (exit 144) — the scanner's own cwd *is* that worktree and its command line matches its own predicate, so filtering by worktree selects it too. Neither `grep -v grep` nor a `[t]est` bracket trick excludes it, because the matching process is the `/bin/bash -c` wrapper, not `grep`. Compute self + ancestry first and skip those pids explicitly: `p=$$; while [ -n "$p" ] && [ "$p" != 1 ]; do ANC="$ANC $p"; p=$(awk '{print $4}' /proc/$p/stat 2>/dev/null); done`, then `case " $ANC " in *" $pid "*) continue ;; esac` inside the kill loop. That form killed both target processes and spared every sibling.
461
- - Never pass `-c user.email=<fake>` / `-c user.name=<fake>` to `git commit` to bypass author-identity errors — fix the worktree's local git config instead (`worktree-manager.sh create` auto-runs `ensure_worktree_identity`). (ex-`hr-never-fake-git-author`; PR #2815 forced a destructive force-push after 4 commits were authored as `test@test` and blocked CLA; `knowledge-base/project/learnings/2026-04-24-fake-git-author-bare-repo-bot-override.md`)
461
+ - Never pass `-c user.email=` / `-c user.name=` to `git commit` when git config already supplies the identity — and never to an identity outside the CLA-sanctioned set (session `git config user.email`, a cla.yml-allowlisted or cla-signatures login's `<id>+<login>` noreply, or a pinned allowlisted email). A *real but wrong* email resolves to a NULL `cla-check` login exactly like a fake one; `-c` is for unset-config sessions only, and only with an allowlisted email. Fix config instead (`worktree-manager.sh create` auto-runs `ensure_worktree_identity`). (ex-`hr-never-fake-git-author`; PR #2815 forced a destructive force-push after 4 commits were authored as `test@test` and blocked CLA, and #12027 burned a CI cycle on six `jean@jikig.ai` commits over configured `jean.deruelle@jikigai.com`; `knowledge-base/project/learnings/2026-04-24-fake-git-author-bare-repo-bot-override.md`)
462
462
  - After `git worktree add` on bare repos, verify both `rev-parse --show-toplevel` (directory validity) and `git worktree list --porcelain` (registration). See learning: `knowledge-base/project/learnings/2026-04-10-worktree-registration-verification-insufficient.md`.
463
463
  - In bare repos with multiple worktrees, `git fetch origin branch:branch` fails when the target branch is checked out in any worktree -- git rejects the refspec update. The fallback `git fetch origin branch` only updates `origin/branch`, NOT the local ref. Use `git update-ref refs/heads/branch origin/branch` to force-sync when the fetch refspec is rejected. As of #3741 (2026-05-14), `worktree-manager.sh create` bypasses this failure mode by default — new worktrees are based on `refs/remotes/origin/<from>` directly. The refspec-fetch path only runs when `--update-local-main` is passed.
464
464
  - After creating a worktree via the script, always verify it exists in `git worktree list` before attempting to `cd` into it -- the script may report success for names that silently fail (e.g., excessively long names). A 2026-04-18 recurrence under a normal short name (#2611) confirms the silent-failure mode is not limited to edge-case names; see `knowledge-base/project/learnings/2026-04-18-worktree-manager-silent-registration-failure.md`.
@@ -355,8 +355,8 @@ For each new source file, check if a corresponding test file exists (e.g., `foo.
355
355
  **Interactive mode:** Ask the user whether to write tests now or continue without them. Do not silently proceed.
356
356
 
357
357
  Then run the affected-suite gate — the plugin entry point, wired the same in
358
- `soleur:work` Phase 2 and `soleur:review`. Its rc contract (0/1/4/6/7), the
359
- `.soleur-test-gate.json` override schema, and the per-rc actions live in
358
+ `soleur:work` Phase 2 and `soleur:review`. Its rc contract (0/1/4/6/7),
359
+ `.soleur-test-gate.json` override schema, per-rc actions, pool wait live in
360
360
  [affected-gate-contract.md](${CLAUDE_PLUGIN_ROOT}/skills/ship/references/affected-gate-contract.md). In THIS
361
361
  repo the gate capability-probes and delegates [scripts/test-all.sh](../../../../scripts/test-all.sh), so the
362
362
  always-on fast tier (#9763), ADR-262's PR-gated mutation batteries, and the
@@ -170,3 +170,7 @@ gate). Its exit status is the only failure signal.
170
170
  - Pytest repo without xdist → serial run with the reason printed; a pytest
171
171
  rc-5 collection is treated as empty selection, never a pass.
172
172
  - Empty native selection on a code diff → full command, `reason=empty-selection`.
173
+
174
+ ## Parallel pool and live reds while waiting (#12013)
175
+
176
+ ADR-242 amendment. `affected-tests.sh` hands the runner `SOLEUR_TEST_JOBS=4` for a local `--affected` run (never `--full`, never under `CI`; `SOLEUR_TEST_JOBS=1` forces serial). Once the run holds the lock, the log carries `[parallel] mode engaged — width=4`; a `[parallel] serial fallback — reason=…` line says why it did not (`lock-not-held` follows budget expiry, a missing `flock` or a disabled session state, not a wait that ended in acquisition). While waiting on the rc file, read the log for a red as it happens — extend the wait loop, do not add a second one: `until [ -s "$RCF" ]; do grep -E '^\[run\] .* done \(rc=[1-9]' "$LOG" | sort -u; sleep 30; done`. A hit is provisional: do not kill or relaunch on it. Only the final exit code and the `affected-tests:` verdict line count; a red that shows up only under the pool is re-run alone with `SOLEUR_TEST_JOBS=1` before it is treated as a diff regression. A diff that edits the runner or the affected index selects the self-SUT batteries, which run one at a time at any width, so the pool does not make that run short.