Repository navigation
test(scan): share default reachability options across tests - #1669
Merged
Oskar Haarklou Veileborg (BarrensZeppelin) merged 1 commit intoOct 29, 2026
Merged
Conversation
Each test spelled out every ReachabilityOptions field, so adding a reach flag meant editing about 17 literals. Tests now spread makeReachabilityOptions() and set only the fields they exercise.
Oskar Haarklou Veileborg (BarrensZeppelin)
requested a review
from Martin Torp (mtorp)
October 29, 2026 09:44
Oskar Haarklou Veileborg (BarrensZeppelin)
enabled auto-merge (squash)
October 29, 2026 09:45
Oskar Haarklou Veileborg (BarrensZeppelin)
merged commit Oct 29, 2026
d2106e1
into
v1.x
11 checks passed
Oskar Haarklou Veileborg (BarrensZeppelin)
deleted the
reach-default-options
branch
October 29, 2026 10:32
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.
Every reachability test spelled out each
ReachabilityOptionsfield, so adding a reach flag (as in #1668) meant editing about 17 test literals. This addsmakeReachabilityOptions()intest/reachability-options.mts, with values that mirror the CLI flag defaults. Tests now spread it and set only the fields they exercise. A new flag needs a default in this helper plus the two production literals inhandle-ci.mtsandcreate-scan-from-github.mts.Test-only change.
perform-reachability-analysis.test.mtsused to pass memory limit''and concurrency0, and now gets'8192'and1; none of its assertions depend on them. Test files aren't type-checked, so leaving a new flag out of the helper won't be caught, but the missing boolean isundefinedand behaves as off.Expected reviewer effort: Stamp
Note
Low Risk
Test-only refactor with no production code changes; default option values in one test file shifted but are unused by assertions.
Overview
Introduces
makeReachabilityOptions()intest/reachability-options.mts, returningReachabilityOptionsdefaults aligned with CLI flag defaults. Scan reachability tests no longer inline ~20 fields per fixture; they spread the helper and override only what each case exercises.Removes duplicate local helpers (
makeReachOptionsinexclude-paths.test.mts, inline factories inperform-reachability-analysis.test.mts) and updatesexclude-paths,handle-create-new-scan,handle-scan-reach,perform-reachability-analysis, andgenerate-uv-member-sbomse2e tests accordingly.perform-reachability-analysis.test.mtsnow gets memory limit'8192'and concurrency1instead of''and0; assertions there do not depend on those values.Reviewed by Cursor Bugbot for commit 2ed6f8d. Configure here.