Repository navigation
refactor(agents): deduplicate tool display definitions - #129306
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 11:21 PM ET / August 26, 2026, 03:21 UTC. ClawSweeper reviewWhat this changesReplaces repeated agent and message tool-display action literals with local descriptor factories while preserving labels and detail-key arrays. Merge readinessNo blocking source finding: the refactor preserves the two descriptor shapes consumed by the formatter and generated catalog. This PR remains open for maintainer handling because it carries the protected Priority: P3 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherTool invocations are mapped through static display metadata into redacted progress text, channel status reactions, and a generated shared catalog used by web and mobile clients. The PR changes only how those action descriptors are constructed. flowchart TD
Invocation[Tool invocation] --> Registry[Display metadata registry]
Registry --> Action[Action descriptor lookup]
Action --> Formatter[Progress display formatter]
Registry --> Generator[Shared catalog generator]
Formatter --> Channels[Channel and transcript output]
Generator --> Clients[Web and mobile clients]
Decision needed
Why: The source review found preserved descriptor semantics, but the protected label requires an explicit maintainer decision rather than automated cleanup. Before merge
Agent review detailsSecurityNone. PR surfaceSource -192. Total -192 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the private factories local to their respective registry owners and merge only after the exact-head catalog and type/test checks are green. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR is a behavior-preserving refactor, not a report of broken behavior. Is this the best way to solve the issue? Yes: local factories retain each registry's ownership while preserving the exact action-descriptor contract; a shared exported helper would add surface without a demonstrated need. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8954634b15ea. 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
History |
11fda54 to
3ff7663
Compare
|
Merged via squash.
|
What Problem This Solves
The shipped agent tool-display registry and its message-action owner repeatedly constructed equivalent private descriptor records. Those repetitive definitions made the cross-platform presentation catalog unnecessarily large while requiring exact preservation of every label, action shape, ownership identity, and generated Apple/Android artifact.
Why This Change Was Made
The two existing private registry owners now use small canonical descriptor factories without changing the exported registry, runtime imports, field presence, object/array identities, or generated platform tool-display catalogs. The change removes duplicate construction while keeping all special tool and message definitions in their original owners.
User Impact
Agent, channel, web, iOS, and Android tool labels and presentation remain byte-for-byte identical. Every existing action, visible detail, message label, and generated OpenClawKit JSON artifact is unchanged.
Evidence
3402e71f59dd8fe0d938b715af1862e9dbd7eb3f5b7fcbd70faadc4b2d81766f; no generated files changed.git diff --check, multiple independent complete source/behavior reviews, and full structured precommit review passed.