Retry malformed file notes - #78
Conversation
- Retry only files with invalid notes - Preserve valid notes across attempts - Cover retry limits and restart recovery
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 652e7c6d06
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| outcome = { | ||
| files: {}, | ||
| failedFiles: pendingPaths.map((path) => ({ path, reason })), | ||
| errors: [], |
There was a problem hiding this comment.
Avoid retrying provider execution failures
When requestBatch rejects because the provider exits or cannot be spawned, this catch converts the exception into per-path validation failures, so retryableFailures launches the failing provider two more times. This violates the presenter’s existing recovery policy: tests/presenter-recovery.test.mjs expects a failed provider job to become recoverable after one attempt, but node --test --test-name-pattern='leaves a failed agent job' tests/presenter-recovery.test.mjs now times out (and the provider receives three file-note calls). Restrict the retry loop to failures returned by normalizeFileResponse, while recording request/process exceptions immediately.
AGENTS.md reference: AGENTS.md:L3-L4
Useful? React with 👍 / 👎.
- Preserve completed batches after provider failures - Verify failed files are requested only once
- Track prior presenter calls before simulating recovery - Assert completed and queued files by observed order
Summary
Testing
pnpm run lintpnpm test