Repository navigation
fix(tlon): await durable invite side effects - #130329
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 3:58 PM ET / 19:58 UTC. ClawSweeper reviewWhat this changesThis PR makes Tlon foreign-invite handling await group joins, DM RSVPs, and approval persistence so failed work is retried before the SSE event is acknowledged. Merge readinessKeep open. The patch moves failure propagation to the Tlon monitor callbacks that precede the existing SSE acknowledgement boundary, and the focused regressions cover the prior swallowed-error paths; no blocking code finding was identified. The remaining merge gate is exact-head CI and normal maintainer review. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: FAIL (partial) — step 2 Assertions:
How this fits togetherThe Tlon monitor receives group and direct-message invite events, applies invite policy, then joins, RSVPs, or records a pending approval. The local SSE client acknowledges an event only after its callback resolves, so callback failures preserve replayability. flowchart LR
A[Tlon SSE invite event] --> B[Tlon monitor]
B --> C[Invite policy]
C --> D[Join group, RSVP, or persist approval]
D --> E{Side effect succeeds?}
E -->|yes| F[SSE acknowledgement]
E -->|no| G[Unacknowledged replay]
G --> B
Before merge
Agent review detailsSecurityNone. PR surfaceSource -19, Tests +191. Total +172 across 3 files. View PR surface stats
Review metrics
Merge-risk options
Maintainer options:
Technical reviewBest possible solution: Keep durable invite side effects inside the monitor callback and let the existing SSE client withhold acknowledgement until those effects either succeed or fail. Do we have a high-confidence way to reproduce the issue? Yes—source-reproducible: rejected Tlon poke calls were previously caught or detached before the callback returned, while the added focused cases exercise those exact failure paths. Is this the best way to solve the issue? Yes—the monitor callbacks own the durable side effects, while the local SSE client already owns acknowledgement after callback resolution; changing that boundary is narrower and safer than altering transport acknowledgement. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c3ea9775ca7c. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where Tlon foreign-invite events could be acknowledged before group acceptance or approval state was durably written. Callback-side failures could therefore detach, be swallowed, or leave an invite marked processed even though its side effect never completed.
Why This Change Was Made
The monitor now awaits owner and allowlisted group acceptance, direct-message RSVP handling, and approval persistence before acknowledging the event. Approval state is staged and rolled back on save failure; owner notification remains best effort only after the durable write succeeds. Startup and replay behavior are preserved.
User Impact
Tlon invites are no longer silently lost when joining a group or persisting approval state fails; failed work remains retryable instead of being prematurely acknowledged.
Evidence
Follow-up
Model approval-response decisions as explicit durable/idempotent phases so response retries can share the same ownership contract.