Skip to content

feat(dx-scoreboard): check editor save bursts and restart after termination - #11731

Merged
EffortlessSteven merged 2 commits into
mainfrom
claude/project-thread-7majj8
Oct 31, 2026
Merged

EffortlessSteven merged 2 commits into
mainfrom
claude/project-thread-7majj8

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Requested by Steven · project thread

Governing issue or accepted claim: #11586
Acceptance delta (one sentence): The DX scoreboard fails when a burst of editor saves does not settle or a restarted editor server cannot refresh the checkout a terminated one left behind.

What changed

  • measure_editor_resilience drives ripr lsp --stdio through two checks per corpus repo: four saves 100 ms apart must end in one succeeded refresh, and after the server is terminated mid-refresh a fresh server must refresh the same checkout to succeeded.
  • New row trust.editor_resilience_failures (count, target 0, no regression margin), emitted next to trust.self_contradictions.
  • A real-server test runs when RIPR_DX_EDITOR_BINARY names a binary (skipped otherwise, as xtask tests build none).

Limits

On the tiny fixture the analysis can finish before the 500 ms termination, so that check proves the restart path, not termination exactly mid-analysis. Nightly corpus repos analyse for seconds, which exercises it.


Generated by Claude Code

…ination (#11586)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmmYH8ds2iJRdXvpvLW
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@EffortlessSteven EffortlessSteven self-assigned this Oct 31, 2026

Copy link
Copy Markdown
Member Author

Review of record, head 0cf643145 amended to the pushed head (see PR head SHA)

Angles (inline pass by the owning session; no external provider review available):

  • Correctness: the burst wait reuses AttemptTracker, which already hands a superseded attempt over to its successor, so it ends on the last save's terminal state. The terminated-server check starts a second process on the same checkout and requires succeeded. Drop reaps both children, and RestoreFile restores the edited source.
  • Tests: real-server test passes with RIPR_DX_EDITOR_BINARY set (2 s on a fixture). cargo xtask precommit exits 0 (fmt, clippy -D warnings, static-language gate).
  • Contract: metric is count-valued, lower is better, target 0, no regression margin, matching trust.self_contradictions.
  • Finding, non-blocking: on the tiny fixture the refresh may finish before the 500 ms termination, so that case proves restart-after-termination rather than mid-analysis. Real corpus repos analyse for seconds. Noted in the PR body.

Blocking findings: none.


Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 39 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 150 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: b11785dc-fb2c-466b-b7b3-a4f3c8a8ffe9
Commits

Reviewing files that changed from the base of the PR and between 2287778 and 9f361c9.

Files selected for processing: 4
  • benchmarks/dx_scoreboard/scoreboards.toml
  • changelog.d/11586-lsp-resilience-scoreboard-row.md
  • xtask/src/reports/dx_scoreboard/measure.rs
  • xtask/src/reports/dx_scoreboard/measure/editor_refresh.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 31, 2026 15:02
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Copy link
Copy Markdown
Member Author

Review of record, head b53af14 (supersedes the earlier comment, which named a pre-amend SHA; the reviewed diff is the same four files at this head).

Angles, findings and resolutions are as stated above: no blocking findings, one non-blocking limit (tiny fixture may finish before the 500 ms termination). cargo xtask precommit exits 0 on this tree. Provider reviews (gemini, coderabbit) were quota-limited, so none exists.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

CI on b53af14: Ripr Rust Small on GitHub Hosted / Rust gates failed in check-rust-source-role-authority on crates/ripr/src/app/repair_attempt/mod.rs (the #[cfg(test)] literal from #11596). This PR does not touch that file and main carries the same literal, so the failure is not this PR's. The fix of record is #11734 (merge-ready). I'll merge main into this branch after #11734 lands and re-request qualification.


Generated by Claude Code

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decision

  • Needs reviewer attention before upstream: findings remain.

Confirmed findings

  • The burst check accepts the first save whose notification succeeds, then waits only for a terminal attempt; if a later save notification fails, the metric can remain zero despite not processing all four saves.

Verification questions

  • Confirm the crash scenario is not guaranteed to terminate a server mid-refresh: the code sleeps 500 ms after saving and unconditionally kills the server, even if its refresh already succeeded.
  • Confirm the real-server test is opt-in through RIPR_DX_EDITOR_BINARY and therefore the default test suite does not execute the new instrument.
  • Confirm the only added test is opt-in through RIPR_DX_EDITOR_BINARY and returns success when unset, so normal CI can pass without executing any resilience behavior.
  • Confirm the real-server test asserts only an empty failure list; it does not prove four saves settle on one succeeded attempt, that superseded attempts are handled, or that termination occurs during refresh.
  • Confirm the burst loop awaits each save_edit call before starting the next save, so the comment claiming each save lands while the previous refresh is in flight is not established by this code.
  • Confirm the burst check waits for one terminal did_save after all saves, but does not assert that intermediate attempts were superseded or that multiple attempts were actually created.

Evidence gaps

  • The seeded thread reports cargo xtask precommit and an opt-in real-server test passed on reviewed head b53af14, but the current cargo-test receipt is absent and no base-plus-new witness is shown.
  • Model proof intent was rejected by deterministic validation.
  • The restart path is explicitly covered only when the real-server environment variable is set; the unit test otherwise returns success without exercising the instrument.

Copy link
Copy Markdown
Member Author

Reply to the advisory review on b53af14.

  • "Metric can stay zero if a later save notification fails": not so. Each burst save_edit(...) ends in ?, so a failed write or notify returns Err from measure_editor_resilience, which measure.rs records as SampleOutcome::Failed (a failed row the gate sees), not a zero value.
  • Burst overlap: notify only writes to the server's stdin, so the four saves go out 100 ms apart without waiting for a refresh. Analysis on corpus repos takes seconds, so the later saves land while an earlier refresh is running. I measured this shape on the self workspace: 6 saves gave 3 attempts with 2 superseded.
  • Termination mid-refresh: the 500 ms sleep does not guarantee it on a fast fixture. Stated in the PR body; corpus repos analyse for seconds.
  • Opt-in test: true, by design (xtask tests build no binary). It ran green locally against a release binary, and the scoreboard run exercises the instrument per corpus repo.
  • Asserting superseded counts: a fair hardening but not required for the contract (settles on succeeded; restart works). Left as a follow-up; no push for it.

Not a merge blocker, so no code change. Waiting on #11734 for the unrelated role-authority failure.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Review of record, head 9f361c9 (4 files, +254; main merged).

  • Correctness. measure_editor_resilience adds one new metric row per corpus repo and degrades to NotMeasured when the range changes no Rust file and to Failed on a driver error, so a harness failure is never reported as a pass. The row is emitted before trust.self_contradictions and is registered in the entry's metric id list.
  • Tests. A real-server test runs only when RIPR_DX_EDITOR_BINARY is set (skipped otherwise, as documented); the metric registration is pinned by the scoreboard spec checks in CI.
  • Spec/contract. scoreboards.toml row: target 0, no regression margin, runner_dependent = false; changelog fragment present with the governing issue (dx-scoreboard: no memory row or gate for the long-lived ripr lsp --stdio server #11586).
  • Perf/security. Measurement only runs inside the nightly scoreboard xtask; spawns the locally built ripr lsp --stdio with the existing sanitized env.
  • Disclosed limit (in the PR body): on a tiny fixture the termination check proves restart, not mid-analysis kill.

No blocking findings. Threads: 0. Merge gate: exact-head Ripr Rust Small Result must be success.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven merged commit 0b1e02b into main Oct 31, 2026
58 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/project-thread-7majj8 branch October 31, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants