Skip to content

fix: test: budget of test:changed follows the selection scope - #605

Merged
mvilacad merged 3 commits into
mainfrom
fix/604-test-budget-of-test-changed-follows
Oct 25, 2026
Merged

mvilacad merged 3 commits into
mainfrom
fix/604-test-budget-of-test-changed-follows

Conversation

@mvilacad

@mvilacad mvilacad commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Closes #604

Regression test (written first)

  • Fails on main: bun test packages/ui/tests/test-graph.test.ts -> SyntaxError: Export named 'resolveBudget' not found in module scripts/test-graph.ts (0 pass, 1 fail, 1 error)
  • Passes with the fix: 21 pass, 0 fail (test-graph.test.ts), 24 pass with test-run-budget.test.ts

Change

bun run test ran under a fixed 60 s budget chosen before the selection was known. The budget assumed a narrow selection, but a dependency bump selects every component test, and the full component set alone is ~80 s.

  • resolveBudget(changed, land) and widenedBecause(changed) in scripts/test-graph.ts (replace landBudget). Widened to all components (a shared file, a test-runtime dependency such as package.json/bun.lock, or a file the route map cannot place): landShared (240 s), for the dev run and the land gate. Narrow: changed (60 s) dev, land (180 s) land.
  • scripts/test-changed.sh (what bun run test / test:changed now call) reads the budget from test-changed.ts --print-budget before the clock starts, same as issue-land.sh.
  • test-changed.ts prints widened to all components because <file>, so the landShared budget applies (240 s).
  • AGENTS.md and the BUDGETS comment updated. Budget values are unchanged.

Measured

Side note: bun install --frozen-lockfile fails on origin/main after #588 (site/happy-dom is still 21.0.1 in bun.lock), which makes issue:start abort after creating the worktree. Not part of this change.

@mvilacad
mvilacad marked this pull request as ready for review October 25, 2026 14:39
@mvilacad
mvilacad merged commit 49d2c35 into main Oct 25, 2026
@mvilacad
mvilacad deleted the fix/604-test-budget-of-test-changed-follows branch October 25, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: budget of test:changed follows the selection scope

1 participant