Keep paths as JSON keys throughout aggregation so literal backslashes and newlines cannot change which skill receives a read. Count both usage windows together and preserve the distinction between unknown usage and zero reads.
Filter the shipped instruction list to files selected by the install profile and make the retained paths independent of the launch directory. Record the resolved paths for repair, and anchor the bundled skill lookup to the same config root.
Refs #4029
Replace the literal /tmp/... cwd values in the context-gate suites with
paths under each test's realpath'd mkdtemp sandbox. CodeQL treats /tmp
string literals as shared temp sources and traced them through the hook
input into readFileTail. The hook only hashes cwd, so assertions are
unchanged.
Wrap #3106's mkdtemp fixture roots in realpathSync, matching the existing
atomic-write tests, so CodeQL no longer traces shared-temp paths from
these fixtures into read handles. Assertions are unchanged.
Find the published recording by walking the test's mkdtemp directory
instead of reusing the library path helper, whose shared-temp default
CodeQL traces into the read handle. The basename is still asserted
against getFallbackSessionRecordingPath.
(cherry picked from commit 856f9e81ffb89aea02bd276d8ec819fad7f9f827)
Resolve each recording fixture root with realpath after mkdtemp, and
check or change the published file's mode through a single opened
descriptor instead of a stat/chmod followed by a later open. This removes
the remaining CodeQL temp-file and check-then-use findings from #3952's
regression test without changing its assertions.
The hook proposes a correct absolute checkpoint path on Windows, but the
tests located that line with /^\s+[/\\].*\.md$/, which only matches paths
starting with a slash. Windows paths start with a drive letter (C:\...),
so every case that read the proposed path saw undefined and failed.
- Extract the proposed checkpoint as the indented line that ends in .md
and satisfies path.isAbsolute, so POSIX and Windows paths both match.
- Include the hook output in the "both fires should propose" assertion
so a genuine decline is diagnosable from CI logs.
- Write transcript fixtures into private fs.mkdtempSync directories
instead of predictable names directly under os.tmpdir() (CodeQL
js/insecure-temporary-file) in context-gate, context-gate-state and
ecc-context-monitor tests.
Repair the CodeQL findings introduced by this integration without
dismissing any alert:
- OpenSpec validators: express the empty-symbol check as an explicit
slice instead of an index-versus-length comparison (#2679).
- OpenSpec tests: create file and outside-target fixtures inside private
mkdtemp directories (#2679).
- Antigravity policy test: give the bridge a private TMPDIR/TEMP/TMP so
its edit accumulator never lands in the shared temp directory (#3221).
- Session recording test: write partial bytes through the staging
descriptor and read the saved file through one opened handle (#3952).
Behavior and assertions are unchanged; each focused suite passes.
Yarn kept older transitive resolutions that npm had already moved past:
ansi-regex 6.3.0, get-east-asian-width 1.6.0, micromark-core-commonmark
2.0.3, micromark-factory-space 2.0.1 and micromark-util-types 2.0.2.
Run yarn dedupe and refresh ansi-regex and get-east-asian-width so both
lockfiles resolve the same 294 package versions, as on main.
Native validation proves plugin import with CLI 1.3.5, but authenticated
tool and Stop execution through the native host is not yet verified.
Keep the README install table and support matrix at experimental until a
pinned native loader receipt covers lifecycle execution.
OpenCode 2 renamed the V1 `bash` tool to `shell`, passes `{ path }` to
`write`/`edit`, and publishes no `file.edited` event. The V2 adapter from
#3854 forwarded those names unchanged, so on OpenCode 2 the git-push and
long-running-command reminders, the PR-created log, the strict typecheck,
the strict formatter, and the console.log warning never ran.
Map `shell` to `bash` and `path` to `filePath` in the V2 tool input
normalizer, and run the shared `file.edited` hook after a completed
write/edit tool call. Failed tool calls do not trigger it.
Carried forward from #3224, which found both gaps by live testing
OpenCode 2.0.12; #3635 proposed the same edit derivation.
Co-authored-by: Swapnil Sharma <swap.sha96@gmail.com>