Commit Graph
8 Commits
Author SHA1 Message Date
google-labs-jules[bot]andPR0M3TH3AN c0c5ac5473 fix(torch-lock): re-apply fixes for circular deps and syntax errors
- Moved `withTimeout` implementation to `src/lock-utils.mjs` and exported it correctly.
- Removed duplicate local definitions of `withTimeout`, `mergeRelayList`, and `secureRandom` in `src/lock-ops.mjs` and `src/lock-publisher.mjs`.
- Fixed imports in `src/lock-ops.mjs`, `src/lock-publisher.mjs`, and `src/relay-health.mjs` to use `src/lock-utils.mjs` consistently.
- Updated `test/utils.test.mjs` and `test/utils-async.test.mjs` to fix broken imports and test definitions.
- Verified `npm run lock:complete` and `npm run scheduler:daily` execute correctly.
- Updated `src/todo/TODO_2026-02-20T03-00-00Z.md` to mark verification task as completed.
- Verified `src/relay-health.mjs` does not use `MINUTE_MS` locally, despite mysterious CI error. Confirmed imports are correct.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-21 19:23:48 +00:00
google-labs-jules[bot]andPR0M3TH3AN 481d77f33c Refactor lock publisher to use shared error classifier and utils
- Extracted `LockPublisher` and `publishLock` to `src/lock-publisher.mjs` (already existed, but cleaned up).
- Refactored `src/lock-publisher.mjs` to import error constants and classification logic from `src/lock-error-classifier.mjs` instead of duplicating them.
- Refactored `src/lock-publisher.mjs` and `src/lock-utils.mjs` to use `mergeRelayList` from `src/utils.mjs`.
- Consolidated and moved publisher tests from `test/lock-ops.test.mjs` and `test/lock-ops-publish-retry.test.mjs` to `test/lock-publisher.test.mjs`.
- Cleaned up `src/lock-utils.mjs` to remove duplicate `mergeRelayList`.
- Verified changes with tests.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-21 18:34:18 +00:00
google-labs-jules[bot]andPR0M3TH3AN 9d0d7d274e chore: test integrity enforcement and dashboard security fix
- Refactored `test/memory-scheduler.test.mjs` to use `mock.timers` for deterministic execution, replacing flaky `wait` logic.
- Strengthened `test/lock-ops.test.mjs` with edge case tests for `parseLockEvent` handling invalid JSON and missing fields.
- Fixed a security vulnerability in `src/dashboard.mjs` where sensitive configuration (e.g., rosters, auth) was exposed in `/torch-config.json`.
- Updated `src/prompts/daily/test-audit-agent.md` to comply with the canonical prompt contract.
- Added `reports/test-audit/test-integrity-note-2025-02-14.yaml` detailing test changes and anti-cheat measures.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 19:33:29 +00:00
thePR0M3TH3AN 46198a500e Improve lock publish diagnostics and scheduler failure summaries 2026-02-14 19:30:00 -05:00
thePR0M3TH3AN 57ba0fe4f4 Improve lock relay health ranking and quarantine handling 2026-02-14 19:15:31 -05:00
thePR0M3TH3AN f22bcfb713 Add bounded retry logic for lock publish quorum 2026-02-14 19:08:53 -05:00
thePR0M3TH3AN 84d3e7eded Harden lock backend config validation and fallback behavior 2026-02-14 18:48:21 -05:00
google-labs-jules[bot]andPR0M3TH3AN f931b44732 test: add unit tests for parseLockEvent
Adds comprehensive unit tests for `parseLockEvent` in `src/lock-ops.mjs` (exported via `src/lib.mjs`).
Tests cover:
- Valid event parsing
- Missing d-tag
- Missing expiration tag
- Malformed JSON content
- Non-object JSON content
- Partial JSON content

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:16:27 +00:00