Repository navigation
Report which hosted patch pins changed - #2307
Martin Torp (mtorp) wants to merge 3 commits into
Conversation
Compare local pin records before and after the hosted rewrite so JSON consumers can tell which patch changed in a shared lockfile. Report an unknown result when the available records cannot establish the change. Assisted-by: Codex:GPT-6
Keep the two variants of FinalDiscovery so existing Rust callers can still match on both. Give the CLI a separate way to read pins found on servers named by a grant. Keep the public discovery field empty when the grant adds a server. Assisted-by: Codex:GPT-6
Reuse the existing check for whether the pin check's discovery matches the written disk, which also skips the report after a vlt store heal. Set pinChanged where the confirmed events are built, check that scan's discovery is still current once per run, and skip collecting created paths when no report will read them. Assisted-by: Claude Code:claude-opus-5-5
PR SummaryMedium Risk Overview The CLI adds a CLI_CONTRACT and integration tests (including shared npm lockfiles: second pin, idempotent re-run, integrity repair) document and assert the new field. Reviewed by Cursor Bugbot for commit 19870c4. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 19870c4. Configure here.
| .push(pin); | ||
| } | ||
| pins | ||
| } |
There was a problem hiding this comment.
Shadowed pins skip change detection
Medium Severity
refs_by_patch only reads discovery.refs, but confirmation treats discovery.shadowed as attributed hosted pins as well. A confirmed pin withheld from refs because an unpatched copy sits beside it never appears in the before/after maps, so pinChanged is null instead of true or false even though the lock records are available.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 19870c4. Configure here.
| Written::Landed { created: &created }, | ||
| vlt_stale.healed_store.as_ref(), | ||
| ); | ||
| pin_changes::compare(before_pins.as_deref(), after, &confirmed) |
There was a problem hiding this comment.
After-snapshot filters drop pin results
Medium Severity
The JSON path reuses discovery_after_writes with Written::Landed and the vlt-heal store, and it has no fresh-discovery fallback. When that helper discards the overlay (a vlt heal ran, or a newly created file is not an invisible config), after is None and every confirmed event gets pinChanged: null, including dry runs that should report the planned change.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 19870c4. Configure here.


Hosted scans report an applied event for every confirmed patch, including a patch that was already in place. When two packages share a lockfile, the file list alone cannot tell a caller which pin changed.
Hosted
scanandgetnow includedetails.pinChangedon each confirmed patch's JSON event. The CLI compares local dependency records for the package and patch UUID. It reportstruefor a new or updated pin,falsefor an unchanged pin, andnullwhen the records cannot establish the result. A dry run reports the planned change. This adds no network requests.The scan integration suite covers adding a second patch to a shared npm lockfile, previewing that change, rerunning with both pins already in place, and repairing one pin's integrity without changing its UUID.