Repository navigation
Add durable per-message notification opt-out for orchestration send - #23424
JasonJarvan wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
End-to-end implementation of a durable per-message notification opt-out; I read the full 24-file diff, traced both automatic delivery lanes, verified the migration/version-skew path, and ran the focused plus adjacent test suites locally.
- Durable column —
messages.notify INTEGER NOT NULL DEFAULT 1 CHECK(notify IN (0,1))increate-core-tables-sql.ts,migrate-v43.ts, the v43 version-skew entry, andMessageInsert.notify;insertMessagewrites0only for an explicitnotify: false, so defaults and pre-migration rows keep automatic notification. - Selection filter —
getUndeliveredUnreadMessagesgainsnotify = 1, which is the batch selector shared by the PTY lane (deliverPendingMessages,mailbox-pointer-delivery) and the structured lane (structured-mailbox-pointer-deliveryviaselectOrchestrationPointerBatch). Explicit reads go throughgetUnreadMessages(unfiltered), and mailbox routing mutates onlyto_handle, socheck, waiting checks, restart, routing, and receipt replay all preserve behavior. - RPC contract —
SendParams.notifyplus asuperRefinethat rejects anything other than point-to-pointstatus/handoff;sendRemoteMessageandsendFederatedControlMailfail closed for federated targets before enqueuing a relay, so a silent message can never be attached to a cross-runtime relay. - CLI gate —
--no-notifyis a boolean flag; the handler validates the value and, only when opting out, requiresorchestration.message-notify.v1onstatus.getbefore issuing the send. - Docs and generated artifacts — CLI reference, command spec, skill guide, and the generated
src/cli/bundled-skill-guides.tsare all in sync (the diff formatter marked the generated file as binary; it does contain the new section).
Notes: getUndeliveredUnreadMailboxHandles / hasUndeliveredDirectMessageForRun intentionally stay unfiltered because they drive restore and direct-to-run-mailbox routing, not notification. Focused tests (5 files / 43 tests) and adjacent mailbox/db suites (7 files / 73 tests) pass locally.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (24)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The notification opt-out is mergeable after normal checks; no unresolved issue is established by the supplied evidence. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The opt-out is limited to local point-to-point status and handoff messages, and ordinary messages retain their existing notification behavior. Alternate mailbox consumption paths warrant compatibility review, but no material security bypass was established. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 27.27% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 21 files. (2 skipped: 2 unsupported.)
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. Comment |
|
Closing this stale PR: it has heavily diverged from current main and I won't be rebasing it further. Keeping #23417 open for upstream tracking. |

ELI5
An external agent transport can save a message in Orca's inbox without Orca also interrupting the recipient. The message remains available when the recipient explicitly checks its inbox.
What Changed
orchestration send --no-notify/ RPCnotify: false, backed by a durable message column (schema v43).orchestration.message-notify.v1before the CLI sends an opt-out request, so older runtimes cannot silently ignore it.status/handoffmail hosted by the connected runtime. Reject groups, lifecycle messages and federated cross-runtime sends.Why
A transport that both archives mail and directly presents its body otherwise causes a second native mailbox prompt. A per-message policy at the existing selection point avoids a global runtime switch and keeps external transport details out of Orca. This suppresses automatic prompts; callers still need processing deduplication because explicit inbox reads can return the archived message.
Linked Issue
Closes #23417. Related to #16822; this implements a per-message option rather than a per-run/global policy.
Screenshot / Demo
N/A — CLI, storage and runtime behavior only.
Testing
Linux automated validation:
AI Disclosure
Implemented with Codex GPT-6 Astra; remaining coding fixes and independent review use Grok
grok-4.7-build-fastat the contributor's request.Review
Independent Grok spec and code-quality reviews both passed with no blocking findings. Reviews covered automatic delivery paths, durable migrations, explicit consumption, retries and compatibility.
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
The external AO integration and runtime deployment wait for upstream acceptance.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)