Repository navigation
fix: test: budget of test:changed follows the selection scope - #605
Merged
Merged
Conversation
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.
Closes #604
Regression test (written first)
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)test-graph.test.ts), 24 pass withtest-run-budget.test.tsChange
bun run testran 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)andwidenedBecause(changed)inscripts/test-graph.ts(replacelandBudget). Widened to all components (a shared file, a test-runtime dependency such aspackage.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(whatbun run test/test:changednow call) reads the budget fromtest-changed.ts --print-budgetbefore the clock starts, same asissue-land.sh.test-changed.tsprintswidened to all components because <file>, so the landShared budget applies (240 s).BUDGETScomment updated. Budget values are unchanged.Measured
Side note:
bun install --frozen-lockfilefails onorigin/mainafter #588 (site/happy-domis still 21.0.1 inbun.lock), which makesissue:startabort after creating the worktree. Not part of this change.