Skip to content

ci: a change only to the recorded Node test times runs just the leg plan's check - #12303

Merged
josephfarina merged 4 commits into
mainfrom
ci/times-only-lane
Nov 17, 2026
Merged

josephfarina merged 4 commits into
mainfrom
ci/times-only-lane

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Maintainer impact

A pull request that changes only the recorded Node test times (scripts/vitest-node-durations*.json), such as the daily times refresh, ran the full suite as "test configuration": about 170 runner-minutes for a change that only reschedules which leg runs which file.

Intended invariant

A change only to the recorded Node test times runs the Node leg plan's check (a plan past its budget, or a record it cannot read, fails it), the Vitest tests that read the times, and the test join, which still requires every test owner's outcome. The times decide how Node legs are scheduled, never what a test checks. Beside any other path, the times run the full suite and keep a labelled visual plan broad, as today.

Change

  • change-scope.cjs: a new node-times surface for the recorded times. A change whose only surface is node-times takes the knowledge lane (spec_only) and is also named times_only. node-times stays shared infrastructure beside anything else.
  • ci.yml: the test join runs for times_only, as it does for the release bump, so a failing leg plan check fails the required test context.
  • fs-guard-tests.mjs: the recorded times count as a record whose readers run, so the knowledge lane runs the 8 Vitest files that read them (the leg planner, sequencer, admission, drift, refresh and minimum-Node tests).
  • vitest-node-legs.mjs: the plan fails when a recorded-times file cannot be parsed or records a value that is not seconds (recordProblem); before, an unreadable file planned every test as unrecorded and could still fit.
  • visual-scope.mjs: beside other paths, node-times keeps the labelled visual plan broad, as other test configuration does.
  • docs/specs/AST-030/spec.md: a node-times row in FR2's table, one FR13 sentence, and the FR13 verification state.
  • Tests: times-only changes get the knowledge lane and times_only; times beside a component, a record, a script or a workflow run the full suite; the join's condition; the times readers; recordProblem on a bad file and on the repository records; the visual plan beside a component.

Evidence

  • Before: 6 of the last 120 pull requests touched the recorded times. Each ran the full suite (median 170 runner-minutes per run).
  • After: a times-only pull request runs the specialized lane (median 12.9 runner-minutes), the leg plan's check, and the 8 Vitest files that read the times.
  • Product/runtime behavior verified unchanged: CI only.

Scope

Components: CI (change scope); AST-030 FR2, FR13

  • No intended public API, product behavior, visual direction, or policy change beyond the FR13 lane.
  • Product changes discovered during the work were removed or split.
  • Public text and artifacts contain no internal Meta context.

Testing

pnpm exec vitest run --project node .github/scripts/change-scope.test.mjs .github/scripts/ci-tooling-routing.test.mjs .github/scripts/fs-guard-tests.test.mjs .github/scripts/visual-scope.test.mjs scripts/vitest-node-legs.test.mjs .github/scripts/ci-test-routing.test.mjs .github/scripts/ci-test-join.test.mjs: all pass except the existing "fits the recorded Node suite" case, which fails on main today and passes once the Node leg plan scales past eight legs. pnpm check:knowledge passes.

Writing rubric results

  • Present tense, describes the system: yes.
  • No history, proposals or project status in the record: yes.
  • The existing owner (FR2 table, FR13) is amended; no new record: yes.

…lan's check

The recorded Node test times decide how the Node legs are scheduled,
never what a test checks, yet a change to them ran the full suite as test
configuration. A change only to them now takes the knowledge lane, which
runs no test for a change that holds no record; the Node leg plan's budget
check still runs and catches a bad file. Beside any other change they run
the full suite as before.
@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 17, 2026 12:04pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 17, 2026
@astracat-bot

astracat-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 17, 2026, 12:22 PM UTC

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 17, 2026
@josephfarina

Copy link
Copy Markdown
Contributor Author

Owner decision (engineering owner, under the CI authority that spec:AST-030 records): a pull request that changes only the recorded Node test times runs just the Node leg-plan check, since those numbers only balance the legs and never decide which tests run. spec:AST-030 FR2 and FR13 state the rule.

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 78c31a9

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 17, 2026
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · e8eac30

Storybook · Sandbox · built from this PR's head

Package size: no published package changed; no new dependencies.

Not run on this PR: add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.

CI impact: −0.1 job-min per update · pool −0.1% · time to green −25.6 min · standard runners · 10 CI action or script files changed (not measured)
Before After Change
Job-minutes per PR update 182 181.9 −0.1
Runner pool, runner-minutes a day 63,754 63,722 −32 (−0.1%)
Average concurrent jobs 44.3 44.3 0
Time to green (median → this run) 45.4 min 19.8 min −25.6 min
Runs a day 350 350 0

Changed jobs: test changed: standard

Not measured (the jobs that use these keep their recent minutes above): .github/actions/test-scope/action.yml, .github/scripts/change-scope.cjs, .github/scripts/change-scope.test.mjs, .github/scripts/ci-tooling-routing.test.mjs, .github/scripts/fs-guard-tests.mjs, .github/scripts/fs-guard-tests.test.mjs, .github/scripts/spec-owner-workflow.test.mjs, .github/scripts/test-scope-action.test.mjs, .github/scripts/visual-scope.mjs, .github/scripts/visual-scope.test.mjs.

Assumptions: before is each job's average over the last 20 pull-request runs; after keeps that for unchanged jobs and uses this run's minutes for added or changed ones, weighted by how often each changed job ran in those runs; runs a day averages the seven whole days before today; time to green compares this run with the median of those runs that ran the same jobs.


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: the times-only lane and its AST-030 amendment are approved in direction, but as wired a bad recorded-times file can merge with every required check green.

  • The test join skips its outcome check for every spec_only change that is not a release bump (.github/workflows/ci.yml:1891, :1894), so on a times-only change the leg plan's budget check fails only the test-node legs and no required context, against AST-030 FR7; keep the join's check for a times-only change, as the release bump does.
  • The lane runs none of the Node tests that read the times (scripts/vitest-node-legs.test.mjs, scripts/vitest-shard-sequencer.test.mjs), and the plan check reads an unreadable vitest-node-durations.json as empty, plans two legs that "fit" and never reads the min-node record, so "the plan check still fails a bad file" does not hold; run those tests in the lane or fail the plan on an unreadable record, and state what runs in FR2, FR13 and the description.
  • Beside a component change the times no longer make the labelled visual plan broad (.github/scripts/visual-scope.mjs:79-83 does not list node-times), so "beside any other path, the times run the full suite as today" claims more than the change keeps; add node-times there or narrow the claim, with a test.

The inline comments point at each place.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claim: a change only to the recorded times runs the leg plan's check and no test. Verified in the classifier (change-scope.cjs:416-417, :455-461), but that check's failure reaches no required context (first finding).
  • Claim: the plan check still fails a bad file. False for an unreadable or reshaped record and for the min-node record (second finding).
  • Claim: the times decide scheduling, never what a test checks. False: two Node tests assert on them (second finding).
  • Claim: beside any other path the times run the full suite as today. Verified for the Vitest owners (change-scope.test.mjs:107-123); false for the visual owner (third finding).
  • Claim: node-times stays shared infrastructure beside anything else. Verified (change-scope.cjs:262-276).
  • Claim: the release-branch bump already uses that lane the same way. False: the bump keeps the test join's check (ci.yml:1887-1894).
  • Claim: the record gains a node-times row, an FR13 sentence and the FR13 verification state. Verified (spec.md:104, :333-337, :767).
  • Claim: the tests cover times-only changes and the times beside a component, a record, a script and a workflow. Verified (change-scope.test.mjs:88-123).
  • Claim: the three named test files pass (239 tests) and the knowledge check passes. Verified.
  • Claim: 6 of the last 120 pull requests touched the times, at 170 and 12.9 runner-minute medians. Not checkable from the repository; not relied on.
  • Claim: no public API or product behavior changes; CI only. Verified.
  • Claim: public text carries no internal context. Verified.
  • File .github/scripts/change-scope.cjs: all three findings.
  • File .github/scripts/change-scope.test.mjs: third finding (no visual-owner case); otherwise clear.
  • File docs/specs/AST-030/spec.md: first and second findings (the row and the sentence).

Automated review (maintainer link)

Comment thread .github/scripts/change-scope.cjs Resolved
Comment thread .github/scripts/change-scope.cjs Resolved
Comment thread docs/specs/AST-030/spec.md Resolved
Comment thread .github/scripts/change-scope.test.mjs Resolved
… the times, and fails on an unusable record

- The classifier names times_only apart from spec_only, and the test join
  still requires every test owner's outcome for it, so the Node leg plan's
  check failing test-node fails the required test context.
- The Vitest tests that read the recorded times run for a change to them,
  as a record's readers do.
- The leg plan fails when a recorded-times file cannot be parsed or holds a
  value that is not seconds.
- Beside other paths the times keep the labelled visual plan broad, as test
  configuration.
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 17, 2026
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec dbe04e9

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 17, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: the times-only lane, its gates and the AST-030 amendment hold up, and the three earlier findings are fixed, but the new times_only output breaks two contract tests.

  • .github/scripts/test-scope-action.test.mjs ("is one github-script step that retries server errors") and .github/scripts/spec-owner-workflow.test.mjs ("packages every dependency for trusted-base isolated classification") pin the action's output names and the classifier's --github-output text, so both fail at this head until times_only is added to their expected values.

This head's test-node legs stop first on the Node leg plan, which is over budget on main as well, so CI does not show these failures yet. Non-blocking: a few comments and one test title still say the lane runs no test, though it now runs the tests that read the times (see the inline comments).

Claims and files checked

Review mode: full; reason: spec-record

  • Claim: a times-only change runs the leg plan's check (failing on a plan past budget or an unreadable record), the tests that read the times, and the test join. Verified in the classifier, the join condition, the reader lister and plan runs on broken records.
  • Claim: beside any other path the times run the full suite and keep a labelled visual plan broad, as before. Verified against the base for the times beside a component, a record, a script and a Changeset.
  • Claim: the times decide how Node legs are scheduled, never what a test checks. True for every test but the readers of the times, which the lane now runs.
  • Claim: node-times stays shared infrastructure beside anything else. Verified.
  • Claim: the test join runs for times_only, as it does for the release bump. Verified.
  • Claim: the knowledge lane runs the 8 Vitest files that read the times. True in substance: the lister finds 10, the six named kinds included.
  • Claim: the plan fails on a record it cannot parse or a value that is not seconds, where an unreadable record used to fit. Verified: a truncated record planned 2 legs that fit on the base and fails on this head.
  • Claim: the record gains the FR2 row, an FR13 sentence and the verification state. Verified.
  • Claim: the listed tests cover these cases. Verified.
  • Claim: the named test files pass except the existing leg-plan budget case, and the knowledge check passes. Verified; two other contract tests fail (the finding above).
  • Claim: 6 of 120 pull requests touched the times, at 170 and 12.9 runner-minute medians. Not checkable from the repository; not relied on.
  • Claim: no public API or product behaviour changes. Verified.
  • Claim: public text carries no internal context. Verified.
  • Claim: changes found during the work were removed or split. Verified: a formatter run over six unrelated test files is reverted in the last commit.
  • Claim: the record amendment follows the writing rubric (present tense, no history or status, the existing owner amended). Verified.
  • File .github/actions/test-scope/action.yml: the finding above (new output missing from its contract test).
  • File .github/scripts/change-scope.cjs: the finding above (output text missing from its contract test); non-blocking comment wording.
  • File .github/scripts/change-scope.test.mjs: non-blocking test title; otherwise clear.
  • File .github/scripts/ci-tooling-routing.test.mjs: clear.
  • File .github/scripts/fs-guard-tests.mjs: clear.
  • File .github/scripts/fs-guard-tests.test.mjs: clear.
  • File .github/scripts/visual-scope.mjs: clear.
  • File .github/scripts/visual-scope.test.mjs: clear.
  • File .github/workflows/ci.yml: clear.
  • File docs/specs/AST-030/spec.md: clear.
  • File scripts/vitest-node-legs.mjs: non-blocking comment wording; otherwise clear.
  • File scripts/vitest-node-legs.test.mjs: clear.

Automated review (maintainer link)

Comment thread .github/actions/test-scope/action.yml Resolved
Comment thread .github/scripts/change-scope.cjs Resolved
Comment thread .github/scripts/change-scope.cjs Resolved
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec e8eac30

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, pending CI. The times-only lane, its gates and the spec:AST-030 amendment hold up at this head, and the two contract tests that failed before now pass. CI has not run its tests on this head yet: admission found CI full, so re-run all jobs to let test, build and docsite-test report.

Non-blocking:

  • The title says the lane "runs just the leg plan's check" and the description counts "8 Vitest files", but the lane also runs the test join and 10 Node test files that read the times; a retitle would match FR13.
  • Miss: a times-only change still reports "only spec records changed" as the classifier's scope reason (.github/scripts/change-scope.cjs:479-480), which pnpm review:pre prints; a timesOnly branch would name the lane.
Claims and files checked

Review mode: incremental; reason: none

  • Changed rules (0): none.
  • Claim: a change only to the recorded times ran the full suite. Verified: the base classifier routes the records to shared infrastructure.
  • Claim: it now runs the leg plan's check, the tests that read the times and the test join. Verified (change-scope.cjs:418-419, ci.yml:1893-1896, the reader lister's output).
  • Claim: the plan fails on an unreadable record or a value that is not seconds, where it used to fit. Verified with truncated, renamed-key, deleted and truncated min-node records.
  • Claim: beside any other path the times run the full suite and keep the labelled visual plan broad. Verified (change-scope.test.mjs:109-126, visual-scope.test.mjs:121-134).
  • Claim: the lane runs 8 Vitest files that read the times. Understated: the lister picks 10 (non-blocking).
  • Claim: recent pull request counts and runner-minute medians. Not checkable from the repository.
  • Claim: no public API or product behaviour change. Verified: only CI files, CI scripts and the CI record change.
  • Claim: the tests pass except the inherited leg-budget case, which passes once the leg plan scales past eight legs. Verified at this head and on the merge with main.
  • Claim: pnpm check:knowledge passes. Verified.
  • Claim: the existing record is amended and no new record is added. Verified.
  • Files: .github/actions/test-scope/action.yml clear; .github/scripts/change-scope.cjs non-blocking reason string; .github/scripts/change-scope.test.mjs clear; .github/scripts/ci-tooling-routing.test.mjs clear; .github/scripts/fs-guard-tests.mjs clear; .github/scripts/fs-guard-tests.test.mjs clear; .github/scripts/spec-owner-workflow.test.mjs clear; .github/scripts/test-scope-action.test.mjs clear; .github/scripts/visual-scope.mjs clear; .github/scripts/visual-scope.test.mjs clear; .github/workflows/ci.yml clear; docs/specs/AST-030/spec.md clear; scripts/vitest-node-legs.mjs clear; scripts/vitest-node-legs.test.mjs clear.

Automated review (maintainer link)

// A change only to the recorded Node test times takes the knowledge lane:
// the leg plan's check and the tests that read the times.
const timesOnly = exactSurface(SURFACES.NODE_TIMES);
const specOnly = exactSurface(SURFACES.KNOWLEDGE) || timesOnly;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Miss, non-blocking: specOnly now includes timesOnly, so the classifier's reason (:479-480) reports "only spec records changed" for a times-only change, and pnpm review:pre prints that as its Scope line (scripts/pre-review.mjs:403, :423). A timesOnly branch before the specOnly one, such as "only the recorded Node test times changed", would name the lane.

@josephfarina josephfarina reopened this Nov 17, 2026
@josephfarina
josephfarina merged commit 93fdf45 into main Nov 17, 2026
135 of 141 checks passed
@github-actions
github-actions Bot deleted the ci/times-only-lane branch November 18, 2026 06:05

This branch was successfully deployed

1 active deployment
Preview — e8eac308 Deployed Nov 17, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant