Skip to content

fix(post-processor): isolate updates to the queued run attempt - #1539

Open
Naveen Chatlapalli (1aifanatic) wants to merge 1 commit into
microsoft:mainfrom
1aifanatic:fix/1051-postprocessor-attempt-gate
Open

Naveen Chatlapalli (1aifanatic) wants to merge 1 commit into
microsoft:mainfrom
1aifanatic:fix/1051-postprocessor-attempt-gate

Conversation

@1aifanatic

Copy link
Copy Markdown

Fixes #1051.

Post-processing messages already carry a run ID, but the worker and ATIF handler previously updated the request by document ID alone. A stale message could therefore mark a retried attempt as post-processed or write its ATIF URL onto the new attempt.

The worker now claims and updates only the completed run._id named in the message. The ATIF handler reads turns and writes atifUrl under the same attempt filter. Stale messages are discarded before their handler runs; if a retry replaces the run during processing, the worker skips the completion stamp and report trigger.

Validation: 9 focused post-processor/ATIF tests passed; pnpm --filter telemetry build and pnpm --filter post-processor build passed; git diff --check passed. The repository's post-processor lint script could not run because eslint is not installed in this checkout.

This branch has not been deployed

No deployments
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.

Post-processor updates run by _id only, not gated on run._id (retry race)

1 participant