Repository navigation
fix(tlon): await message persistence before acknowledgement - #129090
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 3:48 AM ET / 07:48 UTC. ClawSweeper reviewWhat this changesThe PR makes Tlon group-discovery settings persistence complete before its SSE event is acknowledged, allowing failed writes to be retried. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open for normal maintainer review. Current main still detaches the groups-ui persistence callback, while this PR returns and awaits it through the existing SSE acknowledgement contract; no patch correctness finding was identified. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (partial) — step 2 Assertions:
How this fits togetherThe Tlon plugin consumes group SSE events, discovers chat channels, persists their settings, and then advances the Urbit event acknowledgement watermark. The change ensures persistence failure reaches the monitor transport rather than being detached from it. flowchart LR
A[Group SSE event] --> B[Tlon monitor]
B --> C[Discover chat channels]
C --> D[Persist channel settings]
D --> E{Write succeeds?}
E -->|Yes| F[Acknowledge event]
E -->|No| G[Reconnect and replay]
G --> B
Before merge
Agent review detailsSecurityNone. PR surfaceSource -55, Tests +52. Total -3 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land one canonical awaited persistence path after rebasing or refreshing the branch and confirming its exact-head checks; retain the focused failure-and-retry regression coverage. Do we have a high-confidence way to reproduce the issue? Yes—source and the added regression test establish the path: a detached groups-ui callback can finish after the SSE client has acknowledged the event, whereas a rejected awaited callback prevents that acknowledgement. Is this the best way to solve the issue? Yes—the patch uses the existing SSE handler-completion contract instead of adding a second retry or acknowledgement mechanism, and it preserves cumulative settings writes while the subscription snapshot lags. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ebf07e56e8de. LabelsLabel 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
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…#129090) * fix(tlon): await message persistence before acknowledgement * test(tlon): use promise timer helper in monitor fixtures
Summary
Root cause
The monitor passed a detached callback into the message loop. The loop could durably acknowledge an event before the callback's persistence completed, so a failed write was not retried and later channel state could become stale.
Verification
cee0085573cda5b1d3002ce47b29a4f3aee531f19cde0beb7b5e2c37af890718Production delta: -55. Test delta: +51. Total net: -4. No live Urbit credentials were available; the real loopback HTTP/SSE owner suite is the strongest feasible boundary proof. No API, configuration, schema, migration, or security-contract change.
Changelog: not required for this internal monitor repair.