Skip to content

Recover auto-review reads from corrupt index#134

Merged
shiny-code-bot merged 1 commit into
mainfrom
auto-review-index-fallback
Jun 18, 2026
Merged

Recover auto-review reads from corrupt index#134
shiny-code-bot merged 1 commit into
mainfrom
auto-review-index-fallback

Conversation

@shiny-code-bot

Copy link
Copy Markdown
Collaborator

Why

Part of #130. The indexed auto-review store should keep read paths durable: if the scoped runs.json index is corrupt or unreadable, users should still be able to see recoverable run history from scoped output sidecars and legacy runs. At the same time, mutation paths should not silently write through a corrupt index and risk discarding index-only state.

What

  • Split auto-review index loading into strict and recovering modes.
  • Use recovering mode for read/lookup paths (list_runs, load_run, finding detail, duplicate lookup).
  • Keep writes and lifecycle mutations on strict loading.
  • Preserve precedence as healthy scoped index > scoped sidecar > legacy, including corrupt-index fallback where scoped sidecars beat stale legacy records.
  • Add regression coverage for corrupt-index recovery from sidecars, legacy fallback, scoped-sidecar-over-legacy precedence, and strict write behavior.

Verification

  • cargo test -p codex-auto-review corrupt_index -- --nocapture
  • cargo test -p codex-auto-review
  • cargo fmt --all --check
  • git diff --check
  • Read-only agent review pass after the precedence repair reported no blocking findings.

@shiny-code-bot shiny-code-bot merged commit 18344eb into main Jun 18, 2026
6 checks passed
@shiny-code-bot shiny-code-bot deleted the auto-review-index-fallback branch June 18, 2026 16:48
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.

1 participant