fix(plugins): cache installed manifest registry index fingerprint to avoid repeated fs probes#86850
fix(plugins): cache installed manifest registry index fingerprint to avoid repeated fs probes#86850Jefsky wants to merge 20 commits into
Conversation
Avoid repeated synchronous filesystem probes (realpath/stat) when the same InstalledPluginIndex object is fingerprinted multiple times during hot-path plugin metadata snapshot lookups. Uses a WeakMap keyed on the index object reference so the cache is automatically invalidated when the object is GC'd. Closes #86791
|
Thanks for the context here. I did a careful shell check against current Close: current main and the v2026.6.6 release already contain a guarded installed-index fingerprint cache with regression coverage, while this branch carries an older unconditional cache plus unrelated dirty changes. So I’m closing this as already implemented rather than keeping a duplicate issue open. Review detailsBest possible solution: Keep the guarded current-main and v2026.6.6 implementation as canonical, and leave any protected linked issue or related protected PR cleanup to maintainers. Do we have a high-confidence way to reproduce the issue? No live profiler reproduction was run in this read-only review. The original hot-path source path and the submitted stale-cache failure mode are source-reproducible, and current main now has focused regression coverage for the cache boundary. Is this the best way to solve the issue? No, this PR branch is not the best way to solve the issue. Current main's guarded cacheability checks and invalidation tests are the safer maintained implementation. Security review: Security review cleared: The diff touches workflow and script surfaces, but I found no concrete security or supply-chain regression beyond the functional merge risks already noted. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 44e6caff5401; fix evidence: release v2026.6.6, commit 8c802aa68351. |
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
This comment was marked as spam.
This comment was marked as spam.
|
ClawSweeper applied the proposed close for this PR.
|
Resolves #86791
The
resolveInstalledManifestRegistryIndexFingerprintfunction caused repeated synchronous filesystem operations (realpath/stat) every time the sameInstalledPluginIndexwas fingerprinted. During hot-path plugin metadata snapshot lookups, the same index object could be fingerprinted multiple times per call cycle.Changes:
WeakMap<object, string>cache keyed on the index object referenceclearInstalledManifestRegistryIndexFingerprintCacheexport for test useProfile evidence showed
lstat/realpathSync/statchains under:resolveInstalledManifestRegistryIndexFingerprintbuildInstalledManifestRegistryIndexKeyresolvePackageJsonPathsafeFileSignatureThis fix avoids re-executing those filesystem probes when the same index object is fingerprinted again.