Skip to content

fix(ci): run product-invariants on main pushes with the merge-commit body (#9744) - #10965

Merged
undivisible merged 3 commits into
BasedHardware:mainfrom
aryanorastar:fix/main-push-pr-body-invariants-9744
Aug 20, 2026
Merged

fix(ci): run product-invariants on main pushes with the merge-commit body (#9744)#10965
undivisible merged 3 commits into
BasedHardware:mainfrom
aryanorastar:fix/main-push-pr-body-invariants-9744

Conversation

@aryanorastar

@aryanorastar aryanorastar commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Fixes #9744

What changed and why

repo-checks.yml ran the deterministic check manifest on main pushes with --skip-pr-body-checks, so product-invariants (and failure-class-protocol) were silently skipped on every post-merge run — even though GitHub folds the PR description, including locked invariant citations like INV-CHAT-1, into the merge commit message. A main-push Hygiene run could not verify citations at all; #9734 merged with the IDs in its body yet the post-merge run reported them missing.

Now the main-push path captures the merge-commit body (git log -1 --format=%B HEAD) and passes it through --pr-body-file, so body-requiring checks run with the real citations. Fail-closed is preserved: a direct push whose commit message omits required invariant IDs still fails.

Product invariants affected

None (CI workflow + test wiring only). This fixes the enforcement of INV-* citations on main pushes.

How it was verified

  • actionlint .github/workflows/repo-checks.yml — clean.
  • python3 .github/scripts/test_run_checks.py — the two wiring regression guards updated/passing; only pre-existing sparse-checkout failures remain (identical on pristine main).

Tests

  • test_ci_lane_is_reachable_from_repo_checks — now asserts the main-push path passes --pr-body-file with the merge-commit body and no longer uses --skip-pr-body-checks (the wiring regression guard this issue asks for).
  • test_main_push_includes_pr_body_checks_when_body_supplied / test_main_push_without_body_still_excludes_pr_body_checks — body-supplied runs select product-invariants; body-less runs stay fail-closed.

Failure class (fixes)

Failure-Class: none

Scoped cleanups

None.

Review in cubic

@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.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@Git-on-my-level Git-on-my-level added workflow-review Needs maintainer review for workflow, automation, hooks, or CI behavior needs-maintainer-review Needs a human maintainer to sign off before merge docs-tooling Layer: Documentation, examples, dev tools labels Aug 1, 2026
@Git-on-my-level

Copy link
Copy Markdown
Collaborator

Thanks for fixing this — the change is tightly scoped and the direction looks right to me.

I reviewed the workflow/script diff statically. Passing the main-push merge commit body into run_checks.py --pr-body-file should restore the body-required manifest checks on post-merge Hygiene runs, and the added regression tests cover both sides of the behavior: body supplied selects product-invariants / failure-class-protocol, while body-less runs still skip those PR-body-required checks.

Because this changes CI workflow behavior, I’m leaving it for human maintainer review rather than treating it as an automated approval. I don’t see a concrete blocker from this review, but a maintainer should confirm this is the desired post-merge enforcement behavior for direct pushes and merge commits before merging.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@aryanorastar

Copy link
Copy Markdown
Contributor Author

Independently verified the final head (ff04f08):

  • actionlint: clean on repo-checks.yml (no new findings).
  • Contract tests: swapped the branch's repo-checks.yml + test_run_checks.py into the working tree and ran the Repo Checks drops merged PR invariant citations on main pushes #9744 regression suite → 4 passed (0 failed), covering both sides: test_main_push_includes_pr_body_checks_when_body_supplied (body-supplied → product-invariants/failure-class-protocol run) and test_main_push_without_body_still_excludes_pr_body_checks (no body → fail-closed, excluded). Working tree restored clean afterward.
  • Fix is correct: main pushes now capture the merge commit body (git log -1 --format=%B HEAD) and pass it via --pr-body-file instead of --skip-pr-body-checks. GitHub folds the PR description (with INV-* citations) into merge commits, so product-invariants can now see the citations on post-merge Hygiene runs. The pull_request lane and --skip-pr-body-checks behavior are untouched.
  • Fail-closed preserved: body-less runs still exclude PR-body-required checks.
  • CI green on this head (17 success / 11 skipped).

@cubic-dev-ai's 5/5 is correct; this is a tightly scoped workflow wiring fix. @Git-on-my-level confirmed no concrete blocker and CI is green.

This restores post-merge invariant-citation enforcement on main pushes. Requesting your human maintainer sign-off on the CI workflow behavior change (needs-maintainer-review / workflow-review).

@cubic-dev-ai

cubic-dev-ai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Independently verified the final head (ff04f08):

  • actionlint: clean on repo-checks.yml (no new findings).
  • Contract tests: swapped the branch's repo-checks.yml + test_run_checks.py into the working tree and ran the Repo Checks drops merged PR invariant citations on main pushes #9744 regression suite → 4 passed (0 failed), covering both sides: test_main_push_includes_pr_body_checks_when_body_supplied (body-supplied → product-invariants/failure-class-protocol run) and test_main_push_without_body_still_excludes_pr_body_checks (no body → fail-closed, excluded). Working tree restored clean afterward.
  • Fix is correct: main pushes now capture the merge commit body (git log -1 --format=%B HEAD) and pass it via --pr-body-file instead of --skip-pr-body-checks. GitHub folds the PR description (with INV-* citations) into merge commits, so product-invariants can now see the citations on post-merge Hygiene runs. The pull_request lane and --skip-pr-body-checks behavior are untouched.
    ...

@aryanorastar The change is sound and I'm comfortable signing off from the review side. The wiring matches what the issue asked for: main-push runs now feed git log -1 --format=%B HEAD through --pr-body-file instead of skipping body-required checks wholesale, so product-invariants and failure-class-protocol get the citations GitHub folds into merge commits. The two new regression guards cover both sides (body supplied → checks selected; body-less → still excluded), and removing --skip-pr-body-checks from the workflow with the assertNotIn guard in test_ci_lane_is_reachable_from_repo_checks correctly prevents the silent-skip regression from creeping back.

One thing worth keeping straight, since you asked for sign-off: the "human maintainer" gate here is separate from my review. I can confirm there's no blocker from the code/diff side, but Git-on-my-level already flagged this as a CI workflow behavior change that needs human maintainer review — that approval has to come from a maintainer, not from me or CI. My review sign-off doesn't substitute for the needs-maintainer-review gate.

Everything else checks out: pull_request lane untouched, fail-closed behavior preserved for direct pushes without citations, and the verification you ran (actionlint clean, 4/4 regression tests passing, CI green) matches what I'd expect from the diff. No outstanding concerns.

Tip: get faster answers by chatting with cubic’s review copilot in the review UI

@aryanorastar

Copy link
Copy Markdown
Contributor Author

@Git-on-my-level this CI workflow fix has your positive signal and cubic's 5/5 with no issues — requesting your maintainer sign-off on the needs-maintainer-review gate. Ready to merge when you have a moment.

…body (BasedHardware#9744)

repo-checks.yml ran the manifest on main pushes with --skip-pr-body-checks,
so product-invariants (and failure-class-protocol) were silently skipped —
even though GitHub folds the PR description, including locked invariant
citations like INV-CHAT-1, into the merge commit message. A main-push
Hygiene run therefore could not verify citations at all (BasedHardware#9734 merged with
the IDs in its body, yet the post-merge run reported them missing).

Pass the merge-commit body through --pr-body-file instead. Fail-closed is
preserved: a direct push whose commit message omits required invariant IDs
still fails product-invariants.

Updates the two wiring regression guards in test_run_checks.py: the
main-push path must now pass --pr-body-file (not --skip-pr-body-checks),
and body-requiring checks must be selected when a body is supplied.

Failure-Class: none

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
@aryanorastar
aryanorastar force-pushed the fix/main-push-pr-body-invariants-9744 branch from ff04f08 to 2f35041 Compare August 3, 2026 16:18
@Git-on-my-level

Copy link
Copy Markdown
Collaborator

Re-reviewed the current head (2f3504106baaff0b5d270a935a30c2f98debc11d). I still don’t see a code-level blocker: the main-push workflow now feeds the merge commit body through run_checks.py --pr-body-file, the PR lane remains separate, and the regression tests cover both the body-supplied path (product-invariants / failure-class-protocol selected) and the body-less fail-closed path.

I also ran the full .github/scripts/test_run_checks.py suite locally on this head: 41 tests passed.

Keeping this as human maintainer review rather than an automated approval because it changes CI workflow behavior. The existing needs-maintainer-review / workflow-review labels are still the right gate; no additional blocker from this review.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@aryanorastar

Copy link
Copy Markdown
Contributor Author

@Git-on-my-level need human response — this is still blocked on code-owner review for CI/workflow behavior.

Your latest AI pass on 2f350410 was again a positive signal (no code-level blocker): main-push feeds the merge-commit body through run_checks.py --pr-body-file, PR lane stays separate, regression tests cover body-supplied + body-less fail-closed, and you ran full test_run_checks.py (41 passed). Cubic is 5/5. Current head is CI green (17 pass).

What’s left is the formal human / workflow-review / needs-maintainer-review sign-off, or an explicit hold if something else is blocking. Happy to follow up immediately either way.

@aryanorastar

Copy link
Copy Markdown
Contributor Author

@Git-on-my-level follow-up: PR #10965 remains CI-green at 2f35041 with your latest positive re-review and 41/41 local contract tests passed. The only remaining blocker is the required workflow code-owner approval; no code or CI changes are pending.

Keep the main-push PR-body invariants wiring current for CO re-check.
@aryanorastar

Copy link
Copy Markdown
Contributor Author

@Git-on-my-level need human response — workflow code-owner APPROVE still the only merge blocker on #10965.

Refreshed tip merges current main onto the main-push --pr-body-file wiring (no conflicts). Still:

  • main-push captures git log -1 --format=%B HEAD--pr-body-file (not --skip-pr-body-checks)
  • PR lane untouched; body-less stays fail-closed
  • regression guards cover body-supplied + body-less paths
  • Failure-Class: none

Your AI re-review on 2f350410 found no code-level blocker (41/41 test_run_checks.py). Cubic 5/5. Please human / workflow-review APPROVE (or explicit hold) when you can.

Pick up desktop glass tripwire updates so Desktop Swift CI is not
failing on stale AgentPill/SettingsGlassChrome contracts.
@aryanorastar

Copy link
Copy Markdown
Contributor Author

@Git-on-my-level need human response — Desktop Swift red on prior tip was the same stale glass tripwires as #11142/#10964 (not this workflow wiring).

Merged current main on tip 16475fba7330. Main-push --pr-body-file fix unchanged:

  • git log -1 --format=%B HEAD--pr-body-file
  • PR lane untouched; body-less fail-closed
  • Failure-Class: none

Please human / workflow-review APPROVE (or explicit hold) when CI re-greens.

@aryanorastar

Copy link
Copy Markdown
Contributor Author

@Git-on-my-level need human response#10965 still blocked only on CI/workflow code-owner APPROVE.

Author-clear on tip 16475fba7330:

  • CI green (Desktop Swift after main refresh cleared glass tripwires)
  • MERGEABLE
  • Your AI re-reviews: no code-level blocker (--pr-body-file from merge-commit body; PR lane untouched; body-less fail-closed; 41/41 test_run_checks.py)
  • Cubic 5/5; Failure-Class: none
  • No author tip pending

Please human / workflow-review / needs-maintainer-review APPROVE (or explicit hold) when you can.

@Git-on-my-level Git-on-my-level added the positive-signal Good PR — positive signal, not a formal approval label Aug 9, 2026
@Git-on-my-level

Copy link
Copy Markdown
Collaborator

Thanks for keeping this fix focused. I rechecked the current head and don’t see a code-level blocker.

Specific notes from the changed files:

  • .github/workflows/repo-checks.yml now keeps the PR lane separate and changes only the main-push Hygiene path: it writes git log -1 --format=%B HEAD to PR_BODY_FILE and passes that to run_checks.py --lane ci --pr-body-file, so product-invariants / failure-class-protocol can inspect the merge-commit text instead of being skipped wholesale. The workflow checkout in this job still uses fetch-depth: 0, which supports reading the merge commit body.
  • .github/scripts/test_run_checks.py updates the CI reachability guard to reject --skip-pr-body-checks in repo-checks.yml, assert the git log -1 --format=%B HEAD / --pr-body-file wiring, and adds coverage for both body-supplied selection (product-invariants, failure-class-protocol, diff-hygiene) and the existing body-less skip behavior.

CI is green on this head. Because this changes CI/workflow enforcement behavior, the existing workflow-review / needs-maintainer-review gate still needs human workflow maintainer sign-off before merge; from this review, the implementation itself looks sound.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@aryanorastar

Copy link
Copy Markdown
Contributor Author

@Git-on-my-level need human response — thanks for the fresh positive-signal recheck on tip 16475fba7330.

Author-clear / CI green / MERGEABLE. Your latest pass again found no code-level blocker (main-push --pr-body-file from merge-commit body; PR lane separate; body-less fail-closed; regression guards present).

Only remaining merge blocker is formal workflow code-owner APPROVE (workflow-review / needs-maintainer-review). Please APPROVE (or explicit hold) when you can — happy to act immediately either way.

@undivisible undivisible added the human Human-authored pull request label Aug 10, 2026
@aryanorastar

Copy link
Copy Markdown
Contributor Author

@Git-on-my-level workflow-review ping: current head is MERGEABLE and the product-invariants main-push guard has no author-side blocker. Please provide the required approval or state an explicit hold.

@aryanorastar

Copy link
Copy Markdown
Contributor Author

@Git-on-my-level workflow CO ping: still MERGEABLE, author-side clear. Waiting maintainer APPROVE.

@aryanorastar

Copy link
Copy Markdown
Contributor Author

@Git-on-my-level workflow CO ping (>1d): still MERGEABLE, CI green, author-clear. Please APPROVE or explicit hold.

@aryanorastar

Copy link
Copy Markdown
Contributor Author

@Git-on-my-level Workflow CO APPROVE ping — tip 16475fba MERGEABLE; author-side clear. Please APPROVE when convenient.

@aryanorastar

Copy link
Copy Markdown
Contributor Author

@Git-on-my-level @kodjima33 Workflow review ping: tip 16475fba is MERGEABLE with 35/35 checks green (positive-signal). Runs product-invariants on main pushes with merge-commit body (#9744). Ready for maintainer review/merge.

@undivisible undivisible left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cline review agrees: main-push Hygiene now passes the merge-commit body via --pr-body-file so product-invariants can see citations, with fail-closed preserved when the body is empty. CI-only, tests updated. Merge.

@undivisible
undivisible merged commit 454dcbc into BasedHardware:main Aug 20, 2026
35 checks passed
undivisible added a commit that referenced this pull request Aug 20, 2026
#10965 passed the squash commit message as the PR body. This repo
squashes with the commit list, not the PR description, so INV-*
citations that made PR Hygiene green vanish on main (#11835).
Append the live (#NNNN) PR body when resolving.

Failure-Class: none
undivisible added a commit that referenced this pull request Aug 20, 2026
#10965 passed the squash commit message as the PR body. This repo
squashes with the commit list, not the PR description, so INV-*
citations that made PR Hygiene green vanish on main (#11835).
Append the live (#NNNN) PR body when resolving.

Failure-Class: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-tooling Layer: Documentation, examples, dev tools human Human-authored pull request needs-maintainer-review Needs a human maintainer to sign off before merge positive-signal Good PR — positive signal, not a formal approval workflow-review Needs maintainer review for workflow, automation, hooks, or CI behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Repo Checks drops merged PR invariant citations on main pushes

3 participants