Repository navigation
refactor(agents): reuse prepared tool facts - #174349
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 reuses prepared MCP settings and tool-result classifications while removing redundant consumer validation and pagination retries. Example: A Claude CLI attempt receives capture key attempt-123.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-authored PR open: the refactor has clear ownership and simplification value, its tradeoffs are explicitly accepted, and inspection found no actionable regression. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherAgent tool preparation consumes admitted configuration, tool results, and generated MCP settings to produce tool policies, sanitized results, and CLI execution settings. flowchart TD
A[Admitted configuration] --> B[Tool preparation]
B --> C[Policy and media consumers]
B --> D[Prepared MCP settings]
D --> E[Per attempt capture setup]
E --> F[CLI backend]
F --> G[Tool result classification]
G --> C
Technical reviewBest possible solution: Retain the producer-owned preparation path and the explicitly accepted best-effort pagination behavior. Do we have a high-confidence way to reproduce the issue? This refactor reports repeated internal work rather than a user-visible bug; source inspection confirms the duplicated reads and classifications. Is this the best way to solve the issue? Producer-owned settings and shared classification reduce repeated work without adding a competing owner; removed validation remains covered by existing admission contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against aaec28c3f6e2. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -181, Tests -9. Total -190 across 28 files. Added test files: 0. View PR surface stats
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 16, 2026, 11:27 AM ET / 15:27 UTC. |
|
Coordinator-authorized Wave-6 rule-10 landing, exact head The native workflow failed twice for tooling infrastructure reasons, without a merge submission:
Native review artifacts were initialized and validated for this exact head with recommendation Exact-head CI run 38921562672 succeeded, including production/test types, lint, selected runtime suites, security-fast and Focused local proof and remaining gaps are in the PR body: result classification 28/28 and lint-suppressions 3/3 passed; MCP cold preparation stopped before assertions. The wide candidate's first-signin regression remains explicitly unresolved and is not claimed fixed or inherited by this slice. Phase E and coordinator-owned residue are excluded. Per the coordinator's standing rule 10, use the direct squash endpoint with this exact head SHA as its precondition. This bypasses the failed native transport, not CI, security or review requirements. Verify the returned merge commit against origin/main ancestry before reporting landed. |
* commit '14e993fff3ecb84eb1d7c9724c4ceda235d797e4': (110 commits) fix(decisions): align accounting ratchet evidence feat(memory): activate PostgreSQL memory search and lifecycle (#174374) fix: join process shutdown and isolate runtime fixtures (#174359) refactor(ui): scope native gateway observation to Solid (#174367) refactor(ui): own canvas widget lifetime in Solid (#174370) perf(control-ui): keep agent avatar faces stable across agent publications (#174239) perf(models): release unused account catalog instructions (#174361) refactor(ui): own composer command menus in Solid stores (#174321) refactor(ui): separate sidebar filter state from view lifecycle (#174352) test(release): make artifact qualification deadlines deterministic fix(codex): preserve sandboxed process inspection and setup errors (#174284) fix(gateway): stop worker processes before draining their queues (#174312) refactor(agents): reuse prepared tool facts (#174349) test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331) refactor(ui): replace MCP retirement host adapters with a factory (#174375) refactor(logging): remove redundant native success traces (#174330) refactor(test): remove dead control-plane fixture branches (#174377) refactor(mcp): remove test-only session runtime seams (#174347) feat(matrix): account-root state databases follow the selected engine (#174315) refactor(discord): collapse private interaction and factory seams (#174322) ...
* commit '14e993fff3ecb84eb1d7c9724c4ceda235d797e4': (110 commits) fix(decisions): align accounting ratchet evidence feat(memory): activate PostgreSQL memory search and lifecycle (#174374) fix: join process shutdown and isolate runtime fixtures (#174359) refactor(ui): scope native gateway observation to Solid (#174367) refactor(ui): own canvas widget lifetime in Solid (#174370) perf(control-ui): keep agent avatar faces stable across agent publications (#174239) perf(models): release unused account catalog instructions (#174361) refactor(ui): own composer command menus in Solid stores (#174321) refactor(ui): separate sidebar filter state from view lifecycle (#174352) test(release): make artifact qualification deadlines deterministic fix(codex): preserve sandboxed process inspection and setup errors (#174284) fix(gateway): stop worker processes before draining their queues (#174312) refactor(agents): reuse prepared tool facts (#174349) test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331) refactor(ui): replace MCP retirement host adapters with a factory (#174375) refactor(logging): remove redundant native success traces (#174330) refactor(test): remove dead control-plane fixture branches (#174377) refactor(mcp): remove test-only session runtime seams (#174347) feat(matrix): account-root state databases follow the selected engine (#174315) refactor(discord): collapse private interaction and factory seams (#174322) ...
* commit '0c6c7ee5837ed93f6fb09ca58b280e76878c21f1': (109 commits) feat(memory): activate PostgreSQL memory search and lifecycle (#174374) fix: join process shutdown and isolate runtime fixtures (#174359) refactor(ui): scope native gateway observation to Solid (#174367) refactor(ui): own canvas widget lifetime in Solid (#174370) perf(control-ui): keep agent avatar faces stable across agent publications (#174239) perf(models): release unused account catalog instructions (#174361) refactor(ui): own composer command menus in Solid stores (#174321) refactor(ui): separate sidebar filter state from view lifecycle (#174352) test(release): make artifact qualification deadlines deterministic fix(codex): preserve sandboxed process inspection and setup errors (#174284) fix(gateway): stop worker processes before draining their queues (#174312) refactor(agents): reuse prepared tool facts (#174349) test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331) refactor(ui): replace MCP retirement host adapters with a factory (#174375) refactor(logging): remove redundant native success traces (#174330) refactor(test): remove dead control-plane fixture branches (#174377) refactor(mcp): remove test-only session runtime seams (#174347) feat(matrix): account-root state databases follow the selected engine (#174315) refactor(discord): collapse private interaction and factory seams (#174322) refactor(feishu): reuse streaming merge in dispatcher tests (#174371) ...
* commit '14e993fff3ecb84eb1d7c9724c4ceda235d797e4': (110 commits) fix(decisions): align accounting ratchet evidence feat(memory): activate PostgreSQL memory search and lifecycle (#174374) fix: join process shutdown and isolate runtime fixtures (#174359) refactor(ui): scope native gateway observation to Solid (#174367) refactor(ui): own canvas widget lifetime in Solid (#174370) perf(control-ui): keep agent avatar faces stable across agent publications (#174239) perf(models): release unused account catalog instructions (#174361) refactor(ui): own composer command menus in Solid stores (#174321) refactor(ui): separate sidebar filter state from view lifecycle (#174352) test(release): make artifact qualification deadlines deterministic fix(codex): preserve sandboxed process inspection and setup errors (#174284) fix(gateway): stop worker processes before draining their queues (#174312) refactor(agents): reuse prepared tool facts (#174349) test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331) refactor(ui): replace MCP retirement host adapters with a factory (#174375) refactor(logging): remove redundant native success traces (#174330) refactor(test): remove dead control-plane fixture branches (#174377) refactor(mcp): remove test-only session runtime seams (#174347) feat(matrix): account-root state databases follow the selected engine (#174315) refactor(discord): collapse private interaction and factory seams (#174322) ...
* commit '0c6c7ee5837ed93f6fb09ca58b280e76878c21f1': (109 commits) feat(memory): activate PostgreSQL memory search and lifecycle (#174374) fix: join process shutdown and isolate runtime fixtures (#174359) refactor(ui): scope native gateway observation to Solid (#174367) refactor(ui): own canvas widget lifetime in Solid (#174370) perf(control-ui): keep agent avatar faces stable across agent publications (#174239) perf(models): release unused account catalog instructions (#174361) refactor(ui): own composer command menus in Solid stores (#174321) refactor(ui): separate sidebar filter state from view lifecycle (#174352) test(release): make artifact qualification deadlines deterministic fix(codex): preserve sandboxed process inspection and setup errors (#174284) fix(gateway): stop worker processes before draining their queues (#174312) refactor(agents): reuse prepared tool facts (#174349) test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331) refactor(ui): replace MCP retirement host adapters with a factory (#174375) refactor(logging): remove redundant native success traces (#174330) refactor(test): remove dead control-plane fixture branches (#174377) refactor(mcp): remove test-only session runtime seams (#174347) feat(matrix): account-root state databases follow the selected engine (#174315) refactor(discord): collapse private interaction and factory seams (#174322) refactor(feishu): reuse streaming merge in dispatcher tests (#174371) ...
What Problem This Solves
Agent tool preparation repeats work already owned by config admission, result classification, or the generated MCP configuration producer.
User Impact
No intended user-visible change. Existing policy enforcement, hostile-input handling, image limits, archive protections, and CLI capture credentials remain. Concurrent automation-list edits are best effort: repeat the read if the current job moved between pages.
Why This Change Was Made
Carry the prepared Claude/Gemini MCP configuration into capture setup instead of rereading and reparsing a file we just generated. Classify tool results once and share the Cron action predicate. Trust admitted config and media metadata rather than repeat shape/scalar checks; remove the archive-extraction rethrow wrapper.
This is the tool-area slice of a wider agents cleanup, intentionally excluding prepared-plugin publication retirement and passive-owner changes while their first-signin regression is diagnosed. It also excludes the separate coordinator-owned W6c residue and the two previously landed harness changes.
Best-effort tradeoffs accepted
zod-schema.agent-runtime.ts; its redundant consumer guards originated in refactor(agents): split Tool Search internals #113296.6b2af6c1ee0).d92501dbf34,30e1556cdac, and Web runtime refactord73bc545064).Evidence
Production: 23 files, +163/-344, 181 net lines removed. Five test files complete signature migrations and preserve outcome precedence; total diff is 28 files. This is an area split of the preserved 896-line candidate, not its wholesale resubmission.
tool-result-error.test.ts: 28/28 passed (81.87s suite on a heavily loaded shared host), including hostile objects and failure precedence.test/scripts/lint-suppressions.test.ts: 3/3 passed (170.63s suite, 202.46s wrapper); no new suppressions.git diff --checkpassed.10ee984418456ab59d59c05990a9a5b247301015: scoped-clean through P2, no actionable findings; published status/report independently inspected.6537a2c1f7f25ac3d0f730141b6313d8f48c2794: CI run 38921562672 passed, including production/test types, lint, security-fast, selected runtime suites andopenclaw/ci-gate. No rerun or green-seeking push. A cancelled advisory auto-response job is superseded by successful job 117042431408 on the same head; no test suite is waived.The full parked candidate had a genuine exact-head first-signin assertion; this slice is not advertised as fixing or inheriting that failure. The requested local single-file candidate replay entered a broad runtime build and was stopped under the local-proof budget before assertions. A separate candidate replay never obtained a remote lease within the 20-minute budget and was stopped without a test result. No retries, skips, or timeout increases were added. Exact-head CI outcomes will be linked before landing.