Repository navigation
fix(signal): preserve messages redelivered behind a busy lane - #128093
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 29, 2026, 11:35 AM ET / 15:35 UTC. ClawSweeper reviewWhat this changesThe PR adds a durable-admission freshness fact to the channel SDK and uses it to prevent Signal redelivery from completing a still-pending dual-identity message. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readinessKeep open. Current main still contains the destructive duplicate-admission path, while this coherent patch fixes it at the durable-admission owner boundary; it has no blocking correctness or security finding. The PR remains under protected maintainer/human-review handling and its post-force-push exact-head checks are still incomplete. Priority: P1 Review scores
Verification
How this fits togetherSignal receives transport envelopes, durably queues them, then drains each sender lane into dispatch. The shared ingress monitor now tells Signal whether its primary queue row was newly inserted or was an existing duplicate before Signal bridges its phone-number alias. flowchart LR
A[Signal receive envelope] --> B[Ingress monitor]
B --> C[Durable queue admission]
C --> D[New or duplicate decision]
D --> E[Signal identity alias bridge]
E --> F[Per-sender lane drain]
F --> G[Signal message dispatch]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +5, Tests +91, Docs +6. Total +102 across 5 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the queue-owned, documented boolean rather than exposing queue internals, preserve Signal’s existing phone-first alias dedupe, and land only after the current head receives normal merge verification. Do we have a high-confidence way to reproduce the issue? Yes. The checked-in regression recreates the busy-lane/redelivery order through the production Signal monitor and durable SQLite queue; this read-only review did not execute it. Is this the best way to solve the issue? Yes. The queue is the authoritative owner of insertion freshness, and the patch exposes only that fact rather than leaking the internal enqueue-result union into the Plugin SDK. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6475e098a014. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (8 earlier review cycles)
|
|
@clawsweeper automerge |
|
🦞🧹
Draft PRs stay fix-only until GitHub marks them ready for review. Pause with Automerge progress:
Re-review progress:
|
|
🦞✅ Source: Why human review is needed: What the maintainer can do as a next step: I added |
|
🦞✅ Source: Why human review is needed: What the maintainer can do as a next step: I added |
|
@clawsweeper stop |
|
🦞✅ I added |
|
@clawsweeper approve Maintainer decision for exact head
This is a valuable, narrow additive fix for a demonstrated silent message-loss path. |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
2a882df to
1052650
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper approve Maintainer decision for exact head Fresh review against current The refreshed head preserves the previously accepted runtime semantics. Its only additional change splits the admission regression into a dedicated test file to satisfy current-main line limits. Focused SQLite-backed Signal and durable-ingress tests pass, the Plugin SDK API surface check passes, and exact-head CI is green. The absence of a live This is ready to land as the narrow owner-boundary repair for #128009. |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
Merged via squash.
|
…aw#128093) * fix(signal): preserve pending dual-identity redeliveries * docs(plugin-sdk): define durable admission freshness * test(channels): split ingress admission coverage --------- Co-authored-by: sallyom <[email protected]>
Closes #128009
What Problem This Solves
Fixes an issue where Signal users could permanently lose a message when signal-cli redelivered it while an earlier message from the same sender was still being processed. The duplicate admission could mark the real pending row completed and erase its payload before dispatch.
Reported with a production-path reproduction by @yetval in #128009.
Why This Change Was Made
The shared durable-ingress monitor now exposes one narrow
isNewfact after enqueue instead of leaking the full queue result through the Plugin SDK. Signal still bridges the phone-number alias on every admission, but completes the primary UUID row only when that row was freshly inserted, preserving both duplicate-redelivery safety and the existing phone-first alias dedupe.User Impact
Signal messages redelivered behind a busy sender lane remain pending and dispatch exactly once after the earlier message finishes, instead of being silently dropped.
Evidence
startSignalIngressMonitor.receiveover the real SQLite ingress queue: a deferred first message blocks the lane, the second message remains pending, its identical redelivery leaves it pending, and releasing the first claim dispatches both messages in order.node scripts/run-vitest.mjs extensions/signal/src/signal-ingress.test.ts src/channels/message/ingress-monitor.test.ts— 58 passed.node scripts/check-changed.mjs -- src/channels/message/ingress-monitor.ts src/channels/message/ingress-monitor.test.ts extensions/signal/src/signal-ingress.ts extensions/signal/src/signal-ingress.test.ts— all selected core, core-test, plugin, and plugin-test gates passed.node --max-old-space-size=8192 --import tsx scripts/plugin-sdk-surface-report.mts --check— passed..agents/skills/autoreview/scripts/autoreview --mode uncommitted ...— clean; no accepted/actionable findings.No live signal-cli daemon or SSE connection was attached; the regression replays the exact receive envelope through the production Signal monitor entry point and durable queue.