refactor(notify): bundle KDCO opencode-notify and remove built-in session-notification#3520
refactor(notify): bundle KDCO opencode-notify and remove built-in session-notification#3520
Conversation
There was a problem hiding this comment.
1 issue found across 37 files
Confidence score: 5/5
- This looks low risk to merge: the only noted issue is a documentation consistency mismatch, not a runtime or user-facing behavior change.
- In
AGENTS.md, the top-level “51 hooks” summary conflicts with the tier breakdown total of 52, which could confuse maintainers but should not affect functionality. - Pay close attention to
AGENTS.md- reconcile the hook totals so the summary and breakdown stay aligned.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="AGENTS.md">
<violation number="1" location="AGENTS.md:7">
P3: Keep the hook counts in this doc aligned. The 51-hook summary conflicts with the hook-tier breakdown below, which still totals 52.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
4 issues found across 17 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/shared/bundled-notify-ownership.ts">
<violation number="1" location="src/shared/bundled-notify-ownership.ts:73">
P1: Broad `notify` substring matching can misclassify unrelated plugins as unsafe and hard-fail bootstrap.</violation>
<violation number="2" location="src/shared/bundled-notify-ownership.ts:101">
P1: Treat stale bundled `file://.../dist/opencode-notify` entries as migratable instead of throwing on them.</violation>
</file>
<file name="postinstall.mjs">
<violation number="1" location="postinstall.mjs:140">
P1: This bootstrap imports a JS file that the current build never emits, so bundled notify ownership setup silently never runs.</violation>
</file>
<file name="src/bundled-opencode-notify/index.ts">
<violation number="1" location="src/bundled-opencode-notify/index.ts:85">
P2: Do not treat todo-fetch failures as "ready" here; a transient error can send a false idle notification while incomplete todos still exist.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
1 issue found across 7 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/shared/bundled-notify-ownership.ts">
<violation number="1" location="src/shared/bundled-notify-ownership.ts:127">
P1: This only marks path-based notify plugins as unsafe, so custom notify package IDs now slip through as `other` and remain beside the bundled owner.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
1 issue found across 2 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/shared/bundled-notify-ownership.ts">
<violation number="1" location="src/shared/bundled-notify-ownership.ts:91">
P2: npm alias specs like `alias@npm:@custom/opencode-notify@1.2.3` bypass this unsafe-entry check, so a custom notify owner can survive migration and coexist with the bundled owner.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
1 issue found across 2 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/shared/bundled-notify-ownership.ts">
<violation number="1" location="src/shared/bundled-notify-ownership.ts:92">
P2: Aliased `kdco/notify` specs still bypass migration and duplicate-owner checks.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
1 issue found across 2 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/shared/bundled-notify-ownership.ts">
<violation number="1" location="src/shared/bundled-notify-ownership.ts:79">
P2: This regex rejects valid npm dist-tags like `release_candidate`, so recognized `kdco/notify@<tag>` entries can now fail bootstrap instead of being migrated.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Summary
Replaces oh-my-opencode's built-in
session-notificationsubsystem with a bundled KDCOopencode-notifyintegration shipped inside the package. OMO now enforces a single canonical bundled notify owner in OpenCode plugin config while keepingbackground-notificationbehavior unchanged.Changes
session-notificationruntime, hook wiring, and legacy config surface (notification.force_enable)dist/opencode-notifywith third-party notice filekdco/notifyentries and loud-fail behavior for custom/unsafe notify entriesblocked/deletedonly)Testing
bun run typecheckpassesbun run buildpasses and emits bundled notify artifact + notice filesbun teststill has unrelated pre-existing failures in slash-command/auto-slash-command areas (no new regressions introduced)Migration Notes
Existing recognized
kdco/notifyentries are migrated to the bundled owner automatically. Custom/unsafe notify entries are not rewritten and fail loudly with cleanup guidance to avoid duplicate owners.