Skip to content

LSP repair packet: distinguish a refresh in flight from stale evidence in analysis_snapshot_stale #4427

Closed

Description

@EffortlessSteven

ripr.collectRepairPacket (and "ripr: Copy Top Repair Packet") returns not_actionable_or_incomplete with reason analysis_snapshot_stale whenever the latest analysis attempt is not Succeeded. That includes a refresh that is queued or running, about one second after a save that produced a fresh result. It also includes a refresh that ended failed, cancelled, stopped or superseded.

The guard is Backend::collect_repair_packet in crates/ripr/src/lsp/backend.rs. It calls AnalysisHealth::allows_current_repairs in crates/ripr/src/lsp/state.rs, which accepts only AnalysisAttemptState::Succeeded. It fails closed on purpose, and that stays.

The gap is the single reason. A client or agent cannot tell "retry shortly" (Queued/Running) apart from "refresh failed; check status or recover" (Failed/Cancelled/Stopped/Superseded).

Acceptance:

  • The sentinel reason, or an added field, distinguishes an in-flight refresh from a terminal non-success, and both still fail closed.
  • LSP tests assert each state's reason (there are existing analysis_snapshot_stale assertions in lsp/tests.rs).
  • The VS Code copy command surfaces the retry or recovery guidance.
  • Removing this issue's 0.11 release-notes non-claim and cut-checklist §0.6 row 31 in the release that carries it.

Origin: the 0.11 release-notes non-claim (swarm #4426; #2766 issuecomment-5871399528), reported by the LLM agent experience and VS Code walk threads on 2026-09-28. Target: 0.12.


Generated by Claude Code

Activity

  1. added 2 commits that reference this issue on Sep 28, 2026
  2. EffortlessSteven commented on Oct 2, 2026

    @EffortlessSteven
    MemberAuthor

    Re-verified 2026-10-02 against origin/main f04ec8d6f94d95b97fbd1348dcb7ac8cf4c5b8ce — still valid; no merged or open PR distinguishes the states.

    • The guard is unchanged: Backend::collect_repair_packet returns the single sentinel for every non-success attempt — crates/ripr/src/lsp/backend.rs:7311-7314 (if !health.allows_current_repairs() { return Some(repair_packet_sentinel("analysis_snapshot_stale")); }) — and allows_current_repairs still accepts only Succeeded: crates/ripr/src/lsp/state.rs:416-418 (matches!(self, Self::Succeeded)), wrapped by the health-level check at state.rs:569-571.
    • The in-flight/terminal vocabulary exists but is collapsed: AnalysisAttemptState distinguishes Queued/Running/Failed/Cancelled/Superseded/Stopped (state.rs:404-414), while the sentinel payload carries only status: "not_actionable_or_incomplete" plus the one reason (backend.rs:8000-8008), so a client cannot tell "retry shortly" from "recover".
    • LSP tests still assert the single reason (crates/ripr/src/lsp/tests.rs:15806, :16463); the VS Code extension has no analysis_snapshot_stale handling on main (grep over editors/vscode at this rev is empty), so no retry/recovery guidance is surfaced; and the 0.11 release-notes non-claim this issue must retire still stands — docs/releases/0.11.0-release-notes.md:251-252.
    • Merged-PR search on analysis_snapshot_stale returns only the 0.11 dead-end/non-claim work (fix(agent,lsp): close dead ends cold LLM agents hit in 0.11 (seam ids, dirty diffs, unrun tests, MCP, LSP nulls) #4418, fix(editor): 0.11 first-run walk fixes (trust start, multi-root, lightbulb actions, hover agreement) #4419, docs(0.11): LSP repair-packet non-claim (#3921); bless oracle_confirmation_mixed drill-in golden #4426); none changes the packet reason. Acceptance in the issue body is unchanged; target remains the release that carries the fix.
  3. EffortlessSteven commented on Oct 3, 2026

    @EffortlessSteven
    MemberAuthor

    Re-verified 2026-10-03 against origin/main 9cdc5fb0dd863677722286aad708a5c7b54f4d96 — classification: verified_current.

    The premise still holds; no merged or open PR distinguishes an in-flight refresh from a terminal non-success:

    First step to ready-to-claim: emit a distinct typed reason (or added field) for Queued/Running versus terminal non-success states at the existing sentinel sites (backend.rs:7421 and the workspace-root variant at :4165), add per-state LSP assertions next to tests.rs:15814/:16471, and mirror the retry/recovery guidance in the VS Code copy command; then retire the 0.11 non-claim and cut-checklist row 31 in the release that carries it (target 0.12).

  4. EffortlessSteven commented on Oct 31, 2026

    @EffortlessSteven
    MemberAuthor

    Claim: branch claude/fix-4427, PR to follow (draft). Premise re-verified on current main (guard now at backend.rs:10045, single reason still returned). Plan: keep reason analysis_snapshot_stale (fail-closed unchanged) and add refresh_state (in_flight / terminal / stale_snapshot), attempt_state and a recovery guidance string to that sentinel; per-state LSP tests; VS Code copy command shows the guidance. Release-note non-claim retirement is left to the release that carries it.


    Generated by Claude Code

  5. EffortlessSteven commented on Oct 31, 2026

    @EffortlessSteven
    MemberAuthor

    Addressed by #11766 (fa621a3): the analysis_snapshot_stale repair-packet sentinel now carries refresh_state (in_flight / terminal / no_snapshot / stale_snapshot), attempt_state and a recovery hint, still failing closed with the same reason and withheld packet; the VS Code copy command shows the hint. Left for the release that carries the fix, as this issue specifies: removing the 0.11 release-notes non-claim, cut-checklist row 31, and the lsp-stale-evidence-reason non-claim in policy/release-selection.json. Not changed: the workspace-root variant of the reason. Known cosmetic gap: a call in the instant between the debounce claim dropping and the attempt being queued can report stale_snapshot instead of in_flight. Leaving this issue open for the release-doc cleanup.


    Generated by Claude Code

  6. EffortlessSteven commented on Nov 1, 2026

    @EffortlessSteven
    MemberAuthor

    Cursor verify claim: checking whether #4427 is satisfied on main.

  7. EffortlessSteven commented on Nov 2, 2026

    @EffortlessSteven
    MemberAuthor

    Verify on origin/main 5ecc556be6 (+ PR #12297 for remaining docs)

    Verdict: behavior already landed (#11766 fa621a32); release-doc acceptance completed in PR #12297 (091e9aea). Do not close here per harness rules.

    Acceptance mapping

    1. Distinguish in-flight vs terminal, fail-closed — Backend::collect_repair_packet still withholds the packet and keeps reason analysis_snapshot_stale, but adds refresh_state, attempt_state, and recovery via AnalysisHealth::repair_block_guidance (crates/ripr/src/lsp/backend.rs:9910-9921, crates/ripr/src/lsp/state.rs:726-748). Delivered fa621a32 (feat(lsp): distinguish in-flight refresh from terminal non-success in repair packet (#4427) #11766).

    2. LSP tests per state — execute_command_collect_repair_packet_distinguishes_in_flight_from_terminal and related guidance tests assert reason + refresh_state + attempt_state + non-empty recovery for Queued/Running/Failed/Cancelled/Superseded/Stopped (crates/ripr/src/lsp/tests.rs:20755-20853). Delivered fa621a32 (feat(lsp): distinguish in-flight refresh from terminal non-success in repair packet (#4427) #11766).

    3. VS Code copy command guidance — copyTopRepairPacket shows the server recovery hint instead of the raw reason token (editors/vscode/src/client.ts:2633-2639). Delivered fa621a32 (feat(lsp): distinguish in-flight refresh from terminal non-success in repair packet (#4427) #11766).

    4. Retire 0.11 non-claim + cut-checklist row 31 + release-selection defer — removed release-notes bullet; cut-checklist row 31 → Landed/Removed/Done; lsp-stale-evidence-reason → landed_and_accepted with pr:11766 (docs/releases/0.11.0-release-notes.md, docs/releases/0.11.0-cut-checklist.md:232, policy/release-selection.json). PR docs(release): retire #4427 LSP repair-packet non-claims (Closes #4427) #12297 (091e9aea).

    Proof (this PR)

    • cargo xtask precommit: exit 0 on 091e9aea.
  8. added 3 commits that reference this issue on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions