- Executed test-audit-agent prompt
- Ran static analysis and flakiness check
- Identified and reported consistent failures in load-test.mjs and smoke-test.mjs
- Updated KNOWN_ISSUES.md
- Created run artifacts (Context, Todo, Decisions, Test Logs)
- Completed lock cycle
Co-authored-by: PR0M3TH3AN <[email protected]>
- Scanned codebase for `setInterval`, `Promise.all`, and other async patterns.
- Generated `reports/performance/hits-2026-02-20.json`.
- Identified potential unbounded concurrency in `src/services/memory`.
- Created daily performance report.
- Updated run artifacts and memory.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Implemented throttling in `performSave` to limit disk writes to max 1 per second.
- Refactored `updateMemoryUsage` to use non-blocking (fire-and-forget) save calls, eliminating latency for memory reads.
- Added atomic write strategy using unique temporary files and `fs.rename` to prevent data corruption.
- Verified with benchmarks: `getRelevantMemories` latency reduced from ~100ms to ~30ms for 10k items.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Extracted command logic from `src/lib.mjs` `main` function into `COMMAND_HANDLERS` dispatch map.
- Simplified `main` function to perform argument parsing and dispatching.
- Added `test/main-dispatch.test.mjs` to verify dispatch logic and error handling.
- Ensured no regressions in CLI behavior.
Co-authored-by: PR0M3TH3AN <[email protected]>
Consolidated the duplicate `relayListLabel` function from `src/lock-ops.mjs` and `src/lock-publisher.mjs` into `src/utils.mjs`.
- Moved `relayListLabel` to `src/utils.mjs`.
- Updated `src/lock-ops.mjs` and `src/lock-publisher.mjs` to import it.
- Updated `src/lock-utils.mjs` to re-export it from `src/utils.mjs` to maintain backward compatibility.
- Added unit tests in `test/utils.test.mjs`.
- Verified all tests pass.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Extracted `PUBLISH_ERROR_CODES`, `PUBLISH_FAILURE_CATEGORIES`, and `classifyPublishError` to `src/lock-error-classifier.mjs`.
- Moved `secureRandom` to `src/lock-utils.mjs`.
- Updated `src/lock-publisher.mjs` and `src/lock-ops.mjs` to import shared utilities from `src/lock-utils.mjs`.
- Reduced `src/lock-publisher.mjs` size significantly (approx. 100 lines) and verified `src/lock-ops.mjs` remains small.
- Verified that tests pass and file sizes are reduced.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Precompute vector norms during `upsertVector` in `InMemoryEmbedderAdapter`.
- Compute query vector norm once per query.
- Update `cosineSimilarity` to accept precomputed norms, avoiding redundant calculations.
- Optimize `cosineSimilarity` loop to iterate only up to `Math.min(left.length, right.length)` and remove redundant casts.
- Achieved ~27% improvement in query time (57ms vs 78ms for 50 queries against 2000 vectors).
Co-authored-by: PR0M3TH3AN <[email protected]>
Moved the duplicate `withTimeout` function from `src/lock-ops.mjs`, `src/lock-publisher.mjs`, `src/lock-utils.mjs`, and `src/relay-health.mjs` to a single definition in `src/utils.mjs`.
Updated all references to import from `src/utils.mjs`. `src/lock-utils.mjs` re-exports `withTimeout` for backward compatibility.
Added unit tests for `withTimeout` in `test/utils.test.mjs`.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Moved `mergeRelayList` from `src/lock-ops.mjs` and `src/lock-publisher.mjs` to `src/utils.mjs`.
- Updated imports in `src/lock-ops.mjs` and `src/lock-publisher.mjs`.
- Added unit tests for `mergeRelayList` in `test/utils.test.mjs`.
- Restored `torch-config-test.json` which was deleted by the test suite.
Co-authored-by: PR0M3TH3AN <[email protected]>
Updates `validateProposal` to accept either a proposal ID or a proposal object.
Updates `applyProposal` to pass the already-fetched proposal object to `validateProposal`,
eliminating a redundant file system read. This improves efficiency and code health.
Tests were verified to ensure no regression.
Co-authored-by: PR0M3TH3AN <[email protected]>
Marks pending items in `src/todo/TODO_2026-02-19T22-29-56Z.md` as completed since they were flagged as N/A by the agent. This ensures the todo list accurately reflects the run status.
Co-authored-by: PR0M3TH3AN <[email protected]>
The unequal-length branch of timingSafeCompare called
crypto.timingSafeEqual(paddedA, paddedB) but did not capture the return
value, unconditionally returning false and leaving the timing-safe
comparison as dead code.
Adds a regression test covering shorter, longer, and exact-match
credential lengths to lock in the correct behaviour.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- run-selected-prompt.mjs: set SCHEDULER_MEMORY_FILE env var before spawning each agent so
store.mjs has a well-known path to read from (memory-updates/<ts>__<agent>.md)
- retrieve.mjs: format memories.md using m.summary + date/tags in readable markdown sections
instead of raw m.content blobs; agents can now scan injected context at a glance
- store.mjs: remove semantically-empty fallback placeholder events that polluted the store
and degraded retrieval quality; also fix default cadence 'weekly' -> 'daily' to match retrieve
- scheduler-flow.md: replace vague "write insights" instruction with a concrete three-section
template (Key findings / Patterns / Warnings) and clarify that $SCHEDULER_MEMORY_FILE is
set by the scheduler automatically
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Added features/diagnostic.mjs to help users verify their local TORCH environment.
Includes checks for Node.js version, dependencies, configuration, and connectivity.
Co-authored-by: PR0M3TH3AN <[email protected]>