Skip to content

feat(opencode): bind installation to the selected native host - #381

Merged
777genius merged 9 commits into
mainfrom
feat/opencode-host-authority
Oct 3, 2026
Merged

777genius merged 9 commits into
mainfrom
feat/opencode-host-authority

Conversation

@777genius

@777genius 777genius commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Installing OpenCode components must target the explicitly selected native executable and its matching configuration dialect. This change adds a shared version/capability profile, bounded prepare/apply probes and exact planned-image/symlink revalidation before native effects. Empty updates clean prior native components; stored remove/recovery remains independent of executable availability.

The integrated candidate 0231b685209f1d04f4cbd0565d64fe3c9b804c15 preserves both original PR history and current main cd97ea0893a9430433db479cd0f5997f449ed1b7, including SDK #382 and physical profile/delivery confirmation changes. Independent GPT-6.1 high review accepted the exact source and mechanical formatter delta. It also found and fixed a group interaction: mutating groups containing OpenCode are refused before snapshots/effects until per-target host snapshots exist. Single OpenCode installation, other registered groups and stored group removal remain supported.

The candidate fixes the checked path-separator conversion flagged by gosec and updates the authenticated authoring source fingerprint. The lint followup briefly introduced a map-key/slice-index compiler error, detected on Linux, macOS and Windows before native execution. An independently reviewed three-line append correction preserves nil, duplicates and sorted transport values. Fresh hosted compilation of clients/installer/clientdetect and the repository-configured changed-line lint both passed before publication. The full architecture lint stage also required two contiguous helper extractions. Independent GPT-6.1 high review accepted their preserved execution/error/authority semantics and the receiver-only naming correction. Four existing behavior tests and both verbatim CI lint commands passed on the reviewed source before publication. All 53 current-head check runs passed before the history-preserving merge. Independent GPT-6.1 high review supplied technical acceptance. The optional CodeRabbit status previously reported a draft review skip, then started a rescan when the PR became ready; it was not used as an independent review approval. Previous failures remain historical.

Retained predecessor evidence: the actual Linux V1 1.18.33/1.18.34 JSON/JSONC public installer matrix passed install/update/remove with real stdio/HTTP MCP tools, preserving foreign config/comments/files/skills; 16 deterministic provider requests, 8 tool calls and zero removal host probes. This remains bound to its tested predecessor. Native V2 notification admission and final Agent Notifications installed qualification are separate checkpoints.

The coherent authority/cleanup/prepare tests exceed the approximate 2,000-line review target; the final main-based delta is 35 files, approximately 2,539 additions and 60 removals. No package or release is published.

Refs 777genius/agent-notifications#105
777genius/agent-notifications#105

Summary by CodeRabbit

  • New Features
    • Added OpenCode version checks to installation planning, with plans showing supported native skills and MCP options.
    • OpenCode setup can now use native executable version checks with a controlled environment and a time limit.
  • Bug Fixes
    • Installation plans are rechecked before changes are applied, helping catch changes to the OpenCode executable or configuration location.
    • Group install, update, and repair requests that include OpenCode are now rejected as unsupported.

Private continuation seed after hosted model capacity failure. Native generic capability facts are frozen; observer capabilities remain unverified. Lifecycle authority and behavior tests follow before any mergeability claim.
Resolve version capabilities and native configuration dialect through one shared profile. Probe the explicitly selected executable at prepare/apply boundaries and fence changed image or symlink identities, including empty updates that clean prior native effects. Preserve generic skills and MCP installation independently of observer eligibility.
@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 234d2286-ce43-4116-b287-ca898cfdd0a9
📥 Commits

Reviewing files that changed from the base of the PR and between cd97ea0 and 0231b68.

📒 Files selected for processing (35)
  • cli/tools/authoring-docs/source.go
  • install/integrationctl/agentplugins/adapters/clientdetect/opencode_identity.go
  • install/integrationctl/agentplugins/adapters/clientdetect/opencode_target.go
  • install/integrationctl/agentplugins/adapters/clientdetect/opencode_target_test.go
  • install/integrationctl/agentplugins/adapters/clientdetect/testdata/golden/detect_darwin.json
  • install/integrationctl/agentplugins/adapters/clientdetect/testdata/golden/detect_linux.json
  • install/integrationctl/agentplugins/adapters/clientdetect/testdata/golden/detect_windows.json
  • install/integrationctl/agentplugins/adapters/clientdetect/testdata/opencode_probe.go
  • install/integrationctl/agentplugins/adapters/clientdetect/version.go
  • install/integrationctl/agentplugins/clients/opencode/activate.go
  • install/integrationctl/agentplugins/clients/opencode/detect.go
  • install/integrationctl/agentplugins/clients/opencode/plan.go
  • install/integrationctl/agentplugins/clients/opencode/project.go
  • install/integrationctl/agentplugins/clients/opencode_host.go
  • install/integrationctl/agentplugins/domain/clients.go
  • install/integrationctl/agentplugins/installer/README.md
  • install/integrationctl/agentplugins/installer/apply.go
  • install/integrationctl/agentplugins/installer/config.go
  • install/integrationctl/agentplugins/installer/engine_test.go
  • install/integrationctl/agentplugins/installer/group.go
  • install/integrationctl/agentplugins/installer/group_apply.go
  • install/integrationctl/agentplugins/installer/opencode_host.go
  • install/integrationctl/agentplugins/installer/opencode_host_http_test.go
  • install/integrationctl/agentplugins/installer/opencode_host_snapshot.go
  • install/integrationctl/agentplugins/installer/opencode_host_test.go
  • install/integrationctl/agentplugins/installer/prepare.go
  • install/integrationctl/agentplugins/installer/types.go
  • install/integrationctl/agentplugins/planner/testdata/golden/plan_detected_divergence.json
  • install/integrationctl/agentplugins/planner/testdata/golden/plan_invalid_components.json
  • install/integrationctl/agentplugins/planner/testdata/golden/plan_remote_mcp_and_app.json
  • install/integrationctl/agentplugins/planner/testdata/golden/plan_skills_only.json
  • install/integrationctl/agentplugins/planner/testdata/golden/plan_stdio_mcp.json
  • install/integrationctl/opencodehost/profile.go
  • install/integrationctl/opencodehost/profile_test.go
  • install/integrationctl/opencodehost/select.go
 ______________________________________________________
< Weeks of programming can save you hours of planning. >
 ------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Keep the approved identity when a caller omits InstallationID in single and group requests. Committed hooks, public result and inspected binding now refer to the same installation and data receipt.
Merge the current SDK, physical profile and delivery confirmation changes without replacing existing OpenCode history. Reject mutating OpenCode groups before effects until per-target host snapshots exist; preserve single-host installation and stored removal. Fix the checked native path separator conversion and refresh the audited authoring source fingerprint.

Independent GPT-6.1 high source and formatter reviews accepted the exact tree. Full current-head CI and final installed notification evidence remain pending.

Refs 777genius/agent-notifications#105
@codecov

codecov Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.96902% with 128 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.28%. Comparing base (cd97ea0) to head (0231b68).

Files with missing lines Patch % Lines
...plugins/adapters/clientdetect/opencode_identity.go 64.51% 19 Missing and 14 partials ⚠️
...ntplugins/adapters/clientdetect/opencode_target.go 75.00% 15 Missing and 6 partials ⚠️
...grationctl/agentplugins/installer/opencode_host.go 74.35% 11 Missing and 9 partials ⚠️
...tegrationctl/agentplugins/clients/opencode/plan.go 0.00% 13 Missing ⚠️
...l/agentplugins/installer/opencode_host_snapshot.go 81.81% 6 Missing and 4 partials ⚠️
...ationctl/agentplugins/clients/opencode/activate.go 0.00% 8 Missing ⚠️
...tegrationctl/agentplugins/clients/opencode_host.go 0.00% 8 Missing ⚠️
...rationctl/agentplugins/clients/opencode/project.go 0.00% 4 Missing ⚠️
...all/integrationctl/agentplugins/installer/apply.go 85.00% 2 Missing and 1 partial ⚠️
install/integrationctl/opencodehost/select.go 96.51% 2 Missing and 1 partial ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #381      +/-   ##
==========================================
+ Coverage   61.15%   61.28%   +0.12%     
==========================================
  Files        1453     1460       +7     
  Lines       77393    77947     +554     
==========================================
+ Hits        47326    47766     +440     
- Misses      23497    23572      +75     
- Partials     6570     6609      +39     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Preserve separator and transport semantics while using current Go loop, context and string idioms required by the actual CI checks. Keep native authority, group refusal, lifecycle limits and source fingerprint unchanged.

Refs 777genius/agent-notifications#105
@777genius
777genius marked this pull request as ready for review October 3, 2026 21:12
@777genius
777genius merged commit 4aa4aea into main Oct 3, 2026
53 of 54 checks passed
@777genius
777genius deleted the feat/opencode-host-authority branch October 3, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant