- Add REQUIREMENTS-v1.2.md with 7 systematization requirements
- Add ROADMAP-v1.2.md with Phase 9-10 plan
- Update master ROADMAP.md with v1.2 phases
- Update MILESTONES.md marking v1.2 In Progress
- Architecture research from get-shit-done-main incorporated
- Archive milestone to .planning/milestones/v1.1.md with full stats:
- 110+ commits, 24 requirements (21 Complete, 3 Partial)
- Phase 6, 7, 8 accomplishments and test coverage
- Known limitations and v1.2 candidate roadmap
- Evolve PROJECT.md:
- Move sandbox audit items from Context to completed checklist
- Mark 'Use sandbox audit as v1.1 release gate' decision as Complete
- Add remaining BBT bare path normalization to Active
- Update Out of Scope with v1.1 deferrals
- Reorganize ROADMAP.md:
- Mark v1.1 phases as Done
- Add v1.2 candidate table
- Include all-time phase summary
Milestone v1.1 Sandbox Onboarding Hardening is complete.
- Wrap figure-map, chart-type-map, and scaffold generation in try/except
- Track written files for cleanup on failure
- Save original formal note content before modification
- On exception: delete partial files and restore original note
- Add test_prepare_rollback.py with 3 tests:
- figure-map failure triggers rollback
- scaffold failure triggers rollback
- success path leaves all files intact
- Fix zotero_key quote stripping in scan_deep_reading_queue
- Upgrade Agent script check from directory existence to actual importability
- Fix doctor env var check: prefer PADDLEOCR_API_TOKEN over old names
- Support per-domain JSON export validation (not just library.json)
- Remove blanket tests/ exclusion from .gitignore
Both variables were assigned inside the try block but used after it.
If the try block threw before assignment, validated_error would be unbound
when line 2909 referenced it with done_incomplete status.
Also initialized validated_status = None for consistency since it could
also be unset if the try block fails before assignment.
- Replace direct meta.get('ocr_status') read with validate_ocr_meta() call
in run_deep_reading() to properly validate OCR completion status
- Fixes bug where meta.json with ocr_status=done but missing files
incorrectly marked paper as ready for deep reading
- validate_ocr_meta() checks 7 conditions before returning 'done':
file existence, sizes, page markers, etc.
- done_incomplete status is correctly treated as blocked (not ready)
by existing blocked logic at line 2810
- Add regression test: test_smoke_deep_reading_done_incomplete_is_blocked
- Test pending->queued transition on job submission
- Test processing->done transition when polling returns success
- Test processing->error transition on API error response
- Test processing->blocked transition via HTTPError 401 (classify_error maps to blocked)
- Test sync_ocr_queue skips done/blocked items from existing queue
- Test cleanup_blocked_ocr_dirs removes empty dirs, preserves dirs with payload
- Test all 7 OCR states (pending, queued, running, done, error, blocked, nopdf) don't crash
Key: patch requests.post with side_effect=HTTPError 401 to trigger
classify_error path, since registry token is always present in test env.
- fixture_vault: creates complete vault structure with paperforge.json
- fixture_library_records: 3 minimal library-record .md files
- fixture_bbt_json: Better BibTeX JSON export in exports/
- fixture_with_pdf: vault with real temp PDF for PDF-resolver tests
- All use pathlib.Path, Windows-compatible
- Add 02-03-SUMMARY.md with execution summary and deviations
- Update STATE.md: mark 02-03 done, add decisions, update next action
- Update ROADMAP.md: mark 02-03 and 01-04 complete
- Convert ocr parser to sub-subcommands (run, doctor)
- Add _cmd_ocr_doctor() with formatted tiered report output
- Update dispatch logic to route ocr doctor subcommand
- Add CLI dispatch test for doctor command
- Update command/lp-ocr.md with doctor documentation
- Add paperforge_lite/ocr_diagnostics.py with tiered L1-L4 checks
- L1: token presence, L2: URL reachability, L3: API schema validation
- L4: optional live PDF round-trip test with polling
- Add 7 mocked unit tests for all levels
- Include blank.pdf test fixture
- load_config now tries paperforge_lite.config.load_vault_config first,
falls back to legacy JSON parsing for pre-01-03 installs
- resolve_vault_for_validate checks PAPERFORGE_VAULT before VAULT_PATH
before cwd (matching the shared resolver's precedence)
- Preserves all existing validation checks
- setup_wizard.py now copies the paperforge_lite/ package alongside
the worker and ld_deep scripts during deployment
- Two copy targets: <pf_path>/worker/paperforge_lite/ for
literature_pipeline.py and <skill_dir>/literature-qa/paperforge_lite/
for ld_deep.py
- Existing copy targets for literature_pipeline.py and ld_deep.py
remain unchanged
- Warning emitted if paperforge_lite source not found
- literature_pipeline: load_vault_config and pipeline_paths now
delegate to paperforge_lite.config, preserving public names
- ld_deep: _load_vault_config and _paperforge_paths now delegate
to shared resolver, preserving public names
- Both scripts require paperforge_lite package to be available
(via pip install or copied install in deployed vaults)
- Existing load_simple_env preserved for .env loading before dispatch
- Replace literature_pipeline.load_vault_config body with
paperforge_lite.config.load_vault_config wrapper
- Rebuild pipeline_paths() from shared paperforge_paths() plus
10 worker-only keys (pipeline, candidates, search_*, harvest_root,
records, review, config, queue, log, bridge_config*, index, ocr_queue)
- Replace ld_deep._load_vault_config and _paperforge_paths with
shared resolver wrappers returning ocr, records, literature
- Fix subprocess test to set PYTHONPATH so paperforge_lite is
importable when worker runs as a standalone script
- 34 tests pass (22 config + 8 worker compat + 4 ld_deep compat)
- Test literature_pipeline.load_vault_config matches paperforge_lite.config
- Test PAPERFORGE_SYSTEM_DIR env var override in worker
- Test pipeline_paths returns all 17 expected keys (shared + worker-only)
- Test ld_deep._load_vault_config and _paperforge_paths match shared resolver
- Test direct worker status subprocess smoke test (CMD-02)
- Tests fail against current code: worker has 5 config keys vs shared's 7,
env overrides not implemented, and pipeline_paths lacks shared resolver keys
- Tests main() with --vault vault paths --json emits valid JSON with vault, worker_script, ld_deep_script keys
- Tests main() with --vault vault paths emits text paths without unresolved <system_dir> or <resources_dir> tokens
- Tests ocr and ocr run both dispatch to run_ocr
- Tests status/selection-sync/index-refresh/deep-reading each dispatch to correct worker
- Uses monkeypatch to isolate from real workers and filesystem