Repository navigation
Commit 56986e9
Fixes #23058
Clause-②: no
Both `Test Core` timing steps, "Check this shard's timing drift" and
"Check the per-package suite-duration ceilings", are now report-only on
every event, `schedule` included. A package over its ceiling or a shard
past its drift bound prints the same table, raises `::warning::`
annotations and exits 0. Ruling: #22949 letter E, item 1, the
maintainer's word 「22949 同意」
(#22949 (comment)).
A refusal (a missing `--event`, a malformed ceiling table or raise
record, a dataset or run summary that does not parse) stays red on every
event, as ACCEPT 6119677604 decided.
The diagnosis the ruling rests on, in two sentences: a wall-clock
reading on a shared runner measures the run's load as much as the code
(the same package reads 82 s on a quiet hour and 209 s on a busy one,
2.56x, while the ceiling formula allows 2.0x of weight); the baseline
window was mostly quiet-density and every event, `schedule` included,
meets both densities, so busy hours red the same near-ceiling packages
whatever their code does: density, not code.
## What changed
- `scripts/partition-test-shards.mjs`: `TIMING_GRADED_EVENT` is removed.
`timingGateMode(event)` returns `report` for every event and still
throws on a missing or empty one. `renderDriftVerdict` has one DRIFT
path: one `::warning::` annotation, exit 0. `timingModeNote` says the
mode once. Header carries the ruling URL and the two-sentence diagnosis.
The formula, the 1.3x and 1.5x constants and the dataset are untouched.
- `scripts/check-test-suite-ceilings.mjs`: imports lose
`TIMING_GRADED_EVENT`; `renderCeilingVerdict` has one OVER path (one
`::warning::` per package over, exit 0; `REFUSED` still exits 1). Header
carries the ruling URL and the diagnosis, the exit-code section is
rewritten. `CEILING_FLOOR_SECONDS`, `RULED_CEILING_RAISES` and the
dataset reader are untouched. `RED_STATUSES` and the local `red` are
renamed `OVER_STATUSES` and `overs`, because nothing is red any more.
- `.github/workflows/ci.yml`: comments only. The step names, `--event
"$GITHUB_EVENT_NAME"`, `if:` and `continue-on-error` of both steps are
byte-identical (checked: no non-comment line of the file changed). The
drift step and the ceilings step say why no event grades; the aggregator
note that called the ceilings step "a gate that DOES red the job" now
says it reds only on a refusal.
- Self-tests: every event is a report case. The graded-mode cases became
report-mode cases, the refusal cases are unchanged, and each file gained
a sweep case that fails if any tier on any event exits non-zero or
raises an `::error::`. Both batteries keep their pinned case floor (8);
the ceilings self-test still reads 58 cases across 9 batteries.
## The spelling of the mode
`TIMING_GRADED_EVENT` is removed rather than set to a value no event
matches. With a never-matching constant the exit-1 branch and its
`::error::` annotation would stay in the file with nothing able to reach
them, and a dead branch reads as a switch someone may flip. With the
constant gone there is no graded mode to select, the self-test says it
as one line (every event reads `report`), and grading a timing again is
a new ruling and a new edit, not a flag. `timingGateMode` keeps its name
and its refusal, which is what the ruling and ACCEPT 6119677604 name.
## Verification
At head 8197058 (after merging origin/main):
- `node scripts/check-test-suite-ceilings.mjs --self-test`: "self-test
OK (58 cases across 9 batteries)", exit 0.
- `node scripts/partition-test-shards.mjs --self-test`: "self-test OK
(72 measured packages, 74 shard items, 6 shards, ...)", exit 0.
- CLI on fixtures, ceilings (live dataset, `@objectstack/client` ceiling
179.74 s, fixture run 209 s): `--event` schedule, merge_group,
pull_request, push and workflow_dispatch each exit 0 with exactly one
`::warning::` and no `::error::`; no `--event` exits 1 with the refusal;
a fixture within its ceiling exits 0 with no annotation.
- CLI on fixtures, drift (`@objectstack/client` predicted 111.17 s):
measured 180 s (DRIFT, 1.62x), 150 s (WARN, 1.35x) and 100 s (OK) each
exit 0 on all five events, with one `::warning::` for DRIFT and WARN and
none for OK; no `--event` exits 1.
- `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived 59 commands from this diff, plus
`pnpm check:doc-authoring` which I added: 56 exit 0, 4 exit 3 (below).
`--ran` reconciles: 59 derived, 55 run, 4 NOT-MEASURED, 0 UNRUN. The
parity checkers named in ACCEPT 6119677604 are all in the 56 green:
self-test-workflow-commands, step-collectors, workflow-status-functions,
required-contexts, aggregator-roster, ratchet-remedy-authority,
stall-guard-budget, stall-guard-headroom, workflow-step-name-quoting,
shard-attestation. So are `check:nul-bytes`, `check:pm-dispatch-gates`
and `check:entry-guard`.
- NOT MEASURED, exit 3 PREREQUISITE NOT MET (no `dist/` in a fresh
worktree): `check:dts-closure`, `check:dual-build-cjs-loads`,
`check:lean-entry-closure`, `check:sourcemap-no-sources-content`. They
are Build Core's family, derived because ci.yml is on that job's path
filter. This diff touches no package, so no `dist/` content can differ;
Build Core builds the closure and runs them.
- Reverse verification (fix committed first, each leg through
`scripts/ablation-replace.mjs` in wrap mode, restore proved by blob hash
equal to HEAD and an empty `git diff HEAD`): re-grading ceilings on
`schedule` (`exitCode: event === 'schedule' ? 1 : 0`) turned the
ceilings self-test red ("over: exit 1, verdict OVER"); the same in the
DRIFT return turned the partition self-test red ("a DRIFT rendered DRIFT
exit 1"); `timingGateMode` returning `grade` for `schedule` turned it
red ("schedule read a mode other than report"). Direction: red in all
three, the common case. These are one-time proofs; no permanent test
file was added for them.
- Not applicable: package `pnpm test` and `pnpm typecheck` (no package
changed), changeset (workflow and tooling only, `skip-changeset`).
## Acceptance notes
- Declared file surface: the claim named the comments of the two timing
steps. One more comment changed, the aggregator note near `ci.yml:1470`,
because it called the ceilings step "a gate that DOES red the job" and
this PR makes that false. No other edit is outside the claim.
- The comments in `partition-test-shards.mjs` above the new header block
still say "the red" for the DRIFT bound (they carry the 1.5x
measurement). One sentence in the new block says the DRIFT bound is the
upper warning tier since this ruling. The self-test battery key "drift
warning tier under the red" is unchanged so the pinned roster does not
move.
- A missing `--event` still surfaces as an uncaught throw with a stack
trace, the cosmetic ACCEPT 6119677604 already recorded as non-blocking.
Only the message text changed.
- Regression detection for the wall moves to E2 (#23059), the dataset
refresh diff and the per-file budget; until it lands a real slowdown is
visible as the warning annotation only. #23007 is settled by ruling item
4 through the seat, not by this PR's merge.
- Acceptance on `main` after landing: the first hourly `schedule` run
shows the two steps green with their `::warning::` annotations where a
package is over. That reading is the seat's, after merge.
- `.github/workflows/ci.yml` is under the round's Tier H posture, so
this PR stays a draft until a `GOVERNED_APPROVERS` member approves it.
## 维护者速读(草稿)
### 改了什么
主干上每小时一次的定时全量跑(`schedule`)里,`Test Core`
的两个计时检查——"单个包的测试耗时上限"和"分片耗时漂移"——不再因为超限而变红,改成只在日志里给一条黄色警告,步骤照样通过。定时、合并队列、PR、手动四类事件一视同仁。耗时公式、20
秒下限、上限提升登记表、数据集和每小时刷新的流程都没有动;`ci.yml`
里只有注释变了,步骤名、`if:`、`continue-on-error` 一个字节没动。
### 为什么改
这是 #22949 裁决 E 的第 1 项(您的原话「22949 同意」)。同一个包在安静的小时跑 82 秒,在繁忙的小时跑 209
秒(2.56 倍),而上限公式只容许 2.0 倍;所以主干定时跑 4 次里有 3
次变红,红的是机器负载,不是代码,每次都要有人按"主干红"规则去修一个并不存在的回归。
### 风险与代价(含回滚)
代价:计时变慢不再让构建变红,真正的变慢要等后续的 E2(#23059,数据集刷新时对比差分,外加单文件 10
秒预算)才有系统化的发现手段;在它落地前只有黄色警告可看。风险低:只改计时检查的退出码和注释,测试本身和其它门禁不变;缺少
`--event`、表格或登记记录格式错误这类"拒收"仍然是红灯,不会悄悄放行。回滚:revert 本 PR 即回到只有 `schedule`
会红的状态。
### 席位意见
### 你要做的
本 PR 改了
`.github/workflows/ci.yml`,按本轮的受管面姿态保持草稿,请有批准权的维护者审阅后批准,批准后由归口席位入队。合并后看第一次整点的定时跑:两个计时步骤应为绿色,超限的包带黄色警告;随后
#23007 按裁决收口。
---
_Generated by [Claude
Code](https://claude.ai/code/session_01LqNgdPZB2Jnr5HpGbaqLeB)_
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 63d5db2 commit 56986e9
3 files changed
Lines changed: 375 additions & 295 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1081 | 1081 | | |
1082 | 1082 | | |
1083 | 1083 | | |
1084 | | - | |
| 1084 | + | |
| 1085 | + | |
1085 | 1086 | | |
1086 | 1087 | | |
1087 | | - | |
1088 | | - | |
1089 | | - | |
1090 | | - | |
1091 | | - | |
1092 | | - | |
1093 | | - | |
1094 | | - | |
1095 | | - | |
1096 | | - | |
1097 | | - | |
1098 | | - | |
1099 | | - | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
1100 | 1110 | | |
1101 | 1111 | | |
1102 | 1112 | | |
| |||
1105 | 1115 | | |
1106 | 1116 | | |
1107 | 1117 | | |
1108 | | - | |
1109 | | - | |
1110 | | - | |
1111 | | - | |
1112 | | - | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
1113 | 1123 | | |
1114 | 1124 | | |
1115 | 1125 | | |
| |||
1459 | 1469 | | |
1460 | 1470 | | |
1461 | 1471 | | |
1462 | | - | |
1463 | | - | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
1464 | 1476 | | |
1465 | 1477 | | |
1466 | 1478 | | |
| |||
1516 | 1528 | | |
1517 | 1529 | | |
1518 | 1530 | | |
1519 | | - | |
| 1531 | + | |
1520 | 1532 | | |
1521 | | - | |
1522 | | - | |
1523 | | - | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
1524 | 1539 | | |
1525 | 1540 | | |
1526 | 1541 | | |
| |||
1538 | 1553 | | |
1539 | 1554 | | |
1540 | 1555 | | |
1541 | | - | |
1542 | | - | |
1543 | | - | |
1544 | | - | |
1545 | | - | |
1546 | | - | |
1547 | | - | |
1548 | | - | |
1549 | | - | |
1550 | | - | |
1551 | | - | |
1552 | | - | |
1553 | | - | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
1554 | 1576 | | |
1555 | 1577 | | |
1556 | 1578 | | |
| |||
0 commit comments