Repository navigation
refactor(delivery): reuse the canonical rendered batch plan type - #140386
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: needs maintainer review before merge. Reviewed September 6, 2026, 3:47 PM ET / 19:47 UTC. ClawSweeper reviewWhat this changesThe outbound delivery queue reuses the renderer’s batch-plan type while preserving its existing exported name and fields. Merge readiness✅ Ready for maintainer review Keep open: this remains a useful, narrowly scoped cleanup absent from fetched main. The replacement is structurally identical, and no actionable correctness or security finding remains. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw summarizes outgoing reply payloads into a batch plan containing content counts and ordered items. The delivery queue carries that plan through storage and recovery to channel delivery. flowchart LR
A[Reply payloads] --> B[Batch planner]
B --> C[Counts and ordered items]
C --> D[Delivery queue]
D --> E[Recovery]
D --> F[Channel delivery]
E --> F
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -9. Total -9 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Maintain one canonical batch-plan definition while retaining the queue-facing alias and unchanged stored representation. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a type-only cleanup, and source inspection confirms the repeated declarations are equivalent. Is this the best way to solve the issue? Yes: aliasing the existing canonical type removes duplication without adding an abstraction, changing fields, or altering executable code. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 79474a759428. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…rol-ui * origin/main: docs: remove the empty release-sections nav group (#140427) fix(tooling): omit Codex machine squash credit (#140420) chore(ui): refresh control ui locales (#140384) refactor(plugin-sdk): reuse native approval input contracts (#140415) fix: silent model WebSocket streams hang past the idle timeout (#140335) perf(ai): avoid unused text extraction for image results (#140409) fix(ui): distinguish failed GitHub status checks from disconnected accounts (#140333) refactor(cron): share runtime feedback schema fields (#140408) fix: avoid duplicate cloud worker teardown during recovery (#140377) fix(cli): show executable approval scope (#138386) refactor(ui): reuse shared requirement records (#140407) test(gateway): table-drive device token lifecycle checks (#140403) fix(chat): fence delayed history at terminal retirement (#140379) test(skills): compare large upload bytes natively (#140402) refactor(delivery): reuse the canonical rendered batch plan type (#140386) docs(start): repair the first-run path from landing page to first channel (#140390) # Conflicts: # docs/.i18n/glossary.zh-CN.json
What Problem This Solves
The outbound queue repeated the renderer's full batch-plan type while already importing its item type. The two declarations describe the same data, leaving an unnecessary second copy to maintain.
Why This Change Was Made
Keep the exported queue type name and alias the canonical
RenderedMessageBatchPlan. Its seven counters and readonly item array remain identical, and the module already has the same type-only dependency.Deletion evidence: the repeated declaration in
src/infra/outbound/delivery-queue-types.ts:20is replaced by the canonical type atsrc/channels/message/types.ts:129.rendered-batch.test.ts:5and:23retain normalized media/item and presentation-heading coverage.git log -S QueuedRenderedMessageBatchPlanlocates the types split at7026cf2f21d(#123410).User Impact
No executable, schema, stored-format or delivery behavior change. The exported type name and all of its fields remain available.
Evidence
Whole-module TypeScript transpilation produces byte-identical JavaScript before and after.
Production: −9 lines. Tests/support, tooling and docs unchanged.
Five existing rendered-batch contract cases passed before and after.
Full
node scripts/check-changed.mjspassed.Independent Codex review: scoped-clean, no actionable P0–P2 findings.
ClawSweeper reviewed this exact head and found no actionable correctness/security findings or before-merge work.
Initial CI hit the unchanged agent-command timeout assertion (
599999versus600000ms); the command budget subtracts real elapsed time. The one targeted same-head shard retry passed; exact-head CI is green. No timeout or assertion was changed.