Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/opencode-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.18.30
1.19.3
Comment thread
ualtinok marked this conversation as resolved.
27 changes: 26 additions & 1 deletion .github/workflows/bump-opencode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,21 @@ jobs:
run: |
echo "${{ steps.latest.outputs.version }}" > .github/opencode-version.txt

# The V1 leg of OC2 parity relies on a capture tied to the exact pin.
# Generate it before opening a PR so changed host behavior is reviewed
# with the version bump, not discovered by the merge queue.
- name: Capture OpenCode 1 OC2 contracts
if: steps.compare.outputs.drift == 'true'
env:
CAPTURE_VERSION: ${{ steps.latest.outputs.version }}
run: |
set -euo pipefail
echo "Recapturing host1 provider and edit-family contracts for $CAPTURE_VERSION"
if ! node tests/docker/opencode2/contract/capture-host1-contracts.mjs "$CAPTURE_VERSION"; then
echo "::error::OpenCode 1 contract capture failed. Review the host behavior and rerun node tests/docker/opencode2/contract/capture-host1-contracts.mjs $CAPTURE_VERSION on Linux x64 before opening the bump PR."
exit 1
fi

# Org policy blocks GITHUB_TOKEN from creating pull requests
# ("GitHub Actions is not permitted to create or approve pull
# requests"), which made every run of this lane fail at the PR step
Expand Down Expand Up @@ -135,7 +150,17 @@ jobs:
git remote set-url origin "$remote_url"

git checkout -b "$branch"
git add .github/opencode-version.txt
descriptor_branch="${branch//\//-}"
descriptor="benchmarks/aft-search/slice-descriptors/${descriptor_branch}.json"
cat > "$descriptor" <<'EOF'
{
"slice_class": "non_ranking",
"targeted_mechanism": "none",
"kind": "harness",
"fixtures": ["harness-goldens"]
}
EOF
git add .github/opencode-version.txt "$descriptor" tests/docker/opencode2/contract/
git commit -m "ci(opencode): bump pinned OpenCode to v${new}

Auto-generated by .github/workflows/bump-opencode.yml.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"slice_class": "non_ranking",
"targeted_mechanism": "none",
"kind": "harness",
"fixtures": ["harness-goldens"]
}
13 changes: 11 additions & 2 deletions packages/opencode-plugin/test/load-matrix/load-matrix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
timeout: options.timeoutMs,
});
if (result.status !== 0 && !options.allowFailure) {
throw new Error(

Check failure on line 116 in packages/opencode-plugin/test/load-matrix/load-matrix.ts

View workflow job for this annotation

GitHub Actions / Load and acceptance matrix

error: bun test src/__tests__/e2e/v2-host-tool-names.test.ts failed (1)

[v2-tool-names:builtins-removed] OpenCode 2.0.29 [v2-tool-names:builtins-removed] tools=aft_callgraph,aft_conflicts,aft_import,aft_inspect,aft_outline,aft_safety,aft_search,aft_zoom,ast_grep_replace,ast_grep_search,bash_kill,bash_status,bash_watch,bash_write,execute,glob,grep,patch,question,read,shell,skill,subagent,webfetch,websearch [v2-tool-names:builtins-removed] rewrite result="1: rewrite-probe-line\n\n\nPrefer `read` tool over shell." [v2-tool-names:builtins-removed] forbidden result="{\"error\":{\"type\":\"permission.rejected\",\"message\":\"Permission denied: shell\"},\"content\":[]}" ::group::src/__tests__/e2e/v2-host-tool-names.test.ts: 94 | ); 95 | expect(detached).toContain("Detached because a user message arrived."); 96 | expect(detached).not.toContain("waited-out\n"); 97 | expect(elapsed).toBeLessThan(40_000); 98 | } catch (error) { 99 | throw new Error(`${String(error)}\nV2 host output:\n${host.logs().slice(-20_000)}`, { ^ error: Error: expect(received).toContain(expected) Expected to contain: "deny \\\"shell\\\" for \\\"echo forbidden-probe\\\"" Received: "{\"error\":{\"type\":\"permission.rejected\",\"message\":\"Permission denied: shell\"},\"content\":[]}" V2 host output: an=56 role=server timestamp=2026-10-19T15:53:13.584Z level=INFO run=1794dbb6 message="watcher started" path=/home/runner/work/aft/aft/packages type=entries backend=node ignores=0 http.span=57 role=server timestamp=2026-10-19T15:53:13.584Z level=INFO run=1794dbb6 message="watcher subscribe" path=/home/runner/work/aft/aft/packages/opencode-plugin type=entries ignores=0 http.span=57 role=server timestamp=2026-10-19T15:53:13.584Z level=INFO run=1794dbb6 message="watcher started" path=/home/runner/work/aft/aft/packages/opencode-plugin type=entries backend=node ignores=0 http.span=57 role=server timestamp=2026-10-19T15:53:13.584Z level=INFO run=1794dbb6 message="watcher subscribe" path=/home/runner/work/aft/aft/packages/opencode-plugin/tmp type=entries ignores=0 http.span=57 role=server timestamp=2026-10-19T15:53:13.585Z level=INFO run=1794dbb6 message="watcher started" path=/home/runner/work/aft/aft/packages/opencode-plugin/tmp type=entries backend=node ignores=0 http.span=58 role=server timestamp=2026-10-19T15:53:13.585Z level=INFO run=1794dbb6 message="watcher subscribe" path=/home/runner/work/aft/aft/packages/opencode-plugin/tmp/v2-host-builtins-removed-Vwgtyy type=entries ignores=0 http.span=58 role=server timestamp=2026-10-19T15:53:13.585Z level=INFO run=1794dbb6 message="watcher started" path=/home/runner/work/aft/aft/packages/opencode-plugin/tmp/v2-host-builtins-removed-Vwgtyy type=entries backend=node ignores=0 http.span=58 role=server timestamp=2026-10-19T15:53:13.585Z level=INFO run=1794dbb6 message="watcher subscribe" path=/home/runner/work/aft/aft/packages/opencode-plugin/tmp/v2-host-builtins-removed-Vwgtyy/project type=entries ignores=0 http.span=58 role=server timestamp=2026-10-19T15:53:13.586Z level=INFO run=1794dbb6 message="watcher started" path=/home/runner/work/aft/aft/packages/opencode-plugin/tmp/v2-host-builtins-removed-Vwgtyy/project type=entries backend=node ignores=0 http.span=59 role=server timestamp=2026-10-19T15:53:13.586Z level=INFO run=1794dbb6 message="watcher subscribe" path=/home/runner/work/aft/aft/packages/opencode-plugin/tmp/v2-host-builtins-removed-Vwgtyy/home type=entries ignores=0 http.span=59 role=server timestamp=2026-10-19T15:53:13.586Z level=INFO run=1794dbb6 message="watcher started" path=/home/runner/work/aft/aft/packages/opencode-plugin/tmp/v2-host-builtins-removed-Vwgtyy/home type=entries backend=node ignores=0 http.span=59 role=server timestamp=2026-10-19T15:53:13.592Z level=INFO run=1794dbb6 message="watcher started" path=/home/runner/work/aft/aft/packages/opencode-plugin/tmp/v2-host-builtins-removed-Vwgtyy/config/opencode type=directory backend=inotify ignores=3 http.span=65 role=server timestamp=2026-10-19T15:53:13.610Z level=INFO run=1794dbb6 message="location services booted" directory=/home/runner/work/aft/aft/packages/opencode-plugin/tmp/v2-ho

Check failure on line 116 in packages/opencode-plugin/test/load-matrix/load-matrix.ts

View workflow job for this annotation

GitHub Actions / Load and acceptance matrix

error: node /home/runner/work/aft/aft/packages/opencode-plugin/tmp/load-matrix-Rb26MS/host-v2/core-loader-lifecycle.mjs /home/runner/work/aft/aft/packages/opencode-plugin/tmp/load-matrix-Rb26MS/host-v2/node_modules/.load-matrix-packages/v2-lifecycle /home/runner/work/aft/aft/packages/opencode-plugin/tmp/load-matrix-Rb26MS/isolated-hosts/v2-lifecycle/project failed (1)

msg: 'loading plugin', id: '@cortexkit/aft-opencode', entrypoint: 'file:///home/runner/work/aft/aft/packages/opencode-plugin/tmp/load-matrix-Rb26MS/host-v2/node_modules/.load-matrix-packages/v2-lifecycle/load-matrix-lifecycle-server.mjs' } [2026-10-19T15:52:56.709Z] INFO [aft-plugin] AFT V2 runtime starting (server entry, Location (no id) at /home/runner/work/aft/aft/packages/opencode-plugin/tmp/load-matrix-Rb26MS/isolated-hosts/v2-lifecycle/project; start 1 in this process) [2026-10-19T15:52:56.715Z] INFO [aft-plugin] Config loaded from /home/runner/work/aft/aft/packages/opencode-plugin/tmp/load-matrix-Rb26MS/isolated-hosts/v2-lifecycle/config/cortexkit/aft.jsonc [2026-10-19T15:52:56.716Z] INFO [aft-plugin] Config loaded from /home/runner/work/aft/aft/packages/opencode-plugin/tmp/load-matrix-Rb26MS/isolated-hosts/v2-lifecycle/project/.cortexkit/aft.jsonc [2026-10-19T15:52:56.716Z] WARN [aft-plugin] Ignoring lsp.auto_install from project config /home/runner/work/aft/aft/packages/opencode-plugin/tmp/load-matrix-Rb26MS/isolated-hosts/v2-lifecycle/project/.cortexkit/aft.jsonc (security: these LSP settings only honor user-level config) [2026-10-19T15:52:56.719Z] INFO [aft-plugin] Config loaded from /home/runner/work/aft/aft/packages/opencode-plugin/tmp/load-matrix-Rb26MS/isolated-hosts/v2-lifecycle/config/cortexkit/aft.jsonc [2026-10-19T15:52:56.719Z] INFO [aft-plugin] Config loaded from /home/runner/work/aft/aft/packages/opencode-plugin/tmp/load-matrix-Rb26MS/isolated-hosts/v2-lifecycle/project/.cortexkit/aft.jsonc [2026-10-19T15:52:56.719Z] WARN [aft-plugin] Ignoring lsp.auto_install from project config /home/runner/work/aft/aft/packages/opencode-plugin/tmp/load-matrix-Rb26MS/isolated-hosts/v2-lifecycle/project/.cortexkit/aft.jsonc (security: these LSP settings only honor user-level config) (node:9341) ExperimentalWarning: vm.USE_MAIN_CONTEXT_DEFAULT_LOADER is an experimental feature and might change at any time (Use `node --trace-warnings ...` to show where the warning was created) [2026-10-19T15:52:56.780Z] INFO [aft-plugin] Resolved binary from AFT_BINARY_PATH: /home/runner/work/aft/aft/target/debug/aft [2026-10-19T15:52:56.781Z] INFO [aft-plugin] AFT storage migration skipped for opencode: no legacy data at /home/runner/work/aft/aft/packages/opencode-plugin/tmp/load-matrix-Rb26MS/isolated-hosts/v2-lifecycle/data/opencode/storage/plugin/aft; using /home/runner/work/aft/aft/packages/opencode-plugin/tmp/load-matrix-Rb26MS/isolated-hosts/v2-lifecycle/data/cortexkit/aft for fresh install [2026-10-19T15:52:56.782Z] INFO [aft-plugin] Config loaded from /home/runner/work/aft/aft/packages/opencode-plugin/tmp/load-matrix-Rb26MS/isolated-hosts/v2-lifecycle/config/cortexkit/aft.jsonc [2026-10-19T15:52:56.783Z] INFO [aft-plugin] Config loaded from /home/runner/work/aft/aft/packages/opencode-plugin/tmp/load-matrix-Rb26MS/isolated-hosts/v2-lifecycle/project/.cortexkit/aft.jsonc [2026-10-19T15:52:56.783Z] WARN [aft-plugin] Ignoring lsp.auto_install from project config /home/runner/work/aft/aft/packages/opencode-plugin/tmp/load-matrix-Rb26MS/isolated-hosts/v2-lifecycle/project/.cortexkit/aft.jsonc (security: these LSP settings only honor user-level config) [2026-10-19T15:52:56.806Z] WARN [aft-plugin] [bash_wait_detach] host has no session prompt hook; a new message cannot detach a waiting bash here [2026-10-19T15:52:56.813Z] INFO [aft-plugin] AFT V2 runtime starting (server entry, Location (no id) at /home/runner/work/aft/aft/packages/opencode-plugin/tmp/load-matrix-Rb26MS/isolated-hosts/v2-lifecycle/project; start 2 in this process; 1 other Location(s) for this directory still running) [2026-10-19T15:52:56.813Z] INFO [aft-plugin] Config loaded from /home/runner/work/aft/aft/packages/opencode-plugin/tmp/load-matrix-Rb26MS/isolated-hosts/v2-lifecycle/config/cortexkit/aft.jsonc [2026-10-19T15:52:56.814Z] INFO [aft-plugin] Config loaded from /home/runner/work/aft/aft/packages/opencode-plugin/tmp/load-matrix-Rb26MS/isolated-hosts/v2-lifecycle/project/.cortexkit/aft.jsonc [2026-10-19T15:52:56.814Z] WARN [aft-plugin] Ignoring lsp.auto
`${command} ${args.join(" ")} failed (${result.status ?? result.error?.message ?? "unknown"})\n${result.stdout}\n${result.stderr}`,
);
}
Expand Down Expand Up @@ -2255,7 +2255,14 @@
});

test("modern V1 version is sourced only from the repository pin", async () => {
expect(modernV1).toMatch(/^1\.18\./);
const pinnedVersion = (
await readFile(join(repoRoot, ".github/opencode-version.txt"), "utf8")
).trim();
expect(pinnedVersion).toMatch(
/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-(?:0|[1-9]\d*|\d*[A-Za-z-][0-9A-Za-z-]*)(?:\.(?:0|[1-9]\d*|\d*[A-Za-z-][0-9A-Za-z-]*))*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/,
);
expect(modernV1).toBe(pinnedVersion);

const files = await fixtureFiles(join(pluginRoot, "test"));
const literals: string[] = [];
for (const path of files) {
Expand All @@ -2266,7 +2273,9 @@
// finding rather than protect it.
if (path.endsWith(".md")) continue;
const text = await readFile(path, "utf8");
if (/\b1\.18\.\d+\b/.test(text)) literals.push(path);
if (text.split(/[^0-9A-Za-z.+-]+/).includes(pinnedVersion)) {
literals.push(path);
}
}
expect(literals).toEqual([]);
});
Expand Down Expand Up @@ -3152,7 +3161,7 @@
} else {
expect(operatorAfter).toEqual(operatorBefore);
}
expect(hostCanaries.map(({ label }) => label)).toEqual([

Check failure on line 3164 in packages/opencode-plugin/test/load-matrix/load-matrix.ts

View workflow job for this annotation

GitHub Actions / Load and acceptance matrix

error: expect(received).toEqual(expected)

[ "v1-server", "v1-tui", "v2-bun", "v2-node", - "v2-lifecycle", "v2-permission-prompt", "v2-synthetic-completion", "v2-completion-detach", - "v2-host-tool-names", "v2-subc-tool-names", "v2-tui-keymap", "v2-theme-capture", "v2-tui-light-theme", "v2-tui-badge-light", "v2-tui-badge-dark", "v2-tui-sidebar-parity", "v2-tui-plugins-key", "v2-tui-directory", "v2-tool-ownership", "v1-root-mutation", "v2-function-negative", "v1-core-bare", "v1-core-file", "v1-core-server-file", "v1-core-subpath", ] - Expected - 2 + Received + 0 at <anonymous> (/home/runner/work/aft/aft/packages/opencode-plugin/test/load-matrix/load-matrix.ts:3164:52)
"v1-server",
"v1-tui",
"v2-bun",
Expand Down
Loading
Loading