Skip to content

fix(lsp): never report another gap's attempt outcome as a gap's receipt status (#4541) - #4588

Merged
EffortlessSteven merged 7 commits into
mainfrom
claude/project-thread-2rk3d2-lsp-packet
Sep 29, 2026
Merged

EffortlessSteven merged 7 commits into
mainfrom
claude/project-thread-2rk3d2-lsp-packet

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Requested by Steven · project thread

Summary

Before: the LSP receipt status (ripr.collectReceiptStatus) looked up the top actionable gap's latest_attempt_outcome in swarm-attempt-ledger.json. When that gap had no recorded attempt, the lookup fell back to the ledger's first entry. The agent was then shown another gap's outcome, for example evidence_improved, as the status of this gap.

After: a named gap matches by canonical_gap_id only. A gap with no recorded attempt reports not_available. With no actionable gap, the ledger's latest entry is still reported as the workspace-level answer.

The repair-packet half of #4541 (a named gap must not receive the first packet in actionable-gaps.json) landed on main through #4543. This PR keeps an extended LSP test over that path. The test also covers a named gap that only the gap-decision ledger lists, because actionable-gaps.json is bounded by packet_limit.

Fixes #4541.

Swarm / Source Boundary

  • ordinary feature, analyzer, editor, docs, spec, fixture, badge, dependency, or repo-ops development for ripr-swarm

Source-of-truth Links

Proposal: n/a
Spec: n/a
ADR: n/a
Plan item: 0.11 shared-state hunt
Governing issue or accepted claim: #4541
Acceptance delta (one sentence): no LSP attempt outcome or repair packet for gap X is built from gap Y's entry.

Candidate Relationships

Candidate branch: claude/project-thread-2rk3d2-lsp-packet
Stack parent or prerequisite PR: none (the packet half landed through #4543)
Proposed replacement of PR: none

Scope

  • crates/ripr/src/lsp/backend.rs: read_latest_attempt_outcome loses its .or_else(|| attempts.first()) fallback for a named gap. Adds a unit test.
  • crates/ripr/src/lsp/tests.rs: extends the no-substitution packet test with the gap-decision-ledger route.
  • CHANGELOG.md: describes the receipt-status change.

Scope Classification

  • One production behavior

Non-goals:

Support-tier Impact

  • none

Policy Impact

  • none

Proof

cargo test -p ripr --lib -- lsp::backend::gap_record_context_tests lsp::tests::execute_command_collect_repair_packet lsp::tests::execute_command_collect_receipt_status
cargo xtask precommit   # exit 0
# negative: re-adding the .or_else(|| attempts.first()) fallback fails
#   latest_attempt_outcome_never_borrows_another_gaps_attempt

Hosted CI is green on d947a07: Rust gates, Rust-only feature lane, ub-review and cargo-deny.

Claim Boundary

Rollback

Revert the commit.

Spec-Test-Code Traceability

  • Tests: lsp::backend::gap_record_context_tests::latest_attempt_outcome_never_borrows_another_gaps_attempt, lsp::tests::execute_command_collect_repair_packet_never_substitutes_another_gaps_packet
  • Code: lsp/backend.rs

Static Language Check

  • Static output avoids killed, survived, untested, proven, and adequate.

Engineering Check

  • No new panic, unwrap, expect, todo, or unimplemented.
  • Public JSON/schema changes are documented. (None.)

Gates

  • cargo fmt --check
  • cargo xtask precommit

Review

Both Devin findings are addressed and resolved. CodeRabbit (rate limit), Gemini (quota) and droid-review reviews are missing, not clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_014WDSj54AyARNwy6oUuYXnx

…pt (#4541)

collect_repair_packet_from_actionable_gaps fell back to packets.first()
when the requested canonical_gap_id was absent, handing the client another
gap's edit surface, verify and receipt commands and skipping the ledger
fallback. read_latest_attempt_outcome likewise reported attempts.first()
for a gap with no attempt. A named gap now matches by id only: the packet
path falls through to the ledger and the "no repair packet for gap"
sentinel; the attempt outcome is not_available.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014WDSj54AyARNwy6oUuYXnx
@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!

@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 27 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 14e23dbf-857a-4aaa-bd68-e5579f41d4b5

📥 Commits

Reviewing files that changed from the base of the PR and between df1b435 and 4b2729e.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • crates/ripr/src/lsp/backend.rs
  • crates/ripr/src/lsp/tests.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-29T01:33:58.544676Z 4425d93 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@EffortlessSteven EffortlessSteven self-assigned this Sep 29, 2026

@devin-ai-integration devin-ai-integration 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.

Devin Review found 2 potential issues.

Devin Review

Comment thread crates/ripr/src/lsp/tests.rs Resolved
Comment thread CHANGELOG.md Resolved
actionable-gaps.json is bounded by packet_limit, so a named gap it does
not list resolves to its own ledger record. The test now asserts that
route returns that record's packet. The changelog states that receipt
status without an actionable gap still reports the latest attempt.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014WDSj54AyARNwy6oUuYXnx
…-2rk3d2-lsp-packet

# Conflicts:
#	CHANGELOG.md
…-2rk3d2-lsp-packet

# Conflicts:
#	CHANGELOG.md
#	crates/ripr/src/lsp/backend.rs
@EffortlessSteven EffortlessSteven changed the title fix(lsp): never answer a named gap with another gap's packet or attempt (#4541) fix(lsp): never report another gap's attempt outcome as a gap's receipt status (#4541) Sep 29, 2026

Copy link
Copy Markdown
Member Author

Scope update at d947a07. #4543 landed on main with the same repair-packet fix, so this PR now carries main's version of collect_repair_packet_from_actionable_gaps.

What remains here:

  • The attempt-outcome fix in read_latest_attempt_outcome. Main still falls back to attempts.first() for a named gap.
  • Its unit test, latest_attempt_outcome_never_borrows_another_gaps_attempt.
  • The end-to-end packet test, which now also covers the ledger lookup for a gap past packet_limit.

The CHANGELOG entry now describes only the receipt-status change.


Generated by Claude Code

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Exact-head review of d947a07, covering all three files in the diff.

  • Production (backend.rs, read_latest_attempt_outcome): the only behavior change is removing the first-entry fallback for a named gap. The unnamed-gap branch still takes attempts.first(), which execute_command_collect_receipt_status_with_attempt_ledger_returns_real_outcome pins. A named gap with no match returns None and renders not_available.
  • Oracle: latest_attempt_outcome_never_borrows_another_gaps_attempt writes a ledger whose only entry belongs to another gap and asserts None. Restoring the fallback fails the test. The packet test asserts the no-packet sentinel names the requested gap and carries no commands. It also asserts that a ledger-only gap gets its own packet and verify command, not the first actionable one.
  • Public claim: the CHANGELOG entry matches the narrowed scope. The packet half is already on main through #4543.
  • Remote: hosted CI is green on this head (Rust gates, Rust-only feature lane, ub-review, cargo-deny). The review threads are resolved.

No findings. CodeRabbit, Gemini and droid-review are still missing, which is not the same as clean.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven enabled auto-merge (squash) September 29, 2026 03:34
…-2rk3d2-lsp-packet

# Conflicts:
#	CHANGELOG.md

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Exact-head note for 5a4a39e, a merge of origin/main.

  • CHANGELOG is a union, and only this PR's receipt-status entry differs from main.
  • No code conflicts.
  • cargo check -p ripr exits 0.
  • The focused LSP tests (gap_record_context_tests, execute_command_collect_repair_packet, execute_command_collect_receipt_status) pass: 38 passed.

The earlier review's dimensions are unchanged. The CodeRabbit, Gemini and droid-review reviews are still missing, which is not the same as clean.


Generated by Claude Code

…-2rk3d2-lsp-packet

# Conflicts:
#	CHANGELOG.md
…-2rk3d2-lsp-packet

# Conflicts:
#	CHANGELOG.md
@EffortlessSteven
EffortlessSteven merged commit 3911480 into main Sep 29, 2026
22 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/project-thread-2rk3d2-lsp-packet branch September 29, 2026 06:36
EffortlessSteven pushed a commit that referenced this pull request Sep 29, 2026
… the stale-subject test)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014WDSj54AyARNwy6oUuYXnx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(lsp): repair packet and attempt outcome fall back to another gap's entry when the named gap is absent

2 participants