Commit Graph
6 Commits
Author SHA1 Message Date
Claude 639ad6877d chore: code quality, CI/CD, and DX improvements
Phase 3 — Code Quality:
- Deduplicate nowUnix() in lock-ops.mjs (import from utils.mjs)
- Promote ESLint no-unused-vars to error, fix all 46 violations
- Remove dead code: unused imports, variables, and catch bindings
- Add /* global marked */ for CDN-loaded library in dashboard

Phase 4 — CI/CD:
- Add Node.js version matrix (22, 23) to CI workflow
- Add npm audit security scan step to CI
- Add innerHTML usage check to CI pipeline
- Enable Dependabot for npm and GitHub Actions dependencies
- Create PR template

Phase 5 — Developer Experience:
- Create .env.example documenting all environment variables
- Expand CONTRIBUTING.md with commit conventions, agent/prompt
  creation guide, architecture overview, and test integrity
- Add system architecture diagram with Mermaid (docs/architecture/)

https://claude.ai/code/session_01GfwUNbgeMgXreFDbsNQMsS
2026-02-19 21:03:30 +00:00
google-labs-jules[bot]andPR0M3TH3AN 1d4097483c Fix race condition in cmdLock sort order
- Add deterministic tie-breaker (eventId) for lock events with identical timestamps in `src/lib.mjs`.
- Add regression tests in `test/lib.test.mjs` verifying win/loss conditions.
- Create weekly race condition report and run artifacts.
- Mark `race-condition-agent` task as completed.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-15 15:31:28 +00:00
thePR0M3TH3AN cfe7e9ec8e Merge pull request #84 from PR0M3TH3AN/torch-lock-completion-6824629536982484145
feat: add torch-lock complete command for persistent history
2026-02-14 13:52:44 -05:00
google-labs-jules[bot]andPR0M3TH3AN 7a8bab4b1b I have implemented 'torch-lock complete' for persistent task history. This involved adding cmdComplete to src/lib.mjs to handle permanent completion events, updating cmdLock to prevent locking completed tasks, modifying cmdList to show 'done' status, exposing the command in the CLI, and adding the necessary unit tests.
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 18:46:04 +00:00
google-labs-jules[bot]andPR0M3TH3AN 433b81d2d3 feat: implement scheduler ratcheting by excluding completed tasks
- 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]>
2026-02-14 18:29:20 +00:00
google-labs-jules[bot]andPR0M3TH3AN 9eda853e7e feat: add unit tests for src/lib.mjs via dependency injection
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]>
2026-02-14 14:23:03 +00:00