Skip to content

Clear a resolved result-lookup error when a terminal review result reconciles #1239

Description

@jeremi

An automated review of #1189 flagged a stale error code on reconciled reviews. A failed result lookup in crates/registry-breg/src/review_store.rs records last_error_code='result-lookup-uncertain' on the submission, but reconcile_result commits the terminal result without clearing it: the sibling cancellation and claim paths do clear the column, that one does not. The projection then maps any non-null last_error_code to recovery: {state: operatorAttention, code}.

Failure scenario: one result poll fails and a later poll returns the available result. The review completes correctly, yet the projection reports operatorAttention next to its valid terminal result indefinitely for a manual review, and until some other application error overwrites the code for an automatic one. Operators are told to act on a review that is already settled.

Suggested fix:

  • Clear last_error_code in the same transaction that reconciles a terminal result.
  • Add a Postgres test that fails one poll, succeeds on the next, and asserts the projection reports recovery.state: none.

Filed from the review of #1189; not merge-blocking.

Activity

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