Problem
LogseqGraphWatcher closure calls graph._resolved_path_is_tracked_markdown(path) — a private method on the entity/use-case boundary. External adapter code (watchdog handler) reaches through the abstraction.
Clean Architecture lens
| Aspect |
Assessment |
| Ring |
Use Case (LogseqGraph + watcher adapter) |
| SOLID |
DIP / ISP — watchers should depend on a narrow public protocol, not _-prefixed internals |
| Uncle Bob |
Boundaries: keep framework details (watchdog) outside; graph exposes intent-revealing API |
Proposed Solution
def is_tracked_markdown_path(self, path: Path) -> bool:
"""Return True if ``path`` is a pages/ or journals/ markdown file in this graph."""
return self._resolved_path_is_tracked_markdown(path)
- Watcher uses public method only
- Unit test in
tests/test_graph.py (watcher ignore vs accept paths)
Out of scope
- Rewriting watcher debounce logic
Definition of Done
- No private graph calls from
LogseqGraphWatcher
make all passes
Problem
LogseqGraphWatcherclosure callsgraph._resolved_path_is_tracked_markdown(path)— a private method on the entity/use-case boundary. External adapter code (watchdog handler) reaches through the abstraction.Clean Architecture lens
LogseqGraph+ watcher adapter)_-prefixed internalsProposed Solution
tests/test_graph.py(watcher ignore vs accept paths)Out of scope
Definition of Done
LogseqGraphWatchermake allpasses