Repository navigation
fix(orcad): stamp the build commit so orca skills install works on SSH and headless hosts - #28558
Conversation
…H and headless hosts #27603 pins 'orca skills install|update' to the commit the CLI was built from, read from the CLI's out/package.json. The desktop CLI build stamps it, but the server bundle (the 'orca' in SSH-host and 'orca serve' terminals) wrote that file without a commit, so the command always failed there with 'Could not read the commit this Orca CLI was built from'. Stamp it the same way.
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to
|
|
Review verdict: the build-time stamp is the right contract; deployed hosts need no Git checkout. Traced the shared metadata through server targets, desktop templates, SSH uploads, and AppImage serve selection, and found no competing fix in the inspected current main. A shared JSON writer would add little beyond the provenance resolver already reused. Added one regression check in Known intended consequence: a new source commit can require a fresh server copy between development builds with the same version so the correct skill revision reaches the host; normal releases already change version. Full SSH transport/redeploy failure testing was not run and was accepted out of scope for this metadata-only change. Windows/WSL, full AppImage packaging, and the all-target release matrix were not run locally; real global updates were avoided. No product fixes were deferred, and nothing was merged. Before: copied build with only After: stamped build prints both pinned commands. |


ELI5
orca skills installandorca skills updatestopped working in terminals on SSH hosts and headlessorca servemachines. They need to know which Orca build they belong to, and the server build forgot to write that down. Now it does.What Changed
Before (since #27603, Oct 11):
orca servemachine,orca skills install --skill …andorca skills update --allalways failed, even with--dry-run: "Could not read the commit this Orca CLI was built from, so there is no source to install skills from."After: the commands work there again and install the skill versions pinned to the commit that server was built from, the same as on the desktop.
Mechanism:
package.jsonbeside it (src/cli/cli-version.ts).commitinto that file (config/scripts/verify-cli-bin.mjs).out/package.jsonwith onlytype,privateandversion(config/scripts/build-orcad.mjs).committhere too, using the sameresolveBuildSourceCommit()the desktop build uses.Why
cli-version.tsreads.pnpm build:orcadin CI and in the release workflows.Linked Issue
Found by the 1.4.225 release audit (P1-A). Follow-up to #27603.
Visual Proof
N/A: CLI output only. Before and after are in Testing below.
Testing
What I ran (macOS):
pnpm run build:orcadwith this change. The builtout/orcad/out/package.jsonis{"type":"commonjs","private":true,"version":"1.4.214","commit":"<HEAD sha>"}.node out/orcad/out/cli/index.js skills install --skill orca-cli --dry-run(the built server CLI) printsnpx --yes skills@1.7.2 add https://github.com/stablyai/orca/tree/<HEAD sha> --skill orca-cli --global ….commit(what main builds today) prints "Could not read the commit this Orca CLI was built from, so there is no source to install skills from."Why no new automated test:
build-orcad.mjsis a top-level build script with no unit harness.build:orcadCI jobs already do.src/cli/cli-version.test.ts.Not run: a real SSH host or a Linux/Windows build of the server.
Review
Agent skill upstream boundary
Notes
git rev-parseat build time.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)