Skip to content

test: unit-test the backtrack collaborators and relocate selector tests#949

Merged
rasros merged 3 commits into
mainfrom
test/backtrack-collaborators
Jul 3, 2026
Merged

test: unit-test the backtrack collaborators and relocate selector tests#949
rasros merged 3 commits into
mainfrom
test/backtrack-collaborators

Conversation

@rasros

@rasros rasros commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Add direct unit tests for the collaborators extracted in the backtrack engine split, which until now were only exercised transitively through the search suites:
    • RestartControllerTest — the Luby budget sequence, per-run budget scaling, restart-index counting, and the adaptive/unbounded schedules.
    • PhaseSavingTest — saved/target phase ordering per rephase mode, deepest-prefix capture, and the onConflictTick rotation.
    • OccurrenceIndexTest — variable→factor inversion and the LS-aliases-CP-lists invariant.
    • DeadlinePollerTest — the adaptive poll cadence, driven deterministically.
  • Give DeadlinePoller a constructor-injected TimeSource.WithComparableMarks (default TimeSource.Monotonic) so its cadence is testable with TestTimeSource. No production call-site change.
  • Relocate the Vsids / DomWdeg / LastConflict tests out of the 792-line BacktrackSolverTest grab-bag into selector/VsidsTest, selector/DomWdegTest, selector/LastConflictTest, matching the one-test-file-per-selector convention already used across selector/.

Why

The engine split created independently-testable units with no direct tests — a bug in the Luby sequence or a rephase-mode ordering would only surface as a search-quality wobble, impossible to localize. And the selector tests sat in the wrong file (BacktrackSolverTest rather than beside the selector under test).

Testing

New tests only; BacktrackSolverTest behavior is unchanged (tests moved verbatim). Full check lintDocs green across JVM + native + wasm.

@rasros rasros merged commit bea28b8 into main Jul 3, 2026
2 checks passed
@rasros rasros deleted the test/backtrack-collaborators branch July 3, 2026 14:55
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.

1 participant