refactor(24-01): polish asset_state docstrings and edge cases

- Fix note_health to use ternary expression (ruff SIM108)
- All docstrings describe inputs, outputs, and derivation rules
- Module-level docstring lists all four exports
- All 26 tests pass, ruff: All checks passed
This commit is contained in:
Research Assistant 2026-05-04 10:36:22 +08:00
parent 5f99a6c92e
commit 2ab79283d8

View file

@ -91,10 +91,11 @@ def compute_health(entry: dict) -> dict[str, str]:
ocr_health = ocr_messages.get(ocr_status, "OCR pending: run `paperforge ocr`")
# Note health
if not note_path:
note_health = "Formal note missing: run `paperforge sync` to regenerate"
else:
note_health = "healthy"
note_health = (
"Formal note missing: run `paperforge sync` to regenerate"
if not note_path
else "healthy"
)
# Asset health — check all four workspace paths
workspace_paths = {