Repository navigation
fix: publish coherent request snapshots (Fixes #536) - #566
Karthik Nadig (karthiknadig) wants to merge 2 commits into
Conversation
Build configured locator graphs off-lock and atomically publish request state. Preserve compatible caches and rebind nested Conda dependencies. Keep callback panics from poisoning publication gates, and prove snapshot, cache, and generation boundaries with deterministic tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Performance Report (Linux)Result: ✅ Within regression budgets
|
Test Coverage Report (Linux)Result: ✅ Within regression budget
|
Performance Report (macOS)Result: ✅ Within regression budgets
|
Performance Report (Windows)Result: ✅ Within regression budgets
|
Test Coverage Report (Windows)Result: ✅ Within regression budget
|
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The broad concurrency and cache-ownership changes require final human review and the pending hosted performance evidence noted in the description.
Review effort: Balanced
Findings: None
What changed in this PR
Introduces coherent configuration snapshots for find, resolve, refresh, and telemetry while preparing locator graphs outside publication locks.
Changes:
- Atomically publishes configuration, generation, and locator graphs.
- Preserves/rebinds locator caches and dependencies across configuration changes.
- Adds concurrency, panic, cache, and rebinding regression coverage and documentation.
| File | Description |
|---|---|
docs/LOCATOR_STATE.md |
Documents snapshot, locator, and cache lifetimes. |
crates/pet/src/jsonrpc.rs |
Implements coherent request snapshots and atomic publication. |
crates/pet-windows-registry/src/lib.rs |
Rebinds cached registry state to replacement Conda locators. |
crates/pet-python-utils/src/cache.rs |
Atomically retains and returns the effective cache directory. |
crates/pet-pyenv/src/lib.rs |
Rebinds PyEnv while preserving shared discovery caches. |
crates/pet-poetry/src/lib.rs |
Tests cache fidelity under identical configuration. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Seed the cache with production-normalized identities and assert an explicit Windows executable case alias. Preserve the missing-manager/project setup so fidelity still depends on cached metadata. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Published signed follow-up a7d7af8 after an independent clean review. The Windows CI failures shared one new test-fixture bug: the fixture seeded raw temporary-path aliases into Poetry's cache while real request identities are normalized. I reproduced the old failure locally with one exactly selected test under a case-aliased temporary directory; the repair uses the production identity constructor for the seeded cache and explicitly checks a Windows executable case alias. Only test code changed. The exact default-environment test, all 42 Poetry tests, exact workspace Clippy, and mandatory precommit pass. The worker could not execute the temporary-directory override, so native Windows CI remains the decisive confirmation; I am not claiming that specific local variant passed. All three hosted performance jobs on the unchanged production revision 74c93c9 passed (discovery P50: Linux 57ms vs48, Windows155 vs162, macOS137 vs146). Those ordinary-inventory checks do not resolve the separate local 100-environment timing anomaly. This PR remains draft with the explicit performance hold; no threshold changes or rerun-to-green attempts. |
|
Final-head quality inspection for a7d7af8: all automated checks now pass, including Windows x64/ARM64 and both native macOS test jobs. The current-head Copilot review has no findings, and there are no unresolved review threads. All three CodeQL analyses report zero results, warnings, or errors. Coverage increased by +0.703pp on Linux, +1.061pp on Windows, and +1.037pp on native macOS. Ordinary matched-inventory discovery P50 is 48/48ms on Linux, 104/162ms on Windows, and 166/146ms on macOS (head/base); the macOS +20ms/+13.7% is within unchanged budgets. The separate performance hold remains: the retained eight-pass local session experiment showed +146.46% at fast 100-environment warm refresh, with very large variation between the two head runs. Passing ordinary small-inventory CI does not resolve that result. Keep this draft until isolated, workload-matched evidence resolves or bounds it; no measurements were discarded and no budgets were changed. |
Give find, resolve, and refresh coherent configuration/generation/locator snapshots while preparing replacement graphs outside the published-state lock.
Validation: full PET package (123 tests), affected locator/cache suites, exact all-target/all-feature Clippy, mandatory precommit, independent source review, and signed commit 74c93c9.
Performance hold: all eight counterbalanced Windows fast/stress passes preserved inventory, response ownership, cache probes 1/0/0, and resource bounds. Stress 1000-environment median was 8.29s base / 7.56s head, but fast 100-environment timing was 431ms / 1061ms with substantial within-head variation on a busy shared host. All measurements are retained; this is not a no-regression claim. Keep draft pending hosted quality and further isolated performance evidence.
Fixes #536