Repository navigation
ci: Node legs run file-reading tests by the inputs Main recorded for them - #12129
josephfarina wants to merge 15 commits into
Conversation
…them Main's hourly full unit run records what each Node test file touches (files read or probed, folders listed, paths written, and the same for the test setup's steps) and keeps the record as an artifact. A pull request's Node legs then run a file-reading test only when the change reaches one of its recorded inputs. A changed test, a test with no record, a test whose record cannot see all it reads, and any change to the install, CI, test setup or build configuration still run. Without a usable record the legs run every file-reading test. When a Node test fails on main, the run names any merged pull request that left it out and opens an issue. spec:AST-030 FR13 points to the new DEC-30.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Approval waits on an engineering owner deciding the spec:AST-030 change, and four fixes are needed whatever that decision is.
- The recorder import in
vitest.global-setup.node.mjssits betweenprocess.once('exit', endRun)andtry, soscripts/ensure-core-built.test.mjs(the run-lease contract) fails intest-node; move the import andrecordStepinside thetryblock. select.mjsmatches a changed path only against a test's exact folders, so a file added in a new subfolder of a folder a test lists (for examplepackages/cli/api/icon/newdir/foricon-set-doc-pointers.test.mjs) leaves out a test that reads it; keep listed folders apart in the record and run a test when a listed folder is an ancestor of a changed path, with a nested-folder test case.- DEC-30 says a test that starts a worker thread always runs, but
record.mjstreats a worker without anenvas recorded, which holds only when the starting process was preloaded with the recorder; mark such workers unseen otherwise, add a worker test case, and make DEC-30 state the rule the code keeps. - The FR13 amendment is inserted before "; and every test that loads a changed workspace package from its build", which leaves that run category attached to the new restriction; move the new sentence after the
dist/clause.
The current FR13 runs every file-reading test on a pull request, and this change intentionally replaces that with DEC-30, so approval needs an engineering owner to approve or reject the FR13 amendment and DEC-30 (the recording on Main, the skip rules, the record picker and the issue-opening alarm) by commenting /approve-spec <full head SHA> on this pull request; the author may do so as an engineering owner. Smaller notes, such as a record version mismatch failing every Node leg instead of falling back, are in the review.
Claims and files checked
Review mode: full; reason: no-earlier-review
Claims:
- The recorder records reads, probes, listings, writes and what it cannot see, and Node children record under the same test: verified (
test-inputs.test.mjsfirst case; probe). - Worker threads record themselves under the same test: true only when the starting process was preloaded with the recorder (probe); DEC-30 states the opposite rule: false as written in DEC-30.
- The global setup records each part as a step: verified (
vitest.global-setup.node.mjsstep names). - Main's legs record, one job merges when all pass and keeps the record artifact: verified (
deploy.yml; workflow test). - A test that read a step's output inherits that step's inputs: verified (
merge.mjs:142-151; merge test). - A test that read a package's build output depends on the whole package: partly; when a recorded step with nothing unseen wrote that output, the test gets the step's folders only (
merge.mjs:142-151). - One job picks the record, every leg reads that choice, and a leg that cannot read it fails: verified (
ci.yml; workflow test). - With no usable record (none kept, none of the base's latest 100 commits, too many changed paths, or a failed lookup) the legs run today's set: verified (
test-inputs-pick.cjs:29-79; the legs keep!cancelled()). - A changed test always runs; install, CI, test setup and build configuration changes run every file-reading test: verified (
select.mjs:22-37,:62; tests). - The record must be of a commit the merge base contains, paths changed since count, and an unrecorded test runs: verified (
test-inputs-pick.cjs;select.mjs:59). - A test that starts a non-Node program, a shell command, or a child or worker without the recorder always runs: verified for children and shells; a worker started without an
envfrom a process that imported the recorder at run time is not caught (probe). - Main's failed full run names merged pull requests that left the test out and opens an issue: verified by reading (
skipped-test-alarm.cjs;deploy.yml); only its readers are tested. - Leg 1 keeps the list it left out: verified (
ci.yml; leg-bounds test). - A file-reading test still runs whenever the change can reach what it reads: false (new subfolder of a listed folder, probe).
- Replay figures (time left out, minutes saved, share of theme editor tests skipped, 23 of 388, recording CPU cost, merge memory): not verifiable at this head; Main keeps no record yet.
- The listed 58 test files pass apart from one known failure: not rechecked here;
scripts/ensure-core-built.test.mjs, outside that list, fails in CI at this head. - No public API, product behavior or visual change: verified (no package files change).
Files:
.github/scripts/ci-admission.test.mjs: clear.github/scripts/ci-node-leg-bounds.test.mjs: clear.github/scripts/ci-test-routing.test.mjs: clear.github/scripts/fs-guard-tests.mjs: non-blocking (a record version mismatch fails the leg).github/scripts/lib/skipped-test-alarm.cjs: clear.github/scripts/lib/test-inputs-pick.cjs: clear.github/scripts/test-inputs-workflow.test.mjs: clear.github/workflows/ci.yml: clear.github/workflows/deploy.yml: non-blocking (a failed record merge turns Main's run red)docs/specs/AST-030/spec.md: owner decision needed; blocking (FR13 clause order, DEC-30 worker rule)scripts/test-inputs/merge.mjs: part of the subfolder finding (listed folders kept with read folders)scripts/test-inputs/record.mjs: blocking (worker rule); duplicate commentscripts/test-inputs/select.mjs: blocking (subfolder finding)scripts/test-inputs/setup.mjs: clearscripts/test-inputs/test-inputs.test.mjs: missing nested-folder and worker casesvitest.config.ts: clearvitest.global-setup.node.mjs: blocking (lease contract test fails)
PR Analysis Report🔎 Preview ·
|
…s, setup lease order - The record keeps listed folders apart; a change anywhere under one runs the test, so a file in a new subfolder of a folder a test walks runs it. - A worker thread counts as recorded only in a process the recorder was preloaded into; DEC-30 states the rule. - The global setup loads the recorder inside the run lease's try block. - The FR13 sentence follows the build-output clause. - A record of another format version narrows nothing.
There was a problem hiding this comment.
Approval waits on an engineering owner deciding the spec:AST-030 change, and four fixes are needed whatever that decision is.
- Regression:
mainnow has its own DEC-30 (a release-critical pull request is admitted at once) and this branch conflicts with it indocs/specs/AST-030/spec.md, so mergemain, number the new decision DEC-31, and update the FR13 sentence, the decision's Reference line, thedeploy.ymlcomment and thetest-inputs-workflow.test.mjsheader. - Still open from the last review: a test that checks a folder with
existsSyncorstatis left out when the change creates or empties that folder, becausemerge.mjsrecords the folder's parent andselect.mjscompares only each changed path's own folder; run a test when a changed path is at or under a path it read or probed, and add both cases totest-inputs.test.mjs. - Miss:
test-inputs-pick.cjstakes the dispatching run's head commit as the record's commit whiledeploy.ymlrecordsneeds.main-commit.outputs.sha, so a run that validates an older commit is labelled with the tip and the paths changed in between never count; read the commit from the downloaded record, or keep the record only when the two agree. - Miss: paths changed between the record's commit and the base never reach the module graph, and the record holds no module the Vitest runner loads (
all-or-nothing.test.mjsrecords none of its four imports), so a helper that changed onmainafter the record can hide a test; also run every guard whose import closure reaches one of those paths.
The current FR13 runs every file-reading test on a pull request, and this change intentionally narrows it with a new decision, so approval needs an engineering owner to approve or reject the FR13 change and that decision (the recording on Main, the record picker, the skip rules and the issue-opening alarm) by commenting /approve-spec <full head SHA> on the head that resolves the conflict; the author may do so as an engineering owner. The earlier fixes (setup lease order, listed subfolders, worker threads, the FR13 clause order) hold on this head, and two smaller notes are in the review.
Claims and files checked
Review mode: full; reason: spec-record
Claims:
- The recorder notes reads, probes, listings, writes and what it cannot see, and Node children and worker threads record under the same test file: verified (
test-inputs.test.mjsrecorder and worker cases; a recording run). - The global setup records each of its parts as a step: verified (
vitest.global-setup.node.mjsstep names; recorded step lines). - Main's full run records in each leg, and one job merges the lines into the kept record when every leg passes: verified (
deploy.ymlrecord job; workflow test). - A test that read a step's output inherits that step's inputs, and one that read a package's build output depends on the whole package: verified (
merge.mjsstep and build-output handling; merge test); when a recorded step with nothing unseen built that output, the test takes the step's inputs. - On a pull request one job picks the record and the legs narrow the guards with it, while module-graph and package-by-name tests run as before: verified (
ci.yml;fs-guard-tests.mjskeeps the build and reached lists). - A changed test file always runs: verified (
select.mjsand its test). - A change anywhere under a listed folder runs the test: verified for listings; false for a folder checked with
existsSyncorstatthat the change creates or empties (probe). - Install, CI, test setup, test utilities and build configuration changes run every file-reading test: verified (
select.mjslist and its test). - The record must be of a commit the merge base contains, the paths changed since count, and an unrecorded test runs: partly false; the commit checked is the dispatching run's head, not the commit recorded.
- A non-Node program, a shell command, or a child or worker without the recorder always runs its test: verified (
record.mjs; tests). - A failing test on Main names the merged pull requests that left it out and opens an issue: verified by reading (
skipped-test-alarm.cjs,deploy.yml); only its readers are tested. - Leg 1 keeps the list it left out: verified (
ci.yml; leg-bounds test). - With no usable record the legs run today's set, every leg reads one choice, and a leg that cannot read it fails: verified (picker fallbacks, record-version fallback, workflow test).
- A file-reading test still runs whenever the change can reach what it reads: false (folder checks; helpers changed since the record).
- Every required context and owner keeps reporting: verified (no required name changes; the legs keep running when the picker is skipped or fails).
- The replay figures (time left out, minutes saved, share of theme-editor tests skipped, the 23 of 388 example, recording cost, merge memory): not verifiable here; Main keeps no record yet.
- The listed test files pass apart from one known failure: the new and changed contract tests pass here; the whole list was not rerun.
- The knowledge check is aligned: verified.
- No public API, product behavior or visual change: verified (no package files change).
Files:
.github/scripts/ci-admission.test.mjs: clear.github/scripts/ci-node-leg-bounds.test.mjs: clear.github/scripts/ci-test-routing.test.mjs: clear.github/scripts/fs-guard-tests.mjs: blocking (since-record paths skip the module graph).github/scripts/lib/skipped-test-alarm.cjs: clear (its last-passing-run compare reads the same head commit as the picker).github/scripts/lib/test-inputs-pick.cjs: blocking (record commit).github/scripts/test-inputs-workflow.test.mjs: header names the reused DEC-30; no case for a run of an older commit.github/workflows/ci.yml: clear.github/workflows/deploy.yml: comment names the reused DEC-30; non-blocking (a failed record merge turns Main's run red)docs/specs/AST-030/spec.md: owner decision needed; blocking (DEC-30 reused, conflict withmain)scripts/test-inputs/merge.mjs: blocking (folder probes and stats)scripts/test-inputs/record.mjs: records no module the Vitest runner loads; duplicate comment (non-blocking)scripts/test-inputs/select.mjs: blocking (folder probes and stats)scripts/test-inputs/setup.mjs: clearscripts/test-inputs/test-inputs.test.mjs: missing folder-probe and folder-stat casesvitest.config.ts: clearvitest.global-setup.node.mjs: clear
…ecord commit, since-record closure - main's new DEC-30 keeps its number; this decision is DEC-31. - A folder a test checks as a whole runs it when the folder is gone; a path it looked for and found missing runs it once the path exists. - Main keeps the record only for the commit its run was dispatched on, and a leg narrows nothing when the record's own commit is not the one picked. - A file-reading test whose import closure reaches a path changed since the record, or a workspace package such a path belongs to, runs.
There was a problem hiding this comment.
Approval waits on an engineering owner deciding the spec:AST-030 change, and one fix is needed whatever that decision is.
- Miss:
fs.cpSync(src, dest, {recursive: true})without afiltercopies a checked-in folder natively, sorecord.mjssees only the source path andmerge.mjsstores it as a checked folder, which leaves a test that copies a fixture and runs on the copy out of every pull request that edits or adds a file in that fixture; note acporcpSyncsource as a listing and add the case totest-inputs.test.mjs.
The current FR13 runs every file-reading test on a pull request, and this change narrows it on purpose with the new DEC-31. So approval needs an engineering owner to approve or reject the FR13 change and DEC-31 (the recording on Main, the record picker, the skip rules and the issue-opening alarm) by commenting /approve-spec <full head SHA> on the head that will merge; the author may do this as an engineering owner. The earlier fixes hold on this head (the DEC-31 numbering, folder checks and missing paths, the record's commit, the since-record import closure), and four smaller notes are in the review.
Claims and files checked
Review mode: full; reason: spec-record
Claims:
- Nearly every Node test reads files, so FR13 runs almost the whole Node suite on each pull request: consistent with the current rule; the runner-minute figures are not verifiable here.
- The replay figures (time left out, minutes saved, share of editor tests skipped, share of full runs, tests whose record cannot see everything): not verifiable here, because Main keeps no record yet.
- With no usable record a pull request runs today's set, one job picks the record, every leg reads that choice, and a leg that cannot read it fails: verified (picker fallbacks, record version and commit fallbacks in
fs-guard-tests.mjs, download step without continue-on-error, workflow test). - A file-reading test still runs whenever the change can reach what it reads: false for a test that copies a checked-in folder with a native recursive copy (probe).
- Every required context and owner keeps reporting: verified (no required job renamed; the legs run when the picker is skipped or fails).
- The recorder notes reads, probes, listings, writes and what it cannot see; Node children and worker threads record under the same test file; the global setup records each part as a step: verified (
record.mjs, recorder tests, setup step names), except the native recursive copy. - Main's full run records in each leg, and one job merges the lines into the kept record when every leg passes: verified (
deploy.yml, workflow test); the record is kept only when the run tested the commit it was dispatched on. - A test that reads a setup step's output inherits that step's inputs, and one that reads a package's build output depends on the whole package: verified (
merge.mjs, merge test). - On a pull request only the file-reading guard tests are narrowed; module-graph and package-by-name tests run as today: verified (
fs-guard-tests.mjs). - A changed test file always runs: verified (
select.mjs, test). - A change under a listed folder, a checked folder that is gone, or a probed path that now exists runs the test: verified (
select.mjs, tests, probe). - Install, CI, test setup, test utilities and build configuration changes run every file-reading test: verified (
RUNS_EVERY_TESTand its test). - The record must be of a commit among the base's latest hundred, paths changed since it count and reach tests through their import closure, a record of another commit narrows nothing, and an unrecorded test runs: verified (picker,
fs-guard-tests.mjs, tests). - A test that starts a non-Node program, a shell, or a child or worker without the recorder always runs: verified (
record.mjs, tests). - A failing test on Main names the merged pull requests that left it out and opens an issue: verified by reading; untested end to end, and its window starts at the previous run's dispatch commit (note).
- Leg 1 keeps the list it left out: verified (
ci.yml, leg-bounds test). - A template-only change runs all the editor tests today: consistent with the current rule; the replayed result and the recording cost are not verifiable here.
- One slim job per pull-request run and one standard job on Main: verified (
ci.yml,deploy.yml). - No public API, product behaviour or visual change: verified (no package files change).
- Public text carries no internal context: verified.
- The listed test files pass: the new and changed test files pass here; the full list was not rerun.
- The knowledge check is aligned: verified.
Files:
.github/scripts/ci-admission.test.mjs: clear.github/scripts/ci-node-leg-bounds.test.mjs: clear.github/scripts/ci-test-routing.test.mjs: clear.github/scripts/fs-guard-tests.mjs: clear.github/scripts/lib/skipped-test-alarm.cjs: note (window starts at the previous run's dispatch commit).github/scripts/lib/test-inputs-pick.cjs: clear.github/scripts/test-inputs-workflow.test.mjs: note (no case runs the alarm itself).github/workflows/ci.yml: clear.github/workflows/deploy.yml: note (a failed record step turns Main's run red)docs/specs/AST-030/spec.md: owner decision neededscripts/test-inputs/merge.mjs: blocking (a copied folder becomes a checked folder)scripts/test-inputs/record.mjs: blocking (native recursive copy unseen); duplicate comment (note)scripts/test-inputs/select.mjs: clearscripts/test-inputs/setup.mjs: clearscripts/test-inputs/test-inputs.test.mjs: no recursive-copy casevitest.config.ts: clearvitest.global-setup.node.mjs: clear
fs.cp and fs.cpSync copy natively, so the recorder notes their source as a listing: a test that copies a checked-in fixture and runs on the copy runs when a file in that fixture changes.
There was a problem hiding this comment.
Approval waits on an engineering owner deciding the spec:AST-030 change, and one fix is needed whatever that decision is.
- The new recursive-copy check in
scripts/test-inputs/test-inputs.test.mjs(line 84) asserts that thedirfolder is listed instead of the copiedtreefolder, so it still passes with thecprule inrecord.mjsundone; assertpath.join(work, 'tree')so the copy fix stays guarded.
The current FR13 runs every file-reading test on a pull request, and this change narrows it on purpose with the new DEC-31. Approval therefore needs an engineering owner to approve or reject the FR13 change and DEC-31 (the recording on Main, the record picker, the skip rules and the issue-opening alarm) by commenting /approve-spec <full head SHA> on the head that will merge; the author may do this as an engineering owner. The recursive fs.cpSync copy is now recorded as a listing, and four smaller notes from earlier rounds still stand in the review.
Claims and files checked
Review mode: incremental; reason: none
Claims:
- Nearly every Node test reads files, so FR13 runs almost the whole Node suite on each pull request (about 77 runner-minutes): consistent with the current rule; the minute figures are not verifiable here.
- The replay figures (time left out, minutes saved, share of editor tests skipped, share that still runs everything, tests whose record cannot see everything): not verifiable here, because Main keeps no record yet.
- With no usable record a pull request runs today's set, one job picks the record, every leg reads that choice, and a leg that cannot read it fails: verified (picker fallbacks in
test-inputs-pick.cjs, version and commit fallbacks infs-guard-tests.mjs, a download step without continue-on-error, workflow test). - A file-reading test still runs whenever the change can reach what it reads: verified for reads, listings, folder checks, missing paths and recursive copies (probe); the copy case has no effective test.
- Every required context and owner keeps reporting: verified (no required job renamed; the legs run when the picker is skipped or fails).
- The recorder notes reads, probes, listings, writes and what it cannot see; Node children and worker threads record under the same test file; the global setup records each part as a step: verified (
record.mjs, recorder tests, setup step names). - Main's full run records in each leg, and one job merges the lines into the kept record when every leg passes: verified (
deploy.yml, workflow test); the record is kept only when the run tested the commit it was dispatched on. - A test that reads a setup step's output inherits that step's inputs, and one that reads a package's build output depends on the whole package: verified (
merge.mjs, merge test). - Only the file-reading guard tests are narrowed; module-graph and package-by-name tests run as today: verified (
fs-guard-tests.mjs). - A changed test file always runs: verified (
select.mjs, test). - A change under a listed folder, a checked folder that is gone, or a probed path that now exists runs the test: verified (
select.mjs, tests, probe). - Install, CI, test setup, test utilities and build configuration changes run every file-reading test: verified (
RUNS_EVERY_TESTand its test). - The record must be of a commit the merge base contains, paths changed since it count and reach tests through their import closure, a record of another commit narrows nothing, and an unrecorded test runs: verified (picker,
fs-guard-tests.mjs, tests). - A test that starts a non-Node program, a shell, or a child or worker without the recorder always runs: verified (
record.mjs, tests). - A failing test on Main names the merged pull requests that left it out and opens an issue: verified by reading; untested end to end, and its window starts at the previous run's dispatch commit (note).
- Each safety rule is tested: true for rules 1, 2, 3 and 5; in rule 4 a record of another commit narrowing nothing is checked only by reading
fs-guard-tests.mjs(the tests pin only the argument), and the alarm (rule 6) is tested only through its readers and wiring (note). - Leg 1 keeps the list it left out: verified (
ci.yml, leg-bounds test). - A template-only change runs all the editor tests today: consistent with the current rule; the replayed 23 of 388 and the recording cost are not verifiable here.
- One slim job per pull-request run and one standard job on Main: verified (
ci.yml,deploy.yml). - No public API, product behaviour or visual change: verified (no package files change).
- Public text carries no internal context: verified.
- The listed test files pass: the new and changed test files pass here; the full list was not rerun.
- The knowledge check is aligned: not rerun at this head; the record is unchanged since it was last checked.
Files:
.github/scripts/ci-admission.test.mjs: clear.github/scripts/ci-node-leg-bounds.test.mjs: clear.github/scripts/ci-test-routing.test.mjs: clear.github/scripts/fs-guard-tests.mjs: clear.github/scripts/lib/skipped-test-alarm.cjs: note (the window starts at the previous run's dispatch commit).github/scripts/lib/test-inputs-pick.cjs: clear.github/scripts/test-inputs-workflow.test.mjs: note (no case runs the alarm itself).github/workflows/ci.yml: clear.github/workflows/deploy.yml: note (a failed record step turns Main's run red)docs/specs/AST-030/spec.md: owner decision neededscripts/test-inputs/merge.mjs: clearscripts/test-inputs/record.mjs: clear (recursive copy fixed); duplicate comment (note)scripts/test-inputs/select.mjs: clearscripts/test-inputs/setup.mjs: clearscripts/test-inputs/test-inputs.test.mjs: blocking (the copy check asserts the wrong folder)vitest.config.ts: clearvitest.global-setup.node.mjs: clear
… listed The case listed the copy source as `dir`, which other calls list too, so it passed with the cp rule undone. It now asserts the copied `tree` folder, which only the cp rule lists.
There was a problem hiding this comment.
Approval waits on an engineering owner deciding the spec:AST-030 change, and one fix is needed whatever that decision is.
- Miss:
scripts/test-inputs/record.mjsdoes not watchchild_process.fork, so a test whose Node child is forked with its ownenvrecords none of that child's reads and is left out when they change, although DEC-31 says such a test always runs; wrapforkbesidespawnand add a forked child with a strippedenvto the recorder test.
The current FR13 runs every file-reading test on a pull request, and this change narrows it on purpose with the new DEC-31. Approval therefore needs an engineering owner to approve or reject the FR13 change and DEC-31 (the recording on Main, the record picker, the skip rules and the issue-opening alarm) by commenting /approve-spec <full head SHA> on the head that will merge; the author may do this as an engineering owner. The recursive-copy test now checks the copied folder, and four smaller notes from earlier rounds still stand in the review.
Claims and files checked
Review mode: incremental; reason: none
Claims:
- Nearly every Node test reads files, so FR13 runs almost the whole Node suite on each pull request (about 77 runner-minutes): consistent with the current rule; the minute figures are not verifiable here.
- The replay figures (time left out, minutes saved, share of editor tests skipped, share that still runs everything, tests whose record cannot see everything): not verifiable here, because Main keeps no record yet.
- With no usable record a pull request runs today's set, one job picks the record, every leg reads that choice, and a leg that cannot read it fails: verified (picker fallbacks in
test-inputs-pick.cjs, version and commit fallbacks infs-guard-tests.mjs, a download step without continue-on-error, workflow test; CI at this head ran the full set with the no-record notice). - A file-reading test still runs whenever the change can reach what it reads: verified for reads, listings, folder checks, missing paths and recursive copies; false for a Node child started with
forkand its own environment (probe). - Every required context and owner keeps reporting: verified (no required job renamed; the legs run when the picker is skipped or fails).
- The recorder notes reads, probes, listings, writes and what it cannot see; Node children and worker threads record under the same test file; the global setup records each part as a step: verified (
record.mjs, recorder tests, setup step names), except a forked child given its own environment, which is neither recorded nor marked. - Main's full run records in each leg, and one job merges the lines into the kept record when every leg passes: verified (
deploy.yml, workflow test), also merged withmain's planned Node legs; the record is kept only when the run tested the commit it was dispatched on. - A test that reads a setup step's output inherits that step's inputs, and one that reads a package's build output depends on the whole package: verified (
merge.mjs, merge test). - Only the file-reading guard tests are narrowed; module-graph and package-by-name tests run as today: verified (
fs-guard-tests.mjs). - A changed test file always runs: verified (
select.mjs, test). - A change under a listed folder, a checked folder that is gone, or a probed path that now exists runs the test: verified (
select.mjs, tests). - Install, CI, test setup, test utilities and build configuration changes run every file-reading test: verified (
RUNS_EVERY_TESTand its test). - The record must be of a commit the merge base contains, paths changed since it count and reach tests through their import closure, a record of another commit narrows nothing, and an unrecorded test runs: verified (picker,
fs-guard-tests.mjs, tests). - A test that starts a non-Node program, a shell, or a Node child or worker without the recorder always runs: false for a Node child started with
forkand its own environment (probe); verified for the other cases (recorder tests). - A failing test on Main names the merged pull requests that left it out and opens an issue: verified by reading; untested end to end, and its window starts at the previous run's dispatch commit (note).
- Each safety rule is tested: true for rules 1, 2 and 3; in rule 4 a record of another commit narrowing nothing is checked only by reading
fs-guard-tests.mjs, rule 5 has noforkcase, and the alarm (rule 6) is tested only through its readers and wiring. - Leg 1 keeps the list it left out: verified (
ci.yml, leg-bounds test). - A template-only change runs all the editor tests today: consistent with the current rule; the replayed 23 of 388 and the recording cost are not verifiable here.
- One slim job per pull-request run and one standard job on Main: verified (
ci.yml,deploy.yml). - No public API, product behaviour or visual change: verified (no package files change).
- Public text carries no internal context: verified.
- The listed test files pass: the new and changed test files pass here, and the workflow contracts pass merged with today's
main; the full list was not rerun. - The knowledge check is aligned: not rerun here.
Files:
.github/scripts/ci-admission.test.mjs: clear.github/scripts/ci-node-leg-bounds.test.mjs: clear.github/scripts/ci-test-routing.test.mjs: clear.github/scripts/fs-guard-tests.mjs: clear.github/scripts/lib/skipped-test-alarm.cjs: note (the window starts at the previous run's dispatch commit).github/scripts/lib/test-inputs-pick.cjs: clear.github/scripts/test-inputs-workflow.test.mjs: note (no case runs the alarm itself).github/workflows/ci.yml: clear.github/workflows/deploy.yml: note (a failed record step turns Main's run red)docs/specs/AST-030/spec.md: owner decision neededscripts/test-inputs/merge.mjs: clearscripts/test-inputs/record.mjs: blocking (forkis not watched); duplicate comment (note)scripts/test-inputs/select.mjs: clearscripts/test-inputs/setup.mjs: clearscripts/test-inputs/test-inputs.test.mjs: clear (the copy check is fixed); the missingforkcase belongs to the blocking findingvitest.config.ts: clearvitest.global-setup.node.mjs: clear
child_process.fork always starts Node; when its environment drops the recorder, the recorder notes it as unseen, so the test runs on every pull request. The recorder test forks a child that keeps the environment (its reads record) and one given a stripped environment.
There was a problem hiding this comment.
Approval waits on an engineering owner deciding the intentional spec:AST-030 change; no blocking defect remains at this head.
- To approve, an engineering owner comments
/approve-spec <full head SHA>on the head that will merge (the author may, as an engineering owner), deciding the FR13 change and the new DEC-31: the recording on Main, the record picker, the skip rules and the alarm that opens an issue on Main. - DEC-31's Decider line names a decider who has not recorded a decision on this pull request; it should name whoever approves.
The child_process.fork gap is fixed: a test whose forked Node child drops the recorder now always runs, and the recorder test fails without the new wrapper. Four non-blocking notes remain: Main's full run turns red if the record merge or upload fails (deploy.yml), the alarm compares from the commit a run was dispatched on rather than the one it tested (skipped-test-alarm.cjs), skippedFailures has no test, and record.mjs states the Node-child rule twice.
Claims and files checked
Review mode: incremental; reason: none
…larm compares from the tested commit - DEC-31 names its decider as pending until that approval is recorded. - Making or keeping the record continues on error: without it pull requests run every file-reading test, so main stays green. - The alarm compares from the commit the last passing run tested (a dispatch names it in its run name), not the commit it ran on. - skippedFailures takes its download as a parameter and has a test; the recorder states the Node-child rule once.
There was a problem hiding this comment.
Approval waits on an engineering owner deciding the intentional spec:AST-030 change, and three fixes are needed either way.
- To approve the spec change, an engineering owner comments
/approve-spec <full head SHA>on the head that will merge (the author may, as an engineering owner), deciding the FR13 change and DEC-31: the recording on Main, the record picker, the skip rules and the alarm that opens an issue on Main. - Regression:
mainnow requires every checkout indeploy.ymlto be bounded at five minutes and retried once, so the newnode-test-inputsjob's plain checkout failsmain-validation-workflow.test.mjson the merge commit (test-node (1/8)); mergemain, give that checkout the same bounded retry and stop step, and add the job to the test's list. - Miss: the Main leg step now names
--reporter=default --reporter=json, which turns off Vitest's automaticgithub-actionsreporter, so a Node test that fails on Main's full run no longer gets an annotation; add--reporter=github-actionsthere, as the pull-request legs inci.ymldo. testedCommitinskipped-test-alarm.cjscopiestestedShafromscripts/release/release-check-receipt.mjsbut falls back to the dispatch commit, which the existing readers anddeploy.yml's commit resolver say an unnamed run may not have tested; share one reader and make the fallback explicit.
The four earlier notes are fixed: the record steps no longer turn Main red, the alarm compares from the tested commit with a test, and the duplicate comment is gone. One non-blocking point: DEC-31 narrows DEC-6 ("tests that read sources through the file system run whole") without naming it.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: the cost and replay figures (runner-minutes, share left out, test counts, recording overhead, merge memory): unverified, since Main keeps no record yet.
- Claim: with no usable record the legs run today's set (no record, none of a recent base commit, too many changed paths, a failed lookup, another format or commit): verified in
test-inputs-pick.cjs:474-506,fs-guard-tests.mjs:497-517and CI's notice at this head. - Claim: one job picks the record and every leg reads that choice; a leg that cannot read it fails: verified in
ci.ymlandtest-inputs-workflow.test.mjs. - Claim: every required context and owner keeps reporting: verified, no required job renamed.
- Claim: the recorder notes reads, probes, listings, writes and what it cannot see, for Node children, workers and setup steps too: verified by the recorder tests and a real recording run.
- Claim: Main merges the legs only when all pass and keeps the record; step outputs inherit step inputs and build output maps to its package: verified in
deploy.ymlandmerge.mjswith tests. - Claim: legs narrow only the file-reading guards; module-graph and package-name tests run as today: verified in
fs-guard-tests.mjs. - Claim: safety rules 1 to 5: verified in
select.mjs,fs-guard-tests.mjsand tests. - Claim: rule 6, the alarm names merged pull requests and opens an issue: verified in
deploy.ymlandskipped-test-alarm.cjs, now with a test. - Claim: leg 1 keeps the left-out list: verified in
ci.yml. - Claim: the same 60-file sample passes with and without recording: unverified; three guard tests pass with recording here.
- Claim: one new slim job per pull-request run, seconds long: verified, 8 s at this head.
- Claim: no public API or product change: verified.
- Claim: the listed test runs pass and the knowledge check is aligned: the five changed test files pass at the head (the merge with
mainfails one other test, see above) and the knowledge check reports aligned. - Claim: the rubric notes (DEC-31's one Rejected line naming three, the FR13 row naming both test files): verified.
- File
.github/scripts/ci-admission.test.mjs: clear. - File
.github/scripts/ci-node-leg-bounds.test.mjs: clear. - File
.github/scripts/ci-test-routing.test.mjs: clear. - File
.github/scripts/fs-guard-tests.mjs: clear. - File
.github/scripts/lib/skipped-test-alarm.cjs: copied run-name reader (blocking). - File
.github/scripts/lib/test-inputs-pick.cjs: clear. - File
.github/scripts/test-inputs-workflow.test.mjs: clear. - File
.github/workflows/ci.yml: clear. - File
.github/workflows/deploy.yml: unbounded checkout on the merge withmain, and dropped failure annotations (blocking). - File
docs/specs/AST-030/spec.md: held for an engineering owner; DEC-6 not named (non-blocking). - File
scripts/test-inputs/merge.mjs: clear. - File
scripts/test-inputs/record.mjs: clear. - File
scripts/test-inputs/select.mjs: clear. - File
scripts/test-inputs/setup.mjs: clear. - File
scripts/test-inputs/test-inputs.test.mjs: clear. - File
vitest.config.ts: clear. - File
vitest.global-setup.node.mjs: clear.
…sted-commit reader - The node-test-inputs job checks out with main's bounded retry and stop step. - Main's recording legs name the github-actions reporter, so a failing Node test on the full run is annotated. - The release-check receipt and the skipped-test alarm read a Main run's tested commit through one helper; a run that names none is passed over. - DEC-31 says it narrows DEC-6 for the Node project.
There was a problem hiding this comment.
Approval waits on an engineering owner deciding the intentional spec:AST-030 change, and one fix is needed whatever that decision is.
- To approve the spec change, an engineering owner comments
/approve-spec <full head SHA>on the head that will merge to accept the FR13 narrowing and the new DEC-31 (the recording on Main, the record picker, the skip rules and the alarm), or rejects it; the author may do this as an engineering owner. .github/scripts/ci-heavy-lanes.test.mjs("reads the commit a unit run names exactly as the release receipt does") still expects the run-name pattern inscripts/release/release-check-receipt.mjs, which this head moved toscripts/lib/main-run-commit.cjs, so the Node run fails here and every full unit run ofmainwould fail after merge; point the test at the shared module and check that the receipt imports it.
The earlier fixes (the bounded checkout of the record job, the github-actions reporter on Main's Node legs, and one shared tested-commit reader) are in place, and the selection rules held on a real recording of three guard tests.
Claims and files checked
Review mode: full; reason: spec-record
Claims in the description:
- FR13's file-system rule runs nearly the whole Node suite on every pull request, about 77 runner-minutes: not checkable here (a measurement).
- The replay figures (time and minutes saved, the share of pull requests, unseen test files, the theme editor's 388 and 23 files): not checkable until
mainkeeps a record. - Without a usable record every file-reading test runs, one job picks the record, and a leg that cannot read it fails: verified (
ci.ymlpicker job and download step; this head's run reports thatmainkeeps no record). - The recorder notes reads, probes, listings, writes and what it cannot see, for Node children, workers and setup steps too: verified (
test-inputs.test.mjs, a real recording run). - Main's legs record, one job merges them when every leg passes, and build output counts as the whole package: verified (
deploy.yml,merge.mjstests). - Pull requests narrow only the file-reading guards, and module-graph and package-name tests still run: verified (
fs-guard-tests.mjs). - Safety rules 1 to 6: verified (
select.mjs,record.mjs,skipped-test-alarm.cjsand their tests). - Leg 1 keeps the list it left out: verified (
ci.yml). - Recording costs about 8% more CPU, the same 60-file sample passes, the merge takes 3.5 GB, the record is about 5 MB: not checkable here.
- One slim job per pull-request run and one standard job on Main: verified (runner labels in both workflows).
- No public API or product change: verified.
- The workflow-reading tests all pass except one that fails on
maintoo: false at this head (ci-heavy-lanes.test.mjsfails). - The two new test files cover the listed cases: verified (14 and 9 pass).
- The knowledge check is aligned: verified.
- Writing rubric results: verified against DEC-31.
Files:
.github/scripts/ci-admission.test.mjs,ci-node-leg-bounds.test.mjs,ci-test-routing.test.mjs,main-validation-workflow.test.mjs,test-inputs-workflow.test.mjs: clear..github/scripts/fs-guard-tests.mjs,lib/skipped-test-alarm.cjs,lib/test-inputs-pick.cjs: clear..github/workflows/ci.yml,.github/workflows/deploy.yml: clear.docs/specs/AST-030/spec.md: waits on the owner decision.scripts/lib/main-run-commit.cjs,scripts/release/release-check-receipt.mjs: the move breaksci-heavy-lanes.test.mjs(finding above).scripts/test-inputs/merge.mjs,record.mjs,select.mjs,setup.mjs,test-inputs.test.mjs: clear.vitest.config.ts,vitest.global-setup.node.mjs: clear.
…eader The pattern moved to scripts/lib/main-run-commit.cjs; the test checks it there and that the release receipt imports it.
There was a problem hiding this comment.
Approval waits on an engineering owner deciding the intentional spec:AST-030 change; no blocking defect remains at this head.
- To approve the spec change, an engineering owner comments
/approve-spec <full head SHA>on the head that will merge to accept the FR13 narrowing and the new DEC-31 (the recording on Main, the record picker, the skip rules and the alarm), or rejects it; the author may do this as an engineering owner.
The heavy-lanes contract now checks the shared run-name reader and the receipt's import, and it passes, so the earlier fix request is resolved.
Claims and files checked
Review mode: incremental; reason: none
Claims in the description:
- FR13's file-system rule runs nearly the whole Node suite on every pull request, about 77 runner-minutes: not checkable here (a measurement).
- The replay figures (time and minutes saved, the share of pull requests, unseen test files, the theme editor's 388 and 23 files): not checkable until
mainkeeps a record. - Without a usable record every file-reading test runs, one job picks the record, and a leg that cannot read it fails: verified (
ci.ymlpicker job and download step; this head's run reports thatmainkeeps no record). - The recorder notes reads, probes, listings, writes and what it cannot see, for Node children, workers and setup steps too: verified (
test-inputs.test.mjs, a real recording run). - Main's legs record, one job merges them when every leg passes, and build output counts as the whole package: verified (
deploy.yml,merge.mjstests). - Pull requests narrow only the file-reading guards, and module-graph and package-name tests still run: verified (
fs-guard-tests.mjs). - Safety rules 1 to 6: verified (
select.mjs,record.mjs,skipped-test-alarm.cjsand their tests). - Leg 1 keeps the list it left out: verified (
ci.yml). - Recording costs about 8% more CPU, the same 60-file sample passes, the merge takes 3.5 GB, the record is about 5 MB: not checkable here.
- One slim job per pull-request run and one standard job on Main: verified (runner labels in both workflows).
- No public API or product change: verified.
- The workflow-reading tests pass except one that also fails on
main: verified for the files run here, the heavy-lanes contract included; the named exception passed here too. - The two new test files cover the listed cases: verified (14 and 9 pass).
- The knowledge check is aligned: verified.
- Writing rubric results: verified against DEC-31.
Files:
.github/scripts/ci-heavy-lanes.test.mjs: clear (checks the shared reader and the receipt's import)..github/scripts/ci-admission.test.mjs,ci-node-leg-bounds.test.mjs,ci-test-routing.test.mjs,main-validation-workflow.test.mjs,test-inputs-workflow.test.mjs: clear..github/scripts/fs-guard-tests.mjs,lib/skipped-test-alarm.cjs,lib/test-inputs-pick.cjs: clear..github/workflows/ci.yml,.github/workflows/deploy.yml: clear.docs/specs/AST-030/spec.md: waits on the owner decision.scripts/lib/main-run-commit.cjs,scripts/release/release-check-receipt.mjs: clear.scripts/test-inputs/merge.mjs,record.mjs,select.mjs,setup.mjs,test-inputs.test.mjs: clear.vitest.config.ts,vitest.global-setup.node.mjs: clear.
# Conflicts: # vitest.global-setup.node.mjs
There was a problem hiding this comment.
Approval waits on an engineering owner deciding the intentional spec:AST-030 change, and one fix is needed whatever that decision is.
- To approve the spec change, an engineering owner comments
/approve-spec <full head SHA>on the head that will merge (the author may do so as an engineering owner); it settles whether pull-request Node legs may leave out a file-reading test whose recorded inputs the change misses, which the new FR13 sentence and DEC-31 allow and FR13 and DEC-6 as they stand forbid. - Miss:
scripts/test-inputs/record.mjswrites a process's lines only when it exits, so a page-render host thatrender-page.mjsstops withSIGKILLeither loses everything it read, leaving its test out of a change only the host read, or leaves a line cut short that makesmerge.mjsthrow so Main keeps no record.
Non-blocking: the bundled-theme build in the global setup's shared folder is credited to step:base-themes, which reads nothing, so a test that only links that build records none of packages/themes/<theme>/.
Claims and files checked
Review mode: incremental; reason: none
- Since the last review: the merge of
mainintovitest.global-setup.node.mjsand.github/workflows/deploy.yml, rechecked with the recorder, merge and selection. - Earlier fixes still hold: nested folders under a listed folder, the record's commit, recursive copies, forked children, the DEC-6 reference and the heavy-lanes contract.
…s are written whole A recorded Node child writes its lines when it exits, so one stopped by a signal (a page host killed once it answered) wrote none, or a cut-short line that made the merge throw. The parent now notes such a child as unseen for the owner it started under, so the test runs; and each line is its own file, written and then renamed into place, so no line is cut.
…s inputs The first worker builds a bundled theme into the run's shared folder and the rest link it, so the build was credited to the setup step that made the empty folder and read nothing. The merge now credits each path to its nearest maker, a step or a test, so a test that links the build depends on what the building test read.
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the spec:AST-030 change, and two defects need fixing either way.
Spec decision. This pull request intentionally narrows spec:AST-030 FR13 and DEC-6, which today run every file-reading test on a pull request, through the new DEC-31. An engineering owner records the decision by commenting /approve-spec <full head SHA> on the head that will merge, or rejects it; the author may do so if they are an engineering owner.
Blocking:
scripts/test-inputs/record.mjs:48names each line file by process id and a counter each thread keeps for itself, so a worker thread's line replaces its process's line: the pull request's own test "records a worker thread of a preloaded process" fails (scripts/test-inputs/test-inputs.test.mjs:152, also intest-node (2/8)), and a worker's line can replace the unseen mark a stopped child wrote, so a test whose host was killed can be left out; addingworkerThreads.threadIdto the name fixes both.- The new mark for a recorded child stopped by a signal makes the global setup's theme cache step unseen (its page hosts are stopped with
SIGKILLonce they answer), so every test that copies that cache, up to 435 of the 1,573 file-reading tests and 409 of them the theme editor's, always runs and the description's savings no longer hold; have a child write its lines before it answers, or measure again and restate the figures.
Non-blocking: a worker thread ended with terminate() loses its reads without an unseen mark (Miss).
Claims and files checked
Review mode: full; reason: spec-record
- Claim: with no usable record the legs run today's set: verified (
fs-guard-tests.mjs:497-517, picker tests intest-inputs-workflow.test.mjs). - Claim: one job picks the record and a leg that cannot read it fails: verified (
ci.ymldownload step withoutcontinue-on-error). - Claim: safety rules 1 to 4 and 6: verified in
select.mjs,fs-guard-tests.mjsand the wiring tests. - Claim: rule 5 (a child or worker the record cannot see runs): false for a worker of a preloaded process (
test-inputs.test.mjs:152fails). - Claim: the replay savings (19 runner-minutes, 37% of pull requests, 23 of 388, 124 of 1,585): false at this head (theme cache step unseen).
- Claim: the listed test files all pass: false at this head (
test-inputs.test.mjs, 1 of 15 fails). - Claim: recording costs about 8% CPU and the merge 3.5 GB: not checked (needs a full recording).
- Files:
record.mjs(two findings),test-inputs.test.mjs(failing test),merge.mjs(clear),select.mjs(clear),setup.mjs(clear),fs-guard-tests.mjs(clear),test-inputs-pick.cjs(clear),skipped-test-alarm.cjs(clear),main-run-commit.cjs(clear),release-check-receipt.mjs(clear),ci.yml(clear),deploy.yml(clear),vitest.config.ts(clear),vitest.global-setup.node.mjs(clear),docs/specs/AST-030/spec.md(held for the owner decision), and the six changed CI contract tests (clear).
…ses it on - Line files carry the thread id, so a worker thread's line never replaces its process's. - A recorded child or worker writes its lines before each IPC message and before a write after new inputs, so a page host killed once it answered loses nothing it passed on. Only a child stopped by a signal while its standard output was read marks its owner unseen, so the theme cache step no longer makes every test that copies the cache run.
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the spec:AST-030 change; no blocking defect remains at this head.
Spec decision. This pull request intentionally narrows spec:AST-030 FR13 and DEC-6, which today run every file-reading test on a pull request, through the new DEC-31 (the recording on Main, the record picker, the skip rules and the alarm). An engineering owner records the decision by commenting /approve-spec <full head SHA> on the head that will merge, or rejects it; the author may do so if they are an engineering owner.
Both defects from the last review are fixed: line files now carry the thread id, and a host killed after it answers keeps its reads, so the theme cache step no longer forces every test that copies it to run.
Non-blocking:
- A started process now writes a file per flush, so a two-test recording went from 96 line files to 22,170 (21,116 of them from
npm packin the setup's pack step); appending each flush to one file per process, or measuring a full run again, would keep the description's recording and merge figures honest. - Miss: a test that reads a shared base theme inherits every mark of the test that built it, so in a recording
theme-eject-editor-basealways ran becausetheme-cut-short, which built its theme, drew with a browser; building each shared theme under its own recorder owner would keep those tests selectable.
Claims and files checked
Review mode: incremental; reason: none
- Changed rules (0).
- Claim: with no usable record the legs run today's set: verified (
fs-guard-tests.mjs:492-517, picker tests intest-inputs-workflow.test.mjs). - Claim: one job picks the record and a leg that cannot read it fails: verified (
ci.ymldownload step withoutcontinue-on-error, wiring test). - Claim: safety rules 1 to 4 and 6: verified in
select.mjs,fs-guard-tests.mjsand the wiring tests. - Claim: rule 5 (a non-Node program, a shell, or a child or worker without the recorder makes its test run): verified (
test-inputs.test.mjs, 15 of 15). - Claim: Node children and worker threads record under the same test file: verified (worker case passes; a worker terminated after it answers keeps its read).
- Claim: the replay savings (about 19 runner-minutes, 37% of pull requests, 23 of 388, 124 of 1,585): not checked (needs a full recording); the theme cache step no longer forces those tests, but the base-theme note above still can.
- Claim: recording costs about 8% CPU, the merge 3.5 GB and under two minutes, the record about 5 MB: not checked; measured before this head, which writes far more line files.
- Claim: the listed workflow and test-inputs test files pass: verified for the 9 files run here (286 tests).
- Files:
record.mjs(line-volume note),merge.mjs(base-theme note),test-inputs.test.mjs(clear),select.mjs(clear),setup.mjs(clear),fs-guard-tests.mjs(clear),test-inputs-pick.cjs(clear),skipped-test-alarm.cjs(clear),main-run-commit.cjs(clear),release-check-receipt.mjs(clear),test-inputs-workflow.test.mjs(clear),ci.yml(clear),deploy.yml(clear),vitest.config.ts(clear),vitest.global-setup.node.mjs(clear),docs/specs/AST-030/spec.md(held for the owner decision), and the five changed CI contract tests (clear).
| if (pkg != null) { | ||
| if (from.unseen.length > 0) trees.add(`${pkg}/`); | ||
| } else { | ||
| for (const value of from.unseen) unseen.add(value); |
There was a problem hiding this comment.
Non-blocking (Miss): a test that reads what another test made inherits all of that test's unseen marks, not only those of the build it read. In a recording, theme-eject-editor-base read theme-butter.built that theme-cut-short built in the shared base-themes folder and inherited cut-short's "runs chromium-browser", so it always runs; on Main, with real renders and Chrome on the runners, which theme editor tests stay selectable depends on which test builds each base theme first. Building each shared theme under its own recorder owner (a step:base-theme-<name> switch around the build in real-base-themes.mjs) would keep the build's inputs apart.
…theme builds as its own step - Each process and thread appends its lines to one file, so a recording no longer writes a file per flush; a line a killed process cut short reads as one its owner cannot see. - The recorder records a run for a named step (as), and a shared base theme builds under it, so a test that links the build depends on what the build read, not on everything its builder did.
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the spec:AST-030 change; no blocking defect remains at this head.
Spec decision. This pull request intentionally narrows spec:AST-030 FR13 and DEC-6, which today run every file-reading test on a pull request, through the new DEC-31 (the recording on Main, the record picker, the skip rules and the alarm). An engineering owner records the decision by commenting /approve-spec <full head SHA> on the head that will merge, or rejects it; the author may do so if they are an engineering owner.
The line-file volume is fixed at this head (one line file per process and thread instead of one per flush), and CI found no room at this head, so its test jobs still need to run.
Non-blocking:
- A shared base theme now builds under its own step, but the lock and the
.builtmark inreal-base-themes.mjsare still written by the test that built it, so a test that links the theme still inherits that test's marks (whentheme-cut-shortbuilds butter first,theme-eject-editor-baseinherits its browser mark and always runs); creating the lock, building and writing the mark under the step would keep such tests selectable.
Claims and files checked
Review mode: incremental; reason: none
- Changed rules (0).
- Claim: with no usable record the legs run today's set: verified (
fs-guard-tests.mjs:492-517, picker tests intest-inputs-workflow.test.mjs). - Claim: one job picks the record and a leg that cannot read it fails: verified (
ci.ymldownload step withoutcontinue-on-error, wiring test). - Claim: safety rules 1 to 4 and 6: verified in
select.mjs,fs-guard-tests.mjsand the wiring tests. - Claim: rule 5 (a non-Node program, a shell, or a child or worker without the recorder makes its test run): verified (
test-inputs.test.mjs, 16 of 16). - Claim: Node children and worker threads record under the same test file: verified (worker and forked-child cases pass).
- Claim: the global setup records each of its parts as a step: verified (the global setup's step switches).
- Claim: a test that read a step's output inherits that step's inputs, and one that read a package's build output depends on the whole package: verified (recordings;
merge.mjsmaker and package-tree rules). - Claim: the replay savings (about 19 runner-minutes, 37% of pull requests, 23 of 388, 124 of 1,585): not checked (needs a full recording).
- Claim: recording costs about 8% CPU, the merge 3.5 GB and under two minutes, the record about 5 MB: not checked; measured before this head.
- Claim: the listed workflow and test-inputs test files pass: verified for the 9 files run here (287 tests).
- Files:
docs/specs/AST-030/spec.md(held for the owner decision),scripts/test-inputs/record.mjs(clear),scripts/test-inputs/merge.mjs(clear),packages/cli/test-utils/real-base-themes.mjs(base-theme mark note),scripts/test-inputs/select.mjs(clear),scripts/test-inputs/setup.mjs(clear),scripts/test-inputs/test-inputs.test.mjs(clear),.github/scripts/fs-guard-tests.mjs(clear),.github/scripts/lib/test-inputs-pick.cjs(clear),.github/scripts/lib/skipped-test-alarm.cjs(clear),scripts/lib/main-run-commit.cjs(clear),scripts/release/release-check-receipt.mjs(clear),.github/scripts/test-inputs-workflow.test.mjs(clear),.github/workflows/ci.yml(clear),.github/workflows/deploy.yml(clear),vitest.config.ts(clear),vitest.global-setup.node.mjs(clear), the five changed CI contract tests (ci-admission,ci-heavy-lanes,ci-node-leg-bounds,ci-test-routing,main-validation-workflow) (clear).
| await (recording | ||
| ? recording.as(`step:base-theme-${like}`, build) | ||
| : build()); | ||
| fs.writeFileSync(done, ''); |
There was a problem hiding this comment.
Non-blocking: the build above now runs under step:base-theme-<like>, but this mark (and the lock at line 118) is still written under the test that built the theme, and every other test that links it reads the mark (lines 115 and 122-124). merge.mjs then gives that reader all of the builder's inputs and unseen marks: in a one-worker recording, theme-eject-editor-base read theme-butter.built written by theme-cut-short and inherited its "runs chromium-browser", so it runs on every pull request; with the mark and the lock credited to the step, its record has no unseen mark. Making the lock, the build, the mark and the lock's removal one function run under recording.as(...) keeps readers to the build's inputs.
|
Paused while CI changes are on hold; will reopen when that work resumes. |
HOLD: CI changes are paused for now; this waits until CI work resumes.
Maintainer impact
Nearly every Node test reads files, so FR13's file-system rule runs almost the whole Node suite on every pull request: about 77 runner-minutes per run, the largest share of a run's cost under CI's job ceiling. The theme editor's 388 test files are more than half of it, and most changes touch none of their inputs.
Replaying the last 120 pull requests' changed files against a recording of the full Node suite:
Fallback. A pull request with no usable record runs exactly today's set: Main keeps no record, none is of a commit among the merge base's latest 100, the paths changed since the record cannot all be listed, the lookup fails, or the record is of another format version or another commit. One job picks the record and every leg reads that one choice, so legs always split the same list; a leg that cannot read the chosen record fails rather than run a different list.
Intended invariant
spec:AST-030FR13 and the new DEC-31: a file-reading test still runs whenever the change can reach what it reads. Every required context and every owner keeps reporting as today.Change
scripts/test-inputs/record.mjs, preloaded with--importin a recording run, records per test file what each Node process touches: files read, paths probed but missing, folders listed, paths written, and what it cannot see (a program that is not Node, a shell command, a child given an environment without the recorder, or a worker of a process the recorder was not preloaded into). Node children and worker threads record themselves under the same test file. The global setup records each of its parts as a step.scripts/test-inputs/merge.mjs) and keeps it as thenode-test-inputsartifact. A test that read a step's output inherits that step's inputs. A test that read a package's build output depends on the whole package.node-test-inputspicks the record, and the Node legs narrow the file-reading guards with it (scripts/test-inputs/select.mjsthroughfs-guard-tests.mjs --inputs). Tests the change reaches through their module graph, and tests that load a changed package by name, run as today.package.json, the lockfile, the workspace or Node version,.github/, the Vitest configuration and setup files, the test utilities, or TypeScript or bundler configuration or build scripts runs every file-reading test.node-skipped-tests) for that alarm.Evidence
Scope
Components: CI test selection, CI records
Testing
pnpm exec vitest run --project nodeover every test file that reads the workflows, admission,fs-guard-testsorscripts/test-inputs(58 files): all pass exceptci-interaction-lab-specs, which fails on main too.scripts/test-inputs/test-inputs.test.mjs: the recorder in real child processes (reads, probes, listings, writes, a Node child, a non-Node program, no owner), the merge (setup steps, build output, a test's own writes, checkout files), and every selection rule..github/scripts/test-inputs-workflow.test.mjs: the wiring inci.ymlanddeploy.yml, the record picker against a stubbed API (newest record of the base, renamed paths, no record, too many changed paths), and the alarm's readers.pnpm check:knowledge: aligned.Writing rubric results
R1 narration: DEC-31's first draft said the run "now records" and that the legs run every test "as before"; rewritten in the present tense.
R2 research: the replay numbers stay in this description; DEC-31 keeps only the conclusion that most changes touch none of the editor tests' inputs.
R3 evidence: FR13's verification row names the two test files and their cases.
R4 rejected alternatives: one
Rejected:line in DEC-31, naming three.R5 change references: none.
R6 open questions: none.
R7 project status: none.