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.
An automated review of #1189 flagged a stale error code on reconciled reviews. A failed result lookup in
crates/registry-breg/src/review_store.rsrecordslast_error_code='result-lookup-uncertain'on the submission, butreconcile_resultcommits 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-nulllast_error_codetorecovery: {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
operatorAttentionnext 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:
last_error_codein the same transaction that reconciles a terminal result.recovery.state: none.Filed from the review of #1189; not merge-blocking.