- test OCR state machine: isolate runtime (no ambient tokens), fix retry exhaustion and full cycle tests
- test migration: verify no-index flat note migration, legacy flag promotion including false overrides
- test migration: verify non-canonical filename migration via frontmatter title
- test migration: verify already-migrated workspace reconciliation from legacy records
- test asset_index: verify fulltext/deep-reading paths only advertised when files exist
- Replaced 5 bare except Exception: pass blocks with logger.warning() calls
(4 per plan at lines 223, 306, 347, 355 + 1 auto-detected at line 315 via Rule 2)
- Added else clause printing [WARNING] for unhandled --fix divergence types
- Added 6 new tests: 4 caplog tests for logger.warning, 1 capsys test for [WARNING],
1 index load failure test
- All 37 repair tests pass
- Removed dead import of load_domain_config and orphaned dict comprehension
- Replaced note_ocr_status != pending guard with combined logic catching note=pending vs meta=done/failed
- Added 5 new tests (3 for condition 4 detection, 2 for dead code verification)
- Replace CST (UTC+8) with UTC timezone using timezone.utc
- Add _escape_md() helper to escape markdown special chars in QA fields
- Wrap JSON+MD read-modify-write in filelock.FileLock with 10s timeout
- Add 5 new tests: UTC timestamp, MD escaping, CJK escaping, lock release, lock timeout
- Removed 'records' from expected keys in test_paperforge_paths_returns_expected_keys
- Removed 'records' assertion in test_paperforge_paths_values_match_shared_resolver
- Updated docstrings to reflect that _paperforge_paths no longer returns records key
- PATH-03: Fix env var name from paperforgeRATURE_DIR to PAPERFORGE_LITERATURE_DIR
- PATH-02: library_records now returns control / 'library-records' matching its docstring
- PATH-04: Add skill_dir and command_dir to CONFIG_PATH_KEYS for migration coverage
- Update test_config.py assertion to use corrected env var name
- run_status() reads canonical index via summarize_index() for lifecycle,
health, and maturity aggregates; falls back to filesystem when index missing
- JSON output includes lifecycle_level_counts, health_aggregate,
maturity_distribution (or None when falling back)
- Text output shows lifecycle and health lines when index is present
- run_doctor() shows Index Health section with PDF/OCR/Note/Asset Health
counts and status per dimension
- Brownfield detection: legacy schema, old Base templates, partial OCR assets
- Fixed status_tag mapping to support 'info' status (existing bug)
- 6 new tests covering index-backed JSON output, fallback, text output,
Index Health with/without index, and mixed health counts
Phase 25-01, Tasks 2+3
- Add build_index() call at end of run_repair() when fix=True or fix_paths=True
- Add 'rebuilt' key to result dict initialization
- Add user-facing messages about repair completion and recovery path (MIG-04)
- Lazy import inside conditional block to avoid circular dependency
- Add tests: build_index called after fix, not called during dry-run,
rebuilt in result, error fallback on build_index failure
- Replace has_pdf/do_ocr/analyze/ocr_status columns with lifecycle/maturity_level/next_step
- Update filters to use lifecycle states instead of raw status combinations
- Add sort by lifecycle ascending to all views
- Update PROPERTIES_YAML and _build_base_yaml properties
- Add sort YAML rendering in _render_views_section and merge_base_views
- Update existing filter tests to match lifecycle semantics
- Add tests: lifecycle columns, removed old columns, lifecycle filters, sort, properties
- New function summarize_index() reads canonical index and returns lifecycle,
health, and maturity aggregates
- Returns None for missing or legacy bare-list index
- 4 new tests: aggregates, missing, legacy format, empty items
Phase 25-01, Task 1
- Add TestDerivedStateFields class with 6 test methods
- Verify lifecycle/health/maturity/next_step present after full build
- Verify same fields present after incremental refresh
- Verify lifecycle is a valid state string
- Verify health dict has four dimension keys
- Verify maturity structure (level, level_name, checks, blocking)
- Verify next_step is a valid action string
- Class TestComputeLifecycle: 8 tests covering indexed, pdf_ready, fulltext_ready, deep_read_done, ai_context_ready states
- Class TestComputeHealth: 4 tests covering all four health dimensions
- Class TestComputeMaturity: 6 tests covering levels 1-6 with blocking indicators
- Class TestComputeNextStep: 8 tests covering sync, ocr, /pf-deep, ready recommendations
- All 26 tests fail with ModuleNotFoundError (module not yet created)
- Add import shutil to config.py
- Add CONFIG_PATH_KEYS tuple for legacy top-level path keys
- Add migrate_paperforge_json() function with gap-fill logic
- Backs up original as paperforge.json.bak before writing
- Idempotent: no-op for already-migrated files
- Non-path top-level keys (version, agent_platform) survive migration
- DEFAULT_CONFIG must contain schema_version: '2'
- CONFIG_KEYS must include schema_version
- get_paperforge_schema_version() defaults to 1 when key absent
- get_paperforge_schema_version() reads explicit value
- load_vault_config() excludes schema_version from output