fix(plugins): ignore throwing provider runtime hooks#88959
Conversation
|
Codex review: found issues before merge. Reviewed June 27, 2026, 9:16 AM ET / 13:16 UTC. Summary PR surface: Source +41, Tests +76. Total +117 across 2 files. Reproducibility: yes. from source inspection: create a provider plugin whose 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 findings
Review detailsBest possible solution: Land a refreshed provider-runtime hardening patch that catches optional hook failures while preserving configured-provider isolation, model-id scoped lookup, and focused regression coverage. Do we have a high-confidence way to reproduce the issue? Yes from source inspection: create a provider plugin whose Is this the best way to solve the issue? No for the current PR head. Catch-and-warn handling is the right layer for optional provider hooks, but this branch needs a rebase that preserves current configured-provider and model-id scoping safeguards. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c5d34c8376f8. Label changesLabel justifications:
Evidence reviewedPR surface: Source +41, Tests +76. Total +117 across 2 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 old provider fallback PR. A plugin factory or normalization hook can genuinely throw, but silently ignoring that failure and continuing with a manifest, sibling provider, or alternate transport changes routing and fail-closed behavior. There is no linked production report or explicit fallback contract justifying that compatibility/security tradeoff. The right fix needs an observed failure, an owner decision about whether startup/request routing should fail or degrade, and diagnostics at the provider boundary. It should not turn arbitrary plugin exceptions into implicit fallback policy. Thanks for investigating the failure mode. |
Summary
normalizeModelIdandnormalizeTransporthooks so model/transport normalization keeps its existing fallback pathsVerification
node scripts/run-vitest.mjs src/plugins/provider-runtime.test.ts --reporter=dotnode_modules/.bin/oxfmt --check --threads=1 src/plugins/provider-runtime.ts src/plugins/provider-runtime.test.tsOPENCLAW_OXLINT_SKIP_LOCK=1 node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json src/plugins/provider-runtime.ts src/plugins/provider-runtime.test.tsgit diff --check HEAD~1..HEAD.agents/skills/autoreview/scripts/autoreview --mode local --prompt "Review the updated OpenClaw provider-runtime patch after changing the transport skip key to plugin package plus provider id. Focus on whether throwing normalizeModelId/normalizeTransport hooks preserve manifest and sibling transport fallback, including same-package multi-provider plugins."node scripts/crabbox-wrapper.mjs run --provider aws --idle-timeout 90m --ttl 240m --timing-json --shell -- "corepack pnpm check:changed"(run_8c7e8041e188, leasecbx_739f083002ff, exit 0; lanescore,coreTests)Real behavior proof
Behavior addressed: provider runtime normalization hooks that throw no longer abort model-id or transport fallback resolution.
Real environment tested: local focused Vitest/format/lint/autoreview plus AWS Crabbox Linux changed gate.
Exact steps or command run after this patch:
node scripts/run-vitest.mjs src/plugins/provider-runtime.test.ts --reporter=dot;node scripts/crabbox-wrapper.mjs run --provider aws --idle-timeout 90m --ttl 240m --timing-json --shell -- "corepack pnpm check:changed".Evidence after fix: focused provider-runtime tests passed 58/58; autoreview reported no accepted/actionable findings; AWS Crabbox run
run_8c7e8041e188exited 0.Observed result after fix: throwing
normalizeModelIdreturns to manifest fallback, and throwing matchednormalizeTransportkeeps scanning sibling transport hooks without duplicate same-provider invocation.What was not tested: direct Blacksmith Testbox was not available because
blacksmith testbox listreported missing auth.