Skip to content

sync-docs.yml auto-merges to main with --admin --squash on a PR that ran zero checks #10535

Closed

Description

@Git-on-my-level

sync-docs.yml writes to main through a PR that no check ever ran, then bypasses branch protection to squash it.

The workflow triggers on any docs/**.mdx push to main, regenerates SDK/hardware README.md files, and then:

  • Creates the PR with secrets.GITHUB_TOKEN (.github/workflows/sync-docs.yml:77). GitHub deliberately does not fire pull_request workflows for events authored by GITHUB_TOKEN, so the PR arrives with zero repo checks.
  • Merges it with gh pr merge --squash --delete-branch --admin (:97) using the Omi Bot app token — --admin bypasses branch protection, and --squash contradicts AGENTS.md:77 ("Merge, never squash. Keeping merge commits is what makes a change cleanly revertible with git revert -m 1 later.").

This is not theoretical. #8325 was created at 2026-06-24T23:12:42Z and merged at 23:12:46Z — 4 seconds, authored by app/github-actions, merged by app/omi-ci-bot. Its entire check list is Mintlify Deployment: skipping and comment-on-declined-pr: skipping; the merge commit bbcc0d9 has a single parent, confirming the squash. Same pattern in #7543, #3680, #3675.

Why it matters beyond style: the generated files land in sdks/*/README.md and omiGlass/README.md, so a bad regeneration reaches main with no diff-hygiene, no repo-checks, and no human in the loop — and because it is squashed, the usual git revert -m 1 recovery does not apply. The failure mode is the one #10534 is about: the PR looks reviewed because it is a PR, while nothing verified it.

Worth noting the repo already has the fix pattern in-tree — four workflows mint an app token via actions/create-github-app-token@v3 (desktop_auto_release.yml:55, desktop_retry_beta_qualification.yml:44, desktop_qualify_beta.yml:63). Passing that token to create-pull-request instead of GITHUB_TOKEN is what makes CI fire on an automated PR.

Open questions for whoever picks this up: does the auto-merge need to exist at all (a docs-sync PR that waits for review is not urgent), and if it does, can it drop --admin and --squash and require its own checks to pass first?

Activity

  1. moved this from Someday to In progress in omi TODO / bountieson Jul 26, 2026
  2. added a commit that references this issue on Aug 1, 2026
    8ffcba7
  3. moved this from In progress to In review in omi TODO / bountieson Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions