Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -928,12 +928,17 @@ jobs:
# here is fine; moving them below that pair is not — and ⛔ that pair does
# not acquire an `if:` or a `continue-on-error:` to "match" these.
#
# The `--self-test` runs here because this is where CI names the script,
# which is what check:self-test-wired requires. ⚠ Under
# `continue-on-error` its verdict is VISIBLE but not enforcing: inside
# this workflow, no step this card may add is permitted to fail anything.
# Giving that self-test teeth means a `check:` step in lint.yml, which is
# deliberately NOT taken here.
# ⛔ The `--self-test` is deliberately NOT invoked here (#17097). It ran
# in this step until then, where `continue-on-error` discarded its verdict:
# the self-test reached an answer nothing could act on, and
# `check:self-test-wired` was satisfied by an invocation that could not
# fail. A self-test with no teeth is worse than no self-test, because its
# presence is what stops anyone from adding a real one. It now runs in
# lint.yml's `Lint & Repo Gates` job, as `Test-timing parser self-test`,
# with no `continue-on-error` — so a broken timing parser reddens there
# while this workflow keeps the report-only property #16454 ruled and
# #14469 measured the cost of losing. ⛔ Do not re-add it here; giving it
# teeth in `ci.yml` is exactly the trade-off those two cards refuse.
- name: Capture this shard's test timings
if: always()
continue-on-error: true
Expand All @@ -942,7 +947,6 @@ jobs:
echo "No test log — the test step did not get far enough to produce one."
exit 0
fi
node scripts/report-test-timings.mjs --self-test
node scripts/report-test-timings.mjs --capture \
--log "$RUNNER_TEMP/test-core.log" \
--summaries .turbo/runs \
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3943,6 +3943,31 @@ jobs:
- name: Shard partitioner self-test
run: node scripts/partition-test-shards.mjs --self-test

# A self-test that RUNS but cannot fail anything (#17097) — the sibling of
# the defect above, one turn further out. `scripts/report-test-timings.mjs`
# ships a real self-test: 61 cases across 4 batteries, a naive prefix-only
# reference parser plus three controls that assert it gets the answer WRONG
# exactly where the real parser gets it right. ci.yml names it, so
# `check:self-test-wired` was green. But every `Test Core` step that runs
# that script carries `continue-on-error: true`, and MUST: #16454 rules the
# timing feature report-only, and #14469 is the measured cost of an
# unguarded diagnostics step there (a FinalizeArtifact 403 on a 313-byte
# upload evicted a fully green shard from the merge queue). So the guard
# that makes the feature safe was the same guard that disarmed its
# self-test — the verdict was produced and then discarded, and the wiring
# gate was satisfied by an invocation that could not fail.
#
# ⇒ the self-test runs HERE, where it has teeth, and ⛔ is no longer
# invoked from ci.yml: ONE enforcing run, not one enforcing and one
# decorative. ci.yml's own `continue-on-error` on the capture and merge
# steps is untouched by this — the report-only property belongs to that
# workflow, not to this script.
# Invoked as `node` rather than through a `pnpm check:*` alias for the same
# reason as the steps above: see the GATE INVOCATION IDIOM note at the top
# of this file. In-process fixtures, no IO, milliseconds.
- name: Test-timing parser self-test
run: node scripts/report-test-timings.mjs --self-test

# Hand-written `.d.mts` mirrors (#10549). `scripts/js-comment-mask.mjs`
# and `scripts/check-regen-pending.mjs` are untyped `.mjs` that each ship
# a hand-written declaration beside them, and both files say "keep this in
Expand Down
20 changes: 15 additions & 5 deletions scripts/report-test-timings.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,21 @@
* summaries (`.turbo/runs/*.json`, uploaded per shard) carry per-PACKAGE
* execution windows and nothing finer.
*
* REPORT ONLY. Nothing here may redden `Test Core` -- that is the required
* branch-protection context, and a diagnostics step that can fail it buys a
* measurement at the price of the merge queue. Every workflow step that runs
* this carries `if: always()` and `continue-on-error: true`, and the tool
* itself degrades to a named refusal rather than throwing.
* REPORT ONLY IN `ci.yml`. Nothing in that workflow may redden `Test Core` --
* that is the required branch-protection context, and a diagnostics step that
* can fail it buys a measurement at the price of the merge queue. Every
* `ci.yml` step that runs this carries `if: always()` and
* `continue-on-error: true`, and the tool itself degrades to a named refusal
* rather than throwing.
*
* -- and that is a property of `ci.yml`, NOT of this script (#17097). This
* docblock used to claim it of "every workflow step that runs this", which
* made the `--capture`/`--merge` guard read as a licence covering the
* self-test too. `--self-test` runs in lint.yml's `Lint & Repo Gates` job with
* NO `continue-on-error`: a red verdict there is the whole point, and it is
* the only instrument watching the parsing rules below -- a clean tree cannot
* tell a working parser from a weakened one, which is what the naive-parser
* controls in the battery exist to say out loud.
*
* ## THE MEASUREMENT THAT CHOSE THE ROUTE (route (a): parse the stream)
*
Expand Down
Loading