Merge branch 'main' into agents/daily/decompose-agent-refactor-14956609596778737678

This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2026-02-19 20:54:11 -05:00
commit 2df8b85682
7 files changed
+118

No files matched your search

@@ -0,0 +1,18 @@
Run Start: 2026-02-19T10-00-00Z
Cadence: daily
Agent: decompose-agent
Prompt: src/prompts/daily/decompose-agent.md
# Context: Decompose src/lock-ops.mjs
**Target File:** `src/lock-ops.mjs` (880 lines)
**Reason:** Largest JS file in `src/` exceeding the size limit.
**Commit SHA:** e10528141db40674c793884007255fb3c46ed795
**Node Version:** v22.22.0
**Extraction Plan:**
1. Extract `RelayHealthManager` and related functions (`summarizeRelayMetrics`, `computeRelayScore`, `buildRelayHealthConfig`, `defaultHealthManager`, `_resetRelayHealthState`) into `src/relay-health-manager.mjs`.
2. Extract `LockPublisher` and related functions (`classifyPublishError`, `isTransientPublishCategory`, `PUBLISH_ERROR_CODES`, `PUBLISH_FAILURE_CATEGORIES`, `secureRandom`, `calculateBackoffDelayMs`, `publishToRelays`, `publishLock`) into `src/lock-publisher.mjs`.
3. Move shared utilities (`withTimeout`, `relayListLabel`, `mergeRelayList`) to `src/lock-utils.mjs` or ensure correct imports.
4. Update `src/lock-ops.mjs` to import these dependencies.
**Goal:** Reduce `src/lock-ops.mjs` by at least 200 lines.