Commit Graph
6 Commits
Author SHA1 Message Date
thePR0M3TH3AN 600c078cd3 Prefer parent torch-config in host-repo torch subdir 2026-02-25 15:04:02 -05:00
google-labs-jules[bot]andPR0M3TH3AN 50b0cf5a07 perf: Refactor config loading to be non-blocking async
Replaces synchronous `fs.readFileSync` with `fs.promises.readFile` in `loadTorchConfig` to prevent event loop blocking.
Updates all dependent configuration getters and consumers to use async/await.
Includes benchmark proving non-blocking behavior.
Fixes dashboard tests to properly await server listening.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-17 19:02:46 +00:00
thePR0M3TH3AN 57ba0fe4f4 Improve lock relay health ranking and quarantine handling 2026-02-14 19:15:31 -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 56694d14d2 Verify hardcoded relays are moved and add regression tests
- Verified that `src/lib.mjs` no longer contains hardcoded relay URLs.
- Confirmed `DEFAULT_RELAYS` are defined in `src/constants.mjs` and used in `src/torch-config.mjs`.
- Added regression tests in `test/torch-config.test.mjs` to ensure `getRelays()` correctly falls back to `DEFAULT_RELAYS` and prioritizes environment variables.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:13:43 +00:00
google-labs-jules[bot]andPR0M3TH3AN 647724bd5b 🧪 Add unit tests for src/torch-config.mjs and refactor for testability
- Extract parseTorchConfig for better isolation in tests.
- Add _resetTorchConfigCache for deterministic unit testing.
- Implement comprehensive tests in test/torch-config.test.mjs covering:
  - Path resolution with env var support.
  - Normalization of cadence and status.
  - Roster parsing and filtering.
  - Error handling for malformed config files.
  - Caching behavior.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 13:11:46 +00:00