Repository navigation
Build the CLI npm distribution once for its test suite - #1182
Merged
Merged
Conversation
PR #1182: Build the CLI npm distribution once for its test suite1 files, +52 / -40 Scope✅ PR scope looks good. Structural✅ No structural bloat detected. Slop✅ Slop indicators look low. Static Analysis✅ Oxlint found no issues. CorrectnessNo extraneous code patterns detected. |
taras
marked this pull request as ready for review
November 8, 2026 12:56
The closure-publishability case and the <Plan> identity case each built the CLI package into their own private workspace. The manifest checks now run immediately after the Plan case's build, before its emitted-bin consumers, so the file builds four times instead of five. Every assertion and child command is retained. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every case in cli-npm-bin.test.ts built packages/cli into a private workspace of its own, five builds of the same inputs. A beforeAll now acquires one workspace and builds it once; each case reads that finished package and keeps its consumer directories, child processes and Api middleware to itself. The five original cases and their assertions are restored. The two smoke runs and the upgrade refusal run from a case-owned directory instead of the shared package root, and planned.txt is checked where the smoke run would write it. A same-file regression drives the test adapter directly. It proves that a one-time resource outlives each case, that a failed case leaves it to the next, and that it is released only after the last case's cleanup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The adapter lifetime test in cli-npm-bin.test.ts was written to confirm how a beforeAll resource outlives its cases. It is not coverage this suite needs to carry. It is removed together with the imports and helper only it used. The one-build npm CLI package suite is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
taras
force-pushed
the
codex/reduce-npm-test-builds
branch
from
November 8, 2026 13:03
6e7c499 to
b80b25c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The CLI npm distribution suite builds the same package five times. Build it once in suite setup, retain it until all consumers and cleanup finish, and keep all five original cases independently reported.
Consumers keep their own working directories, processes and scoped middleware. Build-specific output middleware ends before cases run. All 70 original assertion sites and seven emitted CLI invocations remain.
Validation:
6e7c499a468afdbb4f519328cf83731db98ce222: one-file frozen Deno check, oxfmt and oxlint passed; three existing sort warnings remain.95f3fd43covered all five original cases. Their suite and helpers remain byte-identical at the current head. The separate exploratory adapter-lifetime test and its unused support were removed at the user's direction; no runtime or timing run was repeated for that deletion.gpt-6-astradelta review: PASS on6e7c499a, no findings. The prior whole-change reviews remain applicable to the unchanged implementation.One chronological local observation before removing the exploratory test: 216.997s before, 73.545s after (143.452s less). Cache, order and machine effects were not controlled; this is not a CI timing or whole-measurement completion guarantee. Independent fresh-build samples decrease from five to one; the cases do not compare build determinism.
Only
scripts/tests/cli-npm-bin.test.tschanges. No corpus, runtime exclusion, runner, dependency, timeout or weight data changes. Main repair #1180, Preparation #1117 and measurement investigation #1179 remain separate. Required CI and the main-health gate still apply.Closes #1181.
Delivery refresh: signed merge
5ab8c5d70cd9278e9cb03ccfef9fd162e7f9aee7incorporates current main23c9003, including the reviewed CI repairs and documentation update required by strict branch protection. Relative to main, only the original npm CLI test file differs; its reviewed blob remains84bda304cd7eb04dd2b501039be87249ae0c6d99. The previous head's Deno Delivery shard failed once and then passed all 25 files on one unchanged-commit retry. Intermittence is recorded in open flake #1176; no causal repair is claimed. The final branch CI was still running when this PR merged and was superseded by post-merge verification. CI on main0ef868f, including this cleanup, passed all required checks; its draft release also passed.