Skip to content

fix(code-mode): recovery fails after tool metadata extraction - #133162

Closed
steipete wants to merge 1 commit into
mainfrom
codex/qa-20260830-ci-tool-metadata-import
Closed

steipete wants to merge 1 commit into
mainfrom
codex/qa-20260830-ci-tool-metadata-import

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Related: #132932. Unblocks the shared build failures observed in #131441, #133143, and #133151.

What Problem This Solves

Resolves a problem where builds from current main fail with a missing export and Code Mode recovery throws when preparing normal tools. Unrelated PRs also fail build, typecheck, and QA jobs when CI combines their branches with the affected main.

Why This Change Was Made

The tool metadata extraction in #132932 moved the side-effect ownership helper into the dependency-light metadata owner but left one recovery import behind. Route that final reader to the same canonical owner already used by the client-tool path and public SDK; do not restore the obsolete runtime export or create another store. The metadata behavior and recovery policy are unchanged.

Provenance: verified the raw parent of 87b7121 and its patch: the helper moved out of src/plugins/tools.ts while the reconciliation import stayed unchanged. No containing stable tag was found in the local tag set.

User Impact

Developers can build current main again, and bounded Code Mode recovery can prepare normal tools without the missing-function exception. No configuration, protocol, schema, or public SDK change.

Evidence

  • Frozen baseline: aace96c6720e283f95d84921c15610b33c9d3171.
  • Before: production core typecheck fails with TS2305 at code-mode-reconciliation.ts:2. Existing recovery tests fail 3/15 with getPluginToolSideEffectOwnerKey is not a function at the real recovery preparation boundary.
  • After: the same core typecheck passes; all 15 existing recovery tests and 13 client-tool preparation tests pass.
  • Commands: node scripts/run-tsgo.mjs -p tsconfig.core.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core.tsbuildinfo; OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/agents/embedded-agent-runner/run/code-mode-reconciliation.test.ts src/agents/embedded-agent-runner/run/attempt-client-tools.test.ts.
  • Formatting and git diff --check pass. Production LOC: +1/-1, net zero; test LOC: +0/-0. Existing tests provide the regression proof, so no duplicate test was added.
  • Exact reviewed head: d4172019980394296eb9dc6c64ed4ebd79c18bda. Fresh autoreview and separate read-only Codex review found no actionable findings. Independent source review confirms the sole stale importer, shared WeakMap owner, migrated sibling callers, and unchanged upstream dynamic-tool request/response contract.
  • Build and exact-head CI results will be recorded before landing.

Original shared failures: browser production types, QA build, and TUI build.

@clawsweeper

clawsweeper Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete

Copy link
Copy Markdown
Contributor Author

Closing this duplicate in favor of #133155, which was opened concurrently and contains the byte-identical one-line repair. Independent source review and failing/passing recovery/typecheck evidence have been transferred to #133155 (comment). We are leaving the existing maintainer-owned landing and CI in place rather than running a competing PR.

@steipete steipete closed this Aug 30, 2026
@RomneyDa
RomneyDa deleted the codex/qa-20260830-ci-tool-metadata-import branch October 22, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant