Skip to content

feat(opencode): add bounded native V2 observer - #373

Merged
777genius merged 5 commits into
mainfrom
feat/opencode-v2-observer
Oct 3, 2026
Merged

777genius merged 5 commits into
mainfrom
feat/opencode-v2-observer

Conversation

@777genius

@777genius 777genius commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

OpenCode V2 uses native execution and inbox events that the V1 observer cannot interpret. Add createV2Observer while preserving createObserver and its V1 contract. Bound retained metadata and actual host calls, fence stale results, verify ownership and suppress child sessions. Inconclusive ownership can recover on fresh work; eviction preserves live or buffered owned work and reports unavoidable capacity loss.

Validation: 69 SDK tests and TypeScript checks pass. Eight new regression cases fail on their previous implementations and pass after fixes; the strengthened interruption test also fails if its guard is removed. The exact package tarball matches committed source and was consumed by native notification checks on 1.18.33, 2.0.0 and 2.0.21 on Linux amd64.

Local Claude Code / Claude Opus 5.5 review comments and fixes are recorded on this PR. The final follow-up found no remaining actionable defect.

Version 0.2.0 is an unpublished candidate. Publication and registry integrity verification require a separate authorized release action. Consumer integration: 777genius/agent-notifications#294 (draft until dependency publication and clean registry qualification).

@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 3 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 196831eb-6139-44c0-964c-c1ce79e614a3

📥 Commits

Reviewing files that changed from the base of the PR and between d84a969 and 27be62a.

⛔ Files ignored due to path filters (1)
  • sdk/opencode-js/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (9)
  • sdk/opencode-js/README.md
  • sdk/opencode-js/index.d.ts
  • sdk/opencode-js/index.js
  • sdk/opencode-js/observer-v2.js
  • sdk/opencode-js/package.json
  • sdk/opencode-js/test/fixtures/v2-success-2.0.0.json
  • sdk/opencode-js/test/fixtures/v2-success-2.0.21.json
  • sdk/opencode-js/test/observer-v2.test.js
  • sdk/opencode-js/typecheck.ts
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

@777genius 777genius left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Local Claude Code review using Claude Opus 5.5 (claude-opus-5-5). Read-only source review at 9b53dcc. 3 actionable findings; fixes and verification will follow. No publication or merge approval.

Comment thread sdk/opencode-js/observer-v2.js Resolved
Comment thread sdk/opencode-js/observer-v2.js Resolved

@777genius 777genius left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Local Claude Opus 5.5 focused follow-up: all six original findings are addressed; one additional P3 concerns eviction activity classification. No new P1/P2. Native recovery evidence is still in progress.

Comment thread sdk/opencode-js/observer-v2.js Resolved

@777genius 777genius left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Local Claude Opus 5.5 final focused review found one narrow P3: retain gate-blocked terminal work while an inbox admission remains. Earlier findings stay addressed; no P1/P2.

Comment thread sdk/opencode-js/observer-v2.js Resolved

@777genius 777genius left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Local Claude Code / Claude Opus 5.5 final follow-up at 27be62a.

All actionable findings from the four review rounds are addressed (8 total across the two PRs). The final focused model review returned no remaining findings. This is technical code review, not publication or merge approval.

Maintainer verification: 69 SDK tests and typecheck, five plugin tests and bundle build pass. Before/after regressions distinguish all recovery and eviction fixes; the strengthened interruption test fails if its guard is removed. Native same-session recovery passed on 1.18.33, 2.0.0 and 2.0.21, including queue plus interrupt, dismiss, reject and provider failure. Actual private D-Bus calls remained generic, silent and action-free.

Provenance: extended recovery matrices ran at product 153cab3 / SDK b6f6c94; installed-artifact checks after the next eviction fix ran at 31bd651 / SDK 8e651b8. Final exact candidate 2a15a95 / SDK 27be62a passed installed completion on all three native versions and current-V2 managed reload. The extended matrices were not all rerun on final SHA. SDK tarball bytes match committed source and the product lock integrity.

Remaining release gates: SDK 0.2.0 registry publication with the exact integrity, a clean registry install reproducing the bundle, and remaining platform CI on final source. Product PR stays draft. No package published and no PR merged.

@codecov

codecov Bot commented Oct 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.26%. Comparing base (0506dd8) to head (27be62a).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #373      +/-   ##
==========================================
+ Coverage   61.11%   61.26%   +0.14%     
==========================================
  Files        1377     1381       +4     
  Lines       73220    73527     +307     
==========================================
+ Hits        44748    45043     +295     
- Misses      22249    22258       +9     
- Partials     6223     6226       +3     

☔ 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.

777genius added a commit that referenced this pull request Oct 3, 2026
…382)

Preserve the public V1/V2 factories and original PR #373 ancestry while adding shared native provenance, bounded cancellation and reader lifecycle checks.

Independent GPT-6.1 high review accepted exact head 01f7fce. All 38 current-head checks and the additional review status succeeded; 148 SDK tests and genuine packed public consumers passed. Newer main changes are source-disjoint. Installed Agent Notifications qualification remains a separate checkpoint; no package or release is published.

Refs 777genius/agent-notifications#105
@777genius
777genius merged commit e00df39 into main Oct 3, 2026
38 of 39 checks passed
@777genius
777genius deleted the feat/opencode-v2-observer branch October 3, 2026 18:57
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