Repository navigation
Conversation
me2seeks
left a comment
There was a problem hiding this comment.
Automated review notice: This comment was posted by an automated review agent operated by me2seeks make. It is not an independent human review and does not replace one.
Summary
Derives the CI planner's releaseContract/asfSource gate-lane test files from package.json scripts instead of a hardcoded list: collectGateScriptTestFiles recursively walks check:release and check:asf-source npm-script chains (npm run x references, cycle-guarded) collecting scripts/*.test.mjs inputs, and planTests merges those sets into the lane predicates. I executed the extraction against the PR head: it finds all 13 previously hardcoded files (zero missing) plus 14 more test files that previously did NOT select the lane (scripts/desktop-nightly*.test.mjs, scripts/release-cli-*.test.mjs, scripts/asf-npm-workflow-policy.test.mjs, etc.) — a strict superset, so no existing lane coverage is lost and genuine gaps are closed. The recursion is cycle-safe via visited.
Findings
- [P3] Only
labelran on this head —ci-test-plan.test.mjsis the suite that guards this planner, and the planner selects CI lanes for every other PR, so thetestlane must run green before merge.
Verdict
merge-ready — verified strict-superset derivation with cycle safety; request CI as housekeeping.
Stop hand-maintaining scripts/*.test.mjs paths in RELEASE_CONTRACT_FILES and ASF_SOURCE_FILES. The planner now reads check:release and check:asf-source (including nested npm run delegations) and treats each named test file as an input to that gate's lane.
93d87ff to
3cf1edf
Compare
|
Thanks for the review. Rebased onto current
|
hqhq1025
left a comment
There was a problem hiding this comment.
Reviewed commit 3cf1edf. The planner now derives release/asf gate-owned scripts/*.test.mjs inputs from the corresponding package.json scripts, including nested npm run calls, rather than maintaining a second static list (scripts/ci-test-plan.mjs:29-68,445-449,561-575). The existing static paths outside those test inputs remain.
I found no substantiated code defect in the changed logic. The 42 planner tests pass locally, and the derived sets include 26 release and 6 ASF test paths. Fresh main 71bc045 merges cleanly and git diff --check passes. However, current-head hosted test is FAILED: Biome rejects the formatting at scripts/ci-test-plan.mjs:574-575. Please fix that gate failure and re-run CI before merge; this review is not merge approval. I did not run the complete CI suite locally or verify future, differently-shaped npm script commands.
Automated review notice: This comment was posted by an automated review agent operated by hqhq1025. It is not an independent human review and does not replace one.
Co-authored-by: Cursor <[email protected]>
|
@hqhq1025 Thanks for catching the Biome format failure. Pushed |
hqhq1025
left a comment
There was a problem hiding this comment.
The only change since the prior reviewed head is Biome formatting of the releaseContract assignment in scripts/ci-test-plan.mjs; the planner logic and test cases are unchanged. The PR still derives the release/ASF gate-test inputs from package scripts, and I found no actionable issue in the reviewed increment. On Node 24, all 42 focused planner tests pass. The current-head hosted test check passes, and the fresh-main merge-tree and diff check are clean. I did not run the complete local workspace suite or package a release. This is not merge approval.
Automated review notice: This comment was posted by an automated review agent operated by hqhq1025. It is not an independent human review and does not replace one.
…e-scripts Keep gate-script test-file derivation from this PR, take main's shouldRunAstryxSurfaceInventory rename and Boolean astryx_surface output, and re-pin compatible protocol declarations to epoch 202 for the merge. Co-authored-by: Cursor <[email protected]>
Astro-Han
left a comment
There was a problem hiding this comment.
Reviewed b840fbe7fa15b325338d7e0dd208a90f0787ce1e (4 files, +98/−47; three commits, the last a merge of main).
1×P3, and no other P0–P3.
P3 — two protocol ledgers were re-dated without anything being re-validated. packages/runtime-host/protocol-compatible-changes/mechanical-candidate-sweep.json and turn-snapshot-optional-fields.json move "epoch": 200 → 202. Those files record the compatibility argument for a specific change, and their epoch is the protocol baseline that argument was made against. Here main still carries 200 in both files, and this PR does not touch RUNTIME_HOST_COMPATIBILITY_EPOCH at all — it reads 202 on main and on this branch alike. So the edit asserts that two unrelated compatibility arguments were re-validated through epoch 202, which this change neither does nor needs to do. It looks like incidental drift picked up while merging main and is better reverted; a CI-planner change has no business re-dating the protocol ledgers.
The planner change itself checks out, including the risk it carries. scripts/ci-test-plan.mjs now derives the release and ASF gate-test inputs from the package.json scripts instead of keeping a second static list: GATE_SCRIPT_LANES maps check:release → releaseContract and check:asf-source → asfSource, and collectGateScriptTestFiles follows nested npm run calls with a visited guard, so a script cycle cannot loop. The derived sets feed the planner at scripts/ci-test-plan.mjs:449 (options.gateTestFiles ?? loadGateTestFiles(...)), so the new module is genuinely wired rather than dead, and the test file drives both the derivation and the lane map.
The thing worth proving was that deleting the static entries loses no coverage, since that failure would be silent. I re-implemented the same derivation against this head's package.json and enumerated the seven scripts/*.test.mjs paths the diff removes:
audit-shipped-dependencies,prepare-windows-upgrade-baseline,generate-third-party-notices,product-release,qualify-released-cli-state-root,third-party-closure,verify-linux-harness
All seven are still produced by the derivation, which yields 26 release-lane and 6 ASF-lane test files. The deletions are therefore duplicates of what the scripts already reach, not coverage.
Gate on this head: test is green; the merge state is blocked, i.e. review still pending rather than a verdict.
What I could not judge
- I did not run the planner's own test file or the release tooling; I verified the derivation's coverage by reproducing its logic independently against
package.json. - No release packaging or hosted CI beyond the check above.
I did not approve, request changes, or merge.
Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.
A CI planner change should not re-date unrelated compatible-change ledgers; restore both files to main's epoch 200. Co-authored-by: Cursor <[email protected]>
Astro-Han
left a comment
There was a problem hiding this comment.
Automated review notice: This comment was posted by an automated review agent. It is not an independent human review and does not replace one.
Incremental re-review of exact head d4a06e02. The previous reviewed head was b840fbe7. The merge-base is unchanged (57964425), so the increment is exactly one commit, d4a06e022 ("Revert incidental epoch re-pin of protocol compatibility declarations"). The PR is now +96/-45 across 2 files.
Status of the previous finding
- P3, two protocol ledgers re-dated from 200 to 202 without re-validation: fixed.
packages/runtime-host/protocol-compatible-changes/mechanical-candidate-sweep.jsonandturn-snapshot-optional-fields.jsonare back to"epoch": 200, which matchesmain. The PR no longer touches anything underpackages/.
Planner change unchanged. git diff 57964425 b840fbe7 -- scripts and git diff 57964425 d4a06e02 -- scripts are byte-identical, so the earlier analysis still holds. scripts/ci-test-plan.mjs derives the release and ASF gate-test inputs from the check:release / check:asf-source script graph, with a visited guard. The seven static entries it removes are all still produced by that derivation.
Main drift. Main is 22 commits past the merge-base. Neither scripts/ci-test-plan.mjs nor its test changed on main. The only package.json change is the new shots:storybook script, which is not reachable from either gate script and so does not affect the derived sets. I merged current main (7c90bac2) into this head locally, without conflicts, and ran node --test scripts/ci-test-plan.test.mjs: 42/42 pass.
New findings: none at P0-P3.
CI and merge state: test passes on this head. MERGEABLE; BLOCKED only on required review.
Verdict: the only open item from the last round is resolved, and there is nothing further.
|
Thank you so much @Astro-Han for the careful re-review, and for verifying the merge against the latest main as well — really appreciated! The incidental epoch re-pin has been reverted in d4a06e0, so the PR no longer touches anything under Whenever a maintainer has a moment, I'd be grateful for a final look and approval. Thanks again to everyone for the helpful feedback! |
|
This pull request has had no new commits for 30 days and has been marked stale. It will be closed in 7 days unless a new commit is pushed. Comments do not reset this timer: only a new commit does. If the pull request is intentionally long-lived, a maintainer can apply the |
Derive CI planner gate test inputs from package.json scripts
Stop hand-maintaining
scripts/*.test.mjspaths inRELEASE_CONTRACT_FILESandASF_SOURCE_FILES. The planner now readscheck:releaseandcheck:asf-source(including nestednpm rundelegations) and treats each named test file as an input to that gate's lane.Summary
Whether a
scripts/*.test.mjsfile runs, and whether a change to it schedules the lane that runs it, were previously written in three places: the test file itself, an npm gate script (check:release,check:asf-source) or a CI step, and a literal path list inscripts/ci-test-plan.mjs. Missing the third meant the gate still ran the test, but editing the test alone did not select the lane — so the test could be changed green without CI exercising it.This PR makes the planner derive those test-file inputs from
package.jsoninstead:loadGateTestFiles()readscheck:releaseandcheck:asf-sourcecollectGateScriptTestFiles()extracts everyscripts/*.test.mjspath from each gate script's command textnpm runinvocations are followed recursively (e.g.check:release→check:asf-npm→scripts/asf-npm-workflow-policy.test.mjs)isReleaseContractPath()andisAsfSourcePath()union the derived sets with the remaining static authority pathsThirteen hand-written
.test.mjsentries are removed fromRELEASE_CONTRACT_FILESandASF_SOURCE_FILES. Static non-test authority paths (workflows, generators, manifests) stay listed as before.Out of scope (per issue): the ~11 test files named directly in
.github/workflows/ci.ymlnode --teststeps are unchanged — most run unconditionally and need no lane selection. App icon drift tests remain driven by the workflow step, not an npm gate script.Fixes #4473
Verification
Result: 32/32 tests passed.
Spot checks:
Not run locally: full
npm ci,check:release,check:asf-source, or workflow-policy suites. The change is confined to the install-free planner and its unit tests, which run beforenpm ciin CI.AI use
Select exactly one:
Tool(s) and scope:
Cursor (Auto) — implemented
loadGateTestFiles/collectGateScriptTestFiles, removed duplicated static test paths, and updatedci-test-plan.test.mjsguardrails.Checklist
Does this PR entail a change in behavior?
Behavior change: editing any
scripts/*.test.mjsnamed bycheck:releaseorcheck:asf-source(including via nestednpm run) now selectsrelease_contractorasf_sourcein the CI test plan. Previously, several release-gate tests (e.g.desktop-nightly-workflow-policy.test.mjs,release-cli-*tests reachable only via derivation) did not select their lane when edited alone. The planner's output now also depends onpackage.jsonscript text, not only the static tables.