SOW-0173: Rust Registry resolves relative watch directories
KT
12h ago+623+623+012345678901234567890123456789-184-184-012345678901234567890123456789
Summary
Registry::watch_directoryandunwatch_directorymake a relative directory absolute once, lexically (std::path::absolute), so journal files under it are registered and notify events for it are applied. Before, every file was skipped and the call returnedOkwith zero files.- Absolute input is used unchanged, so existing callers see identical keys and paths.
- New integration test drives the real notify watcher: relative watch, create event, unwatch. It fails without the fix.
- SOW-0174 tracks a pre-existing issue found while validating: unwatch leaves files registered when the watch string has a trailing slash or names a machine-id directory directly.
Stacked on #23 (SOW-0172).
Validation
cargo test --workspace: 685 passed, 0 failed.cargo clippy -p systemd-journal-sdk-registry --all-targets: no warnings in changed lines..agents/sow/audit.sh: clean.
Summary by cubic
Registry::watch_directory and unwatch_directory now resolve a relative directory once, lexically, so journal files under it are registered and notify events for it are applied. Previously every file was skipped and the call returned Ok with zero files; absolute input is used unchanged and an empty directory is now refused with an error.
- Adds a Unix-only integration test that drives the real
notifywatcher: relative watch, create, rename and remove events, unwatch. It fails without the fix. - Validation: 685 workspace tests pass, clippy clean on changed lines, rustfmt and SOW audit clean.
- Tracks a pre-existing issue as SOW-0174: unwatch leaves files registered when the watch string has a trailing slash or names a machine-id directory directly.