@soleur/opencode 3.400.6 → 3.401.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
|
@@ -73,6 +73,48 @@ rules:
|
|
|
73
73
|
mirrors: "CodeQL: js/file-system-race"
|
|
74
74
|
soleur-origin: "PR #2463"
|
|
75
75
|
|
|
76
|
+
# Mirrors CodeQL js/file-system-race for the SYNC, named-import, module-scope shape the two rules above miss
|
|
77
|
+
# (they need the `fs.` namespace, the async API, or an enclosing `function`).
|
|
78
|
+
# Origin: PR #12536 — `try { st = lstatSync(p) } catch { continue }` then `readFileSync(p)` inside a top-level
|
|
79
|
+
# `for` loop in a test file; CodeQL flagged it high in CI, local semgrep (custom + p/javascript + p/typescript)
|
|
80
|
+
# reported 0. Measured when added: 1 finding on the pre-fix file, 0 on the fixed one, 0 across apps/web-platform,
|
|
81
|
+
# plugins/soleur, scripts and .github (1185 files). `existsSync`/`accessSync` and `createReadStream` were left
|
|
82
|
+
# out on purpose: including them added 13 hits CodeQL does not raise on main.
|
|
83
|
+
- id: soleur.js-file-system-race-sync-check-then-read
|
|
84
|
+
patterns:
|
|
85
|
+
- pattern: $READ($PATH, ...)
|
|
86
|
+
- pattern-either:
|
|
87
|
+
- pattern-inside: |
|
|
88
|
+
try { ... $X = $CHECK($PATH, ...); ... } catch ($E) { ... }
|
|
89
|
+
...
|
|
90
|
+
- pattern-inside: |
|
|
91
|
+
try { ... $X = $CHECK($PATH, ...); ... } catch { ... }
|
|
92
|
+
...
|
|
93
|
+
- pattern-inside: |
|
|
94
|
+
<... $CHECK($PATH, ...) ...>;
|
|
95
|
+
...
|
|
96
|
+
- pattern-inside: |
|
|
97
|
+
if (<... $CHECK($PATH, ...) ...>) { ... }
|
|
98
|
+
- pattern-inside: |
|
|
99
|
+
if (<... $CHECK($PATH, ...) ...>) $S;
|
|
100
|
+
- metavariable-regex:
|
|
101
|
+
metavariable: $CHECK
|
|
102
|
+
regex: ^(fs\.)?l?statSync$
|
|
103
|
+
- metavariable-regex:
|
|
104
|
+
metavariable: $READ
|
|
105
|
+
regex: ^(fs\.)?(readFileSync|openSync)$
|
|
106
|
+
message: |
|
|
107
|
+
Possible TOCTOU race: $CHECK($PATH) then $READ($PATH) on the same path (CodeQL js/file-system-race).
|
|
108
|
+
The file can be swapped between the check and the read. Open once with
|
|
109
|
+
openSync(path, O_RDONLY | O_NOFOLLOW), then fstatSync and readFileSync on that descriptor.
|
|
110
|
+
severity: WARNING
|
|
111
|
+
languages: [javascript, typescript]
|
|
112
|
+
metadata:
|
|
113
|
+
category: security
|
|
114
|
+
cwe: "CWE-367: Time-of-check to Time-of-use"
|
|
115
|
+
mirrors: "CodeQL: js/file-system-race"
|
|
116
|
+
soleur-origin: "PR #12536"
|
|
117
|
+
|
|
76
118
|
# Mirrors CodeQL js/incomplete-url-substring-sanitization.
|
|
77
119
|
# Origin: PR #4573 — a test assertion `html.includes("https://soleur.ai")`
|
|
78
120
|
# tripped CodeQL in CI (local semgrep auto/p-packs did not catch it). Checking
|
package/skills/work/SKILL.md
CHANGED
|
@@ -1181,7 +1181,7 @@ every RED reporting `rc=?`, because the log dir had been removed mid-run; the 12
|
|
|
1181
1181
|
like a flake reproduction and were entirely self-inflicted. **If an edit cannot wait, kill the
|
|
1182
1182
|
run** — a discarded run costs minutes, a misattributed one costs the whole investigation. Same
|
|
1183
1183
|
rule for measurement loops and agent panels: they contend for one machine, so sequence them.
|
|
1184
|
-
**Test-harness sharp edges** — mid-run commits trip the write boundary; new policy hooks touch ~15 ratchet surfaces; nested `test-all.sh` sandboxes need `env -u` scrubs → [work-test-harness-sharp-edges.md](./references/work-test-harness-sharp-edges.md) (#10161).
|
|
1184
|
+
**Test-harness sharp edges** — mid-run commits trip the write boundary; new policy hooks touch ~15 ratchet surfaces; nested `test-all.sh` sandboxes need `env -u` scrubs; markdownlint `0 files` = skipped → [work-test-harness-sharp-edges.md](./references/work-test-harness-sharp-edges.md) (#10161).
|
|
1185
1185
|
|
|
1186
1186
|
**Sibling-worktree contention produces a FALSE RED — the runner now self-identifies it.** Parallel worktrees are this repo's documented workflow, so two sessions can run `test-all.sh` simultaneously. The contended resource is NOT a colliding path — it is CAPACITY: every suite's `mktemp` lands in the same machine-global, RAM-backed 4 GiB `/tmp` tmpfs, so a second run competes for the memory the first is holding, and the failure both implicated suites document in-repo is a TIMEOUT (`skill-security-scan.test.ts` #4096; `vitest.config.ts` #3817/#4128), never a path collision. **The previously-recorded cause — `skill-security-scan`'s `.scan-meta.json` plus the semgrep bootstrap as "the known pair" — was refuted by measurement (#6789):** `run-scan.sh` PID-scopes `.scan-meta.json` since its original commit (cannot collide across worktrees; its real defect was an *unbounded meta_dir* leak, age-reaped), and the semgrep bootstrap is unreachable from any suite `test-all.sh` runs. You no longer run `ps` by hand: `test-all.sh` prints a contention preamble (`/tmp` headroom, sibling runs resolved to their worktrees via `/proc/<pid>/cwd`, machine load) and fires a named `SIBLING_RUN_DETECTED` / `SIBLING_SUITE_DETECTED` / `LOW_TMP_HEADROOM` banner when one of those conditions holds (`SIBLING_SUITE_DETECTED`: one level down — a sibling running a single suite directly), and an advisory git-common-dir lock serializes concurrent runs (`LOCK_CONTENDED_PROCEEDING` banner on timeout; never aborts). When a banner fires, confirm three ways (isolated re-run, the matching CI gate's status, a clean full re-run once the sibling exits) rather than accepting "flake"; never delete another session's `/tmp` artifacts — `/tmp` is shared tmpfs; write large logs to `/var/tmp` (`tmpfs-guard.sh`'s cron reaper bounds abandoned-scratch growth only for entries above its size floor; the **count-shaped** class — tens of thousands of few-hundred-byte artifacts, which filled `/tmp` on 2026-07-27 — is **not reclaimed by anything today**; the reclaim tier was measured against the real `/tmp` and **removed before merge** (12,240 entries, ~1,500 authored), so the guard *detects and reports* the count shape, deleting nothing. #7004 rebaselined that report onto growth above a downward-ratcheting watermark, so it alarms on NEW leaks, not the standing backlog. Do not treat the reaper as a general backstop). **Why:** #6726 — 4 `skill-security-scan` failures were pure contention (isolated re-run 22/0, CI green throughout); #6789 re-derived the actual cause and shipped the self-identification above.
|
|
1187
1187
|
|
|
@@ -92,3 +92,12 @@ already carries — see
|
|
|
92
92
|
- **When a verification's VERDICT is the deliverable, do not bound its wall — a timeout kill is `unknown`, never pass or fail.** A `ratchet`/suite verify re-run under a self-imposed `timeout`/bounded exec was killed at 120 s mid-run and could have been misread either direction; re-run unbounded and let it finish. Bound the SUT's per-invocation calls (a `REPLAY_SUT_TIMEOUT`-style knob), never the verification harness itself. **Why:** PR #12419 — see `knowledge-base/project/learnings/performance-issues/mutant-side-runaway-read-as-pristine-site-cost-ci-replay-20261108.md` session error 4.
|
|
93
93
|
|
|
94
94
|
- **A suite run is evidence for the tree it ran on — re-run the touched suites after the LAST edit of the commit, comment-only edits included.** A comment can trip a strict substring pin: a test-all.sh comment naming an array that contains a refused prefix turned the lint's unit suite red at the pushed head, after the suite had run green one edit earlier. **Why:** #12348/PR #12561 — all 11 escalation seats found it; see `knowledge-base/project/learnings/2026-11-11-each-fix-round-found-the-next-sibling-until-the-test-stated-its-residuals.md`.
|
|
95
|
+
|
|
96
|
+
## `0 issues in 0 files` is a skipped lint, not a clean one
|
|
97
|
+
|
|
98
|
+
`markdownlint-cli2` never reads a path matched by `.markdownlintignore` (for
|
|
99
|
+
example `knowledge-base/project/`), and still prints a clean-looking summary.
|
|
100
|
+
Lint a `/var/tmp` copy with the pinned binary and `-c .markdownlint.json`, and
|
|
101
|
+
confirm a known-bad copy fails, before reporting clean. **Why:** #12536 — see
|
|
102
|
+
`knowledge-base/project/learnings/2026-11-10-a-verify-only-key-slot-guard-anchors-on-what-every-signer-needs.md`
|
|
103
|
+
session error 5.
|