[codex] Reuse compatible plugin metadata snapshots on hot catalog paths#77601
[codex] Reuse compatible plugin metadata snapshots on hot catalog paths#77601
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. from source inspection: current main has unscoped catalog/manifest-contract callers, and the current snapshot helper rejects workspace-scoped snapshots when no Next step before merge Security Review detailsBest possible solution: Land the PR after maintainer review and exact-head checks if it remains green, keeping the opt-in limited to unscoped control-plane readers with env/config/workspace compatibility enforced. Do we have a high-confidence way to reproduce the issue? Yes, from source inspection: current main has unscoped catalog/manifest-contract callers, and the current snapshot helper rejects workspace-scoped snapshots when no Is this the best way to solve the issue? Yes, the proposed approach is the narrowest maintainable fix I found: explicit opt-in for the two unscoped control-plane readers while preserving strict matching for explicit workspace callers and keeping env/config fingerprints in the compatibility check. Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 7e591a624fed. |
Summary
workspaceDircould reject the Gateway's current workspace-scoped plugin metadata snapshot and fall back to cold plugin metadata scans.0.1.5to the current script default0.2.5; this was already failing onorigin/mainand is test-only.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause (if applicable)
Regression Test Plan (if applicable)
src/plugins/current-plugin-metadata-snapshot.test.ts,src/agents/model-catalog.test.ts,src/plugins/manifest-contract-eligibility.test.tsUser-visible / Behavior Changes
Plugin/model catalog metadata lookups should avoid repeated cold scans on compatible hot paths, reducing latency and event-loop pressure for affected Gateway sessions.
Diagram (if applicable)
Security Impact (required)
Yes, explain risk + mitigation: N/ARepro + Verification
Environment
Steps
loadPluginMetadataSnapshot.Expected
Actual
Evidence
Human Verification (required)
pnpm exec oxfmt --check --threads=1 src/plugins/current-plugin-metadata-snapshot.ts src/plugins/current-plugin-metadata-snapshot.test.ts src/agents/model-catalog.ts src/agents/model-catalog.test.ts src/plugins/manifest-contract-eligibility.ts src/plugins/manifest-contract-eligibility.test.tspnpm check:changelog-attributionspnpm test src/plugins/current-plugin-metadata-snapshot.test.ts src/plugins/manifest-contract-eligibility.test.ts src/agents/model-catalog.test.tspnpm exec oxfmt --check --threads=1 test/scripts/plugin-prerelease-test-plan.test.tspnpm test test/scripts/plugin-prerelease-test-plan.test.tspnpm check:changedontbx_01kqtrar6geep8cka08mk7cyq4before the stale-test canary updatepnpm check:changedontbx_01kqtrsq3225b6xpgfjxbvbbkbafter the final diffReview Conversations
Compatibility / Migration
Risks and Mitigations