Repository navigation
refactor: reuse existing owners across measured consumer clones - #178116
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
|
Codex review: needs maintainer review before merge. What this changesThis PR replaces repeated queue bookkeeping, filesystem-error handling, cache pruning, validation, and database-root discovery with shared implementations. Example: Two file operations target same-file while another targets other-file.
Review scores
ProductKind: Refactor · Worth it: Yes Merge readiness✅ Ready for maintainer review Keep open: this maintainer-directed refactor removes duplicated implementations while preserving their existing contracts; no actionable introduced bug was found. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherCore and plugin consumers pass operations and metadata through shared helpers, retaining domain authority checks before storage or transport effects. flowchart TD
A[Core consumers] --> C[Shared helpers]
B[Plugin consumers] --> C
C --> D[Domain authority checks]
D --> E[Existing workers and clients]
E --> F[Storage and transport]
Technical reviewBest possible solution: Retain the shared-owner refactor with its existing domain guards and settle the required CI results before landing. Do we have a high-confidence way to reproduce the issue? This PR proposes a refactor rather than a reported runtime defect; source inspection supports the stated duplicated implementations. Is this the best way to solve the issue? Reusing the established helpers is appropriate: the changed consumers remove their old implementations while retaining endpoint-specific policy and lifecycle ownership. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c2bacf334ba1. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -398, Tests +145. Total -253 across 71 files. Added test files: 2. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 20, 2026, 2:07 AM ET / 06:07 UTC. |
|
Merged via squash.
|
…claw#178116) * refactor: reuse existing owners for measured consumer clones * chore(safety): shrink removed assertion allowances
PR openclaw#178192 moved terminal recovery onto the aggregate retry policy. Keep its two component helpers private and exercise the same expectations through that public policy. PR openclaw#178116 replaced the Telegram group-config alias with the canonical resolver type; remove the unused alias.
What Problem This Solves
Measured clone families still repeat filesystem missing-path policy, FIFO tail bookkeeping, validation projections, plugin database-root discovery, and bounded-cache eviction. Private annotations also repeat their owning contracts.
User Impact
No intended user-visible change. Existing public configuration, protocol, persisted data, SDK surface, authorization, ordinary shutdown settlement, and durability remain unchanged.
Why This Change Was Made
Delegate to the existing strict missing-path, path-existence, keyed-queue, and collection owners. Share decision criterion validation and plugin-owned resource traversal beside their existing consumers. Keep endpoint-specific validation, ordering, and error policies at the same boundaries; derive private types from the existing authoritative types. Team Reports shares its eight numeric JSON projections locally, while the existing SQL helper remains the engine owner.
This is the disjoint consumer/owner area split accompanying #178019: 72 paths including the shrink-only assertion baseline, 65 production paths, 398 net production lines removed, with 145 net test/support lines added. The original 537-line, 116-path batch was split to stay below the campaign's 80-path CI-attribution limit. Most of the original Map area is now parked after an inconclusive CI replay; its old 139-line reduction is not counted as landed savings. The repaired retained Map fragment removes only three lines, making the two current candidates 401 net production lines, not 537. No core-private or cross-plugin imports are added; plugin reuse uses existing SDK contracts only.
The credential queue retains fresh main's WorkerTaskPool, access/schema leases, live-authority checks, error hydration, and settlement. Discord retains main's removal of the test-only clock injection. The Phase E standalone memory backend, factory, registry, expiry, federation, and tests are untouched.
Best-effort tradeoffs accepted
Evidence
Independent full-cut review completed with no actionable P0-P2 findings. Earlier source-bound focused consumer proof is retained for the byte-identical accumulator paths, including structured-output, tool-authority, session-override and prompt-prefix stability; fresh qualification covers the changed credential owner and six plugin additions. Fresh native types (93 explicit roots), focused typed/syntax lint, and formatting passed. All 22 selected test files ran serially: 185 cases passed and one Buzz socket-presence case exceeded its existing 15-second timeout, reporting about 24 seconds elapsed. One bounded focused head replay reproduced that timeout. The serial selected-case comparison on clean main
a876cbba56de9bcc623d1df607664df685ff62daalso exceeded the same 15-second deadline, reporting 26,011 milliseconds elapsed. Both selected replays filtered the other five cases; no authored skip was added. These local timeouts remain investigated and unresolved under host load, not causal proof of an inherited or PR-created product defect, and no timeout or assertion was changed. Team Reports conformance and read-budget cases, all nine avatar cases, and all credential/queue contracts passed. Runtime and static cycle checks both reported zero; the staged changed-check planner dry run passed. All current source hashes match the retained receipts. No local passing-test aggregate is claimed.The transcript test-only SQL observation repair captures expanded SQL before native statement disposal, preserving the same exact query counts and index-plan assertions. Its original finalized-statement error reproduced on clean main; the repaired selected cases passed. No assertion, timeout, retry, skip, suppression, or baseline is weakened.
PR CI on the exact head is the broad integration and PostgreSQL parity proof. No local broad suite, build, whole-graph typecheck, real Gateway state, or remote lease was used.
Initial hosted run
39376919246identified one cleanup bookkeeping omission: four removed assertion counts needed the matching shrink-only edit inconfig/assertion-safety-baseline.txt. That correction reduces allowances by five and introduces none. The production source remains unchanged from the reviewed candidate. Independent review of the correction found no actionable P0-P2 issue; the assertion-safety guard and fresh 14-case suppression audit both passed.The same run's
checks-node-changed-compact-small-4failed the unchanged bundled-catalog test withtypesafe/typesafe: Error: Missing modelCatalog.providers.typesafe.baseUrl. Scheduled main run39375515792, job118472955176, reports the exact same error. The actual PR checkoutd5f835a898179abe5c773931e8df692f243463e0has ordered parentsabf93bd5a1c5b39a3ff95365bc76270ec318b2e4and the original PR head; its determining test, provider-catalog owner, normalizer, catalog types, SDK barrel, and Typesafe manifest are byte-identical to that baseline. The assertion-baseline failure is ours; the matching catalog failure is inherited. Neither failed result is relabeled green, and repaired-head CI remains required.