Harden scanner input, build safety, offline recovery and cancellable OCR - #20
Merged
Conversation
…errors (#19) Preserve complete partition ordering and full matching/guarantee inference without recursion. Observe failures from later required parallel branches while retaining deterministic successful-result consumption and unchanged capped-prefix semantics. Includes independent partition oracles, large one-result cases, real spawn/forkserver failure cleanup, bounded-suite and clean-wheel verification, and baseline solution/deduction/branch-count evidence. Temporary write-enabled validation tooling removed. Final Linux/Windows and forward-compatibility CI passed.
…e cancellable scan lifecycle
…native-browser integration
…and exact solver fixes
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.
Scope
These fixes target browser-scanner only, not master. Native fixes are already merged in PR #19 as cb0819f and are included here. The original app PR #18 remains separate. Concurrent scanner changes through 9ea64d8 have been reconciled and preserved, including guided review, grid-artifact rejection, stricter nested validation and their regression suites.
Fixed
Exact solving is unchanged
No weaker cage approximation, removed matching/guarantee deduction, reordered solver queue or added puzzle branching. PR #19's exact partition generator is stack-safe; unlimited parallel searches observe failures from outstanding required branches while positive caps retain their original deterministic prefix semantics.
Final PR validation — all checks passed
Final clean head:
44aefb720ddac794d1c1f88409890132a2997609.CI run 34062413331: Python 3.14.7 660 passed on Linux, 658 passed on Windows, with 32 slow tests deselected on each. The two additional Linux parameters exercise forkserver. Clean-wheel imports and actual installed CLI solves passed on both platforms, as did compilation and dependency validation.
Forward-compatibility run 34062413365 passed for Python 3.14 free-threaded and Python 3.15 prerelease.
Browser PR run 34062413342 passed the combined Python suite, JavaScript unit/lifecycle tests, module parsing, self-hosted build, and both actual Chromium/mobile-WebKit acceptance suites. The latter use real Python and OCR WebAssembly, not substituted solver/OCR results.
Retained independent evidence
Combined reconciliation run 34062123312 also passed.
benchmarks/review3_browser.jsonrecords 27 checks per engine: all eleven puzzle families, malformed imports/autosaves, cancellation during real language initialization followed by a fresh scan, poisoned-cache recovery, and offline reload/solve/recognition with the origin server stopped. No page errors or external runtime requests were observed. Both engines read all 30 baseline clues correctly with no corrections; WebKit still conservatively flags two correct clues.benchmarks/review3_recognition.jsonretains additional generated baseline/serif/shifted/perspective-shadow/4x4 fixtures plus guided review and blank-photo checks. These are generated fixtures, not a representative real-world photo benchmark. Native baseline comparisons retain identical root deductions, complete solution sets and branch counts; both Killer cases still need zero backtracking.The 32 slow tests, full long-running corpora and physical-phone camera/installation behaviour are outside this run's scope. No universal speedup is claimed.
All temporary application scripts and write-enabled verification workflows are removed from the final diff. Permanent test CI retains read-only contents permissions.