Skip to content

feat(opencode): harden dual observer lifecycle and native provenance - #382

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

777genius merged 9 commits into
mainfrom
feat/opencode-sdk-hardening

Conversation

@777genius

@777genius 777genius commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

OpenCode notification consumers need original native provenance, cancellation before delayed delivery and a bounded reader lifecycle. This change preserves the public root V1/V2 factories and types, shares the V2 reducer with the strict native subpath, and keeps active turns across legitimate native session touches. Unknown or cancelling lifecycle updates still invalidate pending delivery synchronously.

Validation on exact head 01f7fced8098a1341da7fb4cafa9268b5798c3f7: all 38 check runs and the additional review status succeeded; 148 SDK tests passed with no skips, pinned TypeScript and public installed import/type/behavior checks passed for V1 floor/current and V2-only with no V1 peer. Genuine immutable unpublished npm-pack bytes remain SHA256 c3d5aaaf6ecc3116b48ab1ae3f0e00b47720f239df9938f0c499d03f2c21a752. Independent GPT-6.1 high source and current-head readiness review accepted the bounded SDK change.

Preserve the original PR #373 commits and the meaningful provenance checkpoints with a merge commit. The three newer main commits modify disjoint source paths. This SDK checkpoint does not claim final installed Agent Notifications qualification and does not publish an npm package or release.

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

Preserve published root factories while sharing one V2 reducer with the strict native reader. Retain actual ingress and terminal identities, bound lookup and preparation lifetimes, and synchronously cancel full-capacity native controls. Package the unpublished 0.3.0 candidate with genuine installed consumer checks.
Merge the original PR #373 history after adapting its published root contracts into the independently reviewed 0.3.0 candidate. The resulting tree is byte-identical to the tested candidate; one shared V2 reducer replaces the obsolete standalone engine.
@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 44 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: a3d5c970-c04c-43fd-b0d2-bd454a7f4ae2
📥 Commits

Reviewing files that changed from the base of the PR and between a3e8497 and 01f7fce.

⛔ Files ignored due to path filters (1)
  • sdk/opencode-js/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (26)
  • .github/workflows/opencode-sdk.yml
  • sdk/opencode-js/README.md
  • sdk/opencode-js/checkpoint.js
  • sdk/opencode-js/common.d.ts
  • sdk/opencode-js/index.d.ts
  • sdk/opencode-js/index.js
  • sdk/opencode-js/observer-core.js
  • sdk/opencode-js/package.json
  • sdk/opencode-js/scripts/check-packed.mjs
  • sdk/opencode-js/scripts/packed-runtime.mjs
  • 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/test/preparation.test.js
  • sdk/opencode-js/test/v1-provenance.test.js
  • sdk/opencode-js/test/v2.test.js
  • sdk/opencode-js/tsconfig.json
  • sdk/opencode-js/typecheck-v2.ts
  • sdk/opencode-js/typecheck.ts
  • sdk/opencode-js/v1.d.ts
  • sdk/opencode-js/v1.js
  • sdk/opencode-js/v2-reducer.js
  • sdk/opencode-js/v2.d.ts
  • sdk/opencode-js/v2.js
  • sdk/opencode/decode.go
  • sdk/opencode/decode_test.go
  • 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.

@codecov

codecov Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.77%. Comparing base (a3e8497) to head (01f7fce).

Files with missing lines Patch % Lines
sdk/opencode/decode.go 76.00% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #382   +/-   ##
=======================================
  Coverage   61.77%   61.77%           
=======================================
  Files        1438     1438           
  Lines       76189    76213   +24     
=======================================
+ Hits        47066    47081   +15     
- Misses      22614    22620    +6     
- Partials     6509     6512    +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.

Preserve both current VS Code Local APIs and the OpenCode native provenance decoder.

Refs 777genius/agent-notifications#105
@777genius
777genius marked this pull request as ready for review October 3, 2026 18:57
@777genius
777genius merged commit cd97ea0 into main Oct 3, 2026
39 checks passed
@777genius
777genius deleted the feat/opencode-sdk-hardening 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