@soleur/opencode 3.387.3 → 3.387.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.387.3",
3
+ "version": "3.387.5",
4
4
  "description": "Soleur AI organization plugin for OpenCode",
5
5
  "type": "module",
6
6
  "bin": {
@@ -248,28 +248,15 @@ fi
248
248
  if ! git rev-parse --verify --quiet refs/remotes/origin/main >/dev/null 2>&1; then
249
249
  undecidable "${OPERATOR_CI_WORDS:+operator ci-is-the-gate set but }origin/main is unresolvable; cannot scope the diff"
250
250
  fi
251
- # `--name-status -M` and BOTH path columns, not `--name-only`: a file renamed OUT
252
- # of the infra surface prints only its new path under --name-only, so the gate
253
- # would miss it while test-all.sh's own predicate catches it. Measured on a probe
254
- # repo: --name-only gave `moved.tf`; --name-status -M gave
255
- # `R100 apps/web-platform/infra/a.tf moved.tf`.
256
- #
257
- # `tr '\t' '\n'` IS THE FIX, NOT FORMATTING. A rename emits both paths on ONE
258
- # tab-joined line, and INFRA_RE is `^`-anchored, so `cut -f2-` alone tests only
259
- # the OLD path — the gate saw renames OUT of the surface and was blind to renames
260
- # IN. Measured on a probe repo: `R100 src/x.tf apps/web-platform/infra/x.tf`
261
- # did NOT match, so a 100%-similarity rename of a .tf file INTO the module
262
- # directory returned SKIPPABLE. Terraform loads every *.tf in the directory, so
263
- # that is a real infra change with no content diff, on the one shard no required
264
- # check covers. The `$`-anchored workflow alternative had the mirror bug: a
265
- # rename of apply-web-platform-infra.yml OUT of .github/workflows/ left the
266
- # literal in column 1 and never matched. Splitting the columns onto separate
267
- # lines tests each path independently.
268
- #
269
- # A COPY is not affected and needs no handling: without `-C` git reports the new
270
- # file as `A` with a single column, which already matches. Do not add `-C` in the
271
- # belief that it closes a gap — measured, it does not exist.
272
- CHANGED="$(git diff --name-status -M refs/remotes/origin/main...HEAD 2>/dev/null | cut -f2- | tr '\t' '\n')"
251
+ # The operator-token arm below builds its path lists the same way, for the same reasons: NUL-delimited so a C-quoted name
252
+ # reaches INFRA_RE as raw bytes, `--no-renames` so a rename lists BOTH its old and its new path (a rename-detected diff prints
253
+ # only the new one), `--ignore-submodules=none` so a gitlink is not hidden by configuration, and `git -C` the repo top (`_tp`,
254
+ # resolved above once the work-tree check passed) because `diff.relative` limits a diff to the cwd subtree.
255
+ # `core.quotePath=false` alone is NOT a fix: it governs only bytes at or above 0x80; a tab, `"` or `\` stays quoted.
256
+ # A copy needs no handling (its source is never listed in either form). `tr` re-splits a name that holds a newline: the extra
257
+ # lines can only add a false OWED, never hide a real infra path (its first line still starts at the prefix). T5f and T5h pin
258
+ # the rename members (dropping `--no-renames` reddens both); T20 pins the rest.
259
+ CHANGED="$(git -C "${_tp:-.}" diff -z --no-renames --ignore-submodules=none --name-only refs/remotes/origin/main...HEAD -- 2>/dev/null | tr '\0' '\n')"
273
260
  rc=$?
274
261
  (( rc == 0 )) || undecidable "${OPERATOR_CI_WORDS:+operator ci-is-the-gate set but }could not compute the branch diff (rc=$rc)"
275
262
  # An EMPTY diff is not "no infra paths" — it is "HEAD is an ancestor of
@@ -289,8 +276,7 @@ INFRA_RE='^(apps/web-platform/infra/|\.github/workflows/apply-web-platform-infra
289
276
  # one failure exit. The grep runs on the paths PLUS one sentinel infra path, so a here-string or pipe that silently
290
277
  # fails (count 0) cannot read as "no infra match". It runs its OWN INFRA_RE grep: the existing refusal sits after condition
291
278
  # 4 and needs REQUIRED_JSON, which this exit skips. Its infra refusal does not self-retire like condition 4's. A merge in
292
- # progress or an unmerged path is refused: the tree is not a state anyone reviewed. The existing non-token check above
293
- # shares the C-quoted-path blind spot (#12251).
279
+ # progress or an unmerged path is refused: the tree is not a state anyone reviewed.
294
280
  if [[ -n "$OPERATOR_CI_WORDS" ]]; then
295
281
  _top="$(git rev-parse --show-toplevel 2>/dev/null)" \
296
282
  && _un="$(git -C "$_top" ls-files -u)" \
@@ -474,7 +460,11 @@ fi
474
460
  # {context, integration_id} OBJECTS, so a bare-string index never matches and the
475
461
  # condition would never retire.
476
462
  if ! jq -e --arg c "infra-validate-required" 'any(.[]; .context == $c)' <<<"$REQUIRED_JSON" >/dev/null 2>&1; then
477
- if grep -qE "$INFRA_RE" <<<"$CHANGED"; then
463
+ # The grep runs on the paths PLUS one sentinel infra path (as in the token arm): a here-string or pipe that silently fails
464
+ # (a full TMPDIR for a large list) would otherwise read as "no infra match" and fall through to SKIPPABLE.
465
+ _n461="$(printf '%s\n%s\n' "$CHANGED" 'apps/web-platform/infra/__sentinel__' | grep -cE "$INFRA_RE")"
466
+ [[ "$_n461" =~ ^[0-9]+$ ]] && (( _n461 >= 1 )) || undecidable "${OPERATOR_CI_WORDS:+operator ci-is-the-gate set but }the infra scope check did not run"
467
+ if (( _n461 > 1 )); then
478
468
  owed "diff touches the infra surface and infra-validate-required is NOT in the live required set (#6480) — the battery is its only BLOCKING gate"
479
469
  fi
480
470
  fi