fix(review): preserve revision state after definite save rejection - #2510
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The connector usage-limit notice is informational, not a review finding. This PR is being checked through the independent coordinator review path; no code action is requested from this notice. |
|
Review gate (Codex credits exhausted, SC-9): one fresh-context reviewer. Verdict: FIX-FIRST — parked for the branch owner; the stacked PR #2516 parks with it. HIGH — a 409 (or 404) from Failure scenario: sessions A and B both hold proposal P at revision 1; B saves revision 2; A saves → 409. A keeps Suggested fix shape: classify only statuses that imply "server state unchanged" (400/401/403/413/422/429) as MEDIUM — the doc comment at Clean: the ambiguous path is byte-identical; focus after rejection is session-scoped per #2423; 401 and 429 handling is sound. |
Chris0Jeky
left a comment
There was a problem hiding this comment.
Post-fix adversarial pass at head 9123a4c: SHIP. The 4xx classification is now an explicit allowlist (400/401/403/413/422/429); 404, 409, and 500 take the uncertainty path, invalidate metadata, notify the review refresh barrier, and retain the retryable draft. Added regression coverage for 404/409/500 plus a PaperReview 409 barrier case. Local proof: vitest composable + PaperReview 181/181, npm run typecheck, npx eslint on touched files, git diff --check. No new CRITICAL/HIGH findings.
Summary
Closes #2455
Verification
npm ci --no-audit --no-fundnpm test -- --maxWorkers=2 src/tests/composables/useProposalRevisions.spec.ts src/tests/views/paper/review/PaperReviewView.spec.ts— 177 passednpm run typechecknpx eslint src/composables/useProposalRevisions.ts src/views/paper/PaperReviewView.vue src/tests/composables/useProposalRevisions.spec.ts src/tests/views/paper/review/PaperReviewView.spec.ts --max-warnings=0git diff --checkReview notes
onRevisionStateUncertainor schedule the revision refresh barrier