Replay Outgoing Messages When Inbox Receives Duplicate#4067
Replay Outgoing Messages When Inbox Receives Duplicate#4067
Conversation
Introduces the design for CausationId tracking and OnceOnlyAction.Replay, enabling automatic replay of downstream outbox messages when the inbox detects a duplicate command. Accepted after 7 rounds of adversarial review. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…cate Create and approve implementation task list (23 tasks) for the replay outbox messages feature. Tasks cover structural prerequisites, core behavior (CausationId propagation, UseInboxHandler replay logic, pipeline validation), telemetry, DI registration, and all 18 persistent store implementations. Minor ADR clarification for ReplayCausation semantics. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Code Review — PR #4067: Replay Outgoing Messages When Inbox Receives DuplicateThis PR contains design and specification documents only — no implementation code yet. The changes are: 🔴 Critical:
|
| Area | Status |
|---|---|
PROMPT.md in repo root |
❌ Should be removed |
| ADR quality and completeness | ✅ Well-written |
| Interface design | SupportsCausationTracking async variant worth revisiting |
| Tidy-first discipline | ✅ Correctly scoped |
| Task list TDD discipline | ✅ Follows project /test-first conventions |
| Scope creep (Task 16) | |
| Persistent store migration dependency |
The core design is sound. The main ask is removing PROMPT.md before merge; the interface and scope observations are lower priority suggestions.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Code Review — PR #4067: Replay Outgoing Messages When Inbox Receives DuplicateOverviewThis PR is a specification and design phase PR only — it contains requirements, ADR 0057, and task definitions for the Replay-on-Inbox-Duplicate feature. No production code has been written yet (the PROMPT.md explicitly states "Implementation — not started"). The 1606 additions are almost entirely documentation and spec artefacts. Issues🔴 PROMPT.md Should Not Be Merged
Recommendation: Remove 🟡 README.md for Spec 0027 Shows Tasks as Incomplete
...but Recommendation: Update the README checkbox to 🟡 Inconsistent
|
| Area | Status |
|---|---|
PROMPT.md in commit history |
❌ Remove before merge |
specs/0027/README.md tasks checkbox |
[x] |
| ADR 0057 design quality | ✅ Solid |
SupportsCausationTracking() startup I/O cost |
|
| Requirements completeness | ✅ Good — minor typos only |
| Non-breaking / opt-in design | ✅ Correct approach |
The design is sound and the specification artefacts are high quality. The main blocker before merging is removing PROMPT.md from the branch history.
Review generated by Claude Code
There was a problem hiding this comment.
No application code in the PR — skipped Code Health checks.
See analysis details in CodeScene
Quality Gate Profile: Clean Code Collective
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
Code Review — PR #4067: Replay Outgoing Messages When Inbox Receives Duplicate
What's in this PR
Issues
|
| Area | Status |
|---|---|
PROMPT.md in repo |
Must fix — remove from git tracking |
| ADR structure & completeness | Good — minor gaps noted |
DescribePipelines() gap |
Low priority — fix in Task 3 |
SupportsCausationTracking() startup cost |
Needs documentation |
| Race condition clarity | Needs a note on downstream idempotency requirement |
| Requirements typos | Trivial — worth fixing |
| Task 14 scenario structure | Clarify [Theory] expectation in task |
| Task 23 test scope | Enumerate specific suites |
| Schema migration PR dependency | Track explicitly |
The design itself is sound — the role interface approach (IAmACausationTrackingInbox/Outbox) is non-breaking and consistent with Brighter's existing patterns. The decision to use the outbox sweeper for re-dispatch rather than building a new dispatch path is the right call. The CausationId concept is well-scoped and distinct from CorrelationId/JobId.
When an Inbox receives a duplicate message, we may choose to replay any outgoing messages that it triggered when it was originally called. This makes us idempotent, in that our behavior matches that of the original call. It also allows us to recreate messages for downstream consumers who might have failed, by triggering from upstream, thus allowing us to replay a whole workflow until we reach the point where it failed.
Closes #2541