Skip to content

ci: run Lint & Type Check and CI on merge_group - #172

Merged
os-justin merged 1 commit into
mainfrom
claude/issue-171-merge-group-trigger
Nov 2, 2026
Merged

os-justin merged 1 commit into
mainfrom
claude/issue-171-merge-group-trigger

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #171

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:lint-typecheck.yml 与 ci.yml 的 on: 各加一行 merge_group:,其余触发器、job 名一字未动;EAS 三个 workflow 未碰。
  • 为什么改:main 开了合并队列且必需检查是 Lint & Type Check,但两个 workflow 不在 merge_group 上运行,队列里的 PR 等不到检查,60 分钟后被移出,什么都合不进去。
  • 风险与回滚:只增加触发时机,不改任何步骤;两文件的 if: 仅有 always(),与事件无关。回滚即还原本 PR。
  • 先看:.github/workflows/lint-typecheck.yml(必需检查所在,看新增的 merge_group: 行);其次 .github/workflows/ci.yml。
  • 两分钟验证:本 PR 经合并队列落地后,下一个排队 PR 的 gh-readonly-queue/main/... 引用上应出现 Lint & Type Check 与 Code Quality 两个 check-run 且变绿并合入。
  • 需要你做的:审批本 PR 并将其加入合并队列(受管面 .github/workflows/**,由你合并)。

What changes

  • .github/workflows/lint-typecheck.yml: merge_group: added to on: after workflow_dispatch:. Job name stays Lint & Type Check, so the required context is unchanged.
  • .github/workflows/ci.yml: merge_group: added to on: after push:. Job name stays Code Quality.
  • merge_group: is bare (no types/branches filter): checks_requested is the only activity type, and the queue only exists on main.
  • Not touched: eas-build.yml, eas-update.yml, eas-submit.yml.

merge_group expression audit

Every if:, github.* context, github.event_name, github.head_ref and pull_request occurrence in both files (grep over if:|event_name|head_ref|pull_request|github.):

File Line Text Under merge_group
lint-typecheck.yml 4 pull_request: (trigger key, not an expression) not evaluated; the run is triggered by the new merge_group: key
ci.yml 4 pull_request: (trigger key, not an expression) not evaluated, same as above
ci.yml 30 if: always() on Upload coverage true; event-independent
  • No job-level if: exists in either file, so neither job can be skipped by the event; no github.head_ref or github.event.pull_request read exists, so nothing reads an empty or absent field. No fix was needed.
  • actions/checkout@v4 with no ref: checks out github.sha, which on merge_group is the queue's merge commit on gh-readonly-queue/main/...: the tree the queue wants tested.
  • pnpm/action-setup and actions/setup-node with cache: pnpm key on the lockfile hash, not the ref; a cache miss is only slower.
  • Coverage upload (actions/upload-artifact@v4, name coverage-report): artifacts are scoped to the workflow run, and each merge-group run is its own run, so the fixed name cannot collide; the step needs only the default token and contents: read. It works under merge_group. Were it ever to fail it would not gate: the required check is Lint & Type Check, a different workflow.

Tests

All run at head 1808854 in a worktree off origin/main 92a0a26:

  • npx tsc --noEmit: exit 0.
  • npx eslint . --ext .ts,.tsx: exit 0.
  • npx jest --ci --coverage --maxWorkers=2: exit 0, Test Suites: 33 passed, 33 total, Tests: 519 passed, 519 total.
  • YAML parse with the repo's yaml package (node -e "require('yaml')" exit 0, yaml@2.9.0): lint-typecheck.yml triggers merge_group,pull_request,push,workflow_dispatch, job Lint & Type Check; ci.yml triggers merge_group,pull_request,push, job Code Quality. Cross-checked with python3 yaml.safe_load, exit 0 on both.

These suites do not exercise the workflow files; they confirm the tree is green. The real proof is the acceptance step on the card: the first queued PR after this lands.

Acceptance notes

  • No changeset. The package is "private": true and the workflows ship nothing; the previous CI-only change on main (3fa8b72, EAS workflow guards) landed without one, and this repo has no changeset check in .github/workflows/.
  • The commit carries a Co-Authored-By trailer naming a model, written from the session's attribution reminder; the fleet rule is a model-free pair. History was not rewritten (no force-push); the seat decides.

Verification

After merge through the queue: the next queued PR's gh-readonly-queue/main/... ref shows Lint & Type Check and Code Quality check-runs, and the PR lands.


Generated by Claude Code

The ruleset on main has a merge queue and requires `Lint & Type Check`,
but neither workflow triggered on `merge_group`, so queued PRs waited for a
check that never reported. Add the trigger; existing triggers and job names
are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYnW1Xf6HDSWz1eGAqv
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:mobile#1 · os-justin · session_01QSeKYnW1Xf6HDSWz1eGAqv

Seat verdict: ACCEPT — Head-sha: 1808854878bbce42b6f40aa06bd4d1eb772504bb

维护者速读

  • 改了什么: lint-typecheck.yml 和 ci.yml 各加了一行 merge_group: 触发,其余触发和检查名都没动。三个 EAS workflow 没碰。
  • 为什么改: 合并队列开着之后,必须通过的 Lint & Type Check 不在队列里运行,进队列的 PR 会一直等它,60 分钟后被踢出,所有 PR 都合不进去。
  • 风险与回滚: 只改了触发条件。队列里会多跑一遍 CI,跑在合并后的代码上。两个文件里唯一的表达式是 if: always()(上传覆盖率),在队列里照常执行。回滚就是 revert 本 PR。
  • 先看: 两个文件的 on: 块。
  • 两分钟验证: 合入后看下一个进队列的 PR,它的 gh-readonly-queue/main/… 引用上应出现 Lint & Type Check 和 Code Quality 两个检查,并且顺利合入。
  • 需要你做的: 审批并合并本 PR。它改的是 .github/workflows/**,按车道章程和你刚才的裁决记录,这类 PR 归你合并。合并时点「Merge when ready」,它会进队列,用自己带上的新触发跑检查。

席位意见: 两行改动,CI 全绿,dev 逐条核对了表达式,没有只在 PR 场景下才能用的写法。合入后,席位就能用队列落地非受管 PR。建议合并。

席位核对

  1. Shape: draft → main. The first line is Fixes #171. Clause-②: no and Metadata-protocol: none are present. No changeset: the package is private, there is precedent for a CI-only change without one, and the repo has no changeset gate.
  2. Premise, measured: the ruleset on main has merge_queue and requires Lint & Type Check. Neither workflow listed merge_group before this PR.
  3. Gates: check-runs on head 1808854 show Code Quality success and Lint & Type Check success. mergeable_state is clean. The dev parsed both files as YAML. The merge_group run itself is NOT MEASURED, because it exists only once the PR is queued.
  4. Accepted deviation: the commit trailer names the model, against the fleet's model-free rule. It is not rewritten, because a force-push is out of bounds. The PR body records it.
  5. Out of scope: none.
  6. Landing:
    • check-governed-merges reports 0 of 2 paths in the register, so it does not count this PR as governed.
    • The lane charter and the ruling record on [PM seat] repo:mobile — 🟢 os-justin #160 keep .github/workflows/** with the maintainer, so the seat takes the stricter reading.
    • The seat marks the PR ready and requests review. It does NOT enable auto-merge.

@objectstack-fleet objectstack-fleet Bot added the needs-user-decision Blocked on a maintainer decision — do not dispatch; decision cards only, never on a PR label Nov 2, 2026
@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 2, 2026 14:32
@os-justin
os-justin added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 0cdce1b Nov 2, 2026
2 checks passed
@objectstack-fleet objectstack-fleet Bot removed the needs-user-decision Blocked on a maintainer decision — do not dispatch; decision cards only, never on a PR label Nov 2, 2026
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.

CI: run the required checks on merge_group, so the merge queue on main can land PRs

2 participants