Repository navigation
fix(editor): surface a failed server start in VS Code and keep findings on file reopen - #8343
Conversation
…pinning on starting (#8342) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxXb3KRfWM32PA5EtQ854z
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 48 minutes. View limit details
Comment |
…nnot hide it (#8342) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxXb3KRfWM32PA5EtQ854z
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxXb3KRfWM32PA5EtQ854z
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxXb3KRfWM32PA5EtQ854z
…-only (#8348) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxXb3KRfWM32PA5EtQ854z
|
Local verification on head
Generated by Claude Code |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Verification questions
- Confirm source-route gap: adoption is gated to
extension == "rs"in state.rs and no other did_* route (did_change/did_save/did_close/did_open with new bytes) was inspected for the same stale-committed identity loss; the .rs claim in the changelog may be narrower than reality or the route may be incomplete. - Confirm editors/vscode/src/client.ts:741 — When the handshake throws, two notifications fire (warning with Show Output action and status bar serverUnavailable) on top of the extension's activation log line. Confirm with maintainers that this is the intended UX and consider demoting to a single warning to avoid double-toast.
- Confirm vscode extension surfaces the failed handshake but cannot fix it; the user still sees two toasts (warning + status popup if shown) and a non-rejecting activate, which is a UX regression vs. the previous generic toast unless the warning is intentionally fire-and-forget.
- Confirm augmented did_open_matching_disk_bytes_..._keeps_refresh only adds one quarantine-absence check; the new unit test carries the meaningful assertions, so the integration proof is thin but not absent.
- Confirm adoption can only lift NoAnalyzedSavedContent quarantine when the live buffer and saved bytes both equal the committed digest for the relative Rust path.
- Confirm pR claim truth: changelog.d/8342 asserts status -> serverUnavailable with reason + Restart Server next step + Show Output warning, and activation logs instead of rejecting. client.ts shows the catch writes
kind: 'serverUnavailable',nextStep: ...Restart Server..., calls warnWithOutput; extension.ts wraps startServerOnce in try/catch and appends to output rather than rethrowing. - Confirm only one pattern (.rs + saved_digest == committed_digest == buffer_digest) was scanned for adoption. A no-match in the sibling route scan is not proof that no other entry point loses the committed identity; a route probe across all did_* entry points is required to claim the fix is complete.
- Confirm vS Code handshake-failure test relies on a private (status) field via unknown cast; if RiprClientController exposes state differently the assertion fails for unrelated reasons.
- Confirm rust unit test covers .rs adoption only; non-.rs committed-snapshot adoption is gated to return false before path checks, so the guard is unverified.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
- extension.ts activate() try/catch only logs; no test asserts activation no longer rejects.
Parked follow-ups
- Parked: if any non-.rs file type later grows a producer-captured committed digest source, adopt_committed_identity's extension gate must be relaxed in lockstep; current diff intentionally defers that.
main's cli_smoke check_python_finding_* oracle still expected the wire token that #8275 removed from the bounded render; port the same alignment #8336 carries. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxXb3KRfWM32PA5EtQ854z
|
Generated by Claude Code |
|
Independent review (Sonnet 5.5 subagent) of exact head What holds up:
Findings:
For the author: please address 1 and 4 before merge. Hosted checks, including Generated by Claude Code |
|
Generated by Claude Code |
|
Generated by Claude Code |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxXb3KRfWM32PA5EtQ854z
|
After merging main (3dccaf7), Earlier on 6c182e1, Generated by Claude Code |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxXb3KRfWM32PA5EtQ854z
…os fixture (#8374 follow-up) #8374 runs the managed exporter from the checkout root with a root-relative --out, so the chaos fixture's confinement check rejected every received path. Join a relative path onto the fixture root before confining it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxXb3KRfWM32PA5EtQ854z
|
The Generated by Claude Code |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxXb3KRfWM32PA5EtQ854z
|
Head 445d7df: the Perl chaos tests now pass, and Generated by Claude Code |
…git discovery The temp root can resolve to a path inside the checkout; on a PR runner the shallow detached checkout has no default base, so first-pr failed before it could report the blocked state. Bound git discovery at the root's parent. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxXb3KRfWM32PA5EtQ854z
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxXb3KRfWM32PA5EtQ854z
|
Generated by Claude Code |
There was a problem hiding this comment.
Confirmed findings
- editors/vscode/src/extension.ts:346 — startOnce swallows pre-handshake resolveServer/createLanguageClient throws into output.appendLine only; while activation stops rejecting, a user facing 'no language server' gets no status-bar change and no Show Output warning. Consider promoting that catch to either warnWithOutput(...) or wrapping the whole startOnce body so client.start catches resolve/create failure too.
- crates/ripr/src/lsp/backend.rs:3031 — Lock-poison silently demotes to false: latest_analysis.lock().ok().and_then(...) returns None on poison and the adoption is skipped without propagation. Consistent with the rest of this file's existing poison handling, so not a new lifetime hazard, but worth noting the documents branch uses .is_some_and(...) and also silently no-ops on poison. No action required unless the rest of the file is hardened.
- crates/ripr/tests/chaos_interrupted_runs.rs:650 — temporary_path now joins a relative marker path onto fixture.root. The cache confinement check still rejects escapes, but a marker file owned by the test process is trusted as-is; ensure upstream caller (#8352) cannot let an attacker-controlled path string reach this function in any production code path.
- editors/vscode/src/extension.ts:349 — The activation swallow only logs to output. Throws from resolveServer/createLanguageClient in startOnce (outside client.start) become silent failures with no warnWithOutput. Either widen the try to wrap the whole startOnce body or add a warnWithOutput fallback; at minimum soften the changelog claim that 'the controller already surfaced the failure'.
Verification questions
- Confirm source-route claim (.rs only) is testable but not yet proven end-to-end by an integration test for a non-.rs clean open over matching bytes. Unit test gates the state layer; an integration probe would close the loop.
- Confirm adopt_committed_identity's return type
boolsays 'document now clean', but the implementation returnsstate.quarantine.is_none()after refresh_quarantine; buffer_authority_unknown or saved_digest mismatch returnsfalseearly without re-quarantining, so callers cannot distinguish 'adopted and lifted' from 'did nothing because mismatched'. - Confirm state unit test exercises both refuse paths (diverging saved digest, diverging buffer) and the accept path, but only on a single .rs extension; non-rs guard is asserted by
extension != 'rs'early-return which has no test coverage in this PR. - Confirm two non-LSP test repairs (chaos Perl relative --out; cli_smoke GIT_CEILING) are correct fixes for hosted-runner flakes independent of this PR's features but only proved locally by the author; if either regresses on main there is no in-PR witness beyond the author's local pass.
- Confirm try/catch in client.ts.start() only encloses createLanguageClient().start(); throws from resolveServer() or createLanguageClient() itself in startOnce() land in extension.ts and are swallowed to output.appendLine without a warning or status update.
Refuted
- A UniCase-style HashMap or
HashSet<String>collision around the newadopt_committed_identity(uri, committed_digest, input_identity)keys could allow unrelated files to be adopted under a stale committed digest.; refuted because:uriis alsp_types::Uriandcommitted_digestis a producer-captured hex digest fromrust_consumed_sources.digest. Thesaved_digest != committed_digest && buffer_digest != committed_digestguard means even a key collision cannot adopt mismatched bytes; path-extension guard and per-state field-level identity copy further block cross-document adoption. No globbing or wildcard key. - The adoption path could silently lift quarantine for a non-.rs file because state.rs only checks extension=='rs' in adopt_committed_identity, but a future refactor could drop the guard and no integration test would catch it because the unit test is the only guard.; refuted because: The unit test adopting_the_committed_digest_lifts_never_analyzed_quarantine_only_for_matching_bytes uses a .rs URI; the guard lives in state.rs and is reviewable. This is a source-route gap (low) rather than a red/green correctness hole.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxXb3KRfWM32PA5EtQ854z
|
Generated by Claude Code |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxXb3KRfWM32PA5EtQ854z
|
Merged main into the branch (490740d) to clear a conflict in
Generated by Claude Code |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Generated by Claude Code |
Requested by Steven · project thread
Closes #8342. Closes #8348.
Two editor friction fixes found by using the extension and LSP as a developer would. They share a branch because this session was limited to one.
1. VS Code, failed server start (#8342)
Before: if the resolved ripr binary died during the LSP handshake, the status bar stayed on "ripr: starting" forever and activation rejected with a generic toast.
After: the status becomes "server is not available" with the reason and a Restart Server next step, a warning with Show Output appears, and activation logs the failure instead of rejecting. The report happens before cleanup so a failed
stop()cannot hide it.Proof: new
show_output_actiontest fails without the fix and passes with it (witnessed); independent reviewer found no blockers.2. LSP, reopen (#8348)
Before: closing and reopening an unchanged Rust file (or opening a second changed file the last refresh already analyzed) replaced its finding with "paused: save a new file first".
After: a clean open adopts the analyzed identity the committed snapshot already holds for exactly those saved bytes, so the finding stays. A buffer or digest that differs still quarantines.
Proof: live driver repro (reopen published the marker before, nothing after);
did_open_matching_disk_bytes_with_stale_committed_snapshot_keeps_refreshgained a no-quarantine assertion that fails without the fix; newadopting_the_committed_digest...unit test;lsp::lib tests 1011 passed.Verification notes: VS Code host is not available here, so the TS suites ran under a local
vscodestub (command_menus_manifestfails on a stale local base only; main has #8296).cargo xtask precommitresult is recorded in a comment before themerge-ready/full-cilabels.🤖 Generated with Claude Code
https://claude.ai/code/session_01FxXb3KRfWM32PA5EtQ854z