You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(lsp): a branch checkout or a regenerated gap ledger does not refresh editor diagnostics #4896
ripr lsp publishes gap diagnostics from <root>/target/ripr/reports/gap-decision-ledger.json (lsp/diagnostics.rsload_gap_ledger_records) and from the analysis diff against the current checkout. It asks the client to watch only configuration and workspace-graph inputs (lsp/backend.rsworkspace_input_watchers: ripr.toml, Cargo.toml, Cargo.lock and the Python markers). The VS Code client's static synchronize.fileEvents watches only **/{Cargo.toml,ripr.toml}.
As a result, nothing triggers a refresh in two common cases:
git checkout / git switch with no open buffer changing. The diagnostics published for the old branch stay in the Problems panel until the user edits, saves or opens a file.
ripr check, ripr reports gap-ledger or ripr pilot run in a terminal rewriting the ledger. The editor keeps projecting the previous ledger. New gaps don't appear and fixed gaps don't clear until an unrelated edit.
#4709 (#4544) made a refresh withhold gaps whose named files changed. This issue is about the missing trigger for that refresh.
Direction
Watch the root gap ledger (target/ripr/reports/gap-decision-ledger.json) and the root .git/HEAD, root-scoped like the existing Python watchers.
Classify those events as a diagnostics input, not a workspace-graph or config change. They schedule one ordinary interactive refresh, and repeated events coalesce through the existing scheduler.
Leave the VS Code static watcher alone if dynamic registration already covers it, or add the two paths there.
Found in the 0.11 shared-state hunt (CLI run alongside ripr lsp).
Root gap-decision-ledger rewrite or root .git/HEAD move triggers exactly one WatchedInput refresh that resolves fresh and bypasses input-identity dedup: lsp:: suite passes on the merged tree — cargo test -p ripr --lib -- lsp:: = 801 passed / 0 failed (includes the watched-input, RelativePattern registration, and re-anchor tests in backend.rs / client_features.rs / refresh_scheduler.rs / lsp/tests.rs).
Local gates on 9af7213: cargo fmt --check, clippy --workspace --all-targets -D warnings, goldens check — all pass. Hosted 'Ripr Rust Small Result' green (run 36848810538; hosted Rust gates 39m11s; Rust-only feature lane pass).
Advisory notes (not on required path; required = Ripr Rust Small Result per branch protection): rust-coverage lane red on 9af7213, codecov/patch red, droid-review timed out after 24h queued — left for the owning lanes.
Activity
fix(lsp): re-anchor diagnostics-input watchers on root transitions (#…
fix(lsp): refresh diagnostics when the gap ledger or checked-out bran…
EffortlessSteven commentedon Oct 1, 2026
Landed via #4904 (squash merge a96d87e; sync of candidate 38c2c7b with origin/main 1eb54ee as merge head 9af7213).
Acceptance evidence on merge head 9af7213:
cargo test -p ripr --lib -- lsp::= 801 passed / 0 failed (includes the watched-input, RelativePattern registration, and re-anchor tests in backend.rs / client_features.rs / refresh_scheduler.rs / lsp/tests.rs).Issue closed by the PR's closing reference.