Repository navigation
ci: verify pinned OpenCode client provisioning - #1145
Conversation
Allow only opencode-ai's lifecycle script for its existing exact global installation, then require the genuine command's pinned version within a bounded deadline. Prevent a successful file-state E2E from masking an unprovisioned native command.
|
Strix is installed on this repository, but we couldn't run this PR security review because this workspace's trial has ended. Add a card to resume code reviews here. So far, Strix has reviewed 392 pull requests, surfaced 113 security issues (1 critical/high) and blocked 3 risky merges across this workspace. |
Walkthrough
Pre-merge checks:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1145 +/- ##
=======================================
Coverage 64.43% 64.43%
=======================================
Files 2356 2356
Lines 143429 143429
=======================================
+ Hits 92417 92422 +5
+ Misses 37916 37911 -5
Partials 13096 13096 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Problem
The completed OpenCode Marketing E2E job installed
opencode-ai@1.18.34, but npm 11.19.1 reported that its postinstall was not allowed. The workflow then entered its public installation lifecycle without checking whether the native command worked.The pinned upstream publisher creates an error stub as the npm entrypoint. The pinned postinstall replaces it with the selected platform binary. The job's installed bytes were not exported, so the exact installed entrypoint is unobserved; the successful file-state lifecycle did not establish native provisioning.
Change
Add an OpenCode-specific branch to the existing CI installation step. It checks the exact existing package pin, permits that package's lifecycle script for this one global installation using npm's documented selective allowance, and requires
opencode --versionto return exactly1.18.34. The probe has a 25-second timeout and a five-second forced-termination limit.This changes one workflow file by seven added lines. The existing matrix, package versions, runner, concurrency, other client branches, installer behavior, refusal checks and lifecycle acceptance remain intact. The permission is command-scoped; no persistent npm configuration or blanket script permission is added.
Verification
The source change is an exact single-block insertion with a verified reverse transformation to the original file. The package publisher, postinstall and npm 11.19.1 option definition were reviewed against official sources. Two independent source reviews found no issues and independently confirmed the complete-file reverse transformation. Runtime checks remain pending.
Local runtime verification is unavailable because the executor transport is disconnected; no local run is claimed. The ordinary OpenCode E2E job must pass the new genuine version gate and its existing preflight/lifecycle checks. Version availability does not establish native plugin discovery, authentication, model calls or MCP tool execution.
Follow-up to #1087. Current base:
a927a6030be2a775e2541aa14e849ce8e7b945bb. Overlapping PR #1078 retains the old generic npm branch; its unrelated changes are not included.Summary by CodeRabbit
E2E follow-up status — evidence through 2026-11-28 08:55 UTC
2cb112fda239f1c899d13c73f865b1c67ecd2c8c, ordinary squash4e68de5cbf579e28a8304487882e73a17e5f7302, tree62e7f5c1e9c0eb01489635e5ff69e640421e624c. The signed merge and PR synthetic5005d64e3b55753fb04a6aa959448f5afcc32abdhave that exact reviewed tree. An actual R13 Claude preflight failure observed a newly created passive temporary file with mode0644: 76 tests passed, one errored, and the Marketing lifecycle did not run. The narrow fix gives only the genuine Claude fixture and joined Claude discovery probe a per-child creation mask of077. Default probe behavior, public CLI execution and strict0600custody admission are unchanged. Exact five-file parity, independent source review and existing workflow selection are clear. The native writer's creation flags or explicit chmod behavior remain unproven; any further invalid mode must still refuse.4e68de5…. No queued result is counted as a pass.0a7d90539ba3bc8b3d109ff96d10ee043afe5561, tree86687d388bd3c16506a3c528fef03bf4f8f1b198, passed both complete Required lanes: PR synthetic and merged main. Each had 176 unique Go packages, 1,231 Node passes with six explicit skips, 133 conformance passes, and successful generated-file/vet checks. All nine executable main Required checks and all six PR Terminal/Skills jobs passed. Own R14 Marketing Codex and Cursor passed their complete 18-stage and 16-stage reports respectively, including fresh profile-E policy-49 closure and actual 17/17 corrected Copilot preflight tests. Each overall preflight retained its one unrelated genuine-Claude availability skip. These runs retain their original source and scope.opencode-ai@1.18.34postinstall and a bounded genuine--versioncheck. The source-supported correction addresses the observed skipped-postinstall warning. Its own native version and subsequent Marketing lifecycle are still unrun. Earlier OpenCode V2.2.5 or separately provisioned runtime results do not substitute for this npm route.Evidence retained only in complete console/source records during the executor outage explicitly lacks independent ZIP/CRC verification until recovery. Skipped, cancelled, metadata-only and Prepared observations are not promoted to native passes. No CI reruns, dispatches, manual cancellations, runner changes or release publication were used.