Add a bounded puzzle thinking-depth analysis tool

This commit is contained in:
Hadrian Burkhardt
2026-11-02 10:06:32 +01:00
parent 010b90bef5
commit c6168f46ac
8 changed files with 1617 additions and 2 deletions
+5 -1
View File
@@ -76,10 +76,14 @@ flutter drive --driver test_driver/integration_test.dart \
--dart-define=QA_TEST=true -d YOUR_ANDROID_DEVICE
```
The thirty-eight unit/widget tests cover 40 Java reference boards (including signed 64-bit seeds), 300 graded generated boards, solver counts against 300 exhaustive small systems, all twelve campaign solutions, bounded campaign comparison chains, solved-grid inspection after restart, discovery animation/replay, reward-gated hints in every mode, declined/unavailable ads and duplicate/stale reward callbacks, streaks, fresh progress, read-ahead, completion awards, campaign read-ahead restoration, gesture isolation, swipes over text and blank paper, cancelled drags, vertical scrolling, landscape and larger text; it also checks every cottage leaf with the real font at 1.5× text, all four hint controls, legacy route migration and exactly-once completion after restart. Reference parity protects the port’s rules; it is not used to migrate saves.
The forty-nine unit/widget tests cover 40 Java reference boards (including signed 64-bit seeds), 300 graded generated boards, solver counts against 300 exhaustive small systems, all twelve campaign solutions, bounded campaign comparison chains, solved-grid inspection after restart, discovery animation/replay, reward-gated hints in every mode, declined/unavailable ads and duplicate/stale reward callbacks, streaks, fresh progress, read-ahead, completion awards, campaign read-ahead restoration, gesture isolation, swipes over text and blank paper, cancelled drags, vertical scrolling, landscape and larger text; it also checks every cottage leaf with the real font at 1.5× text, all four hint controls, legacy route migration and exactly-once completion after restart. Reference parity protects the port’s rules; it is not used to migrate saves.
The physical-device integration test uses a disposable in-memory game plus an isolated QA disk round-trip. It plays all five real WAV files, checks pause/resume, explores the six leaves, verifies bookmarks/discoveries, solves match and lantern puzzles and checks exactly-once awards. Screenshots are saved in `artifacts/flutter-check/`. The release smoke script requires an active, unmuted 24 kHz media track in the tablet’s audio mixer as well as exercising the actual play/pause/resume UI and restores the last page after process restart, without injecting puzzle fixtures. The release build includes a targeted R8 keep rule for the database constructor used reflectively by AdMob’s WorkManager dependency. Advertising is disabled for the automated story tests; real UMP startup is checked separately in the normal build. Reward delivery, cancellation and ad no-fill still need manual release testing with your final AdMob configuration.
## Puzzle thinking-depth tool
`dart tool/analyze_puzzles.dart` reports hypothetical lookahead, successive deduction rounds, comparison steps and thin progress for every story puzzle. It also accepts daily/practice boards and custom visible constraints. Export Markdown and JSON traces with `--markdown PATH --json PATH --trace`. This is a defined reasoning-model estimate, not a validated human difficulty score. See [the tool guide](docs/THINKING_DEPTH.md).
## Source map
| Location | Responsibility |