Skip to content

Commit 97e3ffe

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-16752-collectflowgraphs-nonrecord-members
2 parents 62d8642 + 0939ba0 commit 97e3ffe

5 files changed

Lines changed: 474 additions & 67 deletions

File tree

.github/workflows/ci.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,33 @@ on:
44
push:
55
branches:
66
- main
7+
# ⭐ NO `branches:` filter here, deliberately (#16482). A `pull_request:`
8+
# trigger filtered to `branches: [main]` does not run at all when the PR's
9+
# base is a feature branch — and a workflow that does not run publishes NO
10+
# check run, which is an ABSENCE, not a skip. Branch protection reads that as
11+
# permanently pending, so every required context this file publishes reports
12+
# nothing on such a PR. Measured on the #14478 stack: six card PRs showed
13+
# 8-11 light checks and ZERO of the six required contexts; the first real
14+
# signal arrived at the trunk PR, after every card was written, reviewed and
15+
# merged. Correctness rested on local runs quoted into PR bodies — a
16+
# discipline, not a gate.
17+
#
18+
# Runner cost of removing the filter, measured 2026-09-08 over the 30 days
19+
# 2026-08-09 → 2026-09-08 (4000 PRs read, `sort=created&direction=desc` paged
20+
# until the window closed): 6 of 4000 PRs had a base other than `main`
21+
# (0.15%), all six the #14478/#15679 stack. At the window's measured 7008
22+
# pull_request runs per workflow, 0.15% is ~10.5 extra runs per workflow per
23+
# 30 days ≈ 2.5/week, or ~57 job-runs/week across both files at 23 job-runs
24+
# per PR event. Even the pessimistic bound — one uncancelled run per one of
25+
# those PRs' 115 commits — is 1.6% of current pull_request spend. Small, so
26+
# the trigger is widened unconditionally rather than gated on a label or on
27+
# "the base is an open PR's head" (#16482 records the arithmetic).
28+
#
29+
# ⛔ Do NOT mirror this widening onto the `push:` trigger above. `push:` is
30+
# per-branch, not per-PR: unfiltering it would run this workflow on every
31+
# push to every agent branch in the repo, which is a different and far larger
32+
# population than the 6 PRs measured here.
733
pull_request:
8-
branches:
9-
- main
1034
# Merge queue: the queue builds each PR as speculatively merged onto the
1135
# current main and only lands it if this workflow is green on that result —
1236
# the race-free version of the "pull main and re-verify before merging"

.github/workflows/lint.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,23 @@ on:
44
push:
55
branches:
66
- main
7+
# ⭐ NO `branches:` filter here, deliberately (#16482) — see ci.yml's `on:`
8+
# block for the full rationale and the measured runner cost; both files carry
9+
# required contexts and are widened together, because six contexts split
10+
# across two files are only as reachable as the less reachable file.
11+
#
12+
# ⚠️ The MEASURED 2026-08-25 (#12211) block immediately below does NOT bind
13+
# on this widening, and it is not touched by it. Read what it measured: it is
14+
# a `merge_group` COVERAGE result — "is there a queue-build gap to close" —
15+
# answered NO, plus a ⛔ against adding `merge_group` to the ADVISORY
16+
# workflows. It says nothing about the `pull_request:` trigger's `branches:`
17+
# filter, and its residual is explicitly named as two repository SETTINGS
18+
# (a commit reaching main with no queue build; `strict_required_status_checks
19+
# _policy: false`), "neither reachable from this file". Removing a base-branch
20+
# filter from `pull_request:` changes no merge_group behaviour whatsoever:
21+
# `merge_group:` is a separate trigger key, still present below, and
22+
# `check:required-contexts` assertion 6 fails the build if it ever is not.
723
pull_request:
8-
branches:
9-
- main
1024
# Merge queue (see ci.yml for the full note): required checks must report on
1125
# queue builds or the queue stalls. This workflow has no PR-only steps, so
1226
# the trigger alone is enough.

.github/workflows/pr-automation.yml

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,41 @@
11
name: PR Automation
22

3+
# `edited` is load-bearing, not decoration (#16776). The PR BODY is an input to
4+
# the Check Changeset job below: `check-changeset-no-major.mjs` reads the
5+
# clause-② declaration out of `github.event.pull_request.body`, and that job
6+
# refuses a PR whose declaration is unreadable while a changeset grades `patch` a
7+
# package the diff grew. A verdict whose input is the body has to re-fire when
8+
# the body changes, for the reason this file already writes out twice for labels:
9+
# the payload is a SNAPSHOT, and `rerun_failed_jobs` replays that same frozen
10+
# payload, so without `edited` a red cleared by writing `Clause-②: no` in the
11+
# body could not be cleared at all without pushing a commit. Manufacturing a
12+
# `synchronize` to get a body read is not hypothetical -- PR #16342 took a
13+
# deliberate `git merge origin/main` after a body edit for exactly that, and the
14+
# run it produced is the first measured pass in that round where the gate read
15+
# the line.
16+
#
17+
# Sibling shape, deliberately copied rather than reinvented: this repo's two
18+
# other PR-body-scoped blocking checks -- `duplicate-fix-guard.yml` and
19+
# `partof-closing-keyword-guard.yml` -- already take `edited` and already carry
20+
# this argument.
21+
#
22+
# COST, measured rather than waved at (2026-09-01..09-08, this repo's own run
23+
# counts through `GET /actions/workflows/<file>/runs?event=pull_request`):
24+
# a workflow on the DEFAULT types (`check-links.yml`, [opened, synchronize,
25+
# reopened]) recorded 1967 runs; the two `edited`-subscribed workflows above
26+
# recorded 2524 each, agreeing exactly. So `edited` is ~557 events / 8 days
27+
# (~70/day), against this workflow's own 3684 -- about +15%. One Check Changeset
28+
# job is ~46s (job 101999797457). The two jobs above it are excluded from
29+
# `edited` below, so that +15% buys exactly one job and not three.
30+
#
31+
# NOT filtered to `github.event.changes.body`, and that is deliberate. Such a
32+
# filter would trim title-only edits, and its failure direction is the defect
33+
# coming back silently -- an expression that misjudges `changes.body` on an
34+
# empty previous body stops the gate re-reading and nothing says so. The volume
35+
# above does not buy that risk.
336
on:
437
pull_request:
5-
types: [opened, synchronize, reopened, labeled, unlabeled]
38+
types: [opened, synchronize, reopened, labeled, unlabeled, edited]
639

740
jobs:
841
# ===========================================================================
@@ -96,7 +129,14 @@ jobs:
96129
name: Check PR Size
97130
# A `labeled`/`unlabeled` event cannot change this job's input (the diff),
98131
# so running it there recomputes the same answer for a fee. See above.
99-
if: github.event.action != 'labeled' && github.event.action != 'unlabeled'
132+
# `edited` (#16776) is excluded by the SAME sentence and not by a new one: a
133+
# title or body edit moves no file either. Excluding it also keeps this job's
134+
# behaviour byte-identical to what it was before `edited` was subscribed --
135+
# the trigger was added for the changeset job's body reading and buys one job.
136+
if: >-
137+
github.event.action != 'labeled'
138+
&& github.event.action != 'unlabeled'
139+
&& github.event.action != 'edited'
100140
runs-on: ubuntu-latest
101141
permissions:
102142
# `contents: read` is for the checkout the label writer needs. Declaring
@@ -159,10 +199,15 @@ jobs:
159199
# scans only `needs.*.outputs.*` reads, so this one is out of its scope and
160200
# has to state its intent by hand.)
161201
needs: pr-size
202+
# `edited` excluded for the same reason as the size job above (#16776): the
203+
# path labels are a function of the changed FILES, which a body or title edit
204+
# does not move. The `edited` trigger was added for the Check Changeset job's
205+
# body reading, and nothing here reads the body.
162206
if: >-
163207
!cancelled()
164208
&& github.event.action != 'labeled'
165209
&& github.event.action != 'unlabeled'
210+
&& github.event.action != 'edited'
166211
runs-on: ubuntu-latest
167212
permissions:
168213
contents: read

0 commit comments

Comments
 (0)