fix(ci): packed schema verification, native CLI exec, Node 26 baseline - #8
Merged
P-Theo merged 2 commits intoSep 16, 2026
Conversation
… cwd-independent - The packed-artifact step now asserts options.schema.json is in the tarball and that the opencode2-tps/options.schema.json export resolves (with the JSON import attribute) and carries the expected title. - scripts/check-compatibility.mjs resolves node_modules/.bin against the script location instead of cwd, matching its other path resolutions. Co-authored-by: Panagiotis Theologou <p.theologou@protonmail.com>
- check-compatibility runs @opencode/cli's real bin target (bin/opencode2.exe) instead of npm's .bin wrapper: .cmd shims need a shell on Windows, while the native binary executes unshelled on every platform; also drops the process.platform branch. - CI's node-version moves 24 -> 26.4.0, @opentui/core's documented Node floor, and @types/node follows (^26.0.0, lock regenerated). - The two setInterval test doubles cast to typeof globalThis.setInterval: Node 26 types add a conditional rest-args overload no two-parameter double can satisfy. Co-authored-by: Panagiotis Theologou <p.theologou@protonmail.com>
P-Theo
merged commit Sep 16, 2026
8d591b1
into
refactor/project-layout-and-options-schema
1 check passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #7 — hardening from its final review pass plus two follow-up fixes.
What this fixes
CI never verified the packed schema (the headline feature of #7). The packed-artifact step imported
dist/tui.jsand asserted the entrypoint id, but nothing checked thatoptions.schema.jsonmade it into the tarball or that theopencode2-tps/options.schema.jsonexport resolves from an installed copy.tests/options-schema.test.tsreads the repo file, so afiles:/exportsregression would have shipped a broken schema export with everything green. The step now asserts the tarball containspackage/options.schema.jsonand imports the export through the package's exports map (with the requiredwith { type: "json" }attribute).scripts/check-compatibility.mjswas cwd-dependent and shell-dependent. It resolvednode_modules/.binagainstprocess.cwd()(breakingnode scripts/check-compatibility.mjsfrom any other directory) and used npm's.binwrapper, whose.cmdshim on Windows cannot beexecFileSync'd without a shell. It now resolves against the script's location and executes@opencode/cli's real declared bin target (bin/opencode2.exe) — the native binary runs unshelled on every platform despite the.exename, and both a normal install's postinstall and CI's existing--ignore-scriptsprepare step put it there. Theprocess.platformbranch is gone.CI ran Node 24 below the toolchain's documented floor.
@opentui/core(0.5.11, what^0.5.10resolves to upstream) declaresengines: { bun: ">=1.3.0", node: ">=26.4.0" }. CI's Node-side work (npm ci, tsc, oxlint,scripts/*.mjs, the packed-artifact check) moves tonode-version: 26.4.0, and@types/nodefollows to^26.0.0(lock regenerated; resolves 26.6.1) so typechecking matches what CI actually runs. Node 26'ssetIntervaltyping adds a conditional rest-args overload that no two-parameter test double can satisfy, so the two timer doubles intests/plugin.test.tsandtests/entrypoint.test.tsxnow assert totypeof globalThis.setIntervalat the assignment boundary — behavior unchanged.Verification
All run locally under the actual CI baseline (Node 26.4.0 via mise, npm 11.17):
tsc --noEmitclean with @types/node 26.6.1.bun test: 68 pass, 0 fail.scripts/build.mjsproduces dist;check-compatibilitypasses from the repo root and from a foreign cwd, executing the nativebin/opencode2.exe.@opentui/solid@0.5.11,solid-js@1.9.12): tarball containspackage/options.schema.json,dist/tui.jsimports withid === "opencode2.tps", andopencode2-tps/options.schema.jsonresolves through the exports map.src/is untouched, so refactor: adopt src/tests/scripts layout and ship options.schema.json #7's verified behavior (including live hot-reload fromsrc/, confirmed against a realopencode2TUI) is unaffected.Merge into #7 before merging #7 to main; when #7 lands and its branch is deleted, GitHub retargets this to main automatically and the diff collapses to just these commits.