Skip to content

Fill test gaps in guesses_to_score, Scorer DP, and Guesses#120

Merged
orien merged 1 commit into
masterfrom
test-gap-fixes-m11-m12-m13
May 28, 2026
Merged

Fill test gaps in guesses_to_score, Scorer DP, and Guesses#120
orien merged 1 commit into
masterfrom
test-gap-fixes-m11-m12-m13

Conversation

@orien

@orien orien commented May 28, 2026

Copy link
Copy Markdown
Member

Context

Several areas of the test suite have gaps that allow real bugs to go undetected:

  • guesses_to_score has delta-boundary pairs only at the first of four thresholds — removing the + delta fuzz from any of the other three threshold lines passes the full suite.
  • The Scorer DP dominance pruning guard can be removed without breaking any test.
  • spatial_guesses has no unit tests, and Score and Feedback have no dedicated specs.

Changes

  • Add delta-boundary pairs (n_004/n_005) for all four guesses_to_score thresholds.
  • Add Scorer DP specs that force dominance pruning: two candidates at the same j and l, and a cheaper length-1 sequence that dominates a more expensive length-2 path at the same j.
  • Add spatial_guesses unit tests covering shift doubling, turn scaling, and keypad vs qwerty graph stats.
  • Add score_spec.rb and feedback_spec.rb covering initialisation defaults and structural equality for Score and Feedback.

Consequences

Mutations to the guesses_to_score thresholds, the DP dominance guard, and the spatial guess formula will now be caught by the suite.

Add delta-boundary pairs for all four guesses_to_score thresholds —
previously only the first threshold tested the +5 fuzz window.

Add focused Scorer DP specs that exercise dominance pruning — two
candidates at the same j and l, and a cheaper length-1 sequence that
dominates a length-2 path at the same j.

Add spatial_guesses unit tests (shift doubling, turn scaling, keypad
vs qwerty), and new score_spec.rb and feedback_spec.rb covering Score
and Feedback initialisation defaults and structural equality.
@orien orien merged commit c2c50aa into master May 28, 2026
10 checks passed
@orien orien deleted the test-gap-fixes-m11-m12-m13 branch May 28, 2026 02:57
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