- Update `torch-lock check` to scan `task-logs/<cadence>` for completed tasks.
- Add `--log-dir` and `--ignore-logs` flags to `check` command.
- Implement `getIsoWeekStr` utility for robust weekly cadence checking.
- Ensure completed agents are added to the `excluded` list, enabling the scheduler to skip them.
- Add comprehensive tests for log checking and date utilities.
Co-authored-by: PR0M3TH3AN <[email protected]>
Refactor src/lib.mjs to support dependency injection for cmdCheck, cmdLock, and cmdList.
This allows unit testing without heavy mocking frameworks or side effects.
Add test/lib.test.mjs covering:
- cmdCheck: happy path, paused/excluded agents, unknown agents.
- cmdLock: success, roster check, existing lock check, race check (lost), dry run.
- cmdList: listing locks, empty state.
Coverage for src/lib.mjs is now significantly improved.
Verification: Ran `npm test` and verified all tests pass.
Co-authored-by: PR0M3TH3AN <[email protected]>