Repository navigation
fix: name the id-kind mismatch when --ack is given a message id - #15743
Conversation
`orchestration check --ack` takes the batch's delivery id, which the check
response returns as the top-level `deliveryId`. Passing a message id
instead produced:
stale_delivery: Delivery msg_5d5cdf77614c does not belong to this Run.
That states a Run-scope verdict for what is really the wrong kind of
identifier, and it names no field that carries the right one. The only id
visible while reading the message list is the message `id`, so the message
sends the caller hunting the wrong axis — stablyai#15697 is a detailed report that
concluded the ack path was broken and no delivery id was exposed, when both
were fine.
When the value misses the deliveries table but hits the messages table, say
so and point at `deliveryId`. Anything else keeps the original wording,
including a delivery that exists but belongs to another Run — that one
really is a scope verdict.
Refs stablyai#15697
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between 4ddeebb9f394b94636317d853a1dace447290b1a and ed7edb4. 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe mailbox delivery acknowledgment error now distinguishes a message ID from an invalid delivery ID. It directs callers to use the Merge Risk: 🔵 Low · up to Acknowledging with a message ID now returns a clearer error without changing message state, but the test does not verify the instruction that tells callers how to recover. This is a bounded diagnostics-regression risk. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 624d3833-c34c-473e-8386-c7be1c1b8432
📥 Commits
Reviewing files that changed from the base of the PR and between 59892a2 and c2054bbe31b03d0f52504b890dcc20db5f154945.
📒 Files selected for processing (2)
src/main/runtime/orchestration/db/runs/run-delivery.tssrc/main/runtime/rpc/methods/orchestration-check.test.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
|
@coderabbitai review |
❌ Action failedReview failed.
|
|
# Conflicts: # src/main/runtime/orchestration/db/runs/run-delivery.ts
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/main/runtime/rpc/methods/orchestration/messaging/check.test.ts (1)
266-266: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAssert the complete remediation guidance.
The assertion checks only that the error identifies a message ID. It does not verify the required instruction to use the top-level
deliveryIdfrom the check response. Assert that guidance too, so it cannot regress unnoticed.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: 8f8eb35a-e352-466c-ae6d-1cced7097278
📥 Commits
Reviewing files that changed from the base of the PR and between 3145060 and 4ddeebb9f394b94636317d853a1dace447290b1a.
📒 Files selected for processing (2)
src/main/runtime/orchestration/db/messages/role-mailbox-delivery.tssrc/main/runtime/rpc/methods/orchestration/messaging/check.test.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review.
4ddeebb to
f42f76f
Compare
…lyai#15743) * fix: name the id-kind mismatch when --ack is given a message id `orchestration check --ack` takes the batch's delivery id, which the check response returns as the top-level `deliveryId`. Passing a message id instead produced: stale_delivery: Delivery msg_5d5cdf77614c does not belong to this Run. That states a Run-scope verdict for what is really the wrong kind of identifier, and it names no field that carries the right one. The only id visible while reading the message list is the message `id`, so the message sends the caller hunting the wrong axis — stablyai#15697 is a detailed report that concluded the ack path was broken and no delivery id was exposed, when both were fine. When the value misses the deliveries table but hits the messages table, say so and point at `deliveryId`. Anything else keeps the original wording, including a delivery that exists but belongs to another Run — that one really is a scope verdict. Refs stablyai#15697 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * test: bind message-id diagnostics to queued rows --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-authored-by: Neil <neil@stably.ai>
What changed
When
orchestration check --ackreceives an existing message ID instead of a delivery ID, the error now names the mismatch and directs callers to the top-leveldeliveryIdfrom the check response. It also reminds callers to process the entire batch before acknowledging.Unknown IDs and deliveries from another mailbox retain the existing scope error and acknowledgement guidance. The
stale_deliverycode, consumer fencing, and delivery semantics are unchanged.Resolved the conflict with current main while preserving its acknowledgement guidance. Extended regression coverage to verify a rejected message-ID acknowledgement leaves mail unread, replays the same batch, and succeeds when retried with its delivery ID. The database test also covers unknown IDs.
Refs #15697.
Validation
pnpm tc:nodepassed.Visual proof: N/A — CLI error text only. Shared runtime logic applies to local and remote callers; no platform-specific behavior or wire shape changes.