Repository navigation
fix(daemon): no reply command for an @external sender the queue would refuse - #3275
Conversation
… refuse Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Thanks, @cavalcanticampos. We want to check with @ziadeh about their plans for #3268 before choosing a fix. We'll review this proposal on its merits; this isn't a merge or release promise. |
|
Thanks, @mvschwarz. That makes sense. I'll leave the PR as it is until you've heard from @ziadeh. If their plan for #3268 goes a different way (for example, refusing an unregistered The latest CodeRabbit pass had no actionable comments, so I haven't changed any code since the last push. 🤖 Generated with Claude Code |
|
Thanks, @cavalcanticampos, and thanks for waiting. The reply line now asks the queue's own admission check, so the hint and the queue can't disagree, and the two envelope copies give the same output, each with a test. @ziadeh has confirmed on #3268 that this is the fix they hoped for, and that Two small changes, each with one test1. A registry that can't be read isn't proof of absence. When the person registry or the shared-channel list can't be read, the admission check finds no one, so every 2. If the new check throws, the notification should still go out. The new lookup runs while the notification to the recipient is being staged ( One wording point: where the description and commit say the two copies match, say that of the changed reply branch. The daemon copy already has one branch the CLI copy lacks, for OpenRig's own sender, which this PR doesn't touch. Neither change adds a refusal, and queue admission stays as it is. After your push we'll take a short read of the change and let CI run. |
…d or throws Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for the review. Both changes are in, each with tests. 1. A registry that can't be read isn't proof of absence. The no-route note now shows only when the person registry and the participant file were both read and the queue still refuses the sender. If the registry is broken (
The first two fail without this change. 2. If the new check throws, the notification still goes out. The lookup is now an optional step ( Wording: agreed. The claim that the two envelope copies give the same output holds for the changed Tested: the new tests above, plus 🤖 Generated with Claude Code |
|
Thanks again, @cavalcanticampos. A lookup that throws now keeps the notification and the handoff, and an unreadable registry keeps today's reply line, as asked, each with tests. One remainder of last round's first item
The descriptionIt still says both copies give byte-identical output. As your last comment offered, please narrow it to the changed After your push we'll take a short read of the change. |
…ticipant snapshot Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, @mvschwarz. Note from the same snapshot. Test: Ran: Description. Narrowed: both copies render the changed 🤖 Generated with Claude Code |
openrig-review
left a comment
There was a problem hiding this comment.
Approved at fb1210b. A notification from an @external sender the queue would refuse no longer suggests a reply command that fails; the note now comes from one readable snapshot of the people registry and the participant file, checked by the same resolver the queue uses, and anything unknown or unreadable keeps today's reply line. Both review halves are clear, and required CI passes at this head. Thank you, @cavalcanticampos, and thanks @ziadeh for the report and for reading the fix.
|
Thanks again, @cavalcanticampos. This was merged into main as What it gives people: a notification from an @ziadeh, thanks for the report with source pointers, and for reading the fix. |
|
@cavalcanticampos, thanks again: this is now released in OpenRig 0.7.19. |
What a user gets
Fixes #3268.
Before: a queue row whose source is an
@externaladdress that isn't registered (for examplerig queue create --source some-team@external --destination advisor@kernel ...) reached the seat ending with↩ Reply if needed: rig queue create --destination some-team@external .... Running that command fails withunknown_destination_rig.After: that delivery ends with
↩ No reply route: some-team@external isn't a registered person (rig gateway human list lists who's registered).This works like the #2895 note for a sender with no session. Registered people and registered shared channels keep the existing
--reply-tohint.Cause:
wrapPaneEnvelope(and its CLI twinwrapSendBody) gives every sender ending in@externalthequeue createhint. Nothing checked whether the queue would accept that address as a destination.Fix:
EnvelopeMetagainssenderRegistered?: boolean, in both twins with byte-identical output. When it isfalse, an@externalsender gets the note above instead of the command. When it is absent ortrue, the output is unchanged.QueueRepository.senderReachsetssenderRegistered: falsefor an@externalsender whencanRecordDestination(sender)returns false. That is the same admission check that refuses the reply, so registered people and shared channels pass and unregistered sources don't.senderReachablekeeps its current meaning. Its test that "senderReachable false leaves the external reply line alone" is unchanged.How you verified it
Tested on main at 4d2284c with this change.
packages/daemon/test/queue-nudge-summary.test.tswires the productionmakeTopologyDestinationCheckand a registry that holds onlyalex@external. A row fromsome-team@externalmust end with the new note, and the reply it used to suggest must be refused withunknown_destination_rig. A row fromalex@externalmust keep the--reply-tohint. The test fails without the fix (it gets the oldrig queue createline) and passes with it.packages/daemon/test/pane-envelope.test.tsandpackages/cli/test/send-header.test.tscover the parity contract.pane-envelope,queue-nudge-summary,queue-repository,queue-cross-host-create,draft-aware-delivery(daemon) andsend-header(cli).npm run lintpassed.npm testrun or the UI suite; I'm relying on CI for those. Not exercised against a live daemon or Slack.Anything you were unsure about
I added a new meta field rather than reusing
senderReachable, because an existing test pins thatsenderReachable: falseleaves the@externalline alone.The
rig sendenvelope path (session-transport.ts) doesn't set the new field. The issue is about queue deliveries, andrig sendfrom an@externalsender isn't a normal path.The note's wording is a suggestion; happy to change it.
One concern per PR; no version bump; no
CHANGELOG.mdeditTests added or updated where the change is testable
I listed the checks I ran, their results, and any checks I could not run
🤖 Generated with Claude Code
Summary by CodeRabbit