Skip to content

ci: per-OS check and coverage jobs replace pr-check, pr-links and api-label - #14772

Merged
TrapsterDK merged 2 commits into
mainfrom
ci-pr-check-five-platforms
Nov 23, 2026
Merged

TrapsterDK merged 2 commits into
mainfrom
ci-pr-check-five-platforms

Conversation

@TrapsterDK

Copy link
Copy Markdown
Collaborator

@TrapsterDK TrapsterDK added the needs-review Touches review paths; needs a second-session Review: comment label Nov 23, 2026
@TrapsterDK
TrapsterDK marked this pull request as ready for review November 23, 2026 22:10
@TrapsterDK

Copy link
Copy Markdown
Collaborator Author

Review: changes requested

Reviewed head 9ee1dd7. Most of the spec is met. The 10 jobs check (<platform>) and coverage (<platform>) report contexts that match .github/rulesets/main.json, and they run on pull_request, merge_group and workflow_dispatch. Every other ci.yml job is limited to schedule or dispatch. No references to pr-check, pr-links, api-label or gate remain, and no release or housekeeping workflow depends on them. Permissions are contents: read. The one new third-party action (upload-artifact) is pinned to a SHA. Untrusted values reach the scripts only through env:, and there is no pull_request_target. Concurrency is per ref and cancels only pull_request runs. I did not count the existing failures on main against this PR.

Findings, most severe first:

  1. .github/workflows/ci.yml:26 and CONTRIBUTING.md:69: the merge-queue guard for evidence/* statuses was removed, and nothing replaces it. The old gate job failed a merge group when the pull request head had a pending, failed or errored evidence/* status. The new check job runs only dx check --affected, and the CONTRIBUTING sentence about the guard was deleted. The spec says check runs the guards and does not ask for this one to go. Failing case: /evidence platforms=["macos_arm64"] task=test goes red on a PR, then gh pr merge --squash --auto merges it through the queue. The old gate also ran a whole-repo tools/dx generate and the per-platform lock check (config_consistency_test ... host_dependent_extensions_are_locked_for_every_ci_platform). Neither runs in the queue any more. A fix that keeps the 10 job names: add the evidence-status step to check and run it only on merge_group.

  2. .github/workflows/ci.yml:56-72 and :112-128: the base pinning is written out again as inline shell (event branching and a deepen retry loop), once in each job. tools/ci/gate_base already does this as a Rust binary, and .github/actions/gate also checked that dx compared against the expected base. Both are now unused but still built and tested (tools/ci/aggregate_gates_test.rs:10, the_gate_fails_when_dx_check_fails). This goes against docs/design/tests.md:118: "A workflow run: script holds no logic a test must run; gate logic is a GitHub expression or a Rust binary." The new test tools/ci/ci_check_jobs_test.rs only checks that the strings are present, so nothing exercises the merge_group branch or the deepen loop. Suggestion: use gate_base_bin (or the gate action) in both jobs, or delete the gate action and the crate.

  3. .github/rulesets/main.json:71 and .github/workflows/ci.yml:84: the merge queue's check_response_timeout_minutes: 120 equals the coverage job's timeout-minutes: 120. The queue timer also counts the time a job waits for a runner. Failing case: a coverage (windows_arm64) job that waits 10 minutes for a windows-11-arm runner and then runs for 115 minutes passes in Actions, but the queue has already treated the group as failed. Either raise the queue timeout above the job timeout plus the expected wait, or lower the job timeout.

  4. Minor: the PR title "ci: pr-check runs the consumer CI on all five platforms" no longer describes the change. The ruleset uses merge_method: SQUASH, so this title becomes the commit subject on main. Also, .github/workflows/README.md:8 says --report lcov=lcov.info, but the job writes $RUNNER_TEMP/coverage/lcov.info.

🤖 Generated with Claude Code

@TrapsterDK TrapsterDK changed the title ci: pr-check runs the consumer CI on all five platforms ci: per-OS check and coverage jobs replace pr-check, pr-links and api-label Nov 23, 2026
@TrapsterDK

Copy link
Copy Markdown
Collaborator Author

Fixed in 29a9713.

  1. Guards, all in check without new jobs:
    • The evidence/* status step is back as the first step of check. It runs only on merge_group, and check has statuses: read. The CONTRIBUTING sentence and the permissions test are restored for check.
    • Whole-repo generate: dx check --affected only generates the changed packages, so check (linux_x86_64) now runs dx generate on the whole repo.
    • Lock checks: dx check already covers both. Every Bazel call runs with --lockfile_mode=error, which covers the old bazel mod deps --lockfile_mode=error. config_consistency_test takes //:MODULE.bazel.lock as data, so --affected runs host_dependent_extensions_are_locked_for_every_ci_platform whenever the lock changes.
  2. Base pinning: both jobs use .github/actions/gate, and the inline shell is gone. The action takes command (check or coverage) and an optional lcov input. It passes --lockfile_mode=error and forwards the Bazel options to dx, and it still verifies the base dx compared against. gate_base replaces the shell deepen loop: it deepens a shallow clone until the candidate base is an ancestor of HEAD. The new gate_base_test case merge_group_deepens_a_shallow_clone_until_it_holds_base_sha covers this.
  3. check_response_timeout_minutes is now 180. The longest job timeout is 120.
  4. The PR is retitled. README line 8 now says --report lcov=$RUNNER_TEMP/coverage/lcov.info.

Tests: gate_base_test, workflow_files_test, workflow_pins_test, actionlint_test, secret_flags_test and workflow_expressions_test pass. aggregate_gates_test fails only in every_workflow_swallows_no_failure_outside_the_allow_list, from reusable-release.yml || true. prose_rules_test fails only on allowlist entries for files this PR doesn't touch. Both failures are already red on main.

🤖 Generated with Claude Code

@TrapsterDK

Copy link
Copy Markdown
Collaborator Author

Review: approve

Re-reviewed head 29a9713. All four earlier findings are fixed.

  1. Evidence guard: fixed. .github/workflows/ci.yml:51-67 is the first step of check and runs only on merge_group. The job has statuses: read, the step runs with set -euo pipefail, and a malformed queue ref fails it. The check job has no if: or needs:, so a merge group cannot skip it. With ALLGREEN, every queued entry gets its own group ref ending in its own PR head SHA, so every PR's evidence/* statuses get checked. The whole-repo dx generate at ci.yml:82-86 also runs on every event, as part of the required check (linux_x86_64). Without --apply, stale BUILD files or locks make it exit 1. The lock checks are covered by --lockfile_mode=error and by config_consistency_test under --affected.
  2. Base pinning: fixed. The inline shell is gone. Both jobs now use .github/actions/gate, which still checks that dx compared against GATE_BASE. The JSON from --affected carries affected.base for coverage as well as check (cli/cli/src/exec/affected.rs:316).
  3. Timeout: fixed. check_response_timeout_minutes is 180 (.github/rulesets/main.json:71), above the 120-minute job timeout.
  4. Title and README path: fixed.

gate_base deepening (tools/ci/gate_base/src/lib.rs:80-84):

  • pull_request: the candidate is HEAD^1, which the --depth=2 checkout already holds, so it never fetches.
  • merge_group: base_sha is at most 5 entries behind the group head, so one --deepen=10 is enough.
  • The loop has no iteration cap, but it stops when the base is reached or the clone is no longer shallow. A failed fetch exits through git_checked, so it cannot spin.
  • The new test merge_group_deepens_a_shallow_clone_until_it_holds_base_sha covers the merge_group path.

Note: no CI run exists yet at 29a9713. The gate action's base check uses jq, and this is the first time it runs on macOS and Windows runners, including windows-11-arm. Confirm that step passes on all five platforms before you make the checks required.

🤖 Generated with Claude Code

…-label

ci.yml runs check (<platform>) and coverage (<platform>) on five
platforms for pull requests and the merge queue, through the gate action
and gate_base. check keeps the evidence-status queue guard and runs
whole-repo dx generate on linux_x86_64. Every other ci.yml job runs only
on schedule or dispatch. The ruleset requires the 10 contexts and queues
merges with a 180-minute check timeout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hyBydsMejdwk6QdKus
@TrapsterDK
TrapsterDK force-pushed the ci-pr-check-five-platforms branch from 29a9713 to 391e0e6 Compare November 23, 2026 22:28
@TrapsterDK

Copy link
Copy Markdown
Collaborator Author

Review: approve

  • Rebase: the content is unchanged from the approved 29a9713. The only change is the README (#4850) that main stripped, and tools/ci/prose_rules_allowlist.txt:1 (count 1) still matches.
  • .github/actions/gate/action.yml:47: the new condition cannot hide a failure. The failed dx step still fails the job. In run 45282171949, dx failed in all 10 jobs, all 10 jobs failed, and the base check ran and passed on all five OSes. If dx dies before it writes affected.base, a job that is already red gets a second, noisy error.
  • Run 45282171949: every failure is on main or in files this PR doesn't touch. The tools/ci allowlist and tree guards, consumer_deps_test, versions_contract and language_skeleton_test match pr-check run 45285097271. The nested consumers have stale locks or time out. The Windows workflow_files_test fails only on consumer_inputs_test.rs:12,30. windows_arm64 fails on the Dart SDK.
  • .github/workflows/ci.yml:81-86: the whole-repo dx generate is red on main's stale pubspec.lock files and 37 BUILD files that need regenerating. This was already true at the approved head. check (linux_x86_64) stays red until main is regenerated.

🤖 Generated with Claude Code

@TrapsterDK
TrapsterDK merged commit 51d4be3 into main Nov 23, 2026
28 of 38 checks passed
@TrapsterDK
TrapsterDK deleted the ci-pr-check-five-platforms branch November 23, 2026 23:22
TrapsterDK added a commit that referenced this pull request Nov 24, 2026
* ci: gate skips nested-consumer tests like pr-check did (part of #14770)

The per-OS check and coverage jobs from #14772 run dx --affected without
the old pr-check exclusion, so the nested-Bazel consumer tests time out
in a 60 s small slot on every PR that touches them. A gate config
restores the manual, resources:nested_bazel:1, starter-consumer and
network-consumer exclusion and keeps coverage's own filters. The nightly
network job still runs them; #14793 brings them back into the gate.

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

* ci: pass the nested-consumer tag filter from the gate action

A .bazelrc change widens dx --affected to //..., so keep the filter in
the gate action instead of a .bazelrc config.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
TrapsterDK added a commit that referenced this pull request Nov 24, 2026
…h it

docstrfmt sat in the core shard, which every scoped check attaches, so a
Rust-only consumer resolved @dx_prebuilt//:python_tool_docstrfmt. Off a
release that falls back to the rules_py source tool and fetches its 81
rules_py repos. docstrfmt now has its own real_docstrfmt_format shard,
attached only when the probe selects it, like biome and vale.

Part of #14772

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hyBydsMejdwk6QdKus
TrapsterDK added a commit that referenced this pull request Nov 24, 2026
…h it

docstrfmt sat in the core shard, which every scoped check attaches, so a
Rust-only consumer resolved @dx_prebuilt//:python_tool_docstrfmt. Off a
release that falls back to the rules_py source tool and fetches its 81
rules_py repos. docstrfmt now has its own real_docstrfmt_format shard,
attached only when the probe selects it, like biome and vale.

Part of #14772

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hyBydsMejdwk6QdKus
TrapsterDK added a commit that referenced this pull request Nov 24, 2026
…h it (#14801)

* quality: give docstrfmt its own format shard so only rst targets fetch it

docstrfmt sat in the core shard, which every scoped check attaches, so a
Rust-only consumer resolved @dx_prebuilt//:python_tool_docstrfmt. Off a
release that falls back to the rules_py source tool and fetches its 81
rules_py repos. docstrfmt now has its own real_docstrfmt_format shard,
attached only when the probe selects it, like biome and vale.

Part of #14772

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

* core: shrink the consumer module and extension budgets to what the quickstart measures

The quickstart consumer resolves 77 modules and locks 13 extensions on
linux_x86_64, locally and in the lock-refresh runs since 2026-11-22.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
TrapsterDK added a commit that referenced this pull request Nov 24, 2026
…ns a copy of dx (#14800)

Bazel exits 1 for a failed build as well as a lock tool's "stale", so dx
generate builds each resolver before running it. The gate builds dx and runs
a copy outside bazel-bin, so the lock tool runs inside dx can rebuild dx on
Windows, which cannot replace a running exe.

Part of #14772


Claude-Session: https://claude.ai/code/session_01Xut2hyBydsMejdwk6QdKus

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review Touches review paths; needs a second-session Review: comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: pr-check runs the consumer CI on all five platforms

1 participant