Skip to content

ci: a pull request's Node legs grow with the suite, up to Main's twelve - #12297

Merged
josephfarina merged 2 commits into
mainfrom
ci/node-legs-fit
Nov 17, 2026
Merged

josephfarina merged 2 commits into
mainfrom
ci/node-legs-fit

Conversation

@josephfarina

Copy link
Copy Markdown
Contributor

Maintainer impact

Every pull request's Node legs now fail at "Stop when the Node legs do not fit their budget". The recorded Node suite plans 11,125 s of tests. At eight legs, the most a pull request may start today, the longest leg plans 1,391 s against a budget of 1,387 s. The pending refresh of the recorded times raises the suite to 11,847 s (longest leg at eight: 1,481 s), so a small speed-up of a few files would hold for a day at most.

Intended invariant

A pull request starts as many Node legs as its recorded plan needs for every leg to fit its budget, as before, now up to twelve (the most Main's unit run starts) instead of eight. Past twelve, the suite itself must get faster, and the legs fail with the reason, as today.

Change

  • scripts/vitest-node-legs.mjs: MAX_NODE_LEGS is MAX_MAIN_NODE_LEGS (12). The plan still picks the fewest legs that fit (fitLegsToBudget), so a pull request never grows to finish sooner.
  • .github/workflows/ci.yml: test-node's fallback matrix lists twelve legs, matching the constant.
  • docs/specs/AST-030/spec.md FR22: "at most eight" becomes "at most twelve (the most Main's unit run starts)", and the matching verification row.

Evidence

  • Before, on main at 4e495449: 1,648 Node files plan 11,125 s; at 8 legs the longest is 1,391 s against a 1,387 s budget, so no leg starts.
  • After: 9 legs, longest 1,236 s. With the pending refresh of recorded times (11,847 s): 9 legs, longest 1,317 s.
  • Admission is unchanged: a pull request's legs run two at a time when CI is tight and at full width only when admission finds room (FR16), so a ninth leg is one more job only when CI has room for it.
  • Product/runtime behavior verified unchanged: CI only.

Scope

Components: CI (test-node leg plan); AST-030 FR22

  • No intended public API, product behavior, visual direction, or policy change beyond the FR22 leg count.
  • 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 scripts/vitest-node-legs.test.mjs .github/scripts/ci-admission.test.mjs scripts/vitest-shard-sequencer.test.mjs: 109 pass. pnpm check:knowledge passes.

Writing rubric results

  • Present tense, describes the system: yes (FR22 states the count and its basis).
  • No history, proposals or project status in the record: yes.
  • One fact per sentence; the existing owner (FR22) is amended rather than a new record: yes.

The recorded Node suite now plans 11,125 s, past what eight legs hold
within their budget (1,387 s each), so every pull request's Node legs
fail before they start. A pull request still starts only as many legs as
its plan needs to fit the budget, now up to twelve, the most Main's unit
run starts, instead of failing at eight.
@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 10:33am UTC

Request Review

@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, 11:28 AM UTC

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 17, 2026
@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's Node test plan may use up to twelve legs, the same maximum the main branch already uses, and still uses the fewest legs that fit the leg budget. The leg budget and admission widths are unchanged. spec:AST-030 FR22 changes from "at most eight" to "at most twelve".

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 94d028b

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

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 94d028b

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 job-min per update · pool 0% · standard runners
Before After Change
Job-minutes per PR update 182 182 0
Runner pool, runner-minutes a day 63,754 63,754 0 (0%)
Average concurrent jobs 44.3 44.3 0
Time to green (median → this run) — — —
Runs a day 350 350 0

Changed jobs: test-node changed: standard

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.

Current run: CI concluded cancelled; parts of this report may be missing.


Generated by PR Enrichment workflow | View full report

@cixzhang cixzhang added the release-critical Admitted to CI at once (AST-030 DEC-30). Counts only when a writer applies it. 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 for one stale comment; the leg-count change itself checks out.

  • .github/workflows/ci.yml:1253-1254 still says test-node runs "at most eight" legs, directly above the fallback that now lists twelve, so change it to "at most twelve" to match the planner and FR22.

On the recorded suite the planner now picks nine legs that fit the budget, also with the pending duration refresh, and the FR22 change carries a spec approval for this head. CI at this head stopped at admission because CI was full, not because of this change, so test-node still needs a run.

Claims and files checked

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

Claims (description and commit message):

  • Every pull request's Node legs now stop at the budget step: verified, the base planner returns fits=false and the stop step is ci.yml:1277-1283.
  • The recorded suite plans 11,125 s and eight legs give a longest leg of 1,391 s against 1,387 s: verified on 1,648 files at the merge base.
  • The pending refresh raises the suite to 11,847 s, 1,481 s at eight legs: verified against the open refresh pull request's durations.
  • A pull request starts the fewest legs that fit, now up to twelve, and past twelve the legs fail with the reason: verified, vitest-node-legs.mjs:149-165 and vitest-node-legs.test.mjs:192-210.
  • MAX_NODE_LEGS is MAX_MAIN_NODE_LEGS (12): verified, vitest-node-legs.mjs:86.
  • A pull request never grows to finish sooner: verified, nine legs are planned, not twelve, and vitest-node-legs.test.mjs:75-81 checks one fewer would not fit.
  • test-node's fallback matrix lists twelve legs, matching the constant: verified, ci.yml:1259 and ci-admission.test.mjs:587.
  • FR22 says at most twelve, with the matching verification row: verified, spec.md:551 and spec.md:777.
  • After the change nine legs plan a longest leg of 1,236 s, and 1,317 s with the refresh: verified with the head's planner.
  • Admission and the leg budget are unchanged, two legs at once when CI is tight: verified, TIGHT_NODE_LEGS = 2 (vitest-node-legs.mjs:124) and the unchanged budget constants.
  • Product and runtime behavior are unchanged, CI only: verified, no package file changes.
  • No public API, product or policy change beyond the FR22 count, and no internal context in public text: verified by reading the diff and scanning the text.
  • The three named test files pass (109 tests) and the knowledge check passes: verified by running them at this head.
  • The record stays present tense and amends FR22 in place: verified, spec.md:549-554.

Files:

  • .github/workflows/ci.yml: finding, the matrix comment at lines 1253-1254 still says at most eight.
  • docs/specs/AST-030/spec.md: clear.
  • scripts/vitest-node-legs.mjs: clear.

Automated review (maintainer link)

Comment thread .github/workflows/ci.yml Resolved
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 2d57740

@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: CI passed on this head.

The leg-count change checks out: on the recorded Node times the planner picks nine legs that fit the budget, all nine test-node legs passed on this head, and the FR22 amendment carries engineering-owner spec approval for this head. Nothing else is needed from you.

Claims and files checked

Review mode: same-head; reason: none

  • Changed rules (0): none.
  • Claims (description, commit messages and the owner-decision comment):
    • Every pull request's Node legs currently stop at the budget step: verified; on the base the planner reports that the plan does not fit, and the stop step is ci.yml:1277-1283.
    • The recorded suite plans 11,125 s, and eight legs give a longest leg of 1,391 s against a 1,387 s budget: verified with the base planner on the merge base's 1,648 Node files.
    • The pending refresh raises the suite to 11,847 s, 1,481 s at eight legs: verified against the open refresh pull request's durations.
    • A small speed-up of a few files would not hold: verified in substance; the refresh alone leaves eight legs 94 s over the budget.
    • A pull request still starts only the fewest legs that fit, now up to twelve, and past twelve the legs fail with the reason: verified, vitest-node-legs.mjs:149-165 and vitest-node-legs.test.mjs:192-210.
    • MAX_NODE_LEGS is MAX_MAIN_NODE_LEGS (12): verified, vitest-node-legs.mjs:86.
    • A pull request never grows to finish sooner: verified; nine legs are planned, not twelve, and vitest-node-legs.test.mjs:64-82 checks that one fewer would not fit.
    • test-node's fallback matrix lists twelve legs, matching the constant: verified, ci.yml:1259 and ci-admission.test.mjs:587.
    • test-node's comment says at most twelve legs: verified, ci.yml:1254.
    • FR22 says at most twelve, with the matching verification row: verified, spec.md:551 and spec.md:777.
    • After the change, nine legs with a longest leg of 1,236 s, and 1,317 s with the refresh: verified with the head's planner; CI's own plan on this head is nine legs, 1,239 s, and all nine legs passed.
    • Admission and the leg budget are unchanged, two legs at a time when CI is tight: verified, vitest-node-legs.mjs:124 and :256, with the budget constants unchanged.
    • Product and runtime behavior are unchanged, CI only: verified; no package or app file changes.
    • No public API, product or policy change beyond the FR22 count, and no internal context in public text: verified by reading the diff and scanning the added text, commit messages, title and description.
    • The three named test files pass (109 tests) and the knowledge check passes: verified on this head.
    • The record stays present tense and amends FR22 in place: verified, spec.md:549-554.
    • The leg budget and admission widths stay as they are while the cap rises to twelve: verified as above.
  • Files:
    • .github/workflows/ci.yml: clear.
    • docs/specs/AST-030/spec.md: clear.
    • scripts/vitest-node-legs.mjs: clear.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 2d57740

@josephfarina
josephfarina merged commit be7f821 into main Nov 17, 2026
150 of 152 checks passed
cixzhang added a commit that referenced this pull request Nov 17, 2026
Main moved past #12297 (CI planner budget); a clean merge, no conflicts.
cixzhang added a commit that referenced this pull request Nov 17, 2026
Main moved past #12297 (CI planner budget); a clean merge, no conflicts.
cixzhang added a commit that referenced this pull request Nov 17, 2026
Main moved past #12297 (CI planner budget); a clean merge, no conflicts.
cixzhang added a commit that referenced this pull request Nov 17, 2026
Main moved past #12297 (CI planner budget); a clean merge, no conflicts.
cixzhang added a commit that referenced this pull request Nov 17, 2026
…screen (#12009)

* fix(NavigationStack): a push keeps focus a person moved into the new screen

When a push settled, the stack moved focus to the new screen's title whenever focus was inside the stack. Focus a person had moved into the new screen during the push, such as a tap on its field, was taken away, and on a phone the keyboard closed. The settle now leaves focus that already sits in the screen now on top. The title still takes focus when focus is detached or on the previous screen or the bar. Core's isFocusLost is unchanged.

* fix(NavigationStack): the focus check reads only this stack's cards

The check for focus already in the screen on top now reads the direct children of the stack's cards layer, so a stack nested in a covered screen, with an equal key, cannot answer for it. The test waits past the settle without a check that passes at the commit. The doc and the JSDoc say a push keeps focus already in the new screen.

* Merge main into PR #12009's branch

Main moved past #12297 (CI planner budget); a clean merge, no conflicts.
cixzhang added a commit that referenced this pull request Nov 17, 2026
* fix(NavigationStack): screen content stays under the bar

A card was not a stacking context at rest, so a screen child with a z-index of 2 or more painted over the bar, whose z-index is 1, and covered its title and Back. Each card now isolates its content, as a transform already does during a transition, so transitions are unchanged. A jsdom check, a story with raised content under the bar and a browser case (title and Back hit by elementFromPoint, Back pops) cover it.

* Merge main into PR #12001's branch

Main moved past #12297 (CI planner budget); a clean merge, no conflicts.

* test(NavigationStack): the raised-content case reads hits at rest, after will-change lets go

The animator holds will-change on a card briefly after its last motion, and that alone makes a stacking context, so the browser case passed on the base too. It now waits until every card reads will-change: auto. The jsdom case is named after what it asserts.

* Merge main into PR #12001's branch

Main brought in #12009, which touches NavigationStack.tsx and its test on other lines; a clean merge.
nbozidarevic pushed a commit to nbozidarevic/astryx that referenced this pull request Nov 17, 2026
…ds (meta#12010)

* test(NavigationStack): a push whose commit blocks the main thread starts from its first frame

A heavy screen holds the main thread for 300 ms in the task that pushes it. Two frames after the block, the pushed card must still be more than half the width from where it rests. Dated before the block, the push shows almost all of its travel at once.

* fix(NavigationStack): a push or pop from rest starts when its task ends

A push or a programmatic pop passed the time of its call to every animation, so a heavy commit or a later listener that held the main thread after the call made the transition skip ahead into its curve. A transition from rest now leaves the start to the animator: the browser commit dates it, and in an input event's own task it starts at the first frame after that task. A finger's release keeps its release time. The back chevron keeps the screens' clock.

* fix(NavigationStack): the stack marks its own input task for the next-frame start

The stack's capture handlers for clicks and key presses now mark the task they run in, and the next task clears the mark. A transition that one of them starts uses start: next-frame from that mark, because React may commit it in a microtask, after the browser has cleared window.event. window.event stays as the fallback for a push the app starts outside the stack.

* fix(NavigationStack): the input-task fallback reads only a press's events

The window.event fallback took any UIEvent, which includes focus, wheel, input and resize events. It now reads only the pointer, key and touch events a press dispatches, as its comment says. The clock comment is split into short sentences, and the input-task mark notes why it does not rely on window.event.

* fix(NavigationStack): type the input-task fallback for the window constructors

isDispatchingInput reads view.Event, which the Window type does not declare. Its parameter now takes the window with its globals, as ownerDocument.defaultView already is, so the Lab typecheck passes.

* Merge main into PR meta#12010's branch

Main moved past meta#12297 (CI planner budget); a clean merge, no conflicts.

* test(NavigationStack): the blocked-push case reads the time since the block

WebKit's first frames after a long task can take far longer than 16 ms, so two frames were not a fixed time into the push. The case now reads performance.now() with the position and checks that at least half of what the spring leaves at that time is still to travel, which a push dated before the block cannot meet. The activation-mark comment names the scripted click it serves.

* Merge main into PR meta#12010's branch

Main brought in meta#12009, which touches NavigationStack.tsx and its test on other lines; a clean merge.

* test(NavigationStack): the blocked-push floor is the push's own spring

leftAt was a 0.19 s critically damped spring from rest, so at WebKit's slower frames the floor asked for less than half of what the push leaves. It is now the file's push spring (OMEGA, starting at PUSH_VELOCITY), so a push dated inside the block fails at any frame delay.
@github-actions
github-actions Bot deleted the ci/node-legs-fit branch November 18, 2026 06:04
cixzhang added a commit that referenced this pull request Nov 21, 2026
…ys no second animation (#12004)

* test(sandbox): a raw page that logs whether the platform animated a history back

On a real phone, the page pushes two history entries and logs each popstate and Navigation API navigate event with its hasUAVisualTransition, and the display mode it runs in. It is the evidence page for NavigationStack skipping its own pop or push animation after a platform-animated traversal.

* fix(NavigationStack): a platform-animated history back or forward plays no second animation

When the platform has just animated a history traversal (Safari's edge swipe back or forward, an iOS Home Screen app's back gesture), the browser sets hasUAVisualTransition on the Navigation API navigate event and on popstate. The stack marks it for two frames, and the path change that traversal causes is applied at once: a pop drops the leaving screen with no slide, a push puts the new screen on top with no slide. Focus moves as after any settled push or pop. A traversal the platform did not animate still slides.

* fix(NavigationStack): the traversal listeners attach with the container

The popstate and navigate listeners now attach in the container ref callback on the element window, beside the modality tracker, and detach with it, so a stack moved to another document listens to its new window. The probe page keys screens by position and name, sets the path when the stack pops before it moves the history, and leaves its own two entries out of the stack path.

* test(sandbox): the probe stack follows a back to the page's first entry

The router marks the first history entry, so its state is neither null nor a stack path. The probe now skips only its own two step entries and treats any other entry without a path as the root. The component JSDoc names the exception to its animation.

* Merge main into PR #12004's branch

Main moved past #12297 (CI planner budget); a clean merge, no conflicts.

* Merge main into PR #12004's branch

Main brought in the merged NavigationStack fixes (#12009, #12010, #12001) on other lines of NavigationStack.tsx and its test; a clean merge.

* Merge main into fix/navigationstack-ios-platform-back

* chore(sandbox): drop the history-back probe page from this change

The probe page served only the device takes. Without it this pull request
changes the Lab NavigationStack and its test alone.

* test(NavigationStack): a traversal that hides the stack before the mark clears leaves no mark

* fix(NavigationStack): detaching the traversal listener clears the platform mark

A container that detached within two frames of a browser-marked traversal
kept the mark, so the next tap push or Back pop played no slide.

* Merge main into fix/navigationstack-ios-platform-back

This branch was successfully deployed

1 active deployment
Preview — 2d577406 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. release-critical Admitted to CI at once (AST-030 DEC-30). Counts only when a writer applies it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants