fix: clean up inline-script environments after activation - #1794
Conversation
|
🔒 Automated review in progress — Bill Schnurr (@bschnurr) is auto-reviewing this PR. |
| } else { | ||
| await this.reviewRoutingForMissingEnvironment(scope); | ||
| } | ||
| return undefined; |
There was a problem hiding this comment.
Warning · Non-blocking recommendation
If association lookup returns undefined because the sidecar is temporarily unreadable but no entry lock exists, this path only calls reviewRoutingForMissingEnvironment. That preserves the route for an unproven sidecar, but does not mark it unavailable or schedule recovery, leaving the selected environment unavailable without the explicit retry UI. Can this propagate the transient-unavailable state and schedule the bounded retry independently of lock presence?
|
Result: 🔴 Verification detailsVerification: Isolated verification observed failures that were not classified as caused by this PR: Dependency and test discovery preflight. The relevant tests could not be fully run in the isolated environment; this review is not fully verified. Summary: Verification could not proceed because the offline dependency cache lacked `update-browserslist-db`, so `npm ci --offline` failed. Consequently `npm run compile-tests` could not find `tsc`, and no unit tests could run. The PR adds extensive targeted regression coverage across seven test files, including cleanup scheduling, timestamp refreshes, concurrency, and recovery. Confidence is limited because none of that coverage was executable in the sandbox. Test runs: 1 failed, 5 not run
❌
|
Bill Schnurr (bschnurr)
left a comment
There was a problem hiding this comment.
Approved via Review Center.
Run one bounded activation-time sweep without blocking unrelated interpreter lookups. Preserve cache ownership and usage protection, recover temporary unavailability, and keep recovery across unchanged-metadata saves. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
d830480 to
d0f7469
Compare
|
Result: 🔴 Verification detailsVerification: The relevant tests could not be fully run in the isolated environment; this review is not fully verified. Summary: I could not execute meaningful tests because the verification container was unavailable or no executable verification environment was provided. The PR adds extensive unit coverage for delayed cache eviction, last-used timestamp protection, temporary association recovery, stale-lock reclamation, API fallback behavior, routing availability, CodeLens/code-action retry UI, and cache reconciliation. Since none of those tests could be run, the implementation remains unverified here despite the broad added coverage. Test runs: 1 not run
|
20c1381
into
microsoft:main
Summary
Inline-script cache cleanup previously ran before the first environment creation in a window. Users who did not create another environment could keep old cached environments indefinitely, and cleanup could delay unrelated interpreter lookups.
create(). Keep the existing 14-day expiration policy, reclaim incomplete setups after a one-day grace period, and remove at most three entries per sweep. There is no daily sweep.The feature remains behind the existing
python-envs.inlineScripts.enabledflag. This does not add a worker process, recurring cleanup, dependencies, or a new cache format.Validation
Lint, type checking, the full unit suite, and the production bundle were repeated after integrating the latest
mainAPI-facade refactor and resolving the import in the relocatedsrc/extensionApi.ts. Obsolete compiled files from the renamed modules were removed before recompilation. Cache-deletion, save/recovery, and ordinary-API scenarios were also rerun against the integrated implementation.npm run lintnpm run compile-testsnpm run unittest -- --reporter=dot --no-colors: 2,409 passing, 6 pending.create()and did not schedule another sweep..venvand the base Python installation remained usable.The walkthroughs adapt the editor/discovery-service boundaries; they are not full live VS Code/Pylance GUI or macOS/Linux validation. Usage timestamps are not process-lifetime leases.