fix: preserve verdict state and skip cancelled preview gates - #1139
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Oddish previewCommit:
Vercel deployment URL: https://oddish-cl833trc7.oddish.app Plan:
This comment is updated by the PR Preview workflow. |
This was referenced Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
oddish.core.verdict_statetransition moduleVerdict root cause
tasks.verdictrepresents the last published result, whileverdict_statusalso tracks an in-flight replacement pass. Callers were mutating those columns independently. In particular,clear_inflight_verdictonly preserved a result when the status was alreadySUCCESS; after a replacement moved the status toQUEUEDorRUNNING, append/retry reconciliation could clear the status while leaving the payload behind.The new state module makes the published-result and replacement-attempt contract explicit and is now the only runtime writer for the task verdict columns.
Preview gate
This incorporates the substantive commit from #1079 with its original author attribution. The
Require working previewjob now uses!cancelled()instead ofalways(): it still runs when fork or promotion dependencies are skipped, but a run superseded bycancel-in-progressno longer reports a false failing required check while its replacement is building.Migration
verdict_state_001addsck_tasks_published_verdict_statusasNOT VALID, repairs historical rows, then validates it:SUCCESSFAILEDdiscards the stale payloadnullare treated as unpublishedValidation
Note
Medium Risk
Changes core task QA verdict semantics and many enqueue/cancel/retry paths plus a new DB constraint; behavior is well covered by tests but mistakes could affect dashboard verdict visibility and merge gates.
Overview
Introduces
oddish.core.verdict_stateas the sole writer fortasks.verdict*columns. Replacement QA now usesqueue_verdict/start_verdictso the last published payload stays visible while status isQUEUED/RUNNING; abandon, cancel, and no-op paths restoreSUCCESSon that payload instead of clearing it. Terminal QA failure remains the only path that drops a superseded result (fail_verdict). Call sites across QA backfill/rerun, trial retry, append reconciliation, quota cancellation, queue advancement, cleanup, and QA handlers stop calling ad-hoc clears (clear_inflight_verdict, full_reset_task_verdicton backfill).Adds migration
verdict_state_001and model checkck_tasks_published_verdict_status: a non-nullverdictmust not pair with missing orFAILEDstatus, with a data repair pass before validation.PR preview workflow:
require-working-previewuses!cancelled()instead ofalways()so supersededcancel-in-progressruns do not publish a failing check for a commit whose newer run is still building.Reviewed by Cursor Bugbot for commit 3e2dea0. Bugbot is set up for automated code reviews on this repo. Configure here.