Repository navigation
refactor: simplify action-ledger command wiring - #1888
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. What this changesThis PR replaces the action-command dependency factory with direct imports and replaces parser-only coverage with a built-CLI publication test. Example: Publish a sorted manifest containing five canonical ledger files.
Review scores
ProductKind: Refactor · Worth it: Yes Merge readiness✅ Ready for maintainer review Keep this PR open: it removes redundant command wiring while preserving existing behavior, and current main still contains the factory. No introduced correctness defect was found. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe CLI dispatcher sends publication and finalization arguments to action-ledger commands, which import local shards, finalize receipts, or upload canonical files through the signed Worker client. flowchart LR
A[CLI arguments] --> B[Runtime dispatcher]
B --> C[Action commands]
C --> D[Local ledger files]
C --> E[Signed blob client]
E --> F[Worker blob endpoint]
Technical reviewBest possible solution: Use the direct command exports while preserving existing CLI, provenance, publication, and finalization contracts. Do we have a high-confidence way to reproduce the issue? No runtime bug is claimed; source inspection confirms the redundant factory and its sole production wiring. Is this the best way to solve the issue? Direct imports remove the redundant layer without creating a competing owner, and moving dashboard dispatch preserves its existing dependencies. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9e8717ba669e. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 10, 2026, 6:03 AM ET / 10:03 UTC. |
What Problem This Solves
Action-ledger CLI changes currently require editing a dependency factory and its runtime wiring even though the implementation has one production owner.
User Impact
No user-visible behavior or stored-format change. Publication and finalization retain their existing command interfaces.
Why This Change Was Made
First bounded slice of the dependency-lattice cleanup: remove
createActionCommandsand its dependency interface, import the filesystem root from its existing owner, and import production commands directly. The unrelated dashboard callback stays with runtime dispatch. Remove the test-only manifest parser export; its behavior now runs through the built CLI, real files, and a loopback Worker HTTP receiver.The wider map and ordered migration plan are retained at
~/Developer/.agents/handoffs/clawsweeper-row3/PLAN.md(local handoff, not a deployed document). This slice does not touch report readers or apply workflow files.OpenClaw Bay Impact
Unaffected: no lifecycle, queue, telemetry, dashboard data contract, or public display changes.
Documentation Impact
Added one changelog fragment. Existing CLI and state-storage contracts remain accurate; no command, HTTP, or stored-schema change. The local design handoff is proposed migration guidance, grounded in base
f9f7db87c.Real Behavior Proof
96e082abbef04c7399eaad995cba1136abaaa8cb.node dist/clawsweeper.js publish-action-event-paths, Node 24.21.0 on macOS; isolated copied CLI root and loopback HTTP receiver. No production credentials or endpoints are required by the fixture.POST /internal/state/blobs/putin manifest order; CLI summary reports four uploads and one unchanged blob.node --test test/clawsweeper-action-ledger.test.tsthrough pueue task 1150. All 24 tests passed, including the new CLI/filesystem/HTTP proof.pnpm run build:all,pnpm run lint,pnpm run format:checkpassed in task 1150.codex review --base origin/maincompleted in task 1151 with no actionable findings.Evidence
Pueue tasks 1150 (checks/proof) and 1151 (review) retain logs locally. Review independently repeated the focused build/tests and reported no actionable defects. CI remains the integration gate. Do not merge as part of this task.