fix(ci): preserve invariant citations on main pushes#9746
fix(ci): preserve invariant citations on main pushes#9746tianmind-studio wants to merge 1 commit into
Conversation
Repo Checks discarded the merged PR description before running the shared manifest, so correctly cited invariant changes failed after merge. Forward the merge commit body through the existing --pr-body-file contract while keeping undocumented direct pushes fail-closed. Closes BasedHardware#9744.
5c20b72 to
3aac677
Compare
|
Fresh main-push evidence: Repo Checks run https://github.com/BasedHardware/omi/actions/runs/29365288514 failed exactly at |
Git-on-my-level
left a comment
There was a problem hiding this comment.
Thanks for the focused CI fix. I reviewed the workflow-sensitive part of this PR and this looks like the right direction: the main-push path now passes the merge commit message/body through the existing --pr-body-file data path, and the new regression assertions cover both the workflow wiring and the backend workflow contract.
I do not see an obvious command-injection issue here: the commit body is redirected into a file and consumed as checker input rather than interpolated into shell. CI is also green on the current head.
Because this changes main-branch CI behavior, I’m leaving this as a positive maintainer signal rather than a formal approval. A human maintainer should still confirm that using the merge commit body is the intended source of invariant citations for all merge modes, and that direct main pushes without documented invariant citations continue to fail closed as expected.
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.
What changed and why
Pass the main merge commit's full message/body into the shared deterministic manifest through its existing
--pr-body-filecontract. This preserves product-invariant citations after merge instead of replacing the correctly documented PR body with an empty temporary file. Add a workflow wiring regression assertion that keeps the main-push step connected to that description. Closes #9744.Product invariants affected
none
How it was verified
29360878812rejectedINV-CHAT-1andINV-VOICE-1after Fix PTT higher-model context and cache boundary #9734 merged even though both the PR body and merge commita3e1b7401560d6ae2b671c62fcfa3873ddd05e43contain those IDs.python3 .github/scripts/run_checks.py --lane ci --base HEAD~1: the unmodified main-push path exited 1 for the same two missing IDs.git show -s --format=%B HEADto the body file. All 14 selected CI manifest checks passed, includingproduct-invariantsnaming both required IDs.python3 .github/scripts/test_run_checks.py(10 tests passed)actionlint -shellcheck= .github/workflows/repo-checks.ymlblack --check --line-length 120 --skip-string-normalization .github/scripts/test_run_checks.pyruff check --target-version py39 .github/scripts/test_run_checks.pyTests
The new manifest contract test isolates the main-push workflow step and requires both creation and forwarding of
/tmp/main-push-body.md. The exact previously failing merge was also exercised through the production CI-lane runner. The no-body baseline still fails, confirming undocumented direct pushes remain fail-closed.Root cause and durable guard (bug fixes)
Pull-request runs use
scripts/pr-preflightto load PR metadata, while main pushes calledrun_checks.pydirectly without a body file. The runner intentionally substitutes an empty body when none is supplied, so the post-merge product-invariant check could never recognize valid citations. GitHub's regular merge commit already retains the PR description; forwarding that deterministic local data restores parity without API calls or weaker validation, and the workflow contract test prevents the input from being dropped again.