Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed October 2, 2026, 5:03 PM ET / 21:03 UTC (Revision 7). ClawSweeper reviewWhat this changesThe branch centralizes attachment selection across outbound planning, channel rendering, and ClickClack recovery, with regression coverage for duplicate attachment fields. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 4 items remain The previously raised attachment-loss blocker remains on the unchanged head. Current main already repairs duplicate rendered counts while preserving distinct attachments; this protected PR needs reconciliation with that implementation. Priority: P1 Review scores
Verification
How this fits togetherOutbound planning converts agent replies into channel messages and durable delivery records. Attachment selection determines which files are sent and which platform messages recovery must reconcile after a restart. flowchart TD
A[Agent reply and attachments] --> B[Outbound payload preparation]
B --> C[Attachment selection]
C --> D[Rendered delivery plan]
D --> E[Durable delivery queue]
E --> F[Channel attachment send]
E --> G[ClickClack crash recovery]
F --> H[Delivery receipt]
G --> H
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource -27, Tests +136. Total +109 across 11 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Use current main's normalized merged-input behavior, retain distinct attachments and blank-list fallback, and share delivery facts with recovery without changing stored part ordering. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the patch defect: plan a valid mediaUrl alongside either blank-only mediaUrls or a distinct plural URL. The singular attachment is discarded; this review did not execute tests. Is this the best way to solve the issue? No. Sharing normalization is appropriate, but plural precedence changes established behavior; current main's merged-input deduplication solves duplicate counting while retaining valid attachments. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d5c6cbfb4b8c. 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
HistoryReview history (6 earlier review cycles)
|
|
The duplicate rendered-media count was fixed in #129193 (2da70a8), and ClickClack recovery now consumes that rendered plan. This branch's broader plural-list precedence would discard distinct valid attachments, so the overlapping implementation should be retired. Closed in a sweep of stale maintainer PRs (no activity for 7+ days). Reopen with a current reproduction if this still matters. |
What Problem This Solves
Fixes an issue where users sending an attachment to Matrix would receive no message when the normal reply producer populated both the primary attachment and its attachment list. The same mismatch could prevent ClickClack from recognizing an attachment that was already delivered during crash recovery.
Why This Change Was Made
The reply-payload owner now provides the single canonical attachment-selection rule to rendered-message planning, outbound payload preparation, durable delivery, the existing plugin SDK, text-to-speech, and ClickClack recovery. Nonempty attachment lists supersede the legacy primary field, empty lists retain the existing primary-field fallback, and obsolete infra-owned helpers and duplicate planner/recovery policy are removed without changing the public SDK.
User Impact
Normalized Matrix attachments are delivered exactly once with both automatic and explicit durable reconciliation, and ClickClack recovers previously uploaded attachments without searching for a nonexistent duplicate. Other channel planners inherit the same attachment order and trimming contract.
Evidence
node scripts/run-vitest.mjs src/channels/message/rendered-batch.test.ts src/media/media-retirement-non-goals.test.ts src/infra/outbound/deliver-queue.exact-reconciliation.integration.test.ts extensions/clickclack/src/outbound.test.tsnode node_modules/vitest/vitest.mjs run --config test/vitest/vitest.infra.config.ts src/infra/outbound/deliver-queue.exact-reconciliation.integration.test.ts --maxWorkers 1 --no-file-parallelismnode scripts/run-tsgo.mjs -p tsconfig.core.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core.tsbuildinfo