Skip to content

ci: a merge that waits ends the resolver green, not red (ADR-1128) - #964

Merged
cdeust merged 3 commits into
mainfrom
ci/held-merge-is-not-a-failure
Nov 10, 2026
Merged

cdeust merged 3 commits into
mainfrom
ci/held-merge-is-not-a-failure

Conversation

@cdeust

@cdeust cdeust commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Summary

A resolver run that only waits ends green with a notice instead of red (ADR-1128, amends ADR-1127).

Since ADR-1127 each pull request head wakes the resolver twice and the first wake-up is held (no verdict yet, or no Pipeline yet). It exited 1, so Pipeline after merge showed a failed run on main for every normal merge, and one more for every head a later push replaced: four in 30 minutes on ai-architect-mcp-spec on 2026-11-10, with nothing broken. The owner read them as the CI being in error.

  • main() of the resolver: a merge held: ... refusal or PR head advanced after testing prints ::notice title=Merge not made::<reason>, writes no output and exits 0.
  • close-issues requires needs.resolve.outputs.pr_number != ''; contract already requires run_tests == 'true'. No job runs after a waiting resolver.
  • Every other refusal still fails: wrong source run, red or missing required job, owner hold, closed or draft pull request, unconfirmed merge, API error.

Measured

pytest tests_py/scripts (without test_ci_mutation_scope.py, which fails in this environment on main too): 1946 passed, 15 skipped. New: tests_py/scripts/test_ci_held_merge_is_not_a_failure.py. ruff check, ruff format --check, scripts/check_craftsmanship.py: pass.


Generated by Claude Code

Each head wakes the resolver twice (ADR-1127) and the first wake-up is
held; it exited 1, so main showed a failed Pipeline after merge for every
normal merge (four in 30 minutes on ai-architect-mcp-spec, 2026-11-10). A
waiting resolver now exits 0 with a notice and writes no output, and
close-issues requires a pr_number, so no job runs after it. Every other
refusal still fails.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_018kyZYsWnKSjpX4oNV19PCF
Signed-off-by: Claude <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T07:08:22.199281Z fb8e59e New commits
🔒 Security Review ✅ Completed 2026-11-10T07:10:52.490029Z fb8e59e New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@claude

claude Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Claude finished @cdeust's task in 2m 55s —— View job


Reviewed PR #964

  • Gather context (diff, resolver, downstream job conditions)
  • Run the five review agents (quality, performance, tests, docs, security)
  • Verify findings and post the review

The review is posted: #964 (comment)

  • Blockers: none.
  • Notes (3):
    • The match is on the message text, so the same "head advanced" message in _confirm_pr_merge, after the merge, would end green. That case can't be reached today.
    • ADR-1127 doesn't say that ADR-1128 amends it.
    • No test runs main() through the real resolve().
  • I couldn't run pytest in this job because I don't have permission. The findings come from reading the code.

Verdict: approve

@claude

claude Bot commented Nov 10, 2026

Copy link
Copy Markdown

Review 1 of 3 — PR #964

No Blockers. The waiting refusals are the four fixed merge held: ... literals (pipeline-post-merge.yml:264,384,397,398) plus PR head advanced after testing (:206). They contain no interpolated data, so no API or PR text reaches the ::notice. Every merge held: refusal is raised before the merge PUT (:478). No output is written, so contract (run_tests == 'true', :705) and the whole test/tag chain stay skipped. The new pr_number != '' gate on close-issues is required: without it, int("") at :656 would turn every waiting run red again. The workflow condition and ci_pipeline_profiles.conditions() are held equal by check_runtime_contract, through test_ci_pipeline_routes.py:36, so the ADR's test citation is correct.

Notes, no action before merge

  • The waiting match is on the message, not the call site. _confirm_pr_merge (:493) also raises PR head advanced after testing through _pr_identity, after the PUT. That would end green with the merge commit untested. GitHub freezes a merged PR's head and the PUT is pinned to sha, so this is unreachable today. A MergeHeld(PostMergeError) raised only before the merge would close it for good.
  • ADR-1127's Status and Negative consequence still say a held wake-up "ends in failure". An "amended by ADR-1128" line would match how ADR-1097, ADR-1104 and ADR-1106 record their amendments.
  • run_main stubs resolve(), so no test sends a real refusal raised inside resolve() through main().

Five reviewers ran: quality, performance, tests, docs and security. Performance and security found nothing actionable. I could not run pytest in this job (no permission); the findings come from reading the code.

View job run

Verdict: approve

@claude

claude Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

PR #964 was updated after the trigger (dd62ec5 -> fb8e59e). Push again or mention Claude to run on the latest version.

@claude

claude Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Claude finished @cdeust's task in 2m 17s —— View job


Reviewed PR #964 (review 2 of 3)

  • Check the Blockers from review 1 (there were none)

  • Scope: commits after 6f27dca, which are dd62ec5 (merge of main) and fb8e59e (CHANGELOG conflict fix)

  • Run the five review agents (quality, performance, tests, docs, security)

  • Post the review: ci: a merge that waits ends the resolver green, not red (ADR-1128) #964 (comment)

  • Blockers: none.

  • Since review 1:

    • The merge left conflict markers in CHANGELOG.md, and fb8e59e removed them, keeping both entries.
    • The PR's own files are the same as at 6f27dca.
    • Main's changes to claude-review.yml don't affect the resolver.
  • Notes (3):

    • A PR that hits the review cap now waits without a red run to show it.
    • Two notes are still open from review 1: the "head advanced" message also matches after the merge, and ADR-1127 has no "amended by ADR-1128" line.
  • I read the code but did not run pytest in this job.

Verdict: approve

@claude

claude Bot commented Nov 10, 2026

Copy link
Copy Markdown

Review 2 of 3 — PR #964

Review 1 found no Blockers. Two commits came after 6f27dca: dd62ec5, which merges main, and fb8e59e, which fixes the CHANGELOG conflict. I reviewed only those two.

No Blockers.

  • The merge committed conflict markers, and the next commit removed them. dd62ec5 left <<<<<<</>>>>>>> in CHANGELOG.md. fb8e59e keeps both entries under [Unreleased] → ### Changed: ADR-1128 first, then main's ADR-1119 entry, with no duplicates. No conflict markers are left anywhere in the tree.
  • The PR's own files are the same as at 6f27dca. That covers pipeline-post-merge.yml, ci_pipeline_profiles.py, the new test, both ADR-1128 pages and wiki/manifest.json. ADR-1128 is still the only ADR with that number; main's ci: admit the Claude reviews of one pull request one at a time #963 adds no new one.
  • Main's claude-review.yml changes don't affect the resolver. Those changes are the budget job and the claude-review-<PR> concurrency group. The job is still named Claude review and the step PR Review, which is what _ran_the_review (pipeline-post-merge.yml:353-361) looks for. A queued review that gets replaced ends cancelled, so it can never supply a verdict (:359, :381, :392). test_ci_pipeline_routes.py:36 and check_runtime_contract still agree with the close-issues and contract conditions.

Notes, no action before merge

  • When ADR-1119's budget skips a fourth review, the resolver holds with merge held: no Claude review ran on this head (:384). With this PR that hold ends green with a notice, so a PR over the cap no longer shows a red run.
  • Open from review 1: _confirm_pr_merge (:493) raises the same PR head advanced after testing text after the merge PUT, and the message match (:537, :562) would turn it green. It can't happen today; a MergeHeld raised only before the merge would rule it out.
  • Open from review 1: ADR-1127's Status and Negative consequence still say a held wake-up "ends in failure", with no "amended by ADR-1128" line.

Five reviewers ran: quality, performance, tests, docs and security. Quality, performance and docs found nothing. I read the code but did not run pytest in this job.

View job run

Verdict: approve

@cdeust
cdeust merged commit 9c4eb98 into main Nov 10, 2026
18 checks passed
@cdeust
cdeust deleted the ci/held-merge-is-not-a-failure branch November 10, 2026 08:53
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.

2 participants