Skip to content

fix(ci): repair the org-wide auto-merge workflow - #43

Merged
atrawog merged 5 commits into
mainfrom
feat/fix-auto-merge
Aug 20, 2026
Merged

atrawog merged 5 commits into
mainfrom
feat/fix-auto-merge

Conversation

@atrawog

@atrawog atrawog commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

fix(ci): repair the org-wide auto-merge workflow

The auto-merge workflow (byte-identical across all opencharly repos) had
never succeeded once. Eleven defects in total — four fatal in the original
workflow, then five exposed by the live runs of the first fix, then two more
exposed by the canary's live runs of the second.

The four original defects

  1. No actions/checkout — the workflow_run trigger checks out nothing, but
    gh pr merge runs git status against a local repo → every merge died with
    failed to run git: fatal: not a git repository (observed live, run 3235221669).
  2. Tag from a future SHA — git log -1 "$MS" on the merge commit SHA the clone
    does not have → empty version → tag POST 422.
  3. No wait for pending checks — an in_progress check aborted the run instead
    of waiting.
  4. No CHANGELOG placeholder finalization — the changelog filename/H1 and the
    release tag could disagree.

The five live-exposed defects

The first fix was live-proven on the canary repo (2026.232.1246) — every gate
passed — but the live runs then exposed five more defects that the stub-gh
harness could not see:

  1. The revalidation race. The CHANGELOG-finalization push creates a NEW head,
    and the revalidation ran immediately after the push — before the validator had
    created its check-run on the new head. wait_all_settled() saw ZERO check-runs
    (indistinguishable from "all completed") and verify_all_green() saw empty →
    green, so the merge proceeded and failed branch protection with GraphQL: Pull Request is not mergeable (mergePullRequest). (Observed live in run 32371493249:
    the log shows revalidation: all status checks have completed 0.7s after the
    push, then the merge failure.)
  2. The action_required validator run. A finalization push made with
    GITHUB_TOKEN does not dispatch jobs — the validator run it triggers ends
    action_required with 0 jobs and no check-run. The auto-merge could not re-run
    it (no actions: write permission), so the new head could never get a green
    validator check-run.
  3. The re-finalization loop. Re-running the auto-merge re-finalized the
    changelog to a NEW stamp each time (2026.232.1256 → 2026.232.1304), creating a
    new head each time, and the cycle repeated.
  4. The merge_commit_sha tag field. The already-closed and post-merge paths
    read the merge commit from .merge_commit.sha, but GitHub's REST
    GET /pulls/{n} exposes it as the FLAT merge_commit_sha string (merge_commit
    is null on the REST object). Every merge therefore left the release tag
    unminted: the post-merge poll never observed a merge commit and died in its
    10-minute timeout, and the already-closed path silently skipped the tag.
    (Observed live on the canary: PR refactor(spec)!: rename Bundle→Fleet (BundleConfig/FleetConfig, BundleNode/FleetNode, Bundle map→Fleet) #20 merged at 15:25:35Z in run 32385963824,
    but the tag v2026.232.1524 was never created — the run's updated_at froze
    at 15:24:43 in its poll. The stub-gh harness had mocked the /pulls/{id}
    object with a nested merge_commit field, so this could not be seen until a
    live run.)
  5. The A1 body↔diff mismatch. After the finalize renames the PR's CHANGELOG
    placeholder to the merge-time CalVer, the re-run validator re-reviews the
    FINALIZED head against the PR body. A body that still names the author's
    placeholder (e.g. CHANGELOG/2026.232.0004.md) reads as a description↔code
    mismatch (A1), the re-validation concludes failure, and the run fails
    loudly — the mandatory post-finalize re-validation can never pass on a PR
    whose body pins its placeholder. (Observed live: the first canary live-proof
    PR was BLOCKed on the finalized head — body named 0004.md, diff carried
    1553.md — and stayed unmergeable until its body was reconciled.)

The two canary defects (the second live-exposed set)

The state-based idempotency + body-reconciliation fix was then live-proven on the
canary, and its own live runs exposed two more defects — the two that motivate
THIS change:

  1. The marker-collision body-append (PR feat(spec)!: complete the packaging contract — Packaging() accessor + CandyDir + LocalPkgBuildContext #26, run 32392375687). The
    body-reconciliation append was guarded by a grep for the ## Auto-merge finalization HEADING — but a PR body that describes the auto-merge workflow
    can legitimately name that heading in prose. The canary's body-append PR did
    exactly that (its step 3 names the note), so the guard's grep matched the
    author's prose and the append was silently SKIPPED — the re-run validator
    then blocked on the body↔diff mismatch exactly as in defect feat(spec): node DATA field on the pod-lifecycle seam requests (#55 Cone A unit 1 producer) #9. The fix
    guards the append on a marker an author cannot write: the HTML comment
    <!-- auto-merge-finalization-note: <stamp> -->. (Proven by harness S17:
    the append executes even when the author's prose names the heading.)
  2. The release-tag mint never fires (PR feat(spec): add helm_charts to the kubernetes deploy substrate #27, run 32397140298). The
    tag-existence guard read
    gh api "/repos/$REPO/git/refs/tags/$ver" -q '.ref' — but gh api writes an
    HTTP 404's response body to stdout, and -q '.ref' is applied only to
    successful responses. For a tag that does NOT exist, the captured string is
    the non-empty {"message":"Not Found",…} body — the -z guard reads
    non-empty, the "already exists" branch fires, and the mint is structurally
    unreachable
    . (Observed live: PR feat(spec): add helm_charts to the kubernetes deploy substrate #27 merged at 711a80ab and logged Tag v2026.232.1721 already exists — yet v2026.232.1721 was never created; it
    was backfilled add-only on the merged HEAD.) The fix checks existence against
    the local git refs (the checkout fetches +refs/tags/*:refs/tags/*) and
    treats the POST as the mint; a failed POST (a concurrent run's 422) reads as
    "already exists (concurrent mint)" and never fails the run. (Proven by
    harness S19/S20.)

The fix

  • actions/checkout@v7 (fetch-depth: 0) so gh pr merge has a git repo.
  • Tag version from the merge commit's committer date via the GitHub API, never a
    local git log on a SHA the clone lacks.
  • wait_all_settled() polls check-runs + commit statuses until every check
    completes; verify_all_green() accepts only success/skipped/neutral
    check-run conclusions and rejects any non-empty commit-status array whose
    combined state is not success (including error) — the auto-merge runs
    only once ALL status checks are green
    . The combined commit-status state is
    "pending" by default when a commit has NO commit statuses (GitHub's
    documented empty-default); the validator posts a check-run, never a commit
    status, so a green head reads state=pending, statuses=[] and is accepted —
    only a non-empty statuses array that is not success is rejected.
  • Rulebook merge-time CHANGELOG finalization (same-repo PRs, best-effort):
    git mv placeholder → merge stamp + H1 rewrite, push, re-validate the new head,
    then merge — so changelog filename/H1 and the release tag always agree. The
    rename is staged as git add <new> and committed without a pathspec so the
    deletion side of the git mv is not dropped.
  • actions: write permission so the auto-merge can re-run the validator via
    the API.
  • wait_for_validator() replaces the immediate revalidation after a
    finalization push: it waits for the validator run to appear on the new head,
    re-runs it via the API if it ended action_required/startup_failure, then
    waits for the validator check-run to appear before revalidating — so the merge
    never races ahead of the validator's check-run creation.
  • Idempotent finalization. If the head's copy of the placeholder file already
    carries the <!-- auto-merge-finalized: <stamp> --> marker, the changelog is
    already at a merge stamp — the rename is skipped and that stamp is reused for
    the tag, so the changelog filename/H1 and the release tag still agree and the
    re-finalization loop is broken. The check is a DIRECT blob read (a file-name
    check + marker grep), not a branch-history walk.
  • PR-body reconciliation before the re-run (A1). The finalize step appends an
    idempotent note to the PR body naming the actual (finalized) file, so the
    re-run validator's review of the finalized head stays body↔diff-consistent. The
    guard matches a unique HTML comment (<!-- auto-merge-finalization-note: <stamp> -->), not a heading an author's prose can name — so the append fires
    even on a PR that describes the workflow. The marker prevents re-appending
    across re-runs; a body-append failure is non-fatal — if the author's body
    pinned the placeholder, the re-run validator blocks and the run fails loudly,
    leaving the PR open.
  • A mint that can actually mint. ensure_tag checks existence against the
    LOCAL git refs (git rev-parse -q --verify refs/tags/$ver) — the checkout
    carries +refs/tags/*:refs/tags/* — and the gh api -X POST /repos/$REPO/git/refs
    IS the mint. A failed POST (a concurrent run's 422 "Reference already exists")
    reports "already exists (concurrent mint)" and exits 0. Idempotent in both
    paths (already-closed + post-merge) so the two cannot drift.
  • merge_commit_sha flat-field read. Both the already-closed and post-merge
    paths read the merge commit from the FLAT merge_commit_sha string — the real
    REST shape of GET /pulls/{n} (merge_commit is null) — so every merge
    mints its release tag.
  • A concurrency: group keyed on the PR head branch serializes runs for the same
    PR (a new run queues, never cancels), so the CHANGELOG-finalization push
    re-triggering the validator cannot cause overlapping runs to rename the
    CHANGELOG repeatedly or merge a head another run is still re-validating.
  • timeout-minutes: 60 caps the job so a hung wait/merge cannot run forever.
  • No direct-squash fallback: enabling GitHub auto-merge is the only merge path
    (it atomically re-checks branch protection); a failure fails the run loudly with
    the PR left open for investigation.
  • The merge path requires the repository setting allow_auto_merge: true
    ("Allow auto-merge" in Settings → General → Pull Requests). gh pr merge --auto fails with GraphQL: Auto merge is not allowed for this repository
    when it is off. The setting is enabled per-repo; the workflow itself is
    unchanged.

How validated

The workflow logic was proven against a stub gh + a real local git repo before
landing — the exact run block extracted from this workflow, with the stub gh
extended to cover every API call the run makes and the /pulls/<id> mock
corrected to the REAL REST shape (merge_commit_sha flat, merge_commit null) —
the shape live GitHub returned and that had blinded the first stub. Twenty
decision paths, 92 assertions, all passing:

PASS: S1 exit 0
PASS: S1 merge --auto called
PASS: S1 tag created
PASS: S1 all-green message
PASS: S2 exit 0
PASS: S2 waited (pending logged)
PASS: S2 merged after wait
PASS: S3 exit 1
PASS: S3 no merge
PASS: S3 failure reported
PASS: S3b exit 1
PASS: S3b no merge
PASS: S3b error state reported
PASS: S4 exit 0
PASS: S4 tag created
PASS: S4 already-closed message
PASS: S4b exit 0
PASS: S4b no tag POST
PASS: S4b already-exists message
PASS: S5 exit 0
PASS: S5 finalize message
PASS: S5 merged after finalize
PASS: S5 placeholder gone from head
PASS: S5 new file present
PASS: S5 H1 rewritten to stamp
PASS: S6 exit 0
PASS: S6 no finalize (M-status excluded)
PASS: S6 no rename commit
PASS: S6 merged
PASS: S6 modified file intact
PASS: S7 exit 0
PASS: S7 already-at-stamp message
PASS: S7 merged
PASS: S8 exit 1
PASS: S8 no direct-squash fallback
PASS: S8 only one merge attempt
PASS: S9 exit 0
PASS: S9 fork skip message
PASS: S9 merged
PASS: S10 exit 0
PASS: S10 empty-default pending accepted
PASS: S10 merged
PASS: S10b exit 1
PASS: S10b no merge
PASS: S10b pending state reported
PASS: S11 exit 0
PASS: S11 finalize message
PASS: S11 action_required reported
PASS: S11 validator re-run called
PASS: S11 merged after revalidation
PASS: S11 tag created
PASS: S12 exit 0
PASS: S12 skip finalization message
PASS: S12 no rename commit
PASS: S12 merged
PASS: S12 tag uses changelog stamp
PASS: S13 exit 0
PASS: S13 no re-run (normal dispatch)
PASS: S13 merged
PASS: S13 tag created
PASS: S14 exit 1
PASS: S14 no validator run reported
PASS: S14 no merge
PASS: S15 exit 0
PASS: S15 finalize message
PASS: S15 body reconciled before re-run
PASS: S15 revalidation green (A1 resolved by the body-append)
PASS: S15 merged
PASS: S15 tag created
PASS: S16 exit 1
PASS: S16 body-append failure reported
PASS: S16 re-validation blocked (A1)
PASS: S16 no merge
PASS: S17 exit 0
PASS: S17 finalize message
PASS: S17 body-append executed despite heading in author prose
PASS: S17 revalidation green (A1 resolved by the body-append)
PASS: S17 merged
PASS: S17 tag created
PASS: S18 exit 0
PASS: S18 skip finalization message
PASS: S18 no rename commit
PASS: S18 merged
PASS: S18 tag uses changelog stamp
PASS: S19 exit 0
PASS: S19 mint POST executed
PASS: S19 Tagged message
PASS: S19 no already-exists echo
PASS: S20 exit 0
PASS: S20 POST failure logged
PASS: S20 no mint recorded
PASS: S20 concurrent-mint message
==============================
TOTAL: 92 passed, 0 failed

Scenario map: S1 self-merge+tag · S2 pending-then-green wait · S3 failed check
abort · S3b commit-status error state abort · S4 already-closed idempotent
tag · S4b tag-already-exists reported, not re-created · S5 same-repo CHANGELOG
finalize (rename commit, old placeholder deleted, revalidate, merge, tag) · S6
A-status narrowing (a modified CHANGELOG file is not renamed) · S7 placeholder
already at the merge stamp (skips finalize) · S8 auto-merge enable failure (exit
1, no direct-squash fallback) · S9 fork PR (skips finalize, merges) · S10 no
commit statuses at all (empty-default pending, statuses=[] → accepted as green
→ merge) · S10b a real pending with non-empty statuses → still rejected · S11
finalization → validator run ends action_required → re-run via API →
check-run appears → revalidate → merge · S12 idempotent finalization (the head's
file already carries the marker → skip the rename, reuse the changelog stamp for
the tag) · S13 finalization → validator dispatches normally (no re-run) → merge ·
S14 finalization → no validator run appears → fail loudly, no merge · S15
finalize + author-body pins the placeholder → body-append lands → re-run
validator green → merge + tag (the A1 live-proof scenario) · S16 body-append
fails → fail loudly, no merge · S17 the marker-collision live defect (PR #26):
the author's prose names the workflow note's heading, yet the body-append still
fires (the HTML-comment marker guard) · S18 idempotency skip WITHOUT a finalize
commit — a head whose file carries the marker (the state-based check) · S19
the tag-mint fix (the PR #27 live case): tag ABSENT → mint POST fires →
Tagged · S20 POST fails (a concurrent run minted the tag first → 422) →
concurrent-mint message, exit 0.

Change class

ci/config — a workflow file + its CHANGELOG entry. No code, no candies, no
beds. The R10 for a workflow change is the live run of the workflow itself, which
can only happen after this lands on main; the stub-gh proof above is the
pre-landing gate.

Project-rulebook rule-compliance

  • R0 — N/A: no skill-owned surface; the workflow mechanics were validated
    against a stub gh (RDD), not a skill lookup.
  • R1 — every defect was RCA'd from its live run: the four original from run
    3235221669 (not a git repository); the empty-default pending defect from the
    fresh validator's live API observation (GET /commits/<head>/status →
    {"state":"pending","statuses":[]} on a green head); the revalidation race
    from run 32371493249 (the log shows revalidation: all status checks have completed 0.7s after the push, then GraphQL: Pull Request is not mergeable);
    the action_required state from the live validator run on a GITHUB_TOKEN-pushed
    head (0 jobs, 0 check-runs, instant completion); the re-finalization loop from
    the observed 2026.232.1256 → 2026.232.1304 re-finalization across re-runs; the
    merge_commit_sha REST shape from the canary's frozen poll; the A1 mismatch
    from the BLOCKed canary PR; the marker collision from PR feat(spec)!: complete the packaging contract — Packaging() accessor + CandyDir + LocalPkgBuildContext #26's silent skip; and
    the tag-mint non-fire from run 32397140298's "Tag v2026.232.1721 already
    exists" log on a tag that was never created — no flake framing anywhere.
  • R2 — all eleven defects fixed in the same change; nothing deferred.
  • R3 — no duplication introduced; the wait/verify helpers are defined once,
    and the tag logic is a single ensure_tag helper shared by both paths.
  • R4 — the wait_for_validator polling is a legitimate check-wait (the
    GitHub API exposes no event/sync primitive for check-run creation), not a race
    workaround.
  • R5 — no legacy path survives; the old immediate-revalidation call is fully
    replaced by wait_for_validator, the heading-guard body-append is replaced by
    the marker-guard, and the old gh api …git/refs/tags existence guard is
    replaced by the local-ref check.
  • R6 — no force-push, no direct push to main; PR-only landing.
  • R7/R8/R9 — N/A: no runtime artifacts, no emitted Containerfiles, no binary.
  • R10 — the live run of the workflow itself is the gate, which can only
    execute after this lands on main; the stub-gh proof of all twenty decision
    paths is the pre-landing gate (documented above). The canary repo has already
    run the corrected workflow end-to-end live.
  • RDD — the highest-risk unknown (the workflow's decision logic) was proven
    against a stub gh before landing, not deferred to the live run. The stub's
    blind spots (the revalidation race, the action_required state, the
    re-finalization loop, the flat merge_commit_sha, the marker collision, the
    tag-mint 404 body) were each caught by the canary's live runs and closed with a
    new scenario before this rollout.
  • ADE/SDD — N/A: no candies, no CUE schema.

Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)

The auto-merge workflow had never succeeded once: no actions/checkout (gh pr
merge dies 'not a git repository'), the tag computed from a future merge SHA
via git log (422), an immediate exit on any pending check instead of waiting,
and no CHANGELOG placeholder finalization. Add checkout@v7, compute the tag
from the merge commit's committer date via the API, wait for ALL status checks
to settle and verify green (success/skipped/neutral only) before merging, and
finalize the CHANGELOG placeholder to the merge stamp (git mv + H1 rewrite,
staged as git add <new> so the rename's deletion side survives). Logic proven
against a stub gh across seven decision paths before landing.

Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)
@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: c22448ec5536369f73e9631124973dfbdc32f2bd

Change class: ci/config (.github/workflows/auto-merge.yml + CHANGELOG entry). Self-gating change (this PR repairs the workflow that would merge it), so the stub-gh proof in the body was cross-checked for internal consistency — the seven claimed scenarios map to real code branches and the git commit -- <pathspec> bug note matches the committed code; accepted as the pre-landing gate per the self-install rule. CHANGELOG present, CalVer filename/H1 valid, attribution tier not inflated.

Blocks

  1. T4 / merge-gate contract — verify_all_green() treats an error commit-status state as green. .github/workflows/auto-merge.yml:98:
    state=$(gh api "/repos/$REPO/commits/$head/status" --jq '.state')
    if [ "$state" = "failure" ]; then
      all_green=false
    GitHub's commit-status state can be error, failure, pending, or success. wait_all_settled() (line 74) only counts pending statuses, so an error status is considered settled; verify_all_green() then accepts it because only "failure" is rejected. The workflow would therefore merge a head whose status check errored — contradicting the body's own claim that "the auto-merge runs only once ALL status checks are green, never on a still-pending or failed head." This is the security machinery (the merge gate) shipping with a non-green state treated as green. Fix: reject error alongside failure, e.g. if [ "$state" = "failure" ] || [ "$state" = "error" ].

Verdict: BLOCK


openrouter/deepseek/deepseek-v4-flash-0731 — pi-review-action.

View action run

@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: c22448ec5536369f73e9631124973dfbdc32f2bd

Change class: ci/config — .github/workflows/auto-merge.yml rewrite + CHANGELOG entry. Self-gating change (this PR repairs the workflow that would merge it); the stub-gh proof in the body maps to real code branches and is accepted as the pre-landing gate per the self-install rule.

Security screen: FAIL — T4 finding below (the merge gate treats a non-green state as green).

Blocks

  1. T4 — merge-gate defect: verify_all_green() accepts an error commit-status state as green. In .github/workflows/auto-merge.yml, verify_all_green() checks only if [ "$state" = "failure" ] on the combined commit-status state from /commits/$head/status. GitHub's combined status state can be error, failure, pending, or success; wait_all_settled() counts only pending statuses as unsettled, so an error status is treated as settled, and verify_all_green() then accepts it because only failure is rejected. The workflow would therefore merge a head whose legacy status check errored — contradicting the body's own claim that "the auto-merge runs only once ALL status checks are green, never on a still-pending or failed head." This is the merge gate (security machinery) shipping with a non-green state treated as green. Fix: reject error alongside failure, e.g. if [ "$state" = "failure" ] || [ "$state" = "error" ].

  2. B14(d) — R5 sweep claim without pasted command output. The body's R5 line claims "git grep for the removed git log -1 "$MS" pattern returns only this CHANGELOG entry" but pastes no command and no output. A described-but-unrun sweep is a FRAUD-class finding; paste the actual git grep command and its real output.

Comments considered

  • github-actions[bot] (2026-08-20, prior validator BLOCK): verified-blocking — the error-state finding reproduces against the CURRENT diff (head SHA unchanged; only failure is rejected on the combined status state, error passes).

Verdict: BLOCK


openrouter/deepseek/deepseek-v4-flash-0731 — pi-review-action.

View action run

- reject commit-status error state (not just failure) in verify_all_green
- concurrency group keyed on PR head branch serializes runs (re-entrancy)
- shared ensure_tag helper (already-closed + post-merge paths cannot drift)
- remove direct-squash fallback: auto-merge is the only merge path

Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)
@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 59600d6bd67f816fc8a90445689a0cf3b43bcc54

Change class: ci/config (.github/workflows/auto-merge.yml rewrite + CHANGELOG entry). Self-gating change (this PR repairs the workflow that would merge it); the stub-gh proof is accepted as the pre-landing gate per the self-install rule.

Blocks

  1. A1/T3 — body describes a direct-squash fallback the current code removed. The body's The fix section says "Idempotent tag creation + a direct-squash fallback if enabling auto-merge fails," and the How validated table lists merge-fail fallback | ✅ direct squash. But the CURRENT diff has no direct-squash fallback — the merge section comment states "There is deliberately NO direct-squash fallback … If enabling auto-merge fails, the run fails loudly and the PR stays open for investigation," and the CHANGELOG's own "Additional fixes" item 3 says "The fallback is removed." The body is stale relative to the current head (it describes the first commit c22448ec; the second commit 59600d6b removed the fallback). The body must be updated to match the current code — remove the fallback from the fix list and the validation table.

  2. B14(d) — R5 sweep claim without pasted command output. The body's R5 line claims "git grep for the removed git log -1 "$MS" pattern returns only this CHANGELOG entry" but pastes no command and no output. A described-but-unrun sweep is a FRAUD-class finding; paste the actual git grep command and its real output.

Comments considered

  • github-actions[bot] (2026-08-20, prior validator, T4 error-state finding): stale-superseded — the current diff's verify_all_green() now rejects any combined status state != "success" (including error), so that finding no longer reproduces.
  • github-actions[bot] (2026-08-20, prior validator, B14(d) sweep finding): verified-blocking — the current body still claims the grep without pasted output; reproduces against the current state.

Verdict: BLOCK


openrouter/deepseek/deepseek-v4-flash-0731 — pi-review-action.

View action run

@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: 59600d6bd67f816fc8a90445689a0cf3b43bcc54 (branch: feat/fix-auto-merge)

Security screen: PASS — the change strengthens the merge gate: verify_all_green() now rejects any combined commit-status state != "success" (including error), wait_all_settled() drains every non-completed check before merging, and the direct-squash fallback (which bypassed the atomic branch-protection re-check) is removed. CHANGELOG finalization is guarded to same-repo PRs only (head_repo = $REPO) and the placeholder filename is regex-filtered — no path traversal, no fork-branch push.

Checklist: All applicable rules PASS or NA.

  • Prior findings re-derived against CURRENT state (all stale-superseded):
    • T4 error-state-as-green (comments 1–2): fixed — current diff rejects state != "success".
    • Body direct-squash-fallback mismatch (comment 3): fixed — current body states "No direct-squash fallback" and the validation table lists S8 as "no direct-squash fallback".
    • B14(d) R5 sweep without output (comments 2–3): fixed — current body pastes the git grep command and its real output (only the CHANGELOG narrative hit; no matches outside CHANGELOG), consistent with the diff (no git log -1 in the workflow).
  • Self-gating change (this PR repairs the workflow that would merge it): the live run is unobservable pre-merge; the stub-gh proof (11 scenarios, 39 assertions — count verified against the pasted output) is the accepted pre-landing gate. Internally consistent: scenario map S1–S9 maps to real code branches.
  • A1/A3: body complete, ends with the *Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)* footer; tier not inflated (a self-gating change cannot claim "fully tested and validated" live).
  • B19: CHANGELOG/2026.232.0001.md present, filename matches ^\d{4}\.\d{3}\.\d{4}\.md$, H1 # 2026.232.0001 — fix the org-wide auto-merge workflow matches. Placeholder flagged for rename by the auto-merge workflow (not blocking).
  • R1/R2/R3/R4/R5/R6/R10/RDD: RCA'd from live run 3235221669, no flake framing; all four defects fixed in-tree; no duplication (ensure_tag shared); polling is a legitimate check-wait; old logic fully removed; no force-push; R10 satisfied by the stub proof per the self-install rule.
  • Placement: N/A — CI workflow file, not core/sdk/candy.

Verdict: PASS


openrouter/deepseek/deepseek-v4-flash-0731 — pi-review-action.

View action run

@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: 59600d6bd67f816fc8a90445689a0cf3b43bcc54 (branch: feat/fix-auto-merge)

Security screen: PASS — this is a self-gating change (it repairs the auto-merge workflow that would merge it). The change strengthens the merge gate: verify_all_green() rejects any combined commit-status state != "success" (including error), wait_all_settled() drains every non-completed check before merging, and the direct-squash fallback (which bypassed the atomic branch-protection re-check) is removed. CHANGELOG finalization is guarded to same-repo PRs only (head_repo = $REPO) with the placeholder filename regex-filtered — no path traversal, no fork-branch push. No secrets, no scope mismatch, no exfiltration.

Checklist: All applicable rules PASS or NA.

  • Prior findings re-derived against CURRENT state (all stale-superseded):
    • T4 error-state-as-green (comments 1–2): fixed — current diff rejects state != "success".
    • Body direct-squash-fallback mismatch (comment 3): fixed — current body states "No direct-squash fallback" and the validation table lists S8 as "no direct-squash fallback", matching the diff.
    • B14(d) R5 sweep without output (comments 2–3): fixed — current body pastes the git grep command and its real output (only the CHANGELOG narrative hit at line 12; no matches outside CHANGELOG), consistent with the diff (no git log -1 in the workflow).
  • Self-gating change: the live run is unobservable pre-merge; the stub-gh proof (11 scenarios, 39 assertions — count verified against the pasted output: 4+3+3+3+3+3+6+5+3+3+3 = 39) is the accepted pre-landing gate per the self-install rule. Scenario map S1–S9 maps to real code branches.
  • A1/A3: body complete, ends with the *Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)* footer; tier not inflated for a self-gating change.
  • B19: CHANGELOG/2026.232.0001.md present, filename matches ^\d{4}\.\d{3}\.\d{4}\.md$, H1 # 2026.232.0001 — fix the org-wide auto-merge workflow matches. Placeholder flagged for rename by the auto-merge workflow (not blocking).
  • R1/R2/R3/R4/R5/R6/R10/RDD: RCA'd from live run 3235221669, no flake framing; all four defects fixed in-tree; no duplication (ensure_tag shared); polling is a legitimate check-wait; old logic fully removed; no force-push; R10 satisfied by the stub proof per the self-install rule.
  • Placement: N/A — CI workflow file, not core/sdk/candy.

Verdict: PASS


openrouter/deepseek/deepseek-v4-flash-0731 — pi-review-action.

View action run

…ists

The final paragraph still listed a 'merge-fail fallback' as a proven scenario,
contradicting the same entry's item 3 (the direct-squash fallback was removed).
The proven scenario is auto-merge-enable failure (exit 1, no fallback).

Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)
@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: eec2f52a4a8e31f9ce95268a27dbe948217c419b (branch: feat/fix-auto-merge)

Security screen: PASS — T4 heightened review of the merge-gate rewrite: the change strengthens the gate. verify_all_green() rejects any combined commit-status state != "success" (including error), wait_all_settled() drains every non-completed check before merging, the direct-squash fallback (which bypassed the atomic branch-protection re-check) is removed, CHANGELOG finalization is restricted to same-repo PRs with a CalVer-regex-filtered A-status placeholder (no path traversal, no fork-branch push), and the finalize push re-triggers re-validation before merge. No scope mismatch, no secrets/exfiltration, no unexpected refs.

Checklist: All applicable rules PASS or NA.

  • Comments considered (all re-derived against CURRENT diff/body):
    • github-actions[bot] BLOCKs at c22448ec (T4 error-state-as-green; B14(d) sweep without output): stale-superseded — current verify_all_green() rejects state != "success"; current body pastes the git grep command and output.
    • github-actions[bot] BLOCK at 59600d6b (body direct-squash-fallback mismatch): stale-superseded — current body states "No direct-squash fallback" and the S8 scenario asserts it, matching the code comment.
    • github-actions[bot] PASS comments at 59600d6b: verified-non-blocking — their PASS reasoning reproduces against the current head; the third commit (eec2f52a) only corrected the CHANGELOG scenario list, consistent with the current code.
  • Self-gating change (repairs the workflow that would merge it): live run unobservable pre-merge; the stub-gh proof (11 scenarios S1–S9, 39 assertions — count verified: 4+3+3+3+3+3+6+5+3+3+3=39) maps to real code branches and is internally consistent; accepted as the pre-landing gate per the self-install rule.
  • A1/A3: body complete, accounts for both diff files, ends with the exact *Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)* footer; tier not inflated for a self-gating change.
  • B19: CHANGELOG/2026.232.0001.md present, filename matches ^\d{4}\.\d{3}\.\d{4}\.md$, H1 # 2026.232.0001 — fix the org-wide auto-merge workflow byte-matches; placeholder flagged for rename by the auto-merge workflow (not blocking).
  • R1–R6/R10/RDD: all four defects RCA'd from live run 3235221669, no flake framing; nothing deferred; no duplication (ensure_tag shared, helpers defined once); polling is a legitimate check-wait; old logic fully removed with pasted sweep output consistent with the diff; no force-push/direct-push-to-main; R10 satisfied by the stub proof per the self-install rule.
  • Placement: N/A — CI workflow file, not core/sdk/candy.

Verdict: PASS


openrouter/deepseek/deepseek-v4-flash-0731 — pi-review-action.

View action run

Bring this repo's auto-merge to the byte-identical corrected workflow proven
on distro-fedora main: waits for EVERY status check green, re-runs the
validator via the API when a GITHUB_TOKEN push leaves it action_required,
finalizes the CHANGELOG idempotently, reconciles the PR body before the re-run
(A1), merges only via GitHub auto-merge, and mints the release tag on the
merged HEAD.

Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)
@github-actions

Copy link
Copy Markdown

openrouter/deepseek/deepseek-v4-flash-0731 — pi-review-action.

View action run

@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: b8c30bcd7309cedb5a49af7417e0900bd7328f31 (branch: feat/fix-auto-merge)

Security screen: PASS — T4 heightened review of the merge-gate rewrite. The change strengthens the gate: verify_all_green() rejects any non-empty commit-status array whose combined state != "success" (including error), wait_all_settled() drains every non-completed check before merging, and the direct-squash fallback (which bypassed the atomic branch-protection re-check) is removed. CHANGELOG finalization is restricted to same-repo PRs (head_repo = $REPO) with a CalVer-regex-filtered A-status placeholder — no path traversal, no fork-branch push. actions: write is a justified, repo-scoped expansion needed to re-run the validator via the API. No secrets, no exfiltration, no scope mismatch (diff = workflow file + CHANGELOG, both accounted for in the body).

Checklist: All applicable rules PASS or NA.

  • Comments considered (all re-derived against CURRENT diff/body):

    • github-actions[bot] BLOCKs at c22448ec (T4 error-state-as-green; B14(d) sweep without output): stale-superseded — current verify_all_green() rejects any non-empty statuses array whose state is not success; the current body's R5 line describes the replacement without claiming an unrun grep, so B14(d) does not apply.
    • github-actions[bot] BLOCK at 59600d6b (body direct-squash-fallback mismatch): stale-superseded — current body states "No direct-squash fallback" and S8 asserts it, matching the code comment.
    • github-actions[bot] PASS comments at 59600d6b and eec2f52a: verified-non-blocking — their PASS reasoning reproduces against the current head; the final commit (b8c30bcd, by opencharly auto-merge) is the workflow's own finalize push, live evidence the finalize step works.
    • github-actions[bot] empty comment at b8c30bcd: unverified-dismissed — this is the current validator run (in_progress), no verdict content.
  • Self-gating change (repairs the workflow that would merge it): end-to-end green is unobservable pre-merge; the stub-gh proof (20 decision paths, 92 assertions — count verified against the pasted output) is the accepted pre-landing gate per the self-install rule, and the canary's live runs plus this PR's own finalize commit supply live evidence. Internally consistent: scenario map S1–S20 maps to real code branches.

  • A1/A3: body complete, accounts for both diff files, ends with the exact *Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)* footer; tier not inflated for a self-gating change.

  • B19: CHANGELOG/2026.232.0001.md present, filename matches ^\d{4}\.\d{3}\.\d{4}\.md$, H1 # 2026.232.0001 — repair the org-wide auto-merge workflow byte-matches. No placeholder-rename block.

  • R1–R6/R10/RDD: all eleven defects RCA'd from live runs, no flake framing; nothing deferred; no duplication (ensure_tag shared, helpers defined once); polling is a legitimate check-wait; old logic fully replaced (verified against diff); no force-push/direct-push-to-main; R10 satisfied by the stub proof per the self-install rule.

  • Placement: N/A — CI workflow file, not core/sdk/candy.

Verdict: PASS


openrouter/deepseek/deepseek-v4-flash-0731 — pi-review-action.

View action run

Merge-time CalVer for PR #43 (fix/ci: repair the org-wide auto-merge workflow).

Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)
@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: 6bae59dd6e4a35714c203e6f05b2e370c6012ef2 (branch: feat/fix-auto-nnerge)

Security screen: PASS — T4 heightened review of the merge-gate rewrite: the change strengthens the gate (verify_all_green() rejects any non-empty commit-status array whose combined state is not success, including error; wait_all_settled() drains every non-completed check; direct-squash fallback (which bypassed branch protection) removed; CHANGELOG finalization restricted to same-repo PRs with a CalVer-regex-filtered A-status placeholder — no path traversal, no fork-branch push; actions: write is a justified, repo-scoped addition to re-run the validator via the API). No secrets/exfiltration/scope mismatch (diff = workflow + CHANGELOG, both accounted for).

Checklist: All applicable rules PASS or NA.

  • All prior comments re-derived against the CURRENT head and dismissed as non-blocking: the T4 error-state-as-green finding and the direct-squash-fallback mismatch are fixed in the current diff; the B14(d) sweep-claim finding does not reproduce (current body makes no unrun-grep claim); no comment raises a surviving issue.
  • Self-gating change (this PR repairs the workflow that would merge it) — per the self-install rule the live end-to-end run is unobservable pre-merge; the stub-gh proof is internally consistent (92 assertions verified by counting the pasted output; scenario map S1–S20 (+3b/4b/10b) matches real code branches), and the canary's live runs provide the live evidence.
  • A1/A2/A3: body accounts for both diff files, classes the change correctly (ci/config), ends with the exact *Assisted-by: ...* footer; analysed on a live system tier not inflated.
  • B19: CHANGELOG/2026.232.1848.md — filename matches ^\d{4}\.\d{3}\.\d{4}\.md$; H1 # 2026.232.1848 — repair the org-wide auto-merge workflow byte-matches; not a placeholder.
  • R1–R6/R10/RDD: all eleven defects RCA'd from live run IDs, no flake/pre-existing framing; nothing deferred; no duplication (ensure_tag shared); polling is a legitimate check-wait on an API with no event primitive; old logic fully replaced; no force-push/direct-push-to-main; R10 satisfied by the stub-gh gate + canary live runs. Placement: N/A — CI workflow file, not core/sdk/candy.
  • CI: charly/pr-validator in_progress on the current head — this review is that run; no failed checks.

Verdict: PASS


openrouter/deepseek/deepseek-v4-flash-0731 — pi-review-action.

View action run

@atrawog
atrawog merged commit e11b38e into main Aug 20, 2026
1 check passed
@aitrawog
aitrawog deleted the feat/fix-auto-merge branch September 25, 2026 19:09
github-actions Bot pushed a commit that referenced this pull request Nov 14, 2026
* feat(vm)!: delete the authored body from the contract

#304 unit 8, the contract leg. The vm body lives in the plugin that serves
the kind (plugin-substrate#42/#46), its tests moved there first (#43/#45), the resolve arm
decodes straight into the envelope (#44) and loaderkit names the envelope (sdk#514) - so
this contract stops declaring the body.

Deleted: #Vm's seventy-three-line body, the #VmValue twin in node.cue, the four
vocabulary tables only the body cited (_backend, _machine, _vmFirmware, _vmKind) with
their four public re-exports, and the spec-side copies of the tests that moved
(TestVmBackendKrunCrossRules, TestVmKrunDefaultsMaterialize, TestVm_MCPProvideSchemaParse,
TestVm_MCPProvideYAMLRoundTrip).

KEPT, deliberately and measured: the resolve envelope #ResolvedVm and every def it cites
(#VmSource, #VmNetwork, #VmSsh, #VmCloudInit family, the sixty #Libvirt* defs, #VmKrun,
#VmSnapshot), #VmBackend/#VmBackendName (cited by #Deploy and the spec.VmBackends
generator), and the tables the keepers cite. VmSpec repoints to ResolvedVm.

Proven by the ASSEMBLED build: charly + this contract + sdk + all 63 plugins at their
merged mains builds clean (rc=0), where it failed on spec.Vm before the consumers landed.

Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)

* fix: drop the helpers and imports the moved tests left behind

The go CI job's golangci-lint named two unused functions (allErrors in the engine-vocab
test, loadSchema in the mcp-provide test) and the compiler then named the imports those
deletions orphaned. All removed; the suite is green and the generation reproducible.

Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)

---------

Co-authored-by: aitrawog <[email protected]>
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