fix: harden refresh generation guards#391
Merged
karthiknadig merged 1 commit intomainfrom Apr 5, 2026
Merged
Conversation
Performance Report (Linux) ➖
Legend
|
Test Coverage Report (Linux)
Coverage increased! Great work! |
Performance Report (macOS)
Legend
|
Performance Report (Windows) ➖
Legend
|
Test Coverage Report (Windows)
Coverage increased! Great work! |
There was a problem hiding this comment.
Pull request overview
This PR hardens refresh correctness in PET’s JSONRPC server by making refresh side effects (notifications, shared locator state sync, and missing-env follow-up work) generation-aware so stale work can’t leak across configure boundaries.
Changes:
- Added a generation-guarded
Reporterwrapper to atomically suppress stale refresh notifications after configuration generation advances. - Prevented stale refreshes from syncing refresh-state back into the long-lived shared locator graph.
- Reworked the missing-environment follow-up “one shot” into a generation-stamped reservation so newer generations can supersede stale reservations, and added regression unit tests.
Show a summary per file
| File | Description |
|---|---|
crates/pet/src/jsonrpc.rs |
Adds generation-aware guards for refresh notifications/state sync and replaces missing-env one-shot tracking with generation-stamped reservation + tests. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 0
bhavyaus
approved these changes
Apr 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This follow-up fixes the post-merge correctness gap left after #386.
Fixes #390