lllin000_PaperForge/scripts
LLLin000 3cda942f96 fix: appendix numbering cross-cutting bugs (TABLE regex, int block_id, table alpha prefix, weak-caption tie-break)
3 distinct bugs found and fixed:

1. TABLE in figure regex (_FIGURE_NUMBER_PATTERN)
   Removed TABLE/Table from figure regex — caused table captions to be
   extracted as figure numbers and roadmapped into figure inventory.
   Added unit tests (table_numeric_caption_is_not_a_figure_number,
   table_appendix_caption_marker_has_no_figure_number).

2. int block_id type mismatch in cross-page lookup
   CrossPageSettlementPass and PrimarySamePagePass compared block_id
   with === but deduped_legends use int keys while ResourceRef stores
   str.  Fixed by casting both to str.  Table continuation lookup
   missed page filter, picking wrong page's same block_id.  Added
   page filter + int_block_id tests.

3. Table appendix support gaps
   - Table prefix regex only accepted digits/roman, not 'TABLE A1'.
     Added [A-Z]\d+ token and strip-leading-alpha in parse.
   - _is_validation_first_table_candidate didn't cover figure_title
     raw_label blocks with table_caption_like style.  Added second
     gate.
   - _is_weak_explicit_table_caption only checked table_caption roles.
     Extended to include validation-first candidates.
   - Same-page tie-break didn't apply for weak-explicit captions.
     Ported _bare_table_tie_break into vnext pass.
   - figure_caption_candidate not excluded from note attachment.
   - Continuation merge stripped leading duplicate table marker.

M84CTEM9 vault verification: 6/6 figures matched (3 main + 3
appendix + assets), 4/4 tables (Table 1,2 + Table A1,A2 + assets),
0 false positives, 0 figure asset leakage.
2026-07-04 01:29:06 +08:00
..
dev fix: appendix numbering cross-cutting bugs (TABLE regex, int block_id, table alpha prefix, weak-caption tie-break) 2026-07-04 01:29:06 +08:00
bump.py feat(plugin): i18n descriptions for Skills/Memory/Vector + collapsible vector config 2026-05-14 00:40:33 +08:00
check_version_sync.py v1.4.17rc4 2026-05-09 17:05:07 +08:00
consistency_audit.py refactor(17-dead-code-precommit): remove delegation wrappers and dead code, run ruff cleanup 2026-04-27 17:40:47 +08:00
install-paperforge.ps1 feat: add paperforge setup CLI command, one-click install script, sync __version__ to 1.4.0, detect local version from pip metadata 2026-04-27 21:34:03 +08:00
setup.py chore: rename PaperForge Lite -> PaperForge across 27 files 2026-04-28 01:25:51 +08:00
sync-plugin-version.py fix: add root manifest.json to version bump/sync tooling 2026-05-06 23:03:38 +08:00
update-paperforge.ps1 fix: VaultStep.__init__ missing step_id and checker in super() call 2026-04-27 19:49:36 +08:00
validate_setup.py feat(48-textual-tui-removal): update CLI help and remove textual dependency 2026-05-07 19:41:51 +08:00
welcome.py fix: VaultStep.__init__ missing step_id and checker in super() call 2026-04-27 19:49:36 +08:00