fix(agents): quarantine normalized runtime tools#88994
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 1, 2026, 4:04 AM ET / 08:04 UTC. Summary PR surface: Source +48, Tests +152. Total +200 across 8 files. Reproducibility: yes. source-reproducible rather than locally rerun in this read-only review. Current main filters before provider normalization but does not re-filter the normalized return from Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the centralized post-normalization quarantine only after maintainers accept the intentional tool-availability behavior and final CI/proof remain green. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible rather than locally rerun in this read-only review. Current main filters before provider normalization but does not re-filter the normalized return from Is this the best way to solve the issue? Yes, this is the best fix shape among the inspected options. Centralizing the post-provider quarantine in AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 6627b4fbdd31. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +48, Tests +152. Total +200 across 8 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Closing this rather than landing a compatibility-risk runtime change from the cleanup queue. This is the most plausible real hardening branch in the batch, because it quarantines provider-normalized tools after normalization. But it is still draft, marked compatibility risk, touches shared runtime/doctor/Codex surfaces, and has no linked release-blocking incident. That combination is not "critical enough to land now"; it needs a focused owner pass if we want it back. Reopen path: a current-main provider normalization crash or assistant runtime failure where an incompatible normalized tool reaches execution, with repro and owner-reviewed compatibility story. |
Summary
Linked context
Closes #
Related #88936
Related #88950
Related #88959
Related #88977
Was this requested by a maintainer or owner?
Maintainer fuzzing/hardening sweep for provider/tool-schema runtime crash surfaces.
Real behavior proof (required for external PRs)
node scripts/run-vitest.mjs src/agents/runtime-plan/tools.test.ts src/agents/runtime-plan/tools.diagnostics.test.ts --reporter=dot;node scripts/run-vitest.mjs src/agents/tools-effective-inventory.test.ts src/commands/doctor/shared/active-tool-schema-warnings.test.ts src/agents/embedded-agent-runner/run/attempt.spawn-workspace.context-engine.test.ts extensions/codex/src/app-server/dynamic-tool-build.test.ts src/flows/doctor-core-checks.runtime.test.ts src/flows/doctor-core-checks.runtime-errors.test.ts --reporter=dot;./node_modules/.bin/oxfmt --check --threads=1 ...;OPENCLAW_OXLINT_SKIP_LOCK=1 node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.json ...;git diff --check origin/main...HEAD;node scripts/crabbox-wrapper.mjs run --provider aws --idle-timeout 90m --ttl 240m --timing-json --shell -- "env OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 OPENCLAW_CHANGED_LANES_RAW_SYNC=1 corepack pnpm check:changed".aws, runrun_ba62f5cbca01, leasecbx_54d56c47e7e8, exit 0, lease stopped.$dynamicRefare quarantined after provider normalization; unreadable normalized tool names and throwing normalized array slots are quarantined without crashing metadata preservation; healthy normalized tools still keep plugin/MCP metadata.not authenticated - run 'blacksmith auth login' first, so broad proof used AWS Crabbox instead.Tests and validation
Which commands did you run?
node scripts/run-vitest.mjs src/agents/runtime-plan/tools.test.ts src/agents/runtime-plan/tools.diagnostics.test.ts --reporter=dotnode scripts/run-vitest.mjs src/agents/tools-effective-inventory.test.ts src/commands/doctor/shared/active-tool-schema-warnings.test.ts src/agents/embedded-agent-runner/run/attempt.spawn-workspace.context-engine.test.ts extensions/codex/src/app-server/dynamic-tool-build.test.ts src/flows/doctor-core-checks.runtime.test.ts src/flows/doctor-core-checks.runtime-errors.test.ts --reporter=dot./node_modules/.bin/oxfmt --check --threads=1 extensions/codex/src/app-server/dynamic-tool-build.ts src/agents/embedded-agent-runner/run/attempt.ts src/agents/runtime-plan/tools.test.ts src/agents/runtime-plan/tools.ts src/agents/tools-effective-inventory-build.ts src/agents/tools-effective-mcp-inventory.ts src/commands/doctor/shared/active-tool-schema-warnings.ts src/flows/doctor-core-checks.runtime.tsOPENCLAW_OXLINT_SKIP_LOCK=1 node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.json extensions/codex/src/app-server/dynamic-tool-build.ts src/agents/embedded-agent-runner/run/attempt.ts src/agents/runtime-plan/tools.test.ts src/agents/runtime-plan/tools.ts src/agents/tools-effective-inventory-build.ts src/agents/tools-effective-mcp-inventory.ts src/commands/doctor/shared/active-tool-schema-warnings.ts src/flows/doctor-core-checks.runtime.tsgit diff --check origin/main...HEAD.agents/skills/autoreview/scripts/autoreview --mode commit --commit HEADnode scripts/crabbox-wrapper.mjs run --provider aws --idle-timeout 90m --ttl 240m --timing-json --shell -- "env OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 OPENCLAW_CHANGED_LANES_RAW_SYNC=1 corepack pnpm check:changed"What regression coverage was added or updated?
$dynamicRefquarantine after provider normalization.What failed before this fix, if known?
normalizeAgentRuntimeTools.If no test was added, why not?
N/A.
Risk checklist
Did user-visible behavior change? (
Yes/No)Yes. Unsupported provider-normalized runtime tools are now quarantined instead of passed to assistant runtime paths.
Did config, environment, or migration behavior change? (
Yes/No)No.
Did security, auth, secrets, network, or tool execution behavior change? (
Yes/No)Yes. This hardens tool execution registration boundaries by preventing unsupported/hostile normalized tool definitions from reaching runtime paths.
What is the highest-risk area?
Tool availability for providers/plugins that depend on schema normalization.
How is that risk mitigated?
The pre-provider filter still lets provider-normalizable schemas reach normalization hooks, and the new filter runs only after hooks have had their chance to produce runtime-compatible schemas. Healthy normalized tools are preserved and retain ownership metadata.
Current review state
What is the next action?
Maintainer review.
What is still waiting on author, maintainer, CI, or external proof?
Blacksmith Testbox proof is blocked by missing local auth; AWS Crabbox changed gate passed instead.
Which bot or reviewer comments were addressed?
Local autoreview first caught a test typecheck issue in the diagnostic source accumulator; fixed and rerun. Final autoreview is clean: no accepted/actionable findings,
overall: patch is correct (0.83).