Refactored deploy_skills service creates a single literature-qa skill dir
instead of individual pf-deep/pf-paper/etc. Update all 4 agent
platform tests to check for literature-qa instead of old names.
headless_setup Phase 7 used imported_skills which was removed during
skill_deploy refactor. Use skill_result['skill_deployed'] instead.
Also update bootstrap test that asserted old command_files string.
Setup wizard no longer defines AGENT_CONFIGS; the refactored
skill_deploy.py exports AGENT_SKILL_DIRS instead. Update
test imports and assertions accordingly.
- ensure_base_views now only creates files on first run; subsequent calls
only update folder filter, leaving views untouched
- merge_base_views gains width preservation for PF views (backup safety)
- Removed deprecated control_dir from test_setup_wizard (5 cases)
- Fixed NoneType stdout in test_doctor_runs
- Added paperforge status reference to README
Obsidian handles view data from frontmatter changes automatically;
PaperForge should not regenerate views on every sync.
bbt.py _normalize_attachment_path: check Windows drive letter (D:) pattern on Linux
- Path('D:/...').is_absolute() returns False on Linux — treat paths with UPPER: as absolute
- Fixes test_absolute_windows_path failing on Ubuntu CI
test_e2e_cli: guard against None doctor stdout in test_full_pipeline_consistency
- Same CI environment issue as test_doctor_outputs_verdict — skip on empty output
test_ocr_preflight: patch os.environ to provide PADDLEOCR_API_TOKEN
- run_ocr() checks token before fitz.open() — CI has no token → never reaches mock
- Now patches os.environ in both test_valid_pdf_proceeds + test_junction_path_resolved
test_e2e_cli: skip test_doctor_outputs_verdict when doctor produces no stdout
- On Windows CI, sandbox subprocess produces empty output — environment issue, not code bug
test_ocr_preflight: mock fitz.open (not builtins.open) + set needs_sanitize=True
- Code uses fitz.open(), not builtins.open() — mock was targeting wrong function
- fitz.open() only called when meta.needs_sanitize is true — mock returned {} which skipped it
- These tests were always broken but CI never ran before v2.1
test_e2e_cli: guard against None stdout in doctor_verdict test on Windows CI
L3 runtime.test.mjs: use platform-agnostic path matching
- path.join produces / on Linux but \\\\ on Windows — test used \\\\ only
Updates all tests that assert on status --json output to read from PFResult envelope.
Code was intentionally changed in Phase 57 to wrap JSON output in PFResult {ok, command, version, data, error}. Tests must validate the new contract shape, not the old flat dict format.
- 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