refactor(plugins): expose loaded runtime metadata#79198
Conversation
|
Codex review: found issues before merge. Reviewed July 3, 2026, 11:41 PM ET / 03:41 UTC. Summary PR surface: Source +230, Tests +118, Docs +1. Total +349 across 13 files. Reproducibility: not applicable. this is an internal refactor PR, not a bug report with a user-level reproduction path. The relevant check is source comparison against current main plus rebase validation of the runtime/startup seams. Review metrics: 2 noteworthy metrics.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. 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: Keep this as the canonical startup metadata slice, but land it only after a current-main rebase wires Do we have a high-confidence way to reproduce the issue? Not applicable: this is an internal refactor PR, not a bug report with a user-level reproduction path. The relevant check is source comparison against current main plus rebase validation of the runtime/startup seams. Is this the best way to solve the issue? No as submitted: the staged producer surface is the right shape, but the branch is conflicting and must be integrated with current main's live-registry lifecycle before it is merge-safe. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9d68f877ac3e. Label changesLabel justifications:
Evidence reviewedPR surface: Source +230, Tests +118, Docs +1. Total +349 across 13 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
|
ae37a8c to
fbf8472
Compare
fbf8472 to
2091074
Compare
2091074 to
c09ff42
Compare
Summary
gateway-runtimeloaded registry surface.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Details
This is PR 2 in the prepared runtime resolution migration.
It adds the loaded-runtime metadata layer that later migration PRs can consume without rebuilding plugin/provider/channel registries at request time:
resolveProviderRuntimePluginHandle(...)now checks thegateway-runtimeloaded registry surface introduced here, completing the PR 1 follow-up called out in Tracking: Prepared runtime resolution migration #77700.The architectural line is the same as PR 1: this PR creates startup/runtime producer surfaces only. It does not redirect normal reply/tool/outbound consumers yet. Later PRs will migrate one surface at a time, prove that prepared facts are used, and remove old lookup branches only after the corresponding prepared path owns the call.
Real behavior proof (required for external PRs)
N/A. Maintainer-authored internal refactor surface; no end-user reply path is migrated in this PR.
Root Cause (if applicable)
Regression Test Plan (if applicable)
src/plugins/runtime.channel-pin.test.tssrc/plugins/channel-plugin-ids.test.tssrc/plugins/web-provider-runtime-shared.test.tssrc/plugins/agent-tool-result-middleware-loader.test.tssrc/gateway/server-startup-post-attach.test.tssrc/agents/runtime-plugins.test.tsUser-visible / Behavior Changes
None expected. This PR changes internal startup/runtime metadata plumbing and preserves compatibility fallback behavior for existing callers.
Diagram (if applicable)
Security Impact (required)
Yes, explain risk + mitigation: N/ARepro + Verification
Environment
Steps
pnpm test src/plugins/runtime.channel-pin.test.ts src/plugins/channel-plugin-ids.test.ts src/plugins/bundle-mcp.test.ts src/plugins/web-provider-runtime-shared.test.ts src/plugins/agent-tool-result-middleware-loader.test.ts src/channels/plugins/bundled-root-caches.test.ts src/gateway/server-startup-post-attach.test.ts src/gateway/server-startup.test.ts src/agents/runtime-plugins.test.tspnpm buildgit diff --check origin/main...HEADExpected
Actual
git diff --check origin/main...HEADpassed.Evidence
Evidence is the local targeted test/build proof above. During extraction, the standalone branch exposed two useful guardrails: startup model prewarm must remain metadata-only, and configured model owner plugins should be included in startup metadata alongside implicit runtime owner plugins.
Human Verification (required)
main; file scope is startup/runtime metadata plusCHANGELOG.md; focused Gateway/plugins/channels/agents tests pass; build passes; diff hygiene is clean.Review Conversations
Compatibility / Migration
Risks and Mitigations
resolveProviderRuntimePluginHandle(...)now checksgateway-runtime, and Tracking: Prepared runtime resolution migration #77700 continues to track each consumer migration surface.