Skip to content

fix(id): recovery skips unreadable intent entries instead of aborting (#4125) - #4527

Merged
dezren39 merged 1 commit into
mainfrom
queue/6324-4125-intent-recovery
Nov 2, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/6324-4125-intent-recovery

Conversation

@dezren39

@dezren39 dezren39 commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Fixes #4125 (queue task 6324).

Problem

FileIntentStore::unresolved() aborted on the first entry it could not read or parse, and recovery::reconcile propagated that error before reconciling anything — one corrupt/foreign *.json file (or a subdirectory named *.json) froze recovery for every pending conversion, with no list of what was skipped.

Change

  • FileIntentStore::unresolved() now skips entries it cannot read or parse and never deletes them; only a failure to enumerate the store directory itself remains an error.
  • New trait surface: IntentStore::unreadable_entries() returns the entries the most recent listing skipped (path + reason, path order). The unresolved() trait contract documents the skip semantics so the in-memory store and future stores agree; the in-memory store never skips.
  • reconcile logs each skipped entry distinctly ([recovery] skipping unreadable intent entry …) and reconciles everything readable.
  • Tests: corrupt sibling file ({not json) and a *.json subdirectory next to a valid Recorded intent — reconcile resubmits the valid record (3 legs), the bad entry is reported via unreadable_entries() and stays on disk.

Tests


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…#4125)

FileIntentStore::unresolved aborted on the first unreadable or unparseable *.json entry, so one corrupt or foreign file (or a *.json subdirectory) froze recovery for every pending conversion. The listing now skips such entries, never deletes them, and reports them via the new IntentStore::unreadable_entries (the trait contract documents the skip semantics); reconcile logs each skipped entry distinctly and reconciles everything readable. Tests cover a corrupt sibling file and a *.json subdirectory alongside a valid Recorded intent.
@dezren39
dezren39 requested a review from a team as a code owner November 2, 2026 18:31
@coderabbitai

coderabbitai Bot commented Nov 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next included review available in 45 minutes.

Check out review usage here.

View limit details

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

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: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ce16d58c-820c-4340-86f7-e5f4d6b9264f
Commits

Reviewing files that changed from the base of the PR and between c208824 and 2516bc0.

Files selected for processing: 3
  • pkgs/id/src/currency_poc/intent.rs
  • pkgs/id/src/currency_poc/recovery.rs
  • pkgs/id/src/currency_poc/tests.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 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-11-02T18:33:39.139422Z 2516bc0 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.

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.

id(currency_poc): one corrupt or foreign .json file in the FileIntentStore directory aborts recovery for every pending conversion

1 participant