Skip to content

test(shared): remove duplicate devEngines parse tests - #3301

Merged
fengmk2 merged 2 commits into
mainfrom
claude/prune-tests-duplicate-dev-engines-parse-tests
Nov 1, 2026
Merged

fengmk2 merged 2 commits into
mainfrom
claude/prune-tests-duplicate-dev-engines-parse-tests

Conversation

@Brooooooklyn

Copy link
Copy Markdown
Member

Requested by Brooklyn · project thread

Before: three tests in vp_shared::package_json each repeated one case of a stronger table-style test in the same module, with the same assertions, so they could only fail together with it.

After: the three tests are gone. Every product mutation that failed one of them also fails its covering test, before and after the removal. Only #[cfg(test)] mod tests changes.

Totals

  • Files touched: 1.
  • Cases deleted: 3 of 135 vp_shared unit cases (plus 6 doctests, unchanged); after: 132. The workspace-wide count could not be collected (see below).
  • Cases merged: 0.
  • Net lines: −33 (+0 / −33).
  • Runtime saved: about 0 ms (each deleted case reports <0.000s>).

Removals

  1. test_malformed_single_entry_parses_as_absent: its input "runtime": "node@24" and assertion runtime.is_none() are the "\"node@24\"" row of test_parse_field_non_object_values. M1 (accept a bare string as a single entry's name) failed both; after the removal it still fails test_parse_field_non_object_values.
  2. test_malformed_dev_engines_does_not_break_engines_parse: a string devEngines next to engines.node, with three assertions; test_parse_dev_engines_non_object_values makes the same three for its "\"text\"" row (and seven more shapes). M2 (reject a string devEngines) failed both; after, it still fails the covering test.
  3. test_parse_engines_node: {"engines":{"node":">=20.0.0"}} with one assertion, the engines half of test_parse_both_engines_and_dev_engines (engines and devEngines are independent serde fields). M3 (#[serde(default, rename = "engine")] on engines) failed it and 4 others; after, it still fails test_parse_both_engines_and_dev_engines, test_parse_dev_engines_non_object_values and test_parse_engines_node_empty.

Kept after defense: none; every nominee had another test failing on its mutation.

Case counts

file before after delta
crates/vp_shared/src/package_json.rs 27 24 −3
vp_shared unit total 135 132 −3

0 failures before and after.

What ran and what did not

  • Ran at 4928bc57 and on this branch: cargo test -p vp_shared -- -Z unstable-options --report-time; the three mutations (each reverted); cargo clippy -p vp_shared --all-targets --all-features -- --deny warnings; cargo fmt --all -- --check; git diff --check. All clean.
  • To build without just init (which clones rolldown), packages/cli/binding was dropped from the workspace members locally; Cargo.toml and Cargo.lock were restored and are not in this PR.
  • Not run: just check / just test / just lint (they need the rolldown clone), other crates, Windows, the JS suite and the snapshot suites. No other file changes.

Open pull requests: none of the 62 open PRs touches this file. Ages: test_parse_engines_node from #522 (2026-02-07), the other two from #1760 (2026-06-08); none was added for a bug or sits in a permission or security suite.

To revert: git revert 261d71b3.


Generated by Claude Code

Three `vp_shared::package_json` tests repeat a case that a stronger test
in the same module already checks with the same assertions:

- `test_malformed_single_entry_parses_as_absent` (`"runtime": "node@24"`)
  is one row of `test_parse_field_non_object_values`.
- `test_malformed_dev_engines_does_not_break_engines_parse` (a string
  `devEngines` next to `engines.node`) is the `"text"` row of
  `test_parse_dev_engines_non_object_values`.
- `test_parse_engines_node` is the `engines` half of
  `test_parse_both_engines_and_dev_engines`.

Each product mutation that failed a removed test also failed the
covering test, and still does after the removal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PxVsmvB9xfZKfVnUonY8kf
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T19:24:29.606851Z 261d71b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://claude-prune-tests-duplicate-dev-engines-parse-tes-viteplus-dev.voidzero-docs.workers.dev (commit 833d32f)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://13e901b8-viteplus-dev.voidzero-docs.workers.dev 833d32f 2026-11-01T14:00:11.346Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://16b2f8ba-viteplus-dev.voidzero-docs.workers.dev 261d71b 2026-10-31T19:23:43.571Z Visit the dashboard ↗

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

CLI artifact sizes (833d32f)

Final release artifacts built by the canonical build-upstream and build-windows-cli actions.
The dist rows use the Linux build. The core total excludes .node files to match the release artifact.

Artifact Format Base PR Change
packages/cli/dist Directory total 2.27 MiB 2.27 MiB 0 B (0.00%)
packages/core/dist Directory total 4.07 MiB 4.07 MiB 0 B (0.00%)
Combined package dist Directory total 6.34 MiB 6.34 MiB 0 B (0.00%)
vp (Linux x64) Binary 8.26 MiB 8.26 MiB 0 B (0.00%)
vp (Linux x64) gzip -9 3.77 MiB 3.77 MiB 0 B (0.00%)
NAPI (Linux x64) Binary 35.56 MiB 35.56 MiB 0 B (0.00%)
NAPI (Linux x64) gzip -9 14.17 MiB 14.17 MiB 0 B (0.00%)
vp (macOS ARM64) Binary 5.39 MiB 5.39 MiB 0 B (0.00%)
vp (macOS ARM64) gzip -9 3.21 MiB 3.21 MiB 0 B (0.00%)
NAPI (macOS ARM64) Binary 42.31 MiB 42.31 MiB 0 B (0.00%)
NAPI (macOS ARM64) gzip -9 18.31 MiB 18.31 MiB 0 B (0.00%)
vp (Windows x64) Binary 6.12 MiB 6.12 MiB 0 B (0.00%)
vp (Windows x64) gzip -9 2.83 MiB 2.83 MiB 0 B (0.00%)
NAPI (Windows x64) Binary 31.58 MiB 31.58 MiB 0 B (0.00%)
NAPI (Windows x64) gzip -9 12.86 MiB 12.86 MiB -1 B (-0.00%)
Trampoline (Windows x64) Binary 13.50 KiB 13.50 KiB 0 B (0.00%)
Trampoline (Windows x64) gzip -9 7.09 KiB 7.09 KiB 0 B (0.00%)
Installer (Windows x64) Binary 4.65 MiB 4.65 MiB 0 B (0.00%)
Installer (Windows x64) gzip -9 2.23 MiB 2.23 MiB 0 B (0.00%)

@fengmk2
fengmk2 merged commit 7d1ad9a into main Nov 1, 2026
75 checks passed
@fengmk2
fengmk2 deleted the claude/prune-tests-duplicate-dev-engines-parse-tests branch November 1, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants