Repository navigation
test: overlap native fs-safe probes within asset phases - #132168
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 6:42 PM ET / 22:42 UTC. ClawSweeper reviewWhat this changesThis PR overlaps isolated native fs-safe Node probes within each asset phase while preserving the barrier before asset deletion and bundle disposal. Merge readinessKeep this maintainer-owned PR open: its introduced test-only concurrency change is not on current main and source review found no actionable correctness defect. Priority: P3 Review scores
Verification
How this fits togetherThe tsdown artifact test builds and relocates package output, then uses separate Node processes to check native fs-safe loading modes. Its phase barrier protects the shared copied native assets until every probe has finished. flowchart LR
A[Build and relocate artifacts] --> B[Launch isolated native probes]
B --> C[Wait for all probes]
C --> D[Verify copied assets]
D --> E[Remove native assets]
E --> F[Run missing-asset probes]
F --> G[Dispose build bundles]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +23. Total +23 across 1 file. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the phase-level all-settled barrier and merge once the outstanding exact-head review and CI gates are satisfied. Do we have a high-confidence way to reproduce the issue? Not applicable to a user-facing bug. The supplied Testbox evidence and source identify the test-performance scenario, but this read-only review did not execute it. Is this the best way to solve the issue? Yes. The phase-level all-settled join is the narrowest maintainable way to overlap independent processes while retaining the asset and bundle lifetime invariant. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9684f8f51228. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Checked the complete latest review, including its Before merge and Rank-up moves sections. There are no source or security findings to repair; the outstanding request is current review/CI confirmation. That request is satisfied for unchanged head The phase-level all-settled barriers remain unchanged. Real owner faults, fourteen distinct child/root observations, zero remaining children/roots, the complete changed gate, and fresh autoreview are recorded in the PR evidence. No repair or re-review is needed for this verification-only follow-through. |
|
Merged via squash.
|
What Problem This Solves
The relocated native fs-safe artifact tests wait for fourteen independent Node probes in sequence. This adds avoidable wall time to the tooling suite even though each probe has its own data directory and process-local native loader/configuration state.
Why This Change Was Made
Run the four probes with native assets present concurrently, wait for every child to finish, then verify and remove the assets before running the three missing-asset probes concurrently. Keep the runtime and worker builds serial, along with bundle disposal and the rest of the file.
Promise.allSettledkeeps a failing child from releasing the shared built artifact while its siblings still use it; aggregate failures retain individual probe labels.All seventeen test registrations, fourteen real Node processes, seven native asset hashes, both environment aliases, shared configuration, default fallback, and missing-native require/off/auto outcomes remain. No production, workflow, runner configuration, dependency, or public behavior changes.
User Impact
Developers get faster tooling tests with the same real build/relocation/native-process coverage. No end-user behavior changes.
Evidence
Measured on one dedicated Blacksmith Testbox, one Vitest worker, separate module cache per invocation, import diagnostics and
/usr/bin/time -v. Each set excludes A/B warmups and uses eight balanced AB/BA pairs. The initial full-file set was noisy, so a separate confirmation set was recorded without dropping any initial samples.Confirmation full-file GNU-time median max RSS: 527,686 -> 542,968 KiB; user CPU 4.975 -> 5.015 s; system CPU 0.495 -> 0.545 s. Sampled descendant peak rises 7 -> 10 and tree RSS peak 901,612 -> 1,040,112 KiB. This trades a bounded peak of four short-lived probes for lower wall time; it is not a CPU or memory reduction. Full-file timing, not filtered timing, determines retention.
The real owner fault tests changed the runtime and worker native-copy destinations independently. Each fault failed exactly its corresponding relocated target, with named native-probe failures, while the sibling target passed. Exact owner bytes were restored; full-file shuffles at seeds 17 and 91 and local seed 37 passed all 17 tests. Observation-only instrumentation counted fourteen distinct child PIDs and fourteen distinct roots, peak four probes, four completions before each native asset deletion, then three missing-asset probes. All children and roots were gone after completion.
Blacksmith proof workflow. Baseline source:
a79e6517be830ad930fc9be36d5cc7536f86089c. The test runs real tsdown output and the installed native fs-safe binding; no mocked process, native binding, copied validator, or in-process probe substitution.Canonical test command (with per-run cache/import/resource instrumentation around it):
Test-audit and deslop: no test cases removed or added, no new mocks or test-only production seams. Production LOC +0/-0; test LOC +63/-40 (net +23), for asynchronous process completion and phase-owned failure joining. No incidental coverage removed.
All measured whole-file wall pairs (seconds; no samples omitted)
Complete changed gate passed on the same Testbox (root test types, tooling lint, formatting, dependency and boundary guards). Fresh Codex autoreview reported no actionable findings.