fix(ci): run checks and regular-merge the sync-docs PR (#10535) - #10959
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
All reported issues were addressed across 1 file
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
8ab16e6 to
8ffcba7
Compare
cubic review follow-up on BasedHardware#10959: the point of authoring the PR with the Omi Bot app token was to make CI verify the generated diff, but the immediate gh pr merge --admin merged it regardless of whether any check ran or passed. Switch to gh pr merge --auto --merge so the merge waits for the triggered pull_request lanes and branch protection before landing. Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
|
Addressed the cubic review point: switched from |
Git-on-my-level
left a comment
There was a problem hiding this comment.
Thanks for tightening this workflow. The current head addresses the main CI/merge safety issue I would look for here: the docs PR is now created with the Omi Bot app token so downstream PR checks can run, and the follow-up changed the merge step to gh pr merge --auto --merge without --admin, so it should wait on branch protection instead of forcing the generated PR in.
I’m not formally approving because this changes GitHub Actions behavior and bot-token use, so a human maintainer should still make the final workflow/security call before merge. In particular, please confirm the Omi Bot app credentials are intentionally available to this workflow and that enabling auto-merge for the generated docs PR is the desired maintainer policy. From static review of the diff, the direction looks sound and I don’t see a remaining blocker.
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.
|
Verified the final head (32164fe) locally:
On @Git-on-my-level's two open questions: (1) the Omi Bot credentials are confirmed available — same secrets + same @cubic-dev-ai's P1 (admin bypass) is fully addressed by |
@aryanorastar You're right, and both fixes land the way you described. The P1 (admin bypass) is genuinely closed:
The one thing I'd keep an eye on but not block on: auto-merge is repo-level policy, not something the workflow itself guarantees. If "auto-merge" isn't enabled for the repo (or if a required check is ever flaky on the generated diff), So I agree: P1 is resolved, and what's left is the human policy sign-off on (1) auto-merging generated docs PRs and (2) confirming repo auto-merge is enabled. Nothing here needs another cubic review pass from my side. Tip: get faster answers by chatting with cubic’s review copilot in the review UI |
|
@Git-on-my-level PR #10959 is ready for human maintainer sign-off: cubic-dev-ai's P1 (admin bypass) is resolved (--auto --merge respects branch protection), your review already shows positive signal with no remaining blockers, and CI is green (8 successful, 17 skipped). This also references #10960 and #10961 which may be part of the same sync-docs fix batch. |
sync-docs.yml created its PR with GITHUB_TOKEN, which GitHub deliberately does not fire pull_request workflows for, so the generated sdks/*/README.md diff landed on main with zero checks run. It then merged with --admin --squash, bypassing branch protection and contradicting AGENTS.md's "merge, never squash" rule (a squash loses the revertible -m 1 parent). Mint the Omi Bot app token before create-pull-request (same pattern as repo-hygiene.yml) so CI verifies the generated diff like any human PR, and switch the auto-merge to a regular --merge with the retry loop used by desktop_auto_release.yml. Closes BasedHardware#10535 Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
cubic review follow-up on BasedHardware#10959: the point of authoring the PR with the Omi Bot app token was to make CI verify the generated diff, but the immediate gh pr merge --admin merged it regardless of whether any check ran or passed. Switch to gh pr merge --auto --merge so the merge waits for the triggered pull_request lanes and branch protection before landing. Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
32164fe to
471741f
Compare
Git-on-my-level
left a comment
There was a problem hiding this comment.
Thanks for the follow-up here. The safer direction is right: creating the generated docs PR with an app token means PR checks can run, and switching the merge step to gh pr merge --auto --merge removes the branch-protection/admin bypass from the workflow path.
One workflow-security change still looks needed before this should merge: please scope the Omi Bot app token in the actions/create-github-app-token@v3 step to only the permissions this job needs, matching the existing least-privilege pattern in repo-hygiene.yml:
permission-contents: write
permission-pull-requests: writeWithout those explicit permission-* inputs, the generated app token may receive the installation's broader permission set. Since this workflow then passes that token to create-pull-request and gh pr merge, keeping the token narrowly scoped is important for a workflow/security-sensitive path. After that, the remaining decision is still a human maintainer policy call: confirm the Omi Bot credentials are intentionally available here and that auto-merging generated docs PRs is desired for this repo.
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.
|
Addressed the remaining workflow-security blocker in |
|
@Git-on-my-level — the least-privilege token scoping from your review is on the current head ( permission-contents: write
permission-pull-requests: writeThat matches the |
|
Merged latest |
|
Post-merge CI on Least-privilege token inputs remain. Ready for maintainer re-review / clear changes-requested + workflow sign-off. |
|
Per current CI check summary: all checks show pass (any remaining are skipping). Could you please dismiss the existing 'Changes requested' review now that there are no failing signals on this head? Thanks. |
Dismissed by maintainer automation after re-reviewing head 469cceb: the requested least-privilege app-token permissions are now present. Human workflow policy sign-off is still required before merge.
|
Re-reviewed the current head after the permission-scoping follow-up. The previous workflow-security blocker is resolved: the app token is now minted before I dismissed my stale changes-requested review for the resolved least-privilege issue. I am still leaving this as human maintainer review rather than approval because it changes CI/bot-token/auto-merge behavior: a maintainer should confirm the Omi Bot credentials are intended for this workflow and that auto-merging generated docs sync PRs is the desired repo policy. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Verified current head 469cceb in
Could you please add the approving review so this can clear the code-owner gate? |
Keep sync-docs checkable/auto-merge tip current for workflow CO.
|
@Git-on-my-level need human response — formal workflow/code-owner APPROVE is the only merge blocker on #10959. Author-clear:
Please human / workflow-review APPROVE (or explicit hold on auto-merge policy / Omi Bot credential intent) when you can. Branch protection is waiting on code owner review from you ( |
|
@Git-on-my-level need human response — formal workflow/code-owner APPROVE is still the only merge blocker on #10959. Author-clear on tip
CI re-running on the main merge. Please human / |
|
@Git-on-my-level @undivisible review ping — this one is ready and has been waiting 4 days. MERGEABLE, no failing checks on the current head. It runs checks and regular-merges the sync-docs PR (#10535). Blocked only on workflow CODEOWNER approval — |
|
@kodjima33 @Git-on-my-level @undivisible — consolidating the queue into one comment rather than pinging eleven threads separately. Every one of these is green with zero conflicts. None is waiting on code. Posting this on #10959 since seven of them share its root cause; the rest are listed so nothing needs hunting. Ready to merge right now
Blocked on one signature each
The seven CI PRs — all blocked on
|
| PR | Opened | Last review |
|---|---|---|
| #10959 | Aug 1 | Aug 3 |
| #10960 | Aug 1 | Aug 9 |
| #10964 | Aug 1 | bot only, Aug 1 |
| #10966 | Aug 1 | Aug 1 |
| #11125 | Aug 5 | Aug 10 |
| #11171 | Aug 6 | bot only, Aug 6 |
| #11183 | Aug 6 | Aug 9 |
Three of these touch release-gate correctness — #10964 resolves PR diff bases live instead of trusting the stale payload SHA, #10966 creates the release-gate-failure label before filing the audit issue, and #11171 fails closed when a Codemagic desktop preview dies after dispatch. They are the kind of thing that is quiet until a release goes wrong.
I am not asking anyone to skip a review. The two at the top need a click; the rest need someone to decide they are worth a pass, or to say they are not wanted, which is an equally useful answer and one I would rather have than the current silence. If any of these should be closed, tell me and I will close them today.
Separately: two earlier comments of mine on #11452 tagged @nik, which belongs to an unrelated GitHub user rather than @kodjima33. I have edited both. Apologies to whoever that notified.
Fixes #10535
What changed and why
sync-docs.ymlcreated its PR withGITHUB_TOKEN, which GitHub deliberately does not firepull_requestworkflows for — so the generatedsdks/*/README.md/omiGlass/README.mddiff landed onmainwith zero checks run. It then merged withgh pr merge --squash --delete-branch --admin, bypassing branch protection and contradicting AGENTS.md's "merge, never squash" rule (a squash loses the revertible-m 1parent).Two changes:
create-pull-requestand pass it as the PR token (same pattern asrepo-hygiene.yml:62-74), so CI runs on the generated PR like any human PR.--admin --squashwith--auto --merge— the merge is now scheduled as a regular merge (not squash, preserving the revertible-m 1parent per AGENTS.md) via GitHub auto-merge, so it waits for branch protection and the requiredpull_requestchecks to pass instead of forcing through with--admin. The blind retry loop was removed since--autoschedules the merge rather than forcing it.Product invariants affected
None (CI workflow only).
How it was verified
actionlint .github/workflows/sync-docs.yml— no new findings (the one SC2004 shellcheck warning is pre-existing onmainin an untouched step).python3 .github/scripts/check_runner_cost_policy.py— passed.python3 .github/scripts/check_deployment_secret_boundary.py --base origin/main— passed.python3 -c "import yaml; yaml.safe_load(open(...))"— valid YAML.Could not fully run
make preflightlocally (sparse checkout lacksscripts/), so I ran the workflow-triggered checks individually instead.Tests
No test change — this is a GitHub Actions workflow; the repo has no workflow test harness for
sync-docs.yml. The verification above covers the diff-scoped checks CI runs for workflow changes.Failure class (fixes)
Failure-Class: none
Scoped cleanups
None.