You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BUG: Git delivery: a hand merge after checks is failed rather than adopted by the apply job (Codex F5) #448
DoneWork merged into the integration branch; the comment gives the pull request, the merge and the proofbugSomething isn't workingsev:highIf a condition occurs, a person can get money, data or accessstatus:openNo fix yet
Part of #286. Found by Codex (another model family) reviewing the Git delivery layer on main b8ee59e (PRs #288, #299), 2026-11-19. Severity per Codex: High.
Location:cmapi/src/cmapi/jobs/apply.py:65–:80; _stop at :48; lifecycle table core/lifecycle.py:80.
Checks pass and queue apply. A person merges the PR and deletes its branch before apply runs. Main's apply job treats branch absence as head movement, transitions to failed and schedules cleanup rather than recording the merge and continuing delivery. Keeping the branch also fails the base comparison after main already contains the plan. A retry of sync_failed after a partial apply needs the same adoption path.
Full fix: inspect PR state before branch checks, and inspect again on branch/base-check failures; adopt merged PRs through the common post-merge verifier. Allow SYNC_FAILED -> MERGED for adoption during retry, retaining the lock. Appendix C: jobs/apply.py, core/lifecycle.py, lifecycle test update.
Tests:test_hand_merge_between_checks_and_apply_is_adopted[pr_open] and [sync_failed]: 2 fail main; 2 pass fixed. The fixed tests verify merge_sha and exactly the watch_sync/cleanup continuation, without a new merge or cluster write.
Evidence:workbench/cmapi/review-288b/codex-report.md (F5) and its regression test in codex-fixes.patch; Codex ran it failing on main and passing with its fix. Reviewer 2 (OB3) checks the fix and runs the PostgreSQL and SSH checks the sandbox could not, before it is applied.
DoneWork merged into the integration branch; the comment gives the pull request, the merge and the proofbugSomething isn't workingsev:highIf a condition occurs, a person can get money, data or accessstatus:openNo fix yet
Activity
Review tests into tests/service, where CI collects them; a guard test…