Skip to content

fix(ci): stop three gates from reddening unrelated pull requests - #14518

Merged
bolichen97 merged 1 commit into
mainfrom
fix/unbreak-main-three-gates
Sep 27, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/unbreak-main-three-gates

Conversation

@bolichen97

@bolichen97 bolichen97 commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: a contributor opening a pull request sees only their own failures, instead of inheriting three red lanes from main that name files they never touched.

no linked issue: found by attributing three CI reds on an unrelated pull request
(#14327) rather than from a filed report, so there is no issue to close on merge.

Three gates on main are failing on every open pull request at once, on three
separate lanes, for reasons none of those branches contain.
Measured 18:00-18:25
UTC by reading the head check-runs of the most recently updated open PRs:

lane failing on what it reports
Electron Shell Tests 9 of 10 port vocabulary in gateway-supervisor.js claimed by no list
Frontend Tests (2) 6 of 10 bnStyle.test.ts: 9 Bengali-digit values against a ceiling of 8
Backend Tests (3.12, 2) 4 of 7 carrying the test test_oneshot_supervisor.py, assert supervisor.can_reap()

The one pull request green on all three sits 75 commits behind main — it
predates the breakage, which is the confirmation rather than a counterexample.

Why it matters

Every one of those authors now has to prove a red is not theirs before they can
read their own result, and the fastest honest way to do that — reproduce on a clean
base worktree — costs an hour. The bill for a merge lands on strangers, repeatedly,
until someone happens to fix it. Backend Tests (3.12, 2) is worse than the other
two because it is fleet-dependent: it passes on some runners, so a rerun can look
like a fix and the breakage survives.

These are not flakes. Each is deterministic given its input; what each gets wrong is
who it reports to.

Not a goal

  • Not clearing the inherited debt behind the numerals ceiling. Seven values in the
    catalog still carry Bengali digits; they are the baselined inheritance and are not
    this change's to rewrite. The ceiling stays at 8 rather than being tightened to 7,
    because branches are in flight against it and a tightened ceiling would move the
    bill rather than remove it — the diff-scoped half added here is what stops a new
    violation from ever reaching the count.

  • Not closing the weakness the port-owner pin exists to record (security: POSIX port-owner classification trusts argv0, so a same-user process can present itself as ours #13826 / Bind the local mint identity to its connection by moving it onto the unix socket #13862).
    The six sites are registered as IDENTITY sites because that is what they are; that
    an identity verdict can rest on the holder's argv is unchanged and still tracked.

  • Not auditing the fleet. Why some runners refuse pidfd_open is a host question;
    this change makes the test stand aside where the capability is absent, which is
    what the rest of the file already does.

  • Not the Bundle Size Gate, which is red on 6 of 12 other open pull requests and
    is therefore a fourth gate of the same character. It is a different KIND of
    defect: assets/t-*.js (the i18n runtime chunk) is 28 B past a 955 KB ceiling
    whose own comment records it as "measured ~909 KB … (~5% headroom)", so main's
    chunk has grown ~46 KB and spent that headroom. The sanctioned remedies are a
    lazy-import boundary, a codeSplitting group, or a re-measured ceiling justified
    by whatever grew — a product bundle decision, not a test-gate shape, and not one
    to smuggle in under a PR about who a gate bills. Raising a budget to clear a red
    is the exact move the repo warns against, so it gets its own change.

What changed (motivation → approach → change)

bn numerals — a count ceiling with no diff-scoped companion.
expect(bad.length).toBeLessThanOrEqual(8) tolerates inherited debt, which is fine,
but it cannot say whose violation it is: a branch that adds one rides under the
ceiling and the round that finally reds belongs to whoever runs next. Two values
crossed it — app.metrics_card_old_data (৯০) and
pages.membersPage.create_name_unusable (৫০০), added in separate PRs. Both now use
Western digits per style/bn.md §2, returning the count to 7, and the numerals rule
gains the [changed-values] half that §5's register check in the same file already
had: the count keeps guarding the inheritance while the values a branch writes are
held at zero, so the failure names the key and its owner. Nothing is stored, so
two i18n branches still have no ledger line to conflict on.

The three sibling ceilings, paired in the same change. First Principles was
right that shipping the rule while leaving its own siblings unpaired is a point
patch against its stated cause — one of them in the very file this edits. So
bnStyle.test.ts's dari ceiling (30), hiStyle.test.ts's purna-viram ceiling (30)
and ruStyle.test.ts's guillemet ceiling (20) each gain the same [changed-values]
companion over the same rule, using the changedXxValues() helper each file already
carries. First Principles then counted the directory and found the claim overstated —
deStyle.test.ts's English-compound ceiling (12) and frStyle.test.ts's
accented-capitals ceiling (11) were still unpaired — so those two are paired as
well, with their word-pair lists hoisted to the describe so the ceiling and its
companion cannot come to disagree about what a violation is. All 10 count ceilings
under website/src/i18n/style/ now carry one.

Port-owner registration pin — new sites never declared. A restart-handoff
identity check (successorOwnsPort) and an adopt-refusal arrived in
gateway-supervisor.js without being registered, leaving one probe call and seven
sentinel literals unclaimed. Six sites are added, all to IDENTITY_SITES, because
each decides who holds the port rather than whether anything does — the
distinction the pin exists to keep. The pin was not weakened and no site was
reclassified.

pidfd ctypes fallback — a test that asserted a host capability.
assert supervisor.can_reap() is a claim about the runner, not about the code under
test, so it failed wherever the capability was absent instead of standing aside.

Two rounds of GPT 5.6 findings on this one site moved it from "skip on a boolean" to
a shape with no capability gate at all, which is what the lane was asking for and
is a better test than either earlier version:

  • The fallback assertion is now an equivalence: with the wrappers deleted,
    _pidfd_open must answer exactly what os.pidfd_open answered for the same pid —
    both a descriptor, or both the same errno. That holds on EVERY Linux host, so
    nothing vacates: a container that refuses pidfd fails both paths identically and
    the assertion still runs, a fallback that cannot resolve syscall raises a
    non-OSError and fails, and one passing a wrong syscall number answers a different
    errno from the wrapper and fails. On an interpreter with no wrapper to compare
    against — the python-build-standalone case the fallback exists for — it asserts the
    call REACHED the kernel rather than having died inside ctypes.
  • The end-to-end half — spawn a child, signal it through the fallback, expect
    SIGKILL — genuinely needs the kernel to grant a descriptor, so it is now its own
    test carrying this file's existing @reaping marker. The precondition is declared
    where the file already declares it instead of being inferred from a boolean that
    conflates "this host cannot" with "the fallback is broken".

Docs, in the same commit as the code they cover.

  • testing-conventions gains
    "A gate that reds on someone else's pull request": the three shapes, their fixes,
    and the two diagnostic techniques used here — probe other PRs' heads before
    believing a red is yours, and diff the passed/skipped counts between a passing and
    a failing run of the same shard to tell a capability gap from a real break.
  • i18n-gates already required a diff-scoped companion for
    an upward-only ratchet; the rule now states that an inline toBeLessThanOrEqual
    ceiling is bound by it too, and why an inline one is strictly worse without it.
  • website/docs/testing.md names the two front-end gates
    that scan the whole tree, so a diff-scoped local run does not select them.

Three rounds on one file, and why each was fixed rather than escalated

GPT 5.6 raised a blocking finding on test/test_oneshot_supervisor.py three times,
which is the third-recurrence threshold, so the retrospective came before the edit.
Each round names a DIFFERENT construct, and each construct was introduced by the
previous round's own fix:

  1. the can_reap() skip I added hid a fallback break on wrapper-less interpreters;
  2. making that skip conditional on the wrapper still vacated the assertions on a
    wrapper-present host whose kernel refuses pidfd;
  3. the equivalence restructure removed the skip entirely, but its native is None
    branch accepted any non-zero errno, so a wrong syscall number stayed green on the
    one host class that has no second path to catch it.

That is a new site each round rather than one mechanism failing three times, and the
test got strictly stronger at every step — a skip, then a narrower skip, then no
skip at all. The remaining remedy is bounded exactly as the adjudication described
it: one independent raw syscall(434) comparison inside the existing branch, no new
module state and no cross-module contract. So the restructure trigger does not
apply, and the fix belongs here rather than in an escalation.

The oracle is deliberately NOT a copy of the code under test: the module reads its
own _SYS_PIDFD_OPEN, so comparing against a syscall number the test file states is
what pins that constant. Assuming it instead would leave a wrong constant green,
which is the finding.

Backwards compatibility

Compatible. No production code path changes: the diff is two catalog strings, two
test files, one test-registration list and three docs. The two catalog values are
user-visible Bengali strings whose digits change script (৯০ → 90, ৫০০ → 500), which
is what style/bn.md §2 requires of them.

Tests

  • npx vitest run src/i18n — 44 files pass with I18N_BASE_REF=origin/main set, so
    the diff-scoped halves actually evaluate rather than skipping.
  • node --test website/electron/test/port-owner-self-asserted-identity.test.js —
    7/7.
  • pytest test/test_oneshot_supervisor.py test/test_kiro_prerequisite.py — 214
    passed, 30 skipped. Both pidfd tests collect and stand aside on this Windows
    host (sys.platform != "linux"), which is why the equivalence argument below is
    stated as a construction rather than as a local measurement.
  • Gates: npm run build, npx tsc -p tsconfig.app.json, eslint, npm run jscpd
    (0 clones), check_black_formatting, isort, flake8, mypy (1738 files),
    check_comment_history, check_subprocess_encoding, docs_lint — all clean.

Red-first, each production hunk reverse-patched and the test observed red, then
restored:

reverted result
a catalog value back to its Bengali digits, as a value that DIFFERS from main the new [changed-values] assertion reds and names pages.membersPage.create_name_unusable — while the count ceiling stays silent at 8, which is the whole point
any one of the six registered sites the pin reds naming that line as unclaimed
a de value given "Slack Integration" the new de companion reds naming terminalTab.rename: should be 'Slack-Integration'
a fr value given "Etat" the new fr companion reds naming terminalTab.rename: has 'Etat' not 'État'

Manual verification

Two things this Windows host cannot prove, stated plainly rather than implied:

Screenshots / video

N/A — no user-visible frontend surface changes. The two catalog edits change digit
script inside existing Bengali strings.

Pattern harvest

Rule candidate: agents-md / review-prompt — a count ceiling (toBeLessThanOrEqual,
a ratchet number, a baselined list length) must ship with a diff-scoped
zero-tolerance companion over the same defect. Without one it does not fail the
branch that introduces the violation; it fails whichever branch is unlucky enough to
cross the number, which makes it a gate that bills a stranger.

Rule candidate: review-prompt — when a change adds a call site of a shape some pin
scans the whole tree for, the local diff-relevance run will NOT select that pin. Ask
for the tree-scan pins explicitly. Two exist on the front end
(port-owner-self-asserted-identity, the i18n style tests) and ~41 on the backend.

Not generalizable: which runners in this fleet refuse pidfd_open is a host fact,
not a rule. What generalizes is the shape — assert the code, gate on the host — and
the cheap way to tell them apart from a CI summary alone (the passed/skipped count
delta), which is now written down.

@bolichen97
bolichen97 requested a review from a team September 27, 2026 19:07
@bolichen97
bolichen97 requested a review from a team as a code owner September 27, 2026 19:07
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 27, 2026
@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5) — ✅ PASS

UX-level review of 60309b3bd4f88057065c4137d9f43b879ecd4c2c — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: PASS

Nothing to check.

[UX-REVIEWED] 60309b3

@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of 60309b3bd4f88057065c4137d9f43b879ecd4c2c — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Confirm the six new IDENTITY_SITES registrations are correctly classified against the pin's intent (#13826/#13862) — that classification is the one judgment call here.

[DESIGN-REVIEWED] 60309b3

@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of 60309b3bd4f88057065c4137d9f43b879ecd4c2c and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 60309b3

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 60309b3bd4f88057065c4137d9f43b879ecd4c2c: <one-sentence reason>

@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ PASS

Premise-level review of 60309b3bd4f88057065c4137d9f43b879ecd4c2c — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: PASS

Confirm the pidfd equivalence test green on a fleet runner that refused pidfd_open — the same-errno premise is only proven on that host.

What this change ships

Inventory (10 items) — 10 justified

Intent: FIX — a contributor's PR shows only their own failures instead of three red lanes inherited from main.

  1. Two Bengali catalog values (90-second staleness, 500-char limit) now use Western digits — justified
  2. bn numerals gate now names the branch that adds a Bengali digit, at zero tolerance — justified
  3. Five sibling ceilings (bn dari, hi purna viram, ru guillemets, de compounds, fr accents) gain the same diff-scoped companion — justified
  4. de/fr violation word-lists hoisted so ceiling and companion share one definition — justified
  5. Six restart-handoff and adopt-refusal port sites now declared in the identity pin's list — justified
  6. pidfd fallback test now compares fallback against os.pidfd_open instead of asserting host capability — justified
  7. End-to-end pidfd kill test split out behind the file's existing @reaping marker — justified
  8. testing-conventions gains the three gate-bills-a-stranger shapes and two diagnostics — justified
  9. i18n-gates now states inline ceilings need a diff-scoped companion — justified
  10. website testing doc warns that whole-tree gates escape diff-scoped runs — justified

Verified by grep: all 10 toBeLessThanOrEqual ceilings under website/src/i18n/style/ now carry a [changed-values] companion (6 added here, 4 pre-existing); all six registered code strings exist verbatim in gateway-supervisor.js; changedXxValues() and the @reaping/posix_only markers pre-exist; CI exports I18N_BASE_REF on every pull request, so the companions evaluate where it matters. The deleted assert supervisor.can_reap() is declared and replaced by a strictly stronger assertion, not recast as a gap.

[FIRST-PRINCIPLES-REVIEWED] 60309b3

@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5 Review — ✅ no blocking findings

Reviewed 60309b3bd4f88057065c4137d9f43b879ecd4c2c — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 60309b3

Verdict parsed from the review's SHA-scoped output markers for commit 60309b3bd4f88057065c4137d9f43b879ecd4c2c.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 60309b3bd4f88057065c4137d9f43b879ecd4c2c: <one-sentence reason>

@bolichen97
bolichen97 force-pushed the fix/unbreak-main-three-gates branch 3 times, most recently from 7a20784 to a2a184a Compare September 27, 2026 19:43
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 27, 2026
@bolichen97
bolichen97 force-pushed the fix/unbreak-main-three-gates branch from a2a184a to 01783f7 Compare September 27, 2026 20:04
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 27, 2026
Three gates on main were failing on every open pull request at once, on three
separate lanes, for reasons none of those branches contained. Measured at
18:00-18:25 UTC: Electron Shell Tests red on 9 of the 10 most recently updated
open PRs, Frontend Tests (2) on 6 of 10, Backend Tests (3.12, 2) on 4 of 7 that
carry the test at all. The one PR green on all three sits 75 commits behind main,
which is to say it predates the breakage.

They are three different shapes of one mistake -- a deterministic gate whose bill
goes to a stranger -- so each is fixed at the shape, not just at the instance.

bn numerals: a count ceiling with no diff-scoped companion. Two values carrying
Bengali digits landed in separate PRs (app.metrics_card_old_data,
pages.membersPage.create_name_unusable); the second crossed the ceiling of 8 and
the next round reported a key neither author had touched. Both values now use
Western digits per style/bn.md §2, which returns the count to 7, and the numerals
rule gains the [changed-values] half that §5's register check in the same file
already had: the count keeps guarding the inherited catalog while the values a
branch writes are held at zero, so the failure names the key and its owner.
docs/ci/i18n-gates.md already required exactly this pairing for the generated
ledger; the rule now says an inline ceiling is bound by it too.

Shipping that rule while leaving its own siblings unpaired would be a point patch
against its stated cause, so every other companion-less ceiling under
website/src/i18n/style/ is paired in the same change -- bnStyle's dari (30),
hiStyle's purna viram (30), ruStyle's guillemets (20), deStyle's English compounds
(12) and frStyle's accented capitals (11). The de and fr word-pair lists are
hoisted to their describe so the ceiling and its companion cannot come to disagree
about what a violation is; the rest reuse the changedXxValues() helper each file
already carries. All 10 ceilings in that directory now have one.

Port-owner registration pin: a restart-handoff identity check (successorOwnsPort)
and an adopt-refusal arrived without being declared, leaving one probe call and
seven sentinel literals unclaimed. Six sites are registered, all in
IDENTITY_SITES, because each decides WHO holds the port rather than whether
anything does. This pin scans the whole tree, so local-gate's diff relevance does
not select it -- which is how the sites merged green; website/docs/testing.md now
says so and names the two front-end gates with that property.

pidfd ctypes fallback: the test asserted a HOST CAPABILITY instead of gating on
one, so it failed wherever the capability was absent. It is restructured to need
no capability gate at all rather than to skip on a boolean, because a boolean
conflates "this host cannot" with "the fallback is broken":

- the fallback assertion is an EQUIVALENCE -- with the wrappers deleted,
  _pidfd_open must answer exactly what os.pidfd_open answered for the same pid,
  both a descriptor or both the same errno. That holds on every Linux host, so
  nothing vacates: a container refusing pidfd fails both paths identically and the
  assertion still runs, a fallback that cannot resolve syscall raises a
  non-OSError, and a wrong syscall number answers a different errno;
- where there is no wrapper to compare against -- the python-build-standalone
  interpreters the fallback exists for -- the oracle is a raw pidfd_open(2) whose
  syscall number this test file states. That is deliberately not a copy of the
  code: the module reads its own _SYS_PIDFD_OPEN, so comparing against a number
  stated here is what pins that constant, and accepting "some errno" instead would
  leave a wrong constant green on the one host class with no second path to catch
  it;
- the end-to-end half, which genuinely needs the kernel to grant a descriptor, is
  its own test carrying this file's existing @Reaping marker, so the precondition
  is declared where the file already declares it.

That the CI red was a host gap rather than a break is measurement, not inference:
the failing shard read 22089 passed / 1030 skipped / 1 failed against a passing
22094 / 1026, so four capability-gated tests stood aside there and only the one
that forgot to failed.

Verified red-first: reverting the bn catalog values reddens the new
[changed-values] assertion while the count ceiling stays silent; removing any one
registered site reddens the pin naming that line; planting a compound or an
unaccented capital reddens the new de and fr companions naming the key.
@bolichen97
bolichen97 force-pushed the fix/unbreak-main-three-gates branch from 01783f7 to 60309b3 Compare September 27, 2026 21:29
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 27, 2026
@bolichen97
bolichen97 merged commit f57c1de into main Sep 27, 2026
49 of 50 checks passed
@bolichen97
bolichen97 deleted the fix/unbreak-main-three-gates branch September 27, 2026 21:31
@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Sep 27, 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.

1 participant