Repository navigation
fix(plugins): hide uninstalled TGZ plugins from inventory - #131880
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 12:18 PM ET / 16:18 UTC. ClawSweeper reviewWhat this changesMakes install and uninstall registry refreshes use an isolated plugin-metadata cache so removed packaged plugins disappear from management inventory without replacing the running Gateway snapshot. Merge readinessKeep open for explicit maintainer review. The introduced cache boundary matches the documented distinction between stable Gateway metadata and fresh explicit management operations, and no blocking correctness or security defect was found. Priority: P2 Review scores
Verification
How this fits togetherPlugin management mutations update configuration, installed-package records, and the durable inventory. Gateway runtime readers retain their startup metadata, while explicit install, uninstall, and registry-refresh operations may inspect freshly written package state. flowchart LR
A[Plugin install or uninstall] --> B[Config and package write]
B --> C[Fresh operation cache]
C --> D[Registry refresh]
D --> E[Persisted management inventory]
F[Gateway startup snapshot] --> G[Runtime plugin readers]
C -. preserves .-> F
Before merge
Agent review detailsSecurityNone. PR surfaceSource +5, Tests +198. Total +203 across 13 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the operation-scoped refresh boundary and land it after exact-head CI and maintainer confirmation that Gateway startup metadata stays process-stable. Do we have a high-confidence way to reproduce the issue? Yes, at source level: the added TGZ fixture establishes a cached Gateway snapshot, uninstalls the package, and observes that the old refresh path would republish stale inventory. It was not executed in this read-only checkout. Is this the best way to solve the issue? Yes. The cache scope is applied once at the shared post-mutation registry-refresh owner, covers install and uninstall callers, and preserves the documented Gateway snapshot lifetime. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 221c89c1a20a. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…31880) * fix(plugins): isolate registry refresh cache generations * test(plugins): split cache generation suites
What Problem This Solves
Fixes an issue where users uninstalling a plugin installed from a TGZ/npm-pack artifact could still see it in managed plugin inventory when the running Gateway had cached the plugin's pre-uninstall filesystem metadata.
Why This Change Was Made
Explicit mutation refreshes now discover plugin state inside a fresh operation-scoped PluginCache generation. This prevents install/uninstall refreshes from inheriting stale package facts while preserving the Gateway's existing boot metadata and cache generation.
Ordered non-isolated plugin tests now start explicit lifecycle generations where filesystem or manifest state changes between observations. Oversized lifecycle suites are split by behavior owner so the cache regressions remain covered without max-lines exceptions.
User Impact
Plugin installs and uninstalls become visible immediately to management inventory. A removed TGZ plugin is no longer rediscovered or republished into the durable installed index, while a running Gateway keeps its boot metadata until its normal lifecycle replaces it.
Evidence
Production LOC: +25/-20 (net +5). Tests: +964/-766 (net +198; moved bodies discounted, added scaffolding only). The test-split repair adds no production LOC.