Commit Graph
167 Commits
Author SHA1 Message Date
thePR0M3TH3AN ec31a64736 Merge pull request #62 from PR0M3TH3AN/perf-async-dashboard-io-5891481615082085195
⚡ Replace Blocking Sync I/O in HTTP Request Handler
2026-02-14 12:12:16 -05:00
thePR0M3TH3AN 0088946376 Merge pull request #67 from PR0M3TH3AN/refactor/valid-cadences-7741695179358615025
Refactor src/lib.mjs to use VALID_CADENCES constant
2026-02-14 12:12:09 -05:00
thePR0M3TH3AN d46aa0b449 Merge branch 'main' into refactor/valid-cadences-7741695179358615025 2026-02-14 12:12:02 -05:00
thePR0M3TH3AN e15ba3fe42 Merge pull request #71 from PR0M3TH3AN/refactor/constants-kind-app-data-17267465416565685977
Refactor magic number 30078 to KIND_APP_DATA constant
2026-02-14 12:11:50 -05:00
thePR0M3TH3AN 35c14eca71 Merge pull request #74 from PR0M3TH3AN/unit-tests-lib-mjs-1840636568505209047
🧪 Add unit tests for src/lib.mjs
2026-02-14 12:11:07 -05:00
thePR0M3TH3AN 716b28fddc Merge branch 'main' into unit-tests-lib-mjs-1840636568505209047 2026-02-14 12:10:58 -05:00
thePR0M3TH3AN bcea60fbee Merge pull request #76 from PR0M3TH3AN/perf-optimize-lock-filtering-15960706450530800656
⚡ Optimize lock filtering with Set lookups
2026-02-14 12:10:36 -05:00
thePR0M3TH3AN cc1df8d304 Merge pull request #61 from PR0M3TH3AN/fix-empty-catch-blocks-17156965692183891029
🧹 improve observability by adding console.debug to empty catch blocks
2026-02-14 12:07:34 -05:00
thePR0M3TH3AN 6e2d15941f Merge pull request #60 from PR0M3TH3AN/fix-dashboard-binding-9664858879592007216
🔒 security: bind dashboard server to 127.0.0.1
2026-02-14 12:06:48 -05:00
thePR0M3TH3AN 279e39273b Merge branch 'main' into fix-dashboard-binding-9664858879592007216 2026-02-14 12:06:13 -05:00
thePR0M3TH3AN ef2af6f28e Merge pull request #70 from PR0M3TH3AN/testing/parse-lock-event-6215348514963372273
🧪 Add unit tests for parseLockEvent
2026-02-14 09:32:35 -05:00
thePR0M3TH3AN 6f7098fcbb Merge pull request #65 from PR0M3TH3AN/refactor/redundant-check-ops-8051921680686035210
Refactor ensureDir to remove redundant existence check
2026-02-14 09:32:03 -05:00
thePR0M3TH3AN 8cecca45c1 Merge pull request #66 from PR0M3TH3AN/jules/test-loadTorchConfig-1622753030930324974
🧪 Add unit tests for loadTorchConfig with dependency injection
2026-02-14 09:31:29 -05:00
thePR0M3TH3AN 47763bd123 Merge pull request #69 from PR0M3TH3AN/refactor/configurable-exclusions-982175267044475659
Refactor check scripts to support configurable exclusions
2026-02-14 09:30:56 -05:00
thePR0M3TH3AN 3ba727ec37 Merge pull request #64 from PR0M3TH3AN/refactor/verify-hardcoded-relays-6138275059730299152
🧹 Verify and test relay configuration logic
2026-02-14 09:30:31 -05:00
thePR0M3TH3AN 2b3ab0b25b Merge pull request #72 from PR0M3TH3AN/perf-dashboard-async-io-14696213848673958258
⚡ Optimize dashboard static file serving with async I/O
2026-02-14 09:29:41 -05:00
thePR0M3TH3AN a8f5560f66 Merge pull request #63 from PR0M3TH3AN/refactor/remove-async-ops-8265010904332540873
🧹 Refactor cmdInit and cmdUpdate to be synchronous
2026-02-14 09:29:17 -05:00
thePR0M3TH3AN 4c15736b99 Merge pull request #75 from PR0M3TH3AN/perf/torch-timeout-fix-10089523949735471707
perf(torch): fix 15s delay in lock queries by clearing timeout
2026-02-14 09:28:57 -05:00
thePR0M3TH3AN 832c0c5273 Merge pull request #68 from PR0M3TH3AN/agents/daily/decompose-lib-16890511323530322542
Decompose src/lib.mjs
2026-02-14 09:28:30 -05:00
google-labs-jules[bot]andPR0M3TH3AN 0a7f64d1dc Refactor lock filtering to use Set lookups instead of linear scans
Optimized `cmdCheck` and `cmdList` in `src/lib.mjs` by replacing O(N*M) linear scans with O(N) Set lookups.
- Introduced `rosterSet` and `excludedAgentsSet` to replace `Array.includes()` calls with `Set.has()`.
- Benchmark showed ~99% performance improvement (from ~280ms to ~2ms for 10k agents and 2k locks).
- Verified with existing tests and custom benchmark.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:26:25 +00:00
google-labs-jules[bot]andPR0M3TH3AN af9b7e8f42 perf(torch): fix 15s delay in lock queries by clearing timeout
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:25:09 +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
google-labs-jules[bot]andPR0M3TH3AN cd7b19ead7 Optimize dashboard static file serving with async I/O
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:16:52 +00:00
google-labs-jules[bot]andPR0M3TH3AN 02e96d49be Refactor magic number 30078 to KIND_APP_DATA constant
- Added KIND_APP_DATA to src/constants.mjs
- Updated src/lib.mjs, src/lock-ops.mjs, and dashboard/index.html to use the constant
- Added missing src files to package.json files list
- Updated build.mjs to copy src/constants.mjs to dist/src/

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:16:44 +00: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
google-labs-jules[bot]andPR0M3TH3AN 6fdc092441 refactor: make exclusions in check scripts configurable
Refactor `scripts/check-file-size.mjs` and `scripts/check-innerhtml.mjs` to use `node:util.parseArgs` for parsing command-line arguments. This allows users to configure directory and file exclusions via `--exclude-dir`, `--exclude-file`, and `--no-defaults`, instead of relying on hardcoded lists.

This change improves versatility while maintaining backward compatibility by keeping the original hardcoded lists as defaults. It also adds support for `--max-lines` in `check-file-size.mjs` and `--help` in both scripts.

Verification:
- Manually verified that both scripts respect the new flags and defaults.
- Confirmed that `--report` mode still works as expected.
- Confirmed that unknown flags (like `--update`) are safely ignored (due to `strict: false`).

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:16:23 +00:00
google-labs-jules[bot]andPR0M3TH3AN fdfbb39da6 Decompose src/lib.mjs
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:16:01 +00:00
google-labs-jules[bot]andPR0M3TH3AN c94ff84da8 Refactor src/lib.mjs to use VALID_CADENCES constant
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:15:55 +00:00
google-labs-jules[bot]andPR0M3TH3AN 3a48c76a6c Add unit tests for loadTorchConfig with dependency injection
Refactored `loadTorchConfig` to support dependency injection for `fs`, enabling true unit tests without disk I/O. Added comprehensive unit tests in `test/torch-config-unit.test.mjs`.

- Refactored `loadTorchConfig` to accept optional `fileSystem` argument.
- Created `test/torch-config-unit.test.mjs` with mocked fs tests.
- Verified existing tests pass.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:15:08 +00:00
google-labs-jules[bot]andPR0M3TH3AN 758d3c3c56 Refactor ensureDir to remove redundant existence check
- Remove explicit `fs.existsSync` check in `ensureDir`.
- Rely on `fs.mkdirSync(dir, { recursive: true })` idempotency.
- Verified with existing tests in `test/ops.test.mjs`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:13:58 +00: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 eee6dfa09f Refactor cmdInit and cmdUpdate to be synchronous
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:12:20 +00:00
thePR0M3TH3AN 695adb6dc9 Merge pull request #59 from PR0M3TH3AN/add-prompt-maintenance-agent-1170306418559251314
Add prompt-maintenance-agent and clean up obsolete agents
2026-02-14 08:57:33 -05:00
google-labs-jules[bot]andPR0M3TH3AN b044570f72 ⚡ optimize: replace blocking sync I/O in dashboard request handler
Converted the dashboard HTTP request handler to an async function and replaced synchronous `fs.existsSync` and `fs.statSync` calls with non-blocking `fs.promises.stat`. This improves server responsiveness and concurrency by ensuring the event loop is not blocked during file system checks.

Also added robust error handling to the asynchronous handler to prevent unhandled promise rejections and ensure consistent 500 responses on internal errors.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 13:56:15 +00:00
google-labs-jules[bot]andPR0M3TH3AN 983ad0627b 🧹 improve observability by adding console.debug to empty catch blocks
Replaced empty catch blocks in `loadCanonicalRoster` and `parseLockEvent`
with `console.debug` statements that log the error message. This
improves observability of failures while maintaining the graceful
fallback behavior.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 13:55:21 +00:00
google-labs-jules[bot]andPR0M3TH3AN c275b452be security: bind dashboard server to 127.0.0.1
Explicitly bind the dashboard server to the local loopback interface
to prevent external access. This addresses a vulnerability where
the server was binding to all network interfaces by default.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 13:52:27 +00:00
thePR0M3TH3AN e67d8441a4 Merge pull request #58 from PR0M3TH3AN/agents/daily/decompose-agent-v1-14520720754219938139
[decompose] Extract modules from src/lib.mjs
2026-02-14 08:51:26 -05:00
thePR0M3TH3AN 23ad1adafb Merge pull request #57 from PR0M3TH3AN/agents/weekly/perf-deepdive-agent-11478179249338404241
perf: parallelize daily/weekly lock queries in list command
2026-02-14 08:51:08 -05:00
google-labs-jules[bot]andPR0M3TH3AN c63a4d6ea9 feat: add prompt-maintenance-agent and remove obsolete agents
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 13:25:56 +00:00
google-labs-jules[bot]andPR0M3TH3AN 581dc3484e [decompose] extract modules from src/lib.mjs
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 13:18:07 +00:00
google-labs-jules[bot]andPR0M3TH3AN 9716fe3812 perf: parallelize daily/weekly lock queries in list command
- Modified `src/lib.mjs` to execute `queryLocks` for all cadences in parallel.
- Added `scripts/perf-benchmark.mjs` for measuring CLI performance.
- Added `weekly-perf-report-2026-02-14.md` with baseline and verification data.
- Added `task-logs/weekly/2026-02-14T13-14-38Z__perf-deepdive-agent__completed.md`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 13:17:27 +00:00
thePR0M3TH3AN 0969642ccc Merge pull request #56 from PR0M3TH3AN/torch-config-tests-10463068599140780508
🧪 Add unit tests for src/torch-config.mjs
2026-02-14 08:11:56 -05: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
thePR0M3TH3AN e25d6dead2 Merge pull request #55 from PR0M3TH3AN/agents/daily/content-audit-agent-9033644365328554051
docs: daily content audit (no content found)
2026-02-14 08:10:45 -05:00
thePR0M3TH3AN 0ed73a505b Merge pull request #54 from PR0M3TH3AN/agents/weekly/interop-agent-fail-6399779466283884134
docs(log): interop-agent failure
2026-02-14 08:06:41 -05:00
google-labs-jules[bot]andPR0M3TH3AN 1d81e9f629 docs: daily content audit (no content found)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 13:05:57 +00:00
google-labs-jules[bot]andPR0M3TH3AN b9be5e3f69 docs(log): interop-agent failure
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 13:05:17 +00:00
thePR0M3TH3AN c731f2b09d Merge pull request #53 from PR0M3TH3AN/agents/weekly/fuzz-agent-1863848784432453944
fuzz-agent: fix parseLockEvent crash on null content
2026-02-14 07:51:03 -05:00
google-labs-jules[bot]andPR0M3TH3AN 36cd585fba fuzz-agent: fix parseLockEvent crash on null content
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 08:57:47 +00:00
thePR0M3TH3AN ebc06a750a Update README.md 2026-02-14 02:40:24 -05:00