docs: formalize locator refresh state contract#415
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 formalizes and documents PET’s “refresh-state” contract for transient locator graphs, clarifying which locator state is expected to persist across refresh boundaries and adding a regression test to prevent accidental drift in those classifications.
Changes:
- Add a dedicated document describing
Locator::refresh_state()classifications and an inventory of current locator mutable state. - Link the new locator-state documentation from the project README.
- Add a unit test that pins
create_locators()locator ordering +RefreshStatePersistenceclassifications per platform.
Show a summary per file
| File | Description |
|---|---|
| README.md | Adds a pointer to the new locator refresh-state contract documentation. |
| docs/LOCATOR_STATE.md | Introduces the refresh-state contract and inventories locator state/classifications. |
| crates/pet/src/jsonrpc.rs | Adds a regression test asserting each created locator’s refresh_state() classification (platform-aware). |
| crates/pet-core/src/lib.rs | Expands inline documentation for RefreshStatePersistence and the Locator::refresh_state() contract. |
Copilot's findings
- Files reviewed: 4/4 changed files
- Comments generated: 1
There was a problem hiding this comment.
Pull request overview
This PR formalizes and documents the “refresh-state” contract for locators when refresh executes against a transient locator graph, ensuring it’s explicit which locator state is allowed/required to survive refresh boundaries.
Changes:
- Add
docs/LOCATOR_STATE.mddocumenting refresh-state classifications and an inventory of locator mutable state. - Link the new locator-state documentation from the root README.
- Add a regression test that asserts
create_locators()returns locators with explicitRefreshStatePersistenceclassifications per platform; clarify the contract inpet-coredocs.
Show a summary per file
| File | Description |
|---|---|
| README.md | Adds a pointer to the new locator refresh-state contract documentation; minor formatting cleanup. |
| docs/LOCATOR_STATE.md | New doc describing refresh-state classifications and current locator state inventory. |
| crates/pet/src/jsonrpc.rs | Adds a unit test pinning locator kinds to RefreshStatePersistence for the create_locators() graph. |
| crates/pet-core/src/lib.rs | Expands rustdoc for RefreshStatePersistence and Locator::refresh_state() to codify the contract. |
Copilot's findings
- Files reviewed: 4/4 changed files
- Comments generated: 0 new
Summary:
Validation:
Fixes #387