Skip to content

Post-merge verification loop: delayed re-check, auto-reopen on regression - #494

Merged
currentbits merged 7 commits into
mainfrom
coder/post-merge-verification-loop-delayed-re--a7e398
Aug 18, 2026
Merged

currentbits merged 7 commits into
mainfrom
coder/post-merge-verification-loop-delayed-re--a7e398

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Closes #420.

Merged is not worked. After a thread's PR flips to MERGED, Solenta now schedules a delayed mechanical re-check of that thread's verify command against the merged default branch, and reopens the planboard issue (or starts a fix thread) if it regressed.

Why

The pre-merge gate (#296) only proves the worktree at turn time. Downstream landings and flaky suites can still break main hours later. This is the PostHog-style eval: re-run the tests after merge, not on the agent's word.

What changed

  • Persist issueNumber when a thread is started from the planboard (also parsed from the first GitHub issue #N: prompt).
  • On prState → MERGED, if the thread has a verifyCommand, arm a one-shot postMergeVerify (default 24h; CODER_POSTMERGE_DELAY_MS for tests). Not a user-visible Automation — those mint agent turns on a cadence.
  • When due: fetch, check out the merged default branch in a temp worktree, re-run the verify command.
  • Pass → store evidence. Fail → gh issue reopen + comment + plan:todo, and spawn a Regression: fix thread with the Verification loop: agents must prove their work before a thread goes green #296 failure bundle (same verify command, worktree pending).
  • Verification card shows scheduled / passed / failed.

Uses the existing automations scheduler pattern, the #296 verify engine, and the PR-state refresh hook. A crash mid-check heals back to scheduled-due.

Tests

  • Schedule / due / pass / fail / skip, plus a real detached checkout

  • reopenIssue (reopen + comment + plan:todo; already-open is success)

  • PR refresh: OPEN → MERGED with a verify command arms the check

  • Verification card copy for the delayed status

  • PR created by the Grok agent

Willem and others added 6 commits August 18, 2026 11:28
… Drag-and-drop images and folders onto the thread, like the C
… Subagent model pool: described candidates, the lead picks pe
… Thread breadcrumb: click the project slug to start a new thr
… Linux: prove it works — no CI leg, never tested
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Resolve three conflicts: keep the #420 postmerge store helpers, and take
main's slash-command palette wiring in Composer and ThreadView.
@currentbits
currentbits merged commit 363a45f into main Aug 18, 2026
2 of 6 checks passed
@currentbits
currentbits deleted the coder/post-merge-verification-loop-delayed-re--a7e398 branch October 3, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Post-merge verification loop: delayed re-check, auto-reopen on regression

1 participant