Commit Graph
5 Commits
Author SHA1 Message Date
google-labs-jules[bot]andPR0M3TH3AN e9a0c12d02 fix(ci): resolve lint error and broken import in tests
- Remove unused `randomInt` import in `src/lock-publisher.mjs`.
- Fix broken import path for `withTimeout` in `src/relay-health.mjs` (from `./utils.mjs` to `./lock-utils.mjs`).
- Verify fix with `npm test` and `npm run lint`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-25 16:19:30 +00:00
google-labs-jules[bot]andPR0M3TH3AN eefab43fdf fix(lock-utils): consolidate function declarations and fix CI failures
- Imported `randomInt` from `node:crypto` in `src/lock-publisher.mjs` to fix CI failure.
- Centralized `withTimeout` and `mergeRelayList` in `src/utils.mjs`.
- Updated `src/lock-utils.mjs` to re-export them.
- Removed local redefinitions in `src/lock-ops.mjs` and `src/lock-publisher.mjs`.
- Fixed `test/utils.test.mjs` imports.
- Verified all tests pass.

This resolves the N/A documentation task by ensuring the codebase is in a valid state.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-21 19:32:26 +00:00
google-labs-jules[bot]andPR0M3TH3AN 764bd9eb46 test(cli): add unit tests for cmdRollback
Refactor cmdRollback to support dependency injection and add comprehensive unit tests covering validation, version listing, and rollback operations.

- Refactor `src/cmd-rollback.mjs` to accept `deps` argument.
- Create `test/cmd-rollback.test.mjs` with test cases for happy paths and error conditions.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-21 18:33:09 +00:00
google-labs-jules[bot]andPR0M3TH3AN 12625bc41b Cleanup repo structure and consolidate tests
- Consolidated `tests/` into `test/`
- Moved `test-audit/` scripts to `scripts/test-audit/`
- Updated audit scripts to support configurable output directory
- Removed root clutter (`test_output.txt`)
- Updated documentation and agent prompts

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 20:49:19 +00:00
google-labs-jules[bot]andPR0M3TH3AN 6614535361 perf: optimize rankRelays for subset queries
- Optimized `RelayHealthManager.rankRelays` to use O(M log M) lookup for small subsets instead of O(N) filter.
- Added `byRelay` Map to `_sortedCache` for O(1) access.
- Fixed `NaN` bug in `buildRelayHealthConfig` when `minActiveRelayPool` is undefined.
- Updated `perf/benchmark-lock-ops.mjs` to measure subset performance.
- Added performance report `reports/performance/weekly-perf-report-2026-02-18.md`.
- Achieved ~6.8x speedup in benchmark.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 19:54:47 +00:00