fix(platform): preserve phase4 runtime invariants#14
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 51b52fad2f
ℹ️ 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".
| job.reviews.push(review); | ||
| if req.decision == GenerationReviewDecision::Rejected { | ||
| reject_lifecycle( |
There was a problem hiding this comment.
Reject lifecycle before mutating review state
When decision == Rejected, this method appends to job.reviews before calling reject_lifecycle. If reject_lifecycle returns an error (for example, the linked transaction is no longer in a rejectable state), mutate_job exits early with that error but does not roll back prior in-place mutations, so the job keeps the new review entry even though the API call failed. This creates inconsistent state and can cause duplicate/contradictory review history on retries.
Useful? React with 👍 / 👎.
Summary
This PR fixes Phase 4 runtime invariant gaps found after PR #13.
Fixes
04-backend/openapitools.jsonis removed.Validation