Repository navigation
Conversation
Exact-head acceptance checkpoint — root image_utils migration
|
Exact-head acceptance after continuation (2026-10-24)HEAD
All original pixel coordinate semantics, classification registry and JSON-v1 sidecar locking, and persistent preprocessing model types stay owned in canonical modules. All tracked production/script/test imports were migrated; AST architecture guard rejects executable old imports, root guard now ratchets ≤12. No historical data schema or size threshold changed. Exact-head checks ALL GREEN:
PR remains Draft / not merged, with no completed independent code review and no real scanned-dictionary-page or manual edit/sidecar save-reopen parity acceptance performed. External Python callers using the three retired module paths require import migration. Issue #562 remains open. |
#562 root-file audit continuation — PR #663, 15 → 10 (2026-10-24)Extended the same Draft PR #663, exact HEAD
Exact-head checks: 6-platform CI #39999364650 completed success (including final Risk-tier CI gate, GUI smoke, wheel/compile/compat); CodeQL #39999359484 completed success (Python/Actions); OCR platform smoke #39999364561 completed success on Windows, macOS and Ubuntu. Audited remaining root: PR remains Draft / unmerged, pending independent review and actual scanned-page/sidecar GUI parity. Issue #562 remains open. |
2026-10-25 — Round 43: physical Profile policy + ordinary trace extraction (Draft PR #663)Exact PR HEAD:
Verified exact-head CI: CI #40117087240 completed SUCCESS, all six Windows/macOS/Ubuntu × Python 3.10/3.13 jobs, final risk-tier gate, Tk smoke, wheel/compat; Ubuntu 3.13 3,834 passed / 3 skipped. OCR Platform Smoke #40117087259 SUCCESS 3/3 (Windows/macOS/Ubuntu). PR #663 CodeQL run #40117084567 SUCCESS, Python + GitHub Actions analysis. Not accepted manually: real scanned-dictionary-page GUI ordinary/OCR/combined flows, Profile interaction, PDIC/PPP save/reopen, and crop/export format parity. Independent code review also remains pending. Keep Draft and Issue #562 open; continue physical extraction of remaining large root/core and |
Issue #562 — Round 46 large-batch physical extraction (2026-10-25)Continued existing open Draft PR #663 ( Physical implementations moved (15 methods/functions):
Measured exact Git-tree before/after ( Commits: Verified on exact final HEAD: CI #40127156204 SUCCESS, Ubuntu/Windows/macOS × Python 3.10/3.13 6/6, Ubuntu 3.13 3,847 passed, 3 skipped; OCR Platform Smoke #40127156175 SUCCESS 3/3. Existing Round45 stale-source assertion and in-process monkeypatch identity test were addressed; no tests removed or guards relaxed. A new exact-head CodeQL run is not in the current workflow list, so do not label CodeQL as verified for this SHA. Pending: independent code review; actual scanned dictionary-page GUI ordinary/OCR/combined workflows; Profile interactive behavior; PDIC/PPP save/reopen and crop/export byte/format parity. These require representative real pages and remain manual acceptance outstanding. Keep PR Draft, open, unmerged. |
Root-retirement Phase 1 — physically move main GUI algorithms (2026-10-25)Executed on existing open Draft PR #663 (no merge or Ready). Our initial commit
Existing Measured Git-tree impact for this UI batch: root Python file count 10 → 10, aggregate root bytes 430,865 → 421,084 (−9,781); Exact UI-batch SHA Another independent Profile extraction/fix advanced the same Draft branch to Not complete: root has not reached only |
Exact current Draft HEAD CI verified (2026-10-25)Final current PR #663 HEAD My main UI physical extraction commits remain Manual real dictionary-page GUI ordinary/OCR/combined, Profile, PDIC/PPP save/reopen, crop/export equivalence and independent code review are still outstanding. PR stays open/Draft, not merged or Ready. |
|
Issue #562 — root-retirement Phase 5 completed on
|
|
Issue #562 — root-retirement Phase 6 (2026-10-25), exact HEAD Physically migrated five complete Root Python modules: 10 → 10; bytes: 389,749 → 381,734 (−8,015 B). Exact HEAD CI: https://github.com/chigre/Picture_Capture/actions/runs/40147328269 — success, Ubuntu/Windows/macOS × Python 3.10/3.13 all six matrix jobs successful; risk-tier gate successful. Exact HEAD OCR Platform Smoke: https://github.com/chigre/Picture_Capture/actions/runs/40147328267 — success, Ubuntu/Windows/macOS all three successful. MANUAL ACCEPTANCE NOT DONE: real scanned dictionary page ordinary/OCR/combined flows, GUI/Profile, PDIC/PPP save/reopen and crop/export parity. Keep this PR Draft, Open, unmerged. |
|
Issue #562 — Root-retirement Phase 7 (2026-10-25, verified exact HEAD
|
|
Issue #562 — root retirement Phase 8 (2026-10-25, exact HEAD Physically relocated nine complete Root Python count 10 → 10; root bytes 375,787 → 370,187 (−5,600 B); Validation of the exact MANUAL ACCEPTANCE NOT DONE: representative scanned dictionary-page GUI/Profile, ordinary/OCR/combined detection, PDIC/PPP save/reopen and crop/export parity. Keep this PR Draft/Open/unmerged; do not claim end-state root-only |
Issue #562 — Phase 9 physical UI ownership (2026-10-25)Exact verified HEAD: Physically moved 15 actual algorithms out of root Root inventory: 10 Python files unchanged; 370,187 → 366,538 bytes (−3,649 B). Added Verified exact-head CI: CI #40158742949 success — Ubuntu/Windows/macOS × Python 3.10/3.13 all six successful; risk-tier gate successful. OCR Platform Smoke #40158743189 success — Ubuntu/Windows/macOS all three successful. Still NOT DONE: manual representative real scanned dictionary-page acceptance of GUI, Profile, ordinary/OCR/combined workflows, PDIC/PPP save/reopen and crop/export parity. Keep PR Draft, Open, unmerged; package-root-only |
Issue #562 — Phase 10 physical ownership (2026-10-25)Latest verified HEAD: Moved 10 real method implementations from Root Python inventory 10 → 10 files, 366,538 → 365,602 bytes (−936 B); Initial CI exposed a missing argument separator in a migrated callback, an overstrict new test and historical exact owner-function inventories. Fixed all without dropping behavioral assertions. Exact-HEAD verification: CI #40162439685 success (Ubuntu/Windows/macOS × Python 3.10/3.13: 6/6; risk-tier gate passed; Ubuntu 3.13: 3,900 passed, 3 skipped), OCR Platform Smoke #40162439601 success (3/3). Still NOT DONE: representative real scanned dictionary-page manual acceptance across ordinary/OCR/combined detection, Profile, PDIC/PPP save/reopen and crop/export parity. Keep PR Draft/Open/unmerged. |
Issue #562 — root retirement Phase 11 (2026-10-25)Final exact HEAD: Actual physical moves: root Git tree measurements: Regression: new Exact final HEAD GitHub Actions: CI https://github.com/chigre/Picture_Capture/actions/runs/40165423323 SUCCESS (Ubuntu/Windows/macOS × Python 3.10/3.13 = 6/6; Ubuntu 3.13 3,906 passed, 3 skipped; risk-tier gate success). OCR Platform Smoke https://github.com/chigre/Picture_Capture/actions/runs/40165423445 SUCCESS 3/3. The preceding intermediate HEAD initially failed solely because an old test required the moved function body in Still NOT DONE: manual acceptance with real scanned dictionary pages: GUI, Profile, ordinary/OCR/combined, PDIC/PPP save and reopen, crop/export parity. Do not equate green synthetic CI with real-page functional validation. Keep this PR Draft / Open / unmerged; no automatic merge or Ready transition. |
2026-10-25 — Phase 12–13, exact-head CI verified (Draft PR #663)Continued on the existing open Draft PR #663, branch Actual physical moves (not empty wrappers):
Targeted regression: new Git-tree inventory: direct root Python files 10 → 10; total bytes 361,324 → 359,865 (−1,459). Exact HEAD Not accepted: independent representative real scanned dictionary-page GUI checks of ordinary/OCR/combined workflows, Profile, PDIC/PPP save/reopen, crop/export format parity are NOT DONE. Keep PR Draft/open/unmerged and Issue #562 open. |
Issue #562 — Phase 14 / native AppSettings assignment policy (2026-10-25)
|
Issue #562 — Phase 15: native AppSettings dataclass physical relocation (2026-10-25)Final exact PR HEAD:
|
Issue #562 / PR #663 — OCR core physical owner migration, 2026-10-25Exact validated HEAD: Root inventory: 10 → 10 Python files; aggregate direct-root Python bytes 324,171 → 247,298 (−76,873 bytes). The new physical owner and root bridge have one shared module object. Targeted pickle/import/patch regressions were added; the six architecture guard OCR delegation source checks were reanchored to the real owner; three stale source-location tests were updated. Architectural inventory/audit documentation was revised. No persisted model identity, OCR cache, PDIC/PPP/SECTION formats, ordinary/combined flow or export transaction was intentionally changed. Exact-HEAD verification:
Not completed: independent real scanned/photographed dictionary-page GUI/Profile verification, ordinary/OCR/combined review/editing, PDIC/PPP save/reopen, and crop/export parity. These synthetic CI passes do not replace manual acceptance. Keep Draft/Open, unmerged; do not mark Ready or auto-merge. |
Issue #562 — Phase 16: complete PaddleOCR core implementation physical relocation (2026-10-25)
|
Issue #562 — Phase 17: processing core runtime ownership (2026-10-25)
|
Issue #562 — Phase 18: physically retire root training exporter (2026-10-25)Exact final HEAD:
|
|
Issue #562 automated continuation (2026-10-25), exact HEAD Physical changes in this pass:
A separate concurrent commit series retired Exact-head checks: CI SUCCESS (Ubuntu/Windows/macOS × Python 3.10/3.13, 6/6); OCR Platform Smoke SUCCESS (3/3). A prior intermediate HEAD failed stale source-path tests; repaired and revalidated at the final SHA above. Real scanned dictionary-page manual Profile/Tk, ordinary/OCR/combined, PDIC/PPP save/reopen and crop/export parity acceptance remains NOT DONE. No merge or Ready transition. |
Issue #562 — Phase 19: retire two legacy core files from the package root (2026-10-25)Exact final Draft PR HEAD: Measured from committed Git tree: direct-root Architecture and tests: Both architecture audit docs updated; root classification/guard tightened to seven physical Exact final-head GitHub Actions: full CI https://github.com/chigre/Picture_Capture/actions/runs/40174478638 SUCCESS, Ubuntu/Windows/macOS × Python 3.10/3.13 6/6 success; risk-tier gate success (Documentation architecture check workflow job was skipped); Ubuntu Python 3.13 3,948 passed, 3 skipped. OCR Platform Smoke https://github.com/chigre/Picture_Capture/actions/runs/40174478763 SUCCESS 3/3. Zero unresolved PR review threads. Still NOT DONE: human manual acceptance on real scanned dictionary pages covering Profile/Tk UI, normal/OCR/combined detection, PDIC/PPP save/reopen and crop/export equivalence. CI does not replace it. Final target only |
Issue #562 — Phase 20: retire public OCR and processing facade root files (2026-10-25)Exact final HEAD:
|
2026-10-25 checkpoint — Rounds 48–50 (continue Issue #562 on the same Draft PR)
|
|
Exact-head verification update (2026-10-25): HEAD |
2026-10-25 architecture checkpoint — Rounds 51–52Round 51 commit Round 52 commit No PDIC/PPP/SECTION, public model/pickle, OCR model/cache, saved Profile schema, source-coordinate contract, or crop/export format changes. Do not mark Ready or merge PR #663: real scanned dictionary page manual GUI / ordinary / OCR / combined, Profile, PDIC/PPP reopen, crop/export equivalence remains NOT DONE. |
…ontent change (RED-only)
…redraw (RED-only)
PC-CQ-20261014 — 2026-11-07: three NEW independently RED-first R4.2/R3 repairs (single #663 Draft)Live authority: sole Open/Draft/Unmerged PR #663 on
Permanent checkpoint: STATE, RESUME, three new architecture audits provide source/test SHA, RED, new gate URLs and recovery instruction without this chat. Docs HEAD separate exact-gate runs at this comment: CI #42260039110: Risk tier SUCCESS; test (macos-latest) QUEUED; test (ubuntu-latest) IN_PROGRESS; Python 3.10 / macos-latest QUEUED; test (windows-latest) IN_PROGRESS; Python 3.10 / ubuntu-latest IN_PROGRESS; Python 3.10 / windows-latest IN_PROGRESS; Documentation architecture check SKIPPED. OCR #42260039097: cpu-ocr (windows-latest) IN_PROGRESS; cpu-ocr (ubuntu-latest) SUCCESS; cpu-ocr (macos-latest) IN_PROGRESS. CodeQL #42260026414: Analyze (actions) SUCCESS; Analyze (python) IN_PROGRESS. QUEUED/IN_PROGRESS not PASS; documentation architecture check SKIPPED not PASS. One next action: read LIVE #663 HEAD and verify these docs-head six CI/Risk-tier/gate + OCR 3OS + CodeQL python/actions, read failing logs, then continue a NEW R3 main/Review save-retry or R4.2 render zoom callback owner synthetic RED-first. Keep PR Draft/unmerged; main unchanged; no schema/XY/protocol/consent or private data changes. Human Windows R3 E3, #483 W1-W11, #503 manual Undo/Redo, actual scans and PDIC/PPP/SECTION/Profile/OCR save-reopen, R6 real labels/R8 scans NOT PERFORMED/DEFERRED; synthetic E2 ≠ human acceptance. |
PC-CQ R4.2 next synthetic candidate — review crop geometry epoch (2026-11-07)Live source inspection at A new test-only Git object was created as Next allowed resumption after live HEAD and exact-head six-matrix/Risk/OCR/CodeQL verification: safely add/recreate this isolated test-only fixture on the sole Draft PR branch, run actual failure-first CI, confirm intended failures vs fixture errors, then minimally bind callback publication to the captured geometry revision, and rerun full gates. Do not treat a dangling Git commit or old SHA as authoritative. Human E3, W1–W11, real scanning and persistence reopen remain deferred. |
PC-CQ R4.2 — ReviewWindow crop geometry epoch RED → exact-source GREEN (2026-11-07)Live sole PR #663 OPEN/DRAFT/UNMERGED, branch
Single next actionable step: read live PR HEAD and exact-head CI/OCR/Risk/CodeQL; inspect reachable R3 ordinary ReviewWindow/main-window text save/retry and R4.2 async callback/SECTION/crop epoch for an independent synthetic counterexample. Commit tests first, observe actual RED, then minimal source fix and new exact-HEAD gates. Keep sole #663 Draft/main unchanged. R3 E3, #483 W1–W11, #503 human Undo/Redo, real scans and save/reopen, R6 real-label learning, R8 scans NOT PERFORMED / DEFERRED. |
PC-CQ R4.2 — ordinary ReviewWindow crop failure owner/launch retry: synthetic RED → exact-source GREEN (2026-11-07)Authority: sole #663 remains Open/Draft/Unmerged on
No real dictionary/PDIC/PPP/SECTION/Profile/OCR uploaded or modified, no schema/writer/source XY/experiment-default change, no force/merge/Ready/new PR. Windows R3 E3, #483 W1–W11, #503 manual Undo/Redo, genuine scans/save-reopen, R6/R8 remain NOT PERFORMED / DEFERRED. |
Root source inventory reduced from 15 to 10 — same PR, no root stubs
Based on merged #662, this PR physically migrates five root modules:
image_utils.py→preprocess/analysis_image.py. Shared denoising keeps exactly the same source-pixel output/metadata; EXIF/alpha/ink primitives are re-exported by identity frompreprocess/page_pixels.py.entry_classification.py→proofreading/classification.py. The entire weakref/LRU state registry and single read/modify/publish sidecar transaction lock move together. JSON-v1 sidecar and PDIC schema remain unchanged.image_preprocessing.py→preprocess/pipeline.py. Its call-time patchable analyses, per-page geometry orchestration and rendering adapters remain together; persistent preprocessing model types continue inpreprocess/models.py.cli.py→bootstrap/cli.py. The installedpicture-capture-clicommand name and CLI syntax remain identical; thepyproject.tomlentrypoint points to the new module, and the existing core bootstrap still runs before I/O imports.launcher.py→bootstrap/launcher.py. The actual GUI entrypoints (run.py,python -m picture_capture,picture-capture) still route tobootstrap/application.pyunchanged. The helpers' call-time forwards still target that canonical application module.All repository imports, source contract tests, documentation, critical-path risk classification and physical owner guards are updated. Root inventory and architecture ratchet now require ≤10 direct Python modules. The guard AST-scans production, scripts and tests for executable imports of retired root paths. No byte-size ratchet was relaxed, and no root alias/stub was added.
Why training_export.py is not removed in this batch
The project intentionally assigns
TrainingExportCancelled.__module__andmake_training_zip.__module__topicture_capture.training_export, and verifies backwards-compatible pickling/unpickling. Deleting the root module would break historical objects unless a separate lazy import-compatibility mechanism were added. Retain the real canonical compatibility entry, not a cosmetic stub, and protect it for now. CLI/main/model/OCR root entrypoints have similar public or serialization constraints.Compatibility and acceptance
Breaking source import change for external Python scripts: import from
picture_capture.preprocess.analysis_image,picture_capture.preprocess.pipeline,picture_capture.proofreading.classification,picture_capture.bootstrap.cliandpicture_capture.bootstrap.launcherinstead of retired root modules. Existing PDIC/PPP/SECTION/OCR JSON schemas and actual models' persisted identities are not changed.Additional cross-platform OCR smoke #39999364561 passed on Windows/macOS/Ubuntu on prior head. Keep Draft until independent review and real scanned-page GUI verification. Issue #562 remains open.
Core leaves (2026-10-24) — same PR and branch
Additional internal extraction, no root files deleted:
processing_core.pynow delegates eight crop polygon primitives tocrop/polygon_geometry.py, preserving historical function/module paths and injecting patchable subordinate callbacks at call time.processing_core.resolve_crop_worker_countdelegates tocrop/worker_policy.pywith the currentos.cpu_countprovider.paddle_headwords_core.normalize_headworddelegates toocr/headword_normalization.pywith the current core separators and regex module.tests/test_issue562_core_leaf_extract_20261024.py.docs/architecture/CORE_LEAF_COMPATIBILITY_AUDIT_20261024.md.Latest change head:
b7f96063fbe2fb82ff03df661bd91912b0012e8f.Keep Draft pending all checks.
Continued core extractions (2026-10-24)
This is still the same Draft PR with 10 physical root Python modules. The historical public/core modules remain importable and callable; class/pickle identities, OCR cache layout, stored sidecar schemas, and application entrypoints remain unchanged.
a9fe8ec4: extractedgeometry/column_tracking_math.pyandocr/paddle_results.py. The latter accepts the current_json_payload/OCRRecord/NumPy dependencies at call time. Regression:tests/test_issue562_core_leaf_round2_20261024.py.0d873d77: extractedordinary/ink_threshold.pyandocr/headword_script.py. Core wrappers preserve the historical threshold and language/script helper monkeypatches. Regression:tests/test_issue562_core_leaf_round3_20261024.py.ea20a299: completed type-hint audit for new threshold owner and updateddocs/architecture/CORE_LEAF_COMPATIBILITY_AUDIT_20261024.md.Full cross-platform CI and OCR platform smoke must be checked on exact latest head
ea20a299before this series is considered verified. These source-level tests are not a substitute for an independent representative dictionary-page GUI scan / save-reopen test.No automatic merge, and PR remains Draft.
Crop-column and OCR lemma leaf extraction — 2026-10-24
7e3fb6ac: fixed a characterization-test expectation: U+30FB '・' belongs to the Katakana Unicode block, so the existing classifier returnskana. Production behavior was not changed.5b891ecb: physically moved the implementation ofprocessing_core._entry_crop_box_for_columntocrop/entry_column_bounds.py(gutter/column-path/canonical crop box computation), andpaddle_headwords_core._repair_headword_ocrtoocr/lemma_repairs.py(length-preserving dictionary lemma OCR-confusion repair).__module__remain stable. The crop core passes current_source_px,clamp_boxand NumPy module at each invocation; lemma core passes currentremodule. Historical facade assignment mirrors and patched callbacks remain in place.tests/test_issue562_core_leaf_round4_20261024.pychecks two-column crop bounds, gutter handling, live public patch points, common lemma repairs, and unchanged spelling length.Acceptance: review latest exact-head six-platform CI and Windows/macOS/Ubuntu OCR smoke on
5b891ecb, then independent real dictionary-page GUI + save/reopen check. Keep Draft; do not merge automatically.SECTION reading-order and OCR-line extraction — 2026-10-24
50cdc393: physically extractedgeometry/reading_order.py(column-path/gutter-aware click classification, SECTION-first sort, stable PDIC repair order) andocr/line_grouping.py(vertical box overlap, OCR fragment grouping, merged logical line). Historicalprocessing_coreandpaddle_headwords_corefunctions remain at their original paths with unchanged signatures and__module__.Entry,Geometry,OCRRecordandOCRLinemodel identities are unchanged.e573b64d: corrected synthetic curved-column expectations, resolved the leaf's non-importing Geometry annotation viaTypeAlias, extended SECTION patch tests, and recorded compatibility checks indocs/architecture/CORE_LEAF_COMPATIBILITY_AUDIT_20261024.md.tests/test_issue562_core_leaf_round5_20261024.py: asserts root inventory, historical callable origins, curved column and reading-order behavior, tie-stable sorts, merged OCR record text/box/repair metadata and patch-time callbacks.Windows runner note: earlier exact-head CI on
5b891ecbreported a Windows Python 3.13 Tk test failure because its runtime could not find a usableinit.tcl; other test platforms and OCR smoke succeeded. Track separately from refactor regressions. Review newest exact-head CI and OCR smoke before readiness. Independent representative dictionary-page GUI/PDIC/PPP save/reopen verification still outstanding. Keep Draft and unmerged.OCR alphabetical and ordinary marker-position leaf extraction — 2026-10-24
Commit
3ca0b0accontinues the original Draft PR without relocating any of the ten remaining root Python modules.ocr/alphabetical_warnings.pynow implements the Spanish dictionary collation key, page SECTION/column/axis-aware diagnostic warnings, and mapping warnings onto acceptedEntryrows. This is annotation only; the logic does not change candidate acceptance, decision thresholds, or serialized schemas.ordinary/separator_position_policy.pynow owns single-Han recognition, grayscale whitespace evidence at a marker Y, and OCR-versus-ordinary marker Y selection. The originalprocessing_corewrappers inject current column-edge/classifier/Otsu/NumPy functions, and the fusion choice reads live whitespace-score and single-CJK hooks.processing_coreandpaddle_headwords_corefunctions retain their original names, signatures and callable__module__; the legacy public façade assignment mirrors remain usable.tests/test_issue562_core_leaf_round6_20261024.pycharacterizes OCR/ordinary marker threshold choices and patch seams, alphabet warning diagnostics, name collation, and accepted Entry annotation.Verification: exact-head CI and three-OS OCR Platform Smoke must be checked on
3ca0b0ac. Persisted models/PDIC/PPP/raw OCR caches and transactional crop publishing remain in place. Independent real-page GUI scan, editing and save/reopen acceptance remains outstanding; keep Draft.Whole-entry vertical bounds, OCR band preprocessing, and language-model selection — 2026-10-24
fc5bf0f2extractedcrop/entry_vertical_bounds.py(whole-entry top/bottom bounds and special-pages policy) andocr/band_preprocessing.py(RGB/grayscale/autocontrast/binary OCR band input, OCR-local Otsu threshold, scaling). Core functions remain at historical locations and forward current geometry, source pixel conversion, sidecar path, normalization, NumPy and Otsu callbacks.323dcbc1extractedocr/language_resolution.py, retaining the existing Chinese/Japanese detection and Paddle model-language fallback rules. This is deliberately distinct from the semantic OCR script guard.tests/test_issue562_core_leaf_round7_20261024.pyandtests/test_issue562_core_leaf_round8_20261024.pycover existing source-coordinate crop intervals, special-pages lookup, literal-pixel overrides, public monkeypatches, OCR pixel/scale and binary thresholds, language mapping edge cases and public callable module identities.docs/architecture/CORE_LEAF_COMPATIBILITY_AUDIT_20261024.md. Ten physical root modules retained, no new root shims, no relocation of pickle-visible classes, sidecar persistence format, OCR engine cache or staged crop-publish transactions.CI/OCR smoke must be checked against latest exact head
323dcbc1; the prior3ca0b0acCI and OCR smoke succeeded. Keep this PR Draft pending real dictionary-page GUI scanning, manual editing, and PDIC/PPP/save/reopen parity acceptance; do not merge automatically.Analysis-pixels, OCR coordinates and boundary measurements — 2026-10-24
37519dbb: extractedpreprocess/core_analysis_pixels.pyandocr/band_coordinates.py. The legacyprocessing_core._analysis_imageand_adaptive_dark_maskcall sites still pass live image normalizer, Pillow and NumPy. The legacypaddle_headwords_core._records_to_canonical_bandimports the activeLayoutTransformand passes the existingOCRRecordconstructor at call time, preserving records, transformed half-open boxes, CJK recovery metadata and parent-box coordinates.5f63b62f: extractedocr/boundary_measurements.py(ink ratio, leading lemma box, true-runs, local ROI, running-header cut-off). The old OCR-core functions remain public/patchable with the same signatures and__module__. The header cutoff receives the current historical_true_runscallback.552bc8c1: updated the internal compatibility audit. Regression teststests/test_issue562_core_leaf_round9_20261024.pyandtests/test_issue562_core_leaf_round10_20261024.pycover geometry modes, preserved OCRRecord model identity, image preprocessing, visible ink and header policy, and public monkeypatch seams.Current exact-head CI and OCR smoke are required before considering this batch verified. Even when green, keep PR Draft until independent representative dictionary-page GUI scan/edit/save/reopen checks confirm PDIC/PPP and crop parity.
OCR image-boundary proposal and single-line crop-box extraction — 2026-10-24
c79532f0: extractedocr/image_separator_geometry.py(visual whitespace→ink separator candidates and mutual-nearest OCR-line pairing) andcrop/line_box_geometry.py(half-open PIL box clamping and literal-pixel single-line crop geometry).paddle_headwords_core.detect_image_separator_candidatesstill injects the current ROI, Otsu, contiguous-run and NumPy hooks at call time. Historicalprocessing_core.line_boxstill passes the currentcolumn_index,_source_pxandclamp_boxhooks. Original callables retain their signatures and__module__.ebe073b5: updated the synthetic line-crop geometry fixture to provide the establishedcolumn_pathsgeometry field.90f3b49c: updated the compatibility audit.tests/test_issue562_core_leaf_round11_20261024.pycovers preserved root inventory (10), crop geometry and clamping, monkeypatch parity, synthetic blank-band candidate generation and OCR-line matching. No persisted data classes, raw OCR engine caches, review arbitration or publish transactions moved.Exact-head CI and three-OS OCR smoke are required on
90f3b49cbefore marking this batch verified. Earlier552bc8c1full CI and OCR smoke completed successfully. Keep PR Draft until an independent real-page GUI scan/edit/save/reopen validates PDIC/PPP and cropped exports. Do not merge automatically.Four-owner batch: grammar repairs, ordinary layout, fused Entry, marker crop — 2026-10-24
17984901: extracted 7 historical functions into 4 physical leaf modules, without creating any root-file shim:ocr/line_structure_repairs.py: right-side OCR fragments, wrapped POS lines, and multi-row grammar recovery. Historicalpaddle_headwords_coreinjects the current parser, overlap, merge, POS, text-strip,OCRLine, NumPy and regex hooks per call.ordinary/auto_layout_policy.py: per-page settings clone and optional measured Layout parameter override, retaining lazy detector imports and original field-switch semantics.ordinary/fusion_entry_mapping.py: combined-modeEntrymetadata fusion and refined review candidateEntrycreation; passes the original coreEntryconstructor, preserving model identity and serialized fields.ocr/ordinary_marker_crop.py: memory-only ordinary-marker OCR crop, using existing classification, independent visual head scale, and source-direction-safe crop pixels. Core forwards its live RGB-normalization seam.541c1fc4plus6e491e7f: added two characterization suites (round12_processingandround12_ocr) and fixed the test-only POS regex escape.b4f025ee: updated three historical source-contract tests to check both core delegation and actual code in the new leaf, instead of incorrectly asserting that all crop calculations still reside in the core.67a0000d: revised multiline grammar test to put its expected POS continuation in an indented position; preserve the production safety guard that never absorbs a new headword at the left edge.docs/architecture/CORE_LEAF_COMPATIBILITY_AUDIT_20261024.md. Core root remains exactly 10 physical Python modules. No pickle-visible class migration, OCR cache/schema changes, or crop output publish transaction changes.90f3b49cfailed only the Windows Python 3.10 runner's Tcl/Tk initialization; 3656 other tests passed. All three OCR smoke platforms passed. Latest exact-head CI/OCR smoke must be checked on67a0000dbefore considering this batch green.Keep PR Draft. Independent real-page GUI layout/OCR, manual editing, crop/export and PDIC/PPP save/reopen acceptance remains outstanding; do not merge or mark ready automatically.
Four additional pure policy leaves — round 13, 2026-10-24
2a453df6: extracted 12 historical callable implementations fromprocessing_core.pyandpaddle_headwords_core.pyinto four new owners, while retaining old function names, signatures,__module__, and live public façade patch seams:ocr/visual_rescue_policy.py— accepted one-Han physical-row association, explicit post-lemma grammar evidence, saved Profile v1 vs legacy v0 rescue threshold and strong-edge rescue policy.ocr/peer_typography.py— robust typography center/MAD and diagnostic-only page-local font prototype annotations; does not directly accept rejected OCR candidates.ordinary/review_signals.py— positive-visual veto, single/dual hard-negative consensus, non-selected refined OCR candidate positions in the canonical reading axis.geometry/column_offsets.py— per-column full-resolution pixel offsets and non-crossing column-start ordering; coreGeometry/ColumnPathremain original._median_and_mad,_is_single_cjk_ideograph,_ordinary_visual_rescue_thresholds,column_index_for_click,_source_px, visual-positive check and hard-negative reason set at invocation. Thus public monkeypatches remain live rather than import-time frozen.b22bb190: addedtests/test_issue562_core_leaf_round13_ocr_20261024.pyandtests/test_issue562_core_leaf_round13_processing_20261024.py, and updated the detailed compatibility audit. Guard coverage includes Profile v0/v1, CJK geometry, peer typography non-acceptance, latent rows, consensus veto and offset bounds.Full six-platform CI and three-OS OCR smoke passed on the preceding exact-head baseline
67a0000d. The latest exact-head checks onb22bb190must be reviewed independently before claiming success. Keep PR Draft until representative real-page GUI scan, edit and PDIC/PPP/crop save/reopen validation; do not merge automatically.Round 14 — geometry construction, user rules, grammar parsing — 2026-10-24
7b8ad625: extracted eight historical functions intogeometry/geometry_construction.pyandocr/user_filter_rules.py. All four original nominal/curved geometry entrypoints remain inprocessing_core, supplying current pixel scaling, column nudges, curved path tracker, image normalization, transform and the originalGeometry/ColumnPathmodel constructors. All four user-rule entrypoints remain inpaddle_headwords_core, supplying active aliases, supported kinds,HeadwordFilterRule, parser, matcher and regex module.ef731dde: added regression suitesround14_geometryandround14_rules, plus compatibility audit updates.ad44fe68: corrected the geometry fixture to use real, unchangedGeometry.top/bottomrather than non-existenttop_y/bottom_yfields.9c563204: extracted five more memory-only OCR grammar functions intoocr/grammar_tail_parsing.py— morphology cues, parallel bars, whitespace cursor, structured grammar-tail state machine and ordered diagnostic bug tags. Old core forwards its live POS finder, prefix modifier stripper, usage abbreviation inventory, regex module and historicalGrammarTailParseconstructor.b57aaed4: added grammar characterization tests and extended the compatibility audit.b7f96063: corrected four compiled-regex.match()call sites unintentionally renamed during the grammar-tail extraction; preserves the original variant, closed/open inflection and pronunciation matching semantics.Previous baseline
b22bb190passed all six CI platform/interpreter jobs and three OCR smoke platforms. Check exact-head CI and OCR smoke onb57aaed4before considering this batch verified. Keep PR Draft, unmerged, until real-page GUI scan/edit/save/reopen and crop/PDIC/PPP acceptance.Full legacy VB ordinary scan extraction — Round 17 (2026-10-24)
Implementation moved, not just renamed: Five original processing-core functions are now thin compatibility entrypoints into three leaf modules, in addition to the preceding VB point/brightness leaves from Round 16:
ordinary/legacy_separator_search.py— complete historical two-stage VB separator search; original high/low whiteness, threshold sweep, centering, fallback reasons and per-call current brightness callbacks.ordinary/legacy_page_detection.py— full-resolutionDraw_Auto-style ordinary marker scan plus transform-aware column edge mapping; the original core sends current geometry, source-pixel, SECTION, marker, OCR-refinement and sorting hooks.ordinary/cjk_marker_reconciliation.py— existing OCR-independent oversized CJK split-marker suppression and missing-marker rescue, with the same lazy Paddle public imports and current core callbacks.Original
processing_core/processingcallable names and signatures stay unchanged. Root file inventory stays ten. No changes intended to pixel-coordinate serialization, persisted model identities, PDIC/PPP/SECTION or OCR cache formats, crop publish transaction or GUI entrypoints. Dedicated characterization tests:tests/test_issue562_core_leaf_round17_legacy_20261024.py; architecture audit expanded.Latest Round 17 head:
e8b998bb. Do not mark verified until exact-head six-platform CI and three-OS OCR smoke pass; independent dictionary-page GUI ordinary/OCR/combined scan, editing, crop and save/reopen parity remain acceptance blockers. Keep Draft; do not auto-merge.Round 18 — profile symbol roles, source candidate coordinates and anchor alternatives (2026-10-24)
04ccf516: extracted three substantial implementation owners frompaddle_headwords_core.py:ocr/symbol_inventory.py,ocr/source_candidate_coordinates.py, andocr/review_anchor_variants.py. The original core still exposes the same signatures and historical__module__values.-rawyalternatives, retaining grouping/ordering and copy-on-write issue lists.tests/test_issue562_core_leaf_round18_symbols_20261024.pyandtests/test_issue562_core_leaf_round18_coordinates_20261024.py, plus updateddocs/architecture/CORE_LEAF_COMPATIBILITY_AUDIT_20261024.md.Acceptance: Latest exact-head six-platform CI and Windows/macOS/Ubuntu OCR smoke on
04ccf516must be reviewed. Real dictionary-page GUI ordinary/OCR/combined scan, editing, crop, and sidecar save/reopen checks are still required. Keep PR Draft and do not merge automatically.Round 19 — complete lemma parser and manual review selection (2026-10-24)
5250d14a/fc8bdb6e: moved complete multiscriptparse_headword_textimplementation toocr/lemma_parser.py(Latin/POS, numbered headword, Japanese/Kana, Arabic, CJK visual/marker/bracketed/single headword, OCR repair/grammar synthesis). Historical core/public signature andHeadwordParseidentity remain, with 16 current call-time callbacks, not frozen imports.9e8def0b/af76fcd1: moved manual selection sidecar reader, refined-vs-original Y-variant selection, and manual override application intoocr/review_manual_selection.py; keep current path/JSON hooks and unchanged file format/selection semantics.test_issue562_core_leaf_round19_parser_20261024.pyandtest_issue562_core_leaf_round19_manual_20261024.py, plus extended compatibility audit. About 11 KB further implementation removed from the old Paddle core; package root remains 10 files without new root compatibility stubs.8507138cbefore claiming green. Separate real scanned dictionary-page GUI/OCR/manual edit, crop and sidecar save/reopen acceptance remains pending.Keep Draft, never auto-merge.
Round 19 CI correction + Round 20 POS grammar extraction — 2026-10-24
8507138c, six-platform CI failed due to one new test's incorrect class-module assertion: productionHeadwordParseintentionally remainspicture_capture.paddle_headwords_corefor pickling. Commit6c623dc4fixes the test's expectation and checks exactcore.HeadwordParseidentity; no production class moved.ocr/pos_cue_policy.pytakes the actual implementations of_compile_patterns,_strip_entry_modifiers, and_find_pos_cueout ofpaddle_headwords_core.py. The historical core functions remain with old signatures/module origins and forward current regexp, settings constructor, and patchable modifier callback at call time.tests/test_issue562_core_leaf_round20_pos_20261024.pycovers POS noise heuristics, Latin-only regex handling, numeric markers, pronunciation exclusions, invalid regex, current core patch callback and original signatures. Architecture compatibility audit updated.Latest Round 20 HEAD:
bd16c293. Exact-head six-platform CI and Windows/macOS/Ubuntu OCR smoke must be reviewed before claiming green, with independent actual dictionary-page GUI scan/edit/save-reopen acceptance outstanding. Keep Draft, unmerged.Round 20 CI import fix (2026-10-24)
The first Round 20 CI on
bd16c293failed during pytest collection withNameError: load_dictionary_profileinocr/pos_cue_policy.py. Root cause: the extraction range unintentionally included five adjacent grammar-tail wrappers plus_BUNDLED_PROFILE/_USAGE_ABBREVIATIONSmodule globals.2696eb03: restored all five original grammar-tail wrappers and profile globals to their historicalpaddle_headwords_core.pylocations/initialization order.efe20945: restrictedocr/pos_cue_policy.pyto its three intended functions, with no unintended global state.141822ad: AST regression guard ensuring exact extraction boundaries and original profile initialization.a4e52f32: architecture compatibility audit corrected.Latest HEAD
a4e52f32still requires exact-head six-platform CI and three-platform OCR smoke. Keep Draft and unmerged.Round 21 — CJK OCR parser split (2026-10-24)
a4e52f32succeeded on all six main CI jobs and all three Windows/macOS/Ubuntu OCR smoke jobs.ocr/cjk_prefix_parsing.py: configured-symbol eligibility, marker-led CJK+pinyin parsing, and bracketed/open-bracketed CJK/Japanese reading-prefix lemma parsing.ocr/cjk_single_lemma_parsing.py: single-character+pinyin OCR recognition, visual HeadwordParse construction and short single-Han variants with radical label exclusions.paddle_headwords_core.py, retaining every old function path/signature, active injected collaborator andHeadwordParsepersisted class origin. The original core still owns all compiled regex constants and bracket mapping.tests/test_issue562_core_leaf_round21_cjk_20261024.pywith exact AST extraction boundaries, parsing behavior, class identity and live monkeypatch checks; extended architecture audit. Package root remains 10 Python files.c9c3ea14needs its own six-platform CI and three-OS OCR Smoke confirmation; GUI real-page scan/edit/crop and PDIC/PPP save-reopen parity still pending. Keep Draft, no auto-merge.Round 21 CI test correction and Round 22 — OCR column band extraction (2026-10-24)
b974aec5: fixed the new test's own monkeypatch assertion order (the old CJK visual constructor's__module__was accidentally read from a temporary test spy). Production behavior was correct. Prior headc9c3ea14passed Windows/macOS/Ubuntu OCR smoke but failed the six CI jobs on that test.4fea4383/285b5129: extracted the actualunwrap_column_bandoriginal-pixel OCR band implementation toocr/column_band_sampling.py. The historical core function retains name, exact positional/keyword parameters and live NumPy/PIL/RGB normalizer patch seams.724e1e11/a50166dc/2ef0d57f: co-located the small candidate axis and OCR false-marker helper implementations with existingocr/source_candidate_coordinates.py/ocr/lemma_parser.pyowners; retain original core compatibility facades.12a3b8ec: regression characterization of pixel-by-pixel curved band strips, page-cache RGB shape checks, transformed crop route, module origins and AST extraction boundary.d1e5e371: compatibility audit. Root remains 10 Python files, no root shim, no intentional change to source coordinates, persisted models, review, OCR cache, sidecars or crop publish.d1e5e371: check exact-head six-platform CI and three-OS OCR Smoke. Manual real dictionary GUI scan/edit/export and PDIC/PPP save-reopen parity remain release blockers. Keep Draft and do not merge.Round 22 CI syntax correction — 2026-10-24
The
d1e5e371full CI failed before pytest collection and the architecture change guard reported two malformed function declarations caused by an extraction/edit typo:src/picture_capture/ocr/source_candidate_coordinates.py:73:ndef candidate_axis_v→def candidate_axis_v(59770cdf).src/picture_capture/ocr/lemma_parser.py:287:ndef looks_like_marker_noise_lemma→def looks_like_marker_noise_lemma(2578c5c4).The three-OS OCR smoke on the failing baseline had succeeded, but full CI had failed at the syntax gate. Only these two declaration keywords were changed; no core behavior, public signature, cache/sidecar/persistent model identity, or crop publishing format was changed. Existing AST/architecture guards should prevent reintroduction.
Corrected HEAD
2578c5c4: exact-head six-platform CI and three-OS OCR Smoke rerun automatically. Keep Draft; do not merge until both succeed and representative GUI page workflows receive independent acceptance.Round 23 — large processing algorithms moved out of core (2026-10-24)
Baseline
2578c5c4: six-platform CI and three-OS OCR Smoke passed. Round 23 moves three complete implementation owners (approximately 27 KB source moved, approximately 24 KB net decrease inprocessing_core.py), preserving historical facades:quality/detection_entry_fusion.py: entire ~14 KB ordinary/OCR candidate fusion implementation, ordered assignment, hard-negative/latent review, oversized-CJK suppression and final strict dedup; original core passes 12 current collaborators at call time.geometry/column_path_tracking.py: curved column geometry tracking, adaptive ink mask, stable anchors, smoothing and source-pixel reconstruction; original core passes current constants/helpers and originalColumnPathidentity.ocr/ordinary_marker_text_enrichment.py: existing-marker multi-engine OCR text fill (no line-count/X-Y changes), profile/CJK rules, crop and channel reuse, manual protection, stats and only-blank behavior; original core forwards current crop/geometry/sort/text dependencies.Added
tests/test_issue562_core_leaf_round23_large_split_20261024.pywith exact AST ownership, API signature, dynamic monkeypatch, basic behavioral and pixel anchor checks; extendeddocs/architecture/CORE_LEAF_COMPATIBILITY_AUDIT_20261024.md. Physical Python root stays 10, no new root shim. Source cache, class identity, project sidecars, crop output and GUI not intentionally changed.Latest Round 23 HEAD
af34d8e1: Require new exact-head six-platform CI + 3-OS OCR Smoke before claiming success. Independent real dictionary scan/edit/crop/PDIC/PPP save-reopen acceptance still pending. Keep PR Draft, do not merge.Round 23 CI correction + Round 24 six-module batch extraction (2026-10-24)
CI correction: Previous head
af34d8e1failed five legacy source-location assertions: tests still looked for moved fusion / OCR implementation snippets inprocessing_core.py. Updated all five suites to verify the historical façade and canonical module as a complete chain, still asserting the same entry crop, profile-bracket policy, shared OCR channel and global ordered matching behavior. The 3-OS OCR Smoke on the old head passed.Six newly extracted algorithm owners (about 12.7 KB net reduction in
processing_core.py):detection/page_method_dispatch.py— ordinary/OCR/combined method routing, Profile page eligibility, cached review candidates and sorting.refinement/existing_entry_positions.py— source-pixel Y correction with optional verified ink-top route.ocr/legacy_entry_text_reading.py— per-entry Paddle/Tesseract OCR with Profile-guarded bracket cleanup.crop/illustration_export.py— standalone/associated PPP crop masks, manifest and atomic publish/rollback.crop/illustration_source_bounds.py— transformed source-space top/bottom/margin policy.crop/single_line_export.py— SW crop generation, manifest, stale artifact cleanup and atomic publish.Every old
processing_corefunction keeps its signature/module identity; its live dependencies are passed at call time, no persisted model classes move. Two new AST/live-hook regression suites:tests/test_issue562_core_leaf_round24_detection_20261024.pyandtests/test_issue562_core_leaf_round24_crops_20261024.py. Architecture audit updated. Root stays ten Python files, with no compatibility stubs.Exact-head CI and 3-OS OCR Smoke must independently pass; real representative page GUI ordinary/OCR/combined scan, editor, export, sidecar save/reopen remain release blockers. Keep Draft; do not merge.
Round 25 — 9 additional OCR/runtime/refinement/PPP/worker functions extracted (2026-10-24)
ocr/paddle_engine_lifecycle.py: complete PaddleOCR cached engine factory, eviction and raw-band prediction/coordinate upscaling migrated out ofpaddle_headwords_core.py; historical core cache identity, signatures and monkeypatch seam remain.ocr/tesseract_subprocess.py: complete Tesseract RGB PNG stdin process and timeout/error mapping.refinement/existing_entry_workflow.py: existing saved-marker Y-refinement orchestration and canonical geometry/source disposal.illustration/ppp_detection_update.py: idempotent AUTO illustration detection update protecting manual PPP polygons.illustration/crop_box_policy.py: original-source polygon bound clipping.crop/spawn_job_owners.py: two spawn-safe WW/PPP worker implementations, retaining core importable target identities and live PDIC/PPP readers/export functions.9 actual function bodies moved. Old core API signatures and persisted class module identity unchanged. Two regression suites added:
tests/test_issue562_core_leaf_round25_paddle_20261024.pyandtests/test_issue562_core_leaf_round25_processing_20261024.py. Updateddocs/architecture/CORE_LEAF_COMPATIBILITY_AUDIT_20261024.md. Package root remains 10 modules, no compatibility shims.Prior Round 24 head
d6fc435f3-OS OCR smoke succeeded; full CI was still queued at this change. Newest Round 25 head200bdd3cmust independently pass CI and OCR smoke before merge consideration. Real GUI page scan/edit/crop/save-reopen checks still outstanding. Keep Draft and unmerged.Round 26 — seven source geometry, detection-job and crop-staging functions moved (2026-10-24)
Moved seven complete implementations into four owners:
geometry/page_runtime_context.py: source pixel RGB / Profile page template / canonical geometry context.detection/spawn_job_execution.py: spawn-safe ordinary-page marker detection and PDIC commit.illustration/source_detection_jobs.py: image-file illustration detection and background PPP-detection job.crop/image_staging_io.py: clipped source PNG crop, UTF-8 flushed/fsynced manifest staging, crop temporary file creation with failure cleanup.All existing
processing_corefunctions keep their exact call signatures, module import locations, and call-time monkeypatch callbacks. Full historical models, root inventory (10 Python files), PDIC/PPP/SECTION/crop naming and publishing transaction semantics remain unchanged. The size reduction is modest because explicit compatibility wrappers are retained instead of replacing historical callbacks with frozen leaf imports.New regression suites
tests/test_issue562_core_leaf_round26_page_jobs_20261024.pyandtests/test_issue562_core_leaf_round26_staging_20261024.pycover AST owner boundaries, original signatures, live Profile/PDIC/illustration callbacks, pixel-perfect crop dimensions, UTF-8 manifest temp stage, and simulated I/O failure cleanup. Extended architecture audit.Round 25 head
200bdd3chad passed Windows/macOS/Ubuntu OCR smoke; six-job CI had not completed at start of this batch. Latest Round 26 HEAD3caa91d1needs independent 6-job CI and 3-OS OCR smoke. Real dictionary page GUI scan/edit/export/save-reopen acceptance still outstanding; PR remains Draft, do not merge.Round 26 CI fix + Round 27 pickle-compatible model ownership (2026-10-24)
Round 26 CI root causes repaired: All six CI jobs encountered 14 failures: three delegated
deps={{...}}literals caused runtimeTypeError: unhashable type: 'dict'in ordinary/OCR dispatch, existing-marker Y refinement and legacy entry OCR. Corrected these to mappings ine2892160. Four older source-location tests were updated to verify both the original façade and relocated owners for auxiliary-line exports, Paddle GPU import timing and shared separator-Y refinement (unchanged behavior requirements). Previous Round 26 three-OS OCR Smoke was fully green, but six-job CI failed.Round 27 moves eight complete dataclass implementations to:
geometry/processing_models.py—ColumnPath,Geometry.crop/plan_models.py—CropRecord,EntryCropPiecePlan,IllustrationCropPlan,PageCropPlan,IllustrationCropEvent,IllustrationSplitResult.processing_core.pyre-exports the identical objects and restores their previouspicture_capture.processing_corepickle module identity, without subclassing or changing positional fields, slots/defaults or sequence behavior. Newtests/test_issue562_core_leaf_round27_model_compat_20261024.pytests exact AST class ownership, direct class identity, class/object pickle roundtrips, source coordinate transforms, crop plan fields and a regression guard that all formerdeps={{...}}sites useast.Dict.processing_core.pyshrank approximately 2.9 KB; package root remains 10 physical Python files with no compatibility stubs. Architecture audit extended.Latest Round 27 HEAD
b4e8c9c0requires its own six-job CI and three-OS OCR Smoke. Real GUI dictionary page ordinary/OCR/combined scan/manual edit/crop/PDIC-PPP reopen parity is pending. Keep Draft and do not merge automatically.Round 28 — large GUI implementation extraction, 38,806 bytes removed from app.py (2026-10-24)
Four full
PictureCaptureAppmethod implementations relocated with exact historical class method signatures and per-call dynamic patch dependencies:ui/main_appearance_policy.py: full light/dark ttk global-theme setup and PC.* scoped workspace styles (~12 KB).ui/quick_settings_apply.py: full quick-settings validation, Profile pixel/percent conversion, content/OCR/Lens configuration, redraw/persistence (~7.6 KB).ui/detection_batch_execution.py: full ordinary/OCR/combined multi-page batching, CPU/GPU workers, manual PPP flush, per-page PDIC writes, OCR checkpointing, final audit, progress and quality statistics (~21 KB); all relative imports adjusted from root app to canonicalui/child. The historicalPictureCaptureApp._detect_pagesis still invoked by existing controllers and passes 20 current app module global hooks at call time.app.py: 340,021 → 301,215 bytes (net −38,806 bytes) while retaining original method names, keyword/default signatures and Tk side effects. No new root stubs; root physical Python files remain 10.Updated five earlier architecture/source-location tests to inspect the original app adapter and its new detection-batch owner: ordinary CPU pool, parallel single-writer, forced-refresh resume, combined blank-only OCR and manual PDIC preservation-before-final-audit. Added
tests/test_issue562_ui_round28_large_batch_20261024.pyto guard exact source ownership, historical APIs, currently patched global dependencies, safe no-project return and critical processing order. Architecture audit updated.No intended changes to saved pixels, batch CPU/GPU limits, PDIC/PPP/SECTION models, manual edit preservation, OCR cache, file exports or GUI labels. Latest Round 28 HEAD
9477d640needs new exact-head six-job CI and three-OS OCR smoke, plus independent real GUI scan/edit/crop/save-reopen acceptance. PR remains Draft and unmerged.Round 28 CI fix + Round 29 — another 23,616 bytes of UI implementations extracted (2026-10-24)
CI repair: Previous head
9477d640had ~15 failing tests caused by old physical app.py source-location expectations for relocated UI theme, quick-settings, detection batch processing. Corrected each source assertion to test the retainedPictureCaptureAppfaçade and the canonical owner, without deleting theme, source pixel, single-writer, manual PPP, forced-resume or final-audit guarantees. Prior 3-OS OCR Smoke passed.New Round 29 implementation owners:
ui/main_workspace_build.py: the fullPictureCaptureApp._build_uiimplementation (~15.3 KB), including sidebar, page index, status/progress, source image canvas and event bindings. Old app method/signature remains, forwarding livetkandttkmodules per invocation.ui/settings/interactive_panels.py: completeSettingsDialog._scrollable_settings_pageandSettingsDialog._add_check_group(~9.4 KB) for two-panel settings layout, live help text/wrapping/scroll events, contextual check groups. Exact old class methods, kwargs and live Tk/ttk bindings preserved.app.pyfurther shrank 301,215 → 277,599 bytes (−23,616 bytes), for cumulative −62,422 bytes across Rounds 28–29. Root physical .py file count stays 10, no root shims. Newtests/test_issue562_ui_round29_widget_owners_20261024.pycharacterizes AST ownership, original signatures, patched Tk module seam and widget arrangement. Updated related existing settings and workspace source-owner assertions. Architecture audit appended.Latest Round 29 HEAD
b696e6b7: new exact-head six-job CI and three-OS OCR Smoke must both pass; real dictionary GUI ordinary/OCR/combined scan, manual editing, crop, PDIC/PPP save-reopen parity still outstanding. Keep PR Draft, do not merge automatically.Round 29 CI source-owner fixes + Round 30 — SettingsDialog form/save and Review styles extraction (2026-10-24)
Previous head
b696e6b7: Windows/macOS/Ubuntu OCR Smoke all passed; complete CI failed because ~25 tests still searched the physicalapp.pyfor fully relocated widget and Settings help implementations. Updated affected suites to check original app adapter plus canonicalui/main_workspace_build.pyandui/settings/interactive_panels.py, retaining keyboard, page-tree, scroll/wrap, styles and status guards.Four additional complete methods now physically live in two new owners:
ui/settings/field_form_runtime.py:SettingsDialog._setting_widget,_add_setting_group, and fullsaveworkflow (field/type/profile pixel conversion, OCR backends, crop constraints, language defaults, font/appearance validation, rule checks, settings/Profile persistence, user-visible error handling).ui/review_style_policy.py:ReviewWindow._configure_review_styles, including dense PCR.* light/dark palettes.Original public methods and signatures remain in
app.pyand forward live current globals per invocation. Newtests/test_issue562_ui_round30_form_review_20261024.pylocks syntax/AST owners, historical entrypoints, patched dependencies and validation/palette behaviors; updated existing color picker and before-mutation test owners.app.pyreduces another 16,694 bytes, from 277,599 to 260,905 bytes, totaling about 79 KB removed over Rounds 28–30; root still 10 physical .py modules with no compatibility shims. Extended architecture audit.Exact latest Round 30 HEAD
7f0609efrequires a fully successful six-job CI and three-OS OCR Smoke before acceptance. Independent real-page GUI editing, scan, crop, PDIC/PPP save-reopen parity still outstanding. Remain Draft, do not merge.Round 30 CI fix + Round 31 — six GUI runtime/UI implementations extracted (2026-10-24)
At prior Round 30 head
7f0609ef, all three Windows/macOS/Ubuntu OCR Smoke jobs passed. Main six-job CI failed eleven legacy assertions that searched the originalapp.pyfor now-relocated settings form/save and ReviewWindow style code. All eleven checks were re-grounded on both the original class method and its canonical owner, preserving the actual page navigation, color picker, settings validation, crop save, locale font and proofreading style policies.Round 31 moves six complete implementation bodies into four domain owners:
ui/background_job_runtime.py: nonblocking_start_ui_workerand_poll_ui_worker_queue, generation safety, close-write synchronization and main Tk callback delivery.ui/quick_settings_sync.py: complete percent/pixel quick settings synchronization, bool/color/Lens and font presentation.ui/paddle_environment_report.py: PaddleOCR/PaddleX/PP-OCRv6 runtime and CPU/GPU/CUDA status reporting.ui/main_action_buttons.py: compact sidebar/footer themed button creation.The historical
PictureCaptureAppmethod signatures and dynamically patched globals remain; no persisted data class or file format moves.app.pyfurther shrank 9,058 bytes to 251,847 bytes. Package root stays 10 physical.pyfiles with no alias shims.New
tests/test_issue562_ui_round31_runtime_20261024.pytests AST ownership/parser, original signatures, live hooks, worker generation stale-token handling/no worker-thread UI callbacks and exception-safe quick sync. Updated older architecture assertions for worker queue/footer button methods. Detailed architecture audit appended.Latest Round 31 HEAD
3d49e68arequires exact-head six-job CI and 3-OS OCR Smoke; independent GUI scan/edit/crop/PDIC-PPP save/reopen acceptance still pending. Keep Draft, no merge.Round 31 CI fix + Round 32 — 40,964 bytes of complete SettingsDialog/ReviewWindow constructors extracted (2026-10-24)
Prior head
3d49e68a: three-OS OCR Smoke all passed; main CI reported only two stale source-location assertions (highlightthicknessmoved toui/main_action_buttons.py; worker_ui_worker_close_wait/generation callbacks moved toui/background_job_runtime.py). Updated these to assert the historical app entrypoints and actual canonical owner, preserving all old safety requirements.Round 32 relocates the full widget initialization after Tk Toplevel super construction:
ui/settings/dialog_initialization.py— ~24 KB Settings Center tabs, Profile/REF/illustration/crop/advanced controls, responsive help/scroll, no-modal-grab, autosave validation/event handlers and close behavior.ui/review_window_initialization.py— ~16 KB Proofreading window workarea geometry, state and reference/online badges, digit replacements, review sizing and queued/prefetched rendering, widget build and after-idle alignment.SettingsDialog.__init__andReviewWindow.__init__remain inapp.py, keep original signatures and invoke the same original zero-argumentsuper().__init__(parent)before delegation, preventing any Tk MRO/initialization change. All original app module helpers/modules/constants are supplied dynamically per call. No persisted model class or project format moved, and physical root remains 10 .py files without new shims.app.pydecreases 251,847 → 210,883 bytes (net −40,964 bytes). New testtests/test_issue562_ui_round32_window_init_20261024.pychecks AST, signatures, real Tk super-before-delegate order with no-display doubles, dependency wiring, Settings auto-save and modeless protections, and Review compact workarea/after-idle. Corrected previous constructor source-location tests including eleven detailed ReviewWindow invariants. Architecture audit updated.Exact Round 32 HEAD must pass six CI matrix jobs and Windows/macOS/Ubuntu OCR Smoke independently, plus physical GUI scan/edit/PPP-PDIC/export/save-reopen acceptance before merge. Keep Draft and unmerged.
Round 32 post-extraction test audit (latest
81d1a9b7): Canonical constructor-owner checks added to existing SettingsDialog, compact ReviewWindow and eleven original ReviewWindow UX behavior tests intest_core.py; two remaining source guards for Settings Center color/display options and focused review variables corrected. All cross-platform OCR Platform Smoke jobs on this exact head passed (Windows, Ubuntu, macOS). Main six-job CI is running; do not treat the earlier smoke pass as a full CI pass. Manual real-page GUI acceptance is still required. No merge.Round 33 — main app startup + theme refresh, and CI/GUI repairs (2026-10-24)
Large owner extraction: moved full post-
tk.Tk.__init__main-window startup implementation toui/main_app_initialization.py, and full dynamic resolved-appearance refresh toui/appearance_resolution.py. HistoricalPictureCaptureApp.__init__and_apply_resolved_appearancestay callable with their exact signatures; real Tk superclass construction precedes startup delegation. App-module globals and packagedapp_icon.pngresolution remain call-time bound. Theapp.pysource net reduction is approximately 18.2 KB in Round 33, with two new physical canonical owners and no new root stubs (root remains 10 files). Newtests/test_issue562_ui_round33_app_startup_20261024.pychecks true AST ownership, superclass ordering, live dependencies, and refresh wiring.CI repairs:
6548b923fixes missingReviewWindowclass-constant references and updates stale Round-32 source-location expectations.f2ebece7restores live PageListGrid/PageThumbnailController/context-menu injection to the previously extracted workspace builder, discovered by real GUI startup smoke.a1216b2dandfdcc891fupdate affected Round-33 test contracts to inspect both original compatibility delegates and canonical owners.3e2e7bc9fixes the old SettingsDialog constructor's missingLATIN_ORDERdependency discovered by real GUI construction smoke; constant and settings/persistence policies remain unchanged. No production format/schema migration or physical root move.Latest exact-head:
b8da84c92ac5fa9b9f1295a0afc760dc858d1e6f. The three-OS OCR Platform Smoke #40083183559 succeeded. The exact-head six-platform CI #40083183557 succeeded, including all six OS/Python jobs (Ubuntu, macOS, Windows at Python 3.13 and 3.10), architecture/F821 guards, GUI construction smoke, compatibility checks, and wheel build.6a649a31andb8da84c9repaired annotation-only F821 references in relocated main/review initialization owners without introducing imports fromapp.py. Canonicalsrc/picture_capture/*.pyroot file count remains 10. The documentation-only architecture job is intentionally skipped by the risk-tier classifier.Acceptance remains: representative real dictionary-page GUI ordinary/OCR/combined scan, manual PDIC/PPP edit/save/reopen and crop/export parity. Keep Draft and unmerged.
Round 34 — Profile Wizard large module extractions (2026-10-24)
This is the same Draft PR and branch, now carrying another substantial physical implementation reduction in the oversized
profile/setup.pymodule:profile/wizard_state_initialization.pynow owns the complete originalProjectProfileWizard._build_vars(~13.3 KB).profile/wizard_tab_builders.pynow owns the original_build_template_tab(~7.1 KB) and_build_headword_tab(~17.8 KB).profile/setup.pynet source reduction ~35.7 KB, retaining original method names, annotated signatures, widget behavior and per-call live Tk/settings/reading/headword dependencies. No root shims or root deletions: physical root still 10 modules.tests/test_issue562_profile_wizard_round34_20261024.pyasserts historical compatibility delegates, canonical AST implementations, callback order, widget roles and live dependency injection.tests/test_next_stage_regressions.pynow check both original wizard compatibility method and relocated owners without weakening actual CJK bracket/marker policy, page template nudging, settings/persistence and labels. A new owner F821 check identifiedrecommended_headword_structuresand commit39902fbbexplicitly restores it through call-time injection.Latest Round 34 HEAD:
39902fbbfdb06001de413d7310044620522d9821. Exact-head six-platform CI #40087415895 completed SUCCESS (Windows/macOS/Ubuntu on Python 3.10 and 3.13; Risk-tier CI gate passed). Exact-head three-OS OCR Platform Smoke #40087415931 completed SUCCESS. Ubuntu Python 3.13 pytest: 3,793 passed, 3 skipped, and GUI construction, F821 and wheel checks passed. Earlier Round 34a47910bfOCR smoke passed, while CI exposed stale source-contract checks; the follow-up88710f72fixed those and isolated one missing free-name injection.Independent real scanned dictionary GUI, Profile Wizard visual controls, manual editing, crop output and PDIC/PPP save/reopen parity remain outside automated proof. Keep Draft; do not merge automatically.
Round 35 — Profile Wizard preview/settings/diagnostics physical extraction (2026-10-24)
Same Draft PR and branch. Extracted four substantial canonical implementations out of
profile/setup.py, with a net ~24.9 KB source reduction (from 135.5 KB to 110.2 KB on the same branch):wizard_template_preview.py: historical_refresh_template_previewwith background PIL/decode worker, immutable preview state snapshot and UI-thread Tk photo rendering unchanged.wizard_settings_assembly.py: historical_settings_from_uiwith original Profile defaults, column adjustments, CJK bracket-versus-entry-marker guard and visual sample serialization unchanged.wizard_workspace_builder.py: historical_build_right_image_workspaceand all three Wizard sample/validation UI callbacks unchanged.wizard_validation_diagnostics.py: historical static_validation_coverage_summaryretaining raw OCR/headword diagnostic fields, alerts and calculated coverage.Legacy
ProjectProfileWizardnames, annotated signatures and public access paths remain on the original class. The canonical owner calls receive current live module dependencies, with annotation-only Tkttk.Framereferenced inTYPE_CHECKINGto preserve F821 correctness. No root compatibility shim or changed settings/PDIC/PPP/OCR formats. Physical root Python file count remains 10.Test coverage added in
tests/test_issue562_profile_wizard_round35_20261024.pyfor owner AST and live dependency compatibility, background/UI-thread handoff and important headword decision constraints; prior appearance, worker-concurrency and profile source-location contracts were reanchored onto their actual owner modules, retaining semantic assertions.Verified exact-head
a371169161c4b66bf6592ed2bcdee483ac6388cb: six-platform CI #40088536160 SUCCESS (Windows/macOS/Ubuntu, Python 3.10/3.13, risk-tier gate success); exact-head three-platform OCR Platform Smoke #40088536138 SUCCESS. Ubuntu Python 3.13 reported 3,797 passed, 3 skipped, GUI construction smoke OK, F821 all passed and wheel built. Documentation-only job skipped as intended for its risk tier.Keep Draft and unmerged. Human review of real dictionary image Profile Wizard ordinary/OCR/combined runs, PDIC/PPP manual changes/save/reopen, crop/export parity remains outstanding.
Round 36 — Multi-page Profile Wizard OCR validation extraction (2026-10-24)
Physically extracted six complete Profile Wizard implementations from
profile/setup.pyinto three canonical validation modules. The legacy module has decreased to ~92.2 KB (from ~110.2 KB at Round 35), a further ~18 KB physical file reduction, without introducing root compatibility stubs. Rootsrc/picture_capture/*.pycount remains 10.profile/wizard_validation_execution.py:ProjectProfileWizard.validate_profile, including project/indices/settings snapshots, forced PaddleOCR refresh, explicit OCR cache path, cooperative stop event,wait_on_close=True, and UI-thread done/failed callbacks.profile/wizard_validation_controls.py:_build_validation_taband_apply_validation_feedback, keeping CJK/Latin/numbered/marker-specific tuning and 0/±2 guardrails.profile/wizard_validation_visuals.py: static_marker_preview,_render_validation_resultand_finish_validation; translucent RGBA masks drawn onto RGB, themed Tk photos on UI thread, status and revision validity unchanged.Original
ProjectProfileWizardclass and method/static signatures remain atprofile.setupand delegate via live dependencies. No changes to PDIC/PPP schemas or save logic. Addedtests/test_issue562_profile_wizard_round36_20261024.pyfor legacy entrypoints, live globals, worker snapshot/cancellation, translucent overlay and feedback safety. Reanchored existing dark mode/concurrency/mask source checks to new canonical implementations without weakening behavioral expectations. Architecture audit updated.Exact-head validation
a9e92ce0575daa04dbb4ca4f326115e6ddd809a2: six-platform CI #40089927238 SUCCESS (Ubuntu, macOS, Windows × Python 3.10/3.13; risk-tier gate succeeded); three-OS OCR Platform Smoke #40089927245 SUCCESS. Ubuntu 3.13 pytest: 3,802 passed, 3 skipped; GUI construction smoke OK, F821 passed and wheel built. The documentation-only check was intentionally skipped by risk-tier classification.PR remains Draft and unmerged. Real photographed/scanned dictionary-page Profile Wizard ordinary/OCR/combined operation, manual PDIC/PPP modification/save/reopen and crop/export parity still require independent human validation.
Round 37 — Profile Wizard representative-page thumbnail and layout analysis owners (2026-10-24)
Extracted 13 complete methods from
profile/setup.pyinto two coherent leaf owners while keeping all originalProjectProfileWizardmethod names and signatures with call-time live dependency passing:profile/wizard_sample_thumbnails.py: representative thumbnail grid/loading; full-set off-thread decode, per-slot off-thread replacement and queue polling, main-thread Tk photo rendering, and manual picker. Slot replacement still decodes only the selected image, keeps siblings intact, and avoids refreshing an invisible template preview. Load-generation guards and closure cancellation are retained.profile/wizard_sample_analysis.py: multi-page background layout analysis, queue polling, revision-guarded aggregation, conservative ink-height suggestion and explicit/qualified automatic application. Input paths, settings and indices are snapshotted before workers; stale results are rejected.The class owner
profile/setup.pyis now 78,538 bytes, versus 92,202 bytes after Round 36 (approximately 13.7 KB smaller, with ~13.1 KB net Python source character reduction). Thesrc/picture_captureroot still has 10 Python modules. No new root shims, crop/PDIC/PPP format mutations or OCR schema changes.New
tests/test_issue562_profile_wizard_round37_20261024.pychecks 13 compatibility delegates, parameter signatures, live dependency seams, snapshot workers, token/generation guards, per-slot changes and Tk/main-thread rendering. Existing next-stage and verified ink-height tests were updated to check the new canonical owner behind original wrapper calls, without dropping the established invariants. Architecture audit updated. First CI identified a multiline signature formatting issue, fixed in180c0f26; the next run exposed three stale source-location tests, fixed in the final HEADc618c7a3e48aaa7056375b251ed672ba159bf861.Exact-HEAD results: six-platform CI #40091030636 SUCCESS (Ubuntu/macOS/Windows, Python 3.10 + 3.13; risk-tier CI gate SUCCESS), and OCR Platform Smoke #40091030616 SUCCESS across three OS. Ubuntu Python 3.13: 3,806 passed, 3 skipped, GUI construction smoke OK, ruff F821 all passed, wheel successfully built. Documentation-only architecture job intentionally skipped by risk tier.
Keep PR Draft and unmerged until real dictionary scans pass ordinary/OCR/combined manual GUI verification, editing and PDIC/PPP save/reopen, plus crop/export parity checks.
Round 38 — Wizard shell, reading/OCR controls and headword explanations (2026-10-24)
Physically extracted 12 additional
ProjectProfileWizardmethods fromprofile/setup.pyinto three canonical owner modules, reducing the legacy class source from 78,538 bytes after Round 37 to 60,200 bytes (about 18.3 KB less on disk, ~17 KB net Python source character reduction):profile/wizard_shell_builder.py:_build_ui,_apply_initial_pane_split,_apply_left_wraps,_show_right_image_page,_on_wizard_tab_changed. Four-tab setup, initial 40:60 left/right pane split, resize text wrapping, and tab-specific representative/preview/validation views remain unchanged.profile/wizard_reading_controls.py:_build_reading_tab,_build_language_section,_body_page_range_changed,_refresh_language_summary. Dictionary identity and body-page range UI, reading mode, OCR/index/content-language hints, and body-range resampling/revision invalidation remain unchanged. Legacy keyword-onlyrowsignature preserved.profile/wizard_headword_explanations.py:_refresh_headword_description,_refresh_headword_structure_summary,_refresh_headword_specificity_visibility. Latin/CJK layout guidance, classic headword example image handling, tail evidence summary and selective panel visibility unchanged.Original public
ProjectProfileWizardclass/method paths and annotated signatures remain insetup.py, forwarding live module-level dependencies to the physically relocated owners on each invocation, including image theme and example-path globals.__init__, data storage and save/restore logic intentionally remain at their previous owner; no new root compatibility stubs, changed OCR or PDIC/PPP formats. Root Python module count still 10.Added
tests/test_issue562_profile_wizard_round38_20261024.py(AST owner/legacy signatures; dynamically monkeypatched delegates; 40:60 panes/four tabs; OCR language/revision behavior; CJK/headword guidance) and reanchored existing next-stage, appearance and illustrated-layout source checks without weakening their original semantics. Architecture audit updated. First CI identified two stale source-location assertions, fixed in69580329; the next CI revealed four missing live example/theming dependencies in the extracted headword owner, fixed and regression-covered in exact HEAD24d7808088e0496a97d4f1e0fe1959893aba662a.Exact-head validated: CI #40092554677 SUCCESS across 6/6 OS/Python matrix (Windows/macOS/Ubuntu × 3.10/3.13), Risk-tier CI gate SUCCESS; OCR Platform Smoke #40092554666 SUCCESS. Ubuntu Python 3.13 pytest 3,811 passed, 3 skipped; GUI Smoke OK, ruff F821 passed, wheel built successfully. Docs-only check intentionally skipped by risk classification.
Keep Draft and unmerged. Manual real dictionary-page ordinary/OCR/combined GUI verification, page/template controls, image thumbnails, and PDIC/PPP save/reopen, crop/export parity are still outstanding.
Round 39 — Profile save workflow, revision events and visual marker owners (2026-10-24)
Physically extracted 25 complete methods from
profile/setup.pyto three new canonical owner modules, with all historicalProjectProfileWizardmethod names and argument signatures retained as thin compatibility delegates with call-time dependency passing:profile/wizard_persistence.py(5 methods): draft versus finalized settings/profile save, navigation/step-save, confirm-and-close, close-with-autosave, validation cancellation and optional runtime redraw. Preserves the originalcopy_settings,settings_path,write_project_profile,project_profile_path,sync_quick_settings,messageboxandPROFILE_SETUP_VERSIONsemantics.profile/wizard_profile_events.py(14 methods): reading/headword/profile change revision tracking, invalidation of stale page-validation results, structure/tail/symbol defaults, specificity, CJK role normalization, OCR language changes and human-readable tuning states.profile/wizard_visual_markers.py(6 methods): configured symbol inventory descriptions, image-page visual marker capture, sample replace/deduplicate, versioned sample JSON serialization, listing and clear with confirmation.profile/setup.pyis now 50,216 bytes, down from 60,200 bytes after Round 38 (about 10.0 KB physical reduction); rootsrc/picture_capture/*.pycount remains 10. No new root shims and no changes to PDIC/PPP output schemas or OCR model behavior.ProjectProfileWizard.__init__still owns widget lifecycle.Added
tests/test_issue562_profile_wizard_round39_20261024.pyto characterize 25 AST delegations, signature preservation, live dependency globals, profile save semantics, illustrated-mode gate, symbol sample serialization, and validation invalidation without a Tk root. Updated existing long-form source-location regression checks, plus the specific illustrated-mode guard test to assert its new physical owner, retaining its original safety condition. Architecture audit updated.Exact-head validation
7cc6420f0aecf1261a41f71cc62f56ca6d3d1e80: CI #40094407661 SUCCESS (all six Windows/macOS/Ubuntu × Python 3.10/3.13 combinations; risk-tier gate SUCCESS), OCR Platform Smoke #40094407627 SUCCESS across three OS. Ubuntu 3.13 3,817 passed, 3 skipped; GUI Smoke passed; ruff F821 passed and wheel built successfully. Docs-only CI was intentionally skipped by risk classification.PR remains Draft and unmerged. Independently check real scanned dictionary-page ordinary/OCR/combined GUI operation, Profile edits, PDIC/PPP save/reopen, and crop/export parity before marking ready.
Round 40 — Wizard lifecycle bootstrap and template column interaction ownership (2026-10-24)
Extracted 13 additional complete implementation bodies from
profile/setup.pyinto two leaf owners, with original user-facingProjectProfileWizardpaths, signatures, and UI logic preserved:profile/wizard_bootstrap.pyowns the post-superclass initialization: parent project and settings snapshots, centered screen/work-area geometry, close protocol, per-slot queues, photo caches, validation stop/event flags, revision state, representative selection and delayed full thumbnail decode. The realsuper().__init__(parent)remains inProjectProfileWizard.__init__for Tk Toplevel/MRO semantics. Legacynew_projectremains keyword-only. Original helpers are passed through live class-module globals at call time; nothing runs in a background thread before the originalafter(20, ...)call.profile/wizard_template_interactions.pyowns 12 column/template methods: selection and per-column pixel offsets, adjustment status and UI highlight, cached canvas line-only nudge and reset, static nearest-line distance, click selection, template header/footer/side controls and representative template page navigation. Keeps 0.1% column-width shift and 25% offset cap, without refreshing/decompressing images on each incremental edit._preview_path_distance_sqremains a@staticmethodon the historical class wrapper.The
profile/setup.pyGit blob shrank from 50,216 bytes after Round 39 to 42,538 bytes, a 7,678-byte physical reduction (~7.6 KB source-character net reduction). Rootsrc/picture_capture/*.pystill has 10 Python modules, no root shims, new data formats, OCR model changes or persistence schema changes.tests/test_issue562_profile_wizard_round40_20261024.pyadds unit-level checks for superclass-first initialization, live dependency injection, legacy method signatures/ownership, geometric distance, exact pixel offset changes and reset behavior, and conditional template controls without a Tk root. Existing source-inspection regression tests updated to assert the new physical owners. Architecture audit updated. The first CI run identified two stale/misleading test source assertions (window centering location and docstring containing literal superclass text); these were repaired without changing implementation in final HEAD1982df58b5ed50ab65843fb258117418f2ace70f.Exact HEAD CI evidence: CI #40096082502 SUCCESS (Windows/macOS/Ubuntu × Python 3.10/3.13, 6/6 jobs, risk-tier gate SUCCESS), OCR Platform Smoke #40096082501 SUCCESS across three OS; Ubuntu 3.13 3,823 tests passed, 3 skipped, GUI construction smoke succeeded, ruff F821 succeeded and wheel built. Docs-only architecture check skipped intentionally under risk classification.
Keep this PR Draft and unmerged, pending real photographed/scanned dictionary-page manual checks for Wizard and ordinary/OCR/combined workflows, PDIC/PPP save/reopen and crop/export equivalence.
Round 41 — Root training_export v2 page exporter physically migrated (2026-10-24)
Following Round 40, began explicitly migrating remaining root package business logic, rather than only shrinking
profile/setup.py. The completeexport_training_pagev2 annotation staging implementation (PDIC/PPP ground truth, OCR cache/candidates, source X/Y coordinates, page layout and file copy) moved fromsrc/picture_capture/training_export.pyto the canonicalsrc/picture_capture/training/export_page_v2.pyowner. The root import module remains an intentional stable facade with unchangedexport_training_page(page, project_root, settings, staging_root, page_index)signature and call-time forwarding of 20 global bindings (including patchable_candidate_ground_truth_link) so that existing callers, patches and static v3 composition keep working. Manifest/ZIP publication and cancellation exception identities remain untouched. The physical root file decreased 9,723 → 2,972 bytes (6,751 bytes, ~69% reduction); owner is 9,629 bytes. Root Python module count stays 10 pending compatibility ABI audits; historical architecture guard explicitly requires the training_export facade to remain, so no fake root-file deletion or new root shim was introduced.Added
tests/test_issue562_training_export_page_v2_round41_20261024.pyto verify unchanged import/API and composed v3 identities, live monkeypatch propagation, and a generated-image v2 export of saved PDIC/PPP, OCR review candidates/manual selection, template exclusion geometry and source-pixel coordinates. Existing alpha-safe RGB normalization source-location check now asserts the physical owner and legacy delegate without weakening the invariant. Architecture audit updated.Exact HEAD
4a804f8e847d37bbde45504e1cce42e3564d3333: CI #40101069851 SUCCESS, all 6/6 Windows/macOS/Ubuntu × Python 3.10/3.13 matrix and risk-tier gate; OCR Platform Smoke #40101069843 SUCCESS on 3 OS. Ubuntu Python 3.13: 3,826 passed, 3 skipped; GUI smoke, F821 checks and wheel build succeeded. Documentation-only check skipped by risk classification.Keep PR Draft and unmerged. Real scanned/photographed dictionary-page testing of ordinary/OCR/combined, GUI, PDIC/PPP save/reopen and crop/export remains mandatory for manual acceptance.
Round 42 — Processing facade's real Layout/ordinary implementations migrated (2026-10-25)
Physically moved three complete algorithm bodies from root
processing.pyinto two responsibility-bound owners:layout/current_page.py:understand_page_current: optional illustration mask, trace and replay evidence, Layout-only/composed dispatch, fail-open/fail-closed policy, temporary image lifetime.ordinary/layout_roles.py:materialize_layout_role_entriesandordinary_vb_fallback: final Layout-role Entry creation, source-coordinate and Y refinement, classification metadata and emergency VB fallback. The historicalprocessingcall signatures and call-time patchable Entry/refinement/detector/filter/sort seams remain.Verified Git tree at exact HEAD
4b382f434d812af6cdcc7751a8c2b728e4d5967a: root direct Python files 10 → 10, aggregate root Python bytes 449,419 → 444,564 (−4,855 bytes);processing.py41,760 → 36,905 bytes. New owners are 4,508 and 3,506 bytes. Addedtests/test_issue562_processing_layout_owner_round42_20261025.pyand updated six existing source-owner tests to check actual moved implementations, without removing their behavioral guards. Architecture audit and root classification updated.First exact-head CI exposed two stale source-location assertions, not algorithm failures (3,828 tests passed); corrected them and reran. Final exact HEAD
4b382f434d812af6cdcc7751a8c2b728e4d5967a: CI #40112805630 SUCCESS, 6/6 Windows/macOS/Ubuntu × Python 3.10/3.13, risk-tier gate, Tk GUI smoke, wheel and F821; Ubuntu 3.13 3,830 passed / 3 skipped. OCR Platform Smoke #40112805656 SUCCESS, Windows/macOS/Ubuntu 3/3. Exact-head CodeQL Python/Actions SUCCESS; documentation-only check intentionally skipped. No unresolved PR review threads at this checkpoint.Remain Draft; do not merge or mark Ready. Independent representative scanned dictionary-page GUI checks of ordinary/OCR/combined, Profile, PDIC/PPP save/reopen, and crop/export parity remain NOT DONE. Next: continue root
processing.py/core andprofile/setup.pyphysical business-logic extraction with characterization tests.