Skip to content

fix: validate contextual executable cache aliases - #502

Merged
Karthik Nadig (karthiknadig) merged 3 commits into
mainfrom
fix/issue-448
Aug 10, 2026
Merged

fix: validate contextual executable cache aliases#502
Karthik Nadig (karthiknadig) merged 3 commits into
mainfrom
fix/issue-448

Conversation

@karthiknadig

@karthiknadig Karthik Nadig (karthiknadig) commented Aug 6, 2026

Copy link
Copy Markdown
Member

Summary

Fix PET's executable-detail cache so relative and absolute aliases for the same interpreter share a stable cache identity without changing the intentionally short caller-facing alias.

  • normalize cache keys without resolving symlinks or junctions
  • preserve Python's canonical sys.executable for locator identification
  • preserve validated short aliases while adapting cache hits to the current caller
  • drop stale relative aliases when a disk cache is reused from another working directory
  • invalidate in-memory entries when tracked executables disappear
  • version the disk cache and cover memory, disk, invalidation, stale-context, canonical-executable, and fast-path behavior

Validation

  • cargo test --all
  • ./scripts/rust-precommit.ps1

Fixes #448

Unify relative and absolute cache identities while preserving short caller-facing aliases. Invalidate missing tracked executables and cover memory, disk, and fast-path behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Drop stale relative aliases when a disk cache is reused from another working directory while retaining validated short aliases. Keep the common absolute-cache-hit path free of current-directory lookups.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Keep Python's sys.executable for locator identification while updating only validated caller aliases. This restores macOS python.org classification without changing short user-facing alias selection.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Performance Report (Windows) ✅

Metric PR (P50) PR (P95) Baseline (P50) Delta Change
Server Startup 8ms 11ms 9ms -1ms -11.1%
Full Refresh 119ms 1756ms 152ms -33ms -21.7%

Results based on 10 iterations. P50 = median, P95 = 95th percentile.


Legend
  • 🚀 Significant speedup (>100ms faster)
  • ✅ Faster than baseline
  • ➖ No significant change
  • 🔺 Slower than baseline (>100ms)
  • ⚠️ Significant slowdown (>500ms)

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Test Coverage Report (Windows)

Metric Value
Current Coverage 78.07%
Base Branch Coverage 77.53%
Delta 0.54% ✅

Coverage increased! Great work!

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Performance Report (Linux) ➖

Metric PR (P50) PR (P95) Baseline (P50) Delta Change
Server Startup 1ms 1ms 1ms 0ms 0%
Full Refresh 58ms 361ms 54ms 4ms 0%

Results based on 10 iterations. P50 = median, P95 = 95th percentile.


Legend
  • 🚀 Significant speedup (>100ms faster)
  • ✅ Faster than baseline
  • ➖ No significant change
  • 🔺 Slower than baseline (>100ms)
  • ⚠️ Significant slowdown (>500ms)

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Test Coverage Report (Linux)

Metric Value
Current Coverage 81.2%
Base Branch Coverage 80.6%
Delta .6% ✅

Coverage increased! Great work!

@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown

Performance Report (macOS)

Metric PR (P50) PR (P95) Baseline (P50) Delta
Server Startup 82ms 1038ms 66ms 16ms
Full Refresh 132ms 30255ms 142ms -10ms

Results based on 10 iterations. P50 = median, P95 = 95th percentile.


Legend
  • 🚀 Significant speedup (>100ms faster)
  • ✅ Faster than baseline
  • ➖ No significant change
  • 🔺 Slower than baseline (>100ms)
  • ⚠️ Significant slowdown (>500ms)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@karthiknadig
Karthik Nadig (karthiknadig) marked this pull request as ready for review August 10, 2026 19:10
@karthiknadig
Karthik Nadig (karthiknadig) merged commit 13542c1 into main Aug 10, 2026
34 checks passed
@karthiknadig
Karthik Nadig (karthiknadig) deleted the fix/issue-448 branch August 10, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

incorrectly saved pythonLocator setting on remote settings

3 participants