#7006

test(domain): pin artifactExpansionBudget constants and floor boundary

Opencoskunulugwants to merge intofrom

Pins behavior the suite missed: the concrete ZIP policy constants (ARTIFACT_EXPANSION_RATIO = 500, 256 MiB floor), the floor→scaled crossover on both sides, and Math.floor truncation of fractional sizes. Mutation testing revealed the ratio constant was unpinned (500→499 survived because expectations were derived from the constant); this closes it.

Verification: 5/5 pass (vitest run src/domain/artifactExpansionBudget.test.ts); mutation-checked locally (ratio 500→499 → fail, floor 256→255 MiB → fail, Math.floor removal → fail, Math.max→Math.min → 4 fail). Source unchanged — tests only.

🤖 Generated with Claude Code

Activity

4
chatgpt-codex-connector[bot]1mo ago

Codex Review Summary

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

ReviewStatusCommitReview trigger
📝 Code Review✅ Completed 2026-10-24T12:49:28.663444Zee8a668PR 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.

greptile-apps[bot]1mo ago

Confidence Score: 5/5

[Low impact] The test-only change appears safe to merge.

Summary

Adds three tests for artifactExpansionBudgetBytes without changing runtime code.

  • The budget tests pin the expansion limits and edge cases.

Reviews (1) · Last reviewed commit: "test(domain): pin artifactExpansionBudge..." · Reviewed by Greptile

CassieFox2317d ago

TL;DR: I ran the PR's one changed test file on three Node versions, and it passed each time. The head is 1394 commits behind main 559083be29. The CI workflow run is marked action_required, and no CI test jobs appear in it.

Findings

CheckNode 22.23.4Node 24.22.1Node 26.12.1
src/domain/artifactExpansionBudget.test.tspass, 5 of 5 testspass, 5 of 5 testspass, 5 of 5 tests

Each run printed Test Files 1 passed (1) and Tests 5 passed (5). I ran head ee8a668bcc.

GitHub lists the PR as a draft by coskunulug, with mergeable true and state blocked.

CI on the head, read live with gh:

  • Workflow runs: CI 1 completed/action_required. PR readiness 1 completed/failure and 2 completed/success. PR title 2 completed/action_required.
  • Check runs: Validate author declaration has 1 failure and 2 success. Greptile Review has 1 success.
  • Commit status: PR readiness is pending.
  • The CI run has no Source tests, Portable tests or Test shard jobs in its check runs.

Not run

  • I did not run the four mutants (deliberate edits to the source) against src/domain/artifactExpansionBudget.test.ts. The edits are ratio 499 → 1, floor 255 MiB → 1, no Math.floor → 1, and Math.max→Math.min → 4. I also did not compare fail counts to 1/1/1/4.
  • I did not read the source function body to settle whether the floor runs before the multiply.
  • I did not merge the head with current main, 559083be29.
Test setup
  • Box: Fedora 44 VM (4 vCPUs, 8 GB) on my Nobara 44 PC, Linux 7.2.11
  • Node: 22.23.4, 24.22.1, 26.12.1
  • Head / base: ee8a668bcc / 2250e67bc2 (merge base with main)
  • Install: npm ci --offline and npm run test:prepare on Node 24.22.1
Commands
npm ci --offline
npm run test:prepare
xvfb-run -a npm run test:focused -- src/domain/artifactExpansionBudget.test.ts

🤖 Written and tested with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊