Research Assistant
37768d15be
feat: add ocr_redo frontmatter field + sync preservation
2026-06-01 11:23:32 +08:00
Research Assistant
07d032e420
feat: preserve user tags during sync
2026-05-31 20:01:16 +08:00
Research Assistant
49a8c307c1
test: cover preserved frontmatter tags
2026-05-31 19:52:37 +08:00
Research Assistant
19c28a8b91
chore: commit session work before hotfix switch
2026-05-18 22:47:30 +08:00
Research Assistant
80d76e6ac2
feat(frontmatter): add citation_key field and alias from BBT citationKey
2026-05-12 18:28:53 +08:00
Research Assistant
a5dd71bb13
fix(sync): freeze workspace slug + frontmatter-only update to prevent deep-reading data loss
...
- Slug freeze: reuse existing workspace dir when title slug changes in Zotero
- Frontmatter-only: for existing notes, replace only YAML block, never touch body
- extract_preserved_deep_reading: match both ##精读 and ##🔍 精读 + skip placeholder-only sections
2026-05-10 22:31:16 +08:00
Research Assistant
64e73067fb
style: ruff format pass across paperforge/
2026-05-09 22:31:08 +08:00
Research Assistant
a30ffd3835
refactor: eliminate frontmatter regex duplication — route everything through adapter
...
- adapters/obsidian_frontmatter: +read_frontmatter_bool(note_path, key) public API
- asset_index: delete private _read_frontmatter_bool/_optional copies, import from adapter
- sync_service cleanup methods: raw regex → read_frontmatter_dict()
- ld_deep: fix private worker import → adapter
- config.py paperforge_paths: +config and index keys (domain-collections, formal-library)
- sync_service.run(): pipeline_paths → self.resolve_paths()
2026-05-09 22:30:59 +08:00
Research Assistant
05629bce82
refactor: v2.1 contract hardening — PFResult unification, ErrorCode expansion, adapter cleanup, SyncService orchestration
...
Core contract:
- ErrorCode: 8→26 with _missing_() graceful degradation for unknown codes
- PFResult: +warnings/next_actions, PFError: +suggestions
- OcrStatus: 4→9 granular states (NONE/QUEUED/BLOCKED/NO_PDF/DONE_INCOMPLETE restored 1:1)
- field_registry.yaml: +owner/deprecated/replacement/enum values/default
Adapter cleanup:
- new core/io.py (read_json/write_json), core/date_utils.py (extract_year)
- new adapters/collections.py (build_collection_lookup)
- adapters/bbt.py: cut worker dependency, _private→public+alias
- worker/_utils.py + _domain.py: re-export from core instead of duplicate defs
Command unification:
- All 6 commands (sync/status/ocr/deep/repair/dashboard) → PFResult
- cli.py --json dest unified to 'json' (was json_output on status/doctor)
- commands/sync.py → SyncService (no more int/dict/PFResult mixing)
Service hardening:
- SyncService.run() orchestrates full sync lifecycle (select→index→clean)
- cleanup loops (orphaned records, flat notes) migrated from worker
- worker/sync.py: freeze line + services→worker one-way dependency
- plugin/main.js: formal-library.json fallback deprecation warning
Verification: 181/181 tests, 0 new lint errors
2026-05-09 22:20:07 +08:00
Research Assistant
e4452ba253
fix: cross-platform issues in bbt path normalization + e2e doctor test
...
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
2026-05-09 18:23:10 +08:00
Research Assistant
bbd39a90d3
v1.4.17rc4
...
Milestone v2.1: Contract-Driven Architecture & Engineering Hardening
- Stop the Bleeding: version sync checker, PyYAML hardening, install docs unification
- Contract Layer: PFResult/PFError dataclasses, ErrorCode enum, --json wrapping
- Service Extraction: sync.py decomposed into 3 adapters + SyncService
- State Machine: PdfStatus/OcrStatus/Lifecycle enums, transitions, field registry
- Setup Modularization: setup_wizard.py decomposed into 6 classes
173 tests passing, 0 regressions.
2026-05-09 17:05:07 +08:00