- Added `@playwright/test` and `c8` dependencies.
- Configured Playwright in `playwright.config.js` to run the dashboard server.
- Added `test/playwright/dashboard.spec.js` to verify dashboard functionality (loading, auth, config) and capture console logs.
- Modified `src/dashboard.mjs` to support graceful shutdown via `/shutdown` endpoint (guarded by `NODE_V8_COVERAGE`) for coverage collection.
- Updated `package.json` with `test:playwright` and `test:playwright:coverage` scripts.
- Updated `.gitignore` to exclude coverage and test artifacts.
- Fixed `host` default value in `src/cli-parser.mjs`.
Co-authored-by: PR0M3TH3AN <[email protected]>
Replaced synchronous `execSync` with asynchronous `exec` (promisified) in `test/ops.test.mjs` to allow the parent process's mock WebSocket server to handle connections from the child process.
Added `NOSTR_LOCK_RELAY_FALLBACKS: ''` to the child process environment to prevent `nostr-tools` from attempting to connect to default public relays, which caused hangs in restricted CI environments.
Updated `test/ops.test.mjs` to mock a relay response (EOSE) for robust integration testing without external network dependencies.
Co-authored-by: PR0M3TH3AN <[email protected]>
Decomposed src/lib.mjs into src/cmd-check.mjs, src/cmd-list.mjs, and src/cmd-complete.mjs to reduce file size.
Extracted logic preserves existing behavior.
Verified with lint and tests.
Reduced src/lib.mjs by 292 lines.
Co-authored-by: PR0M3TH3AN <[email protected]>
Updated `test/test-audit-run-flaky-check.test.mjs` to assert against test names instead of file paths, as `scripts/test-audit/run-flaky-check.mjs` keys the results by test name from the TAP output.
This resolves the CI failure where the test expected keys matching the file paths but received keys matching the test names defined in the fixtures.
Co-authored-by: PR0M3TH3AN <[email protected]>
Added `proposal-triage-agent`, `plan-agent`, `builder-agent`, and `governance-agent` to the landing page `AGENT_ICONS` map. This ensures these agents are correctly displayed with appropriate icons in the Functional Agents section.
Verified that `src/prompts/weekly-scheduler.md` and `src/prompts/roster.json` already correctly list these agents.
Verified frontend changes using Playwright.
Co-authored-by: PR0M3TH3AN <[email protected]>
Introduces three new weekly agents that form a triage→plan→build pipeline:
- proposal-triage-agent: evaluates proposals, dead ends, and coverage gaps;
produces prioritized backlog in src/backlog/BACKLOG.md
- plan-agent: creates concrete implementation plans from top backlog items
in src/plans/PLAN-*.md
- builder-agent: executes approved plans, makes code changes, verifies
acceptance criteria
Also includes:
- Architecture proposal document in docs/proposals/
- Seeded initial backlog with 11 items from diagnosed dead ends
- Updated roster.json and weekly-scheduler.md (24 weekly agents)
- All three validators pass (prompt-contract, scheduler-roster, flow-parity)
https://claude.ai/code/session_01FLP7ibXd5QPG517g1kYCHL
- Mitigate command injection in `src/services/governance/index.js` by using explicit array arguments with `execFileSync` and adding a security comment.
- Add regression test `test/governance-security.test.mjs` verifying the fix against simulated exploit attempts.
- Fix CI build failures by resolving circular dependencies and duplicate declarations in `src/lock-utils.mjs`, `src/lock-ops.mjs`, `src/lock-publisher.mjs`, and `src/relay-health.mjs`.
- Resolve linting errors in tests and implementation files.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Mitigate command injection in `src/services/governance/index.js` by using explicit array arguments with `execFileSync` and adding a security comment.
- Add regression test `test/governance-security.test.mjs` verifying the fix against simulated exploit attempts.
- Fix CI build failures by resolving circular dependencies and duplicate declarations in `src/lock-utils.mjs`, `src/lock-ops.mjs`, `src/lock-publisher.mjs`, and `src/relay-health.mjs`.
- Resolve linting errors in tests and implementation files.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Rewrote `src/lock-publisher.mjs` to ensure clean imports and no duplicate declarations of `withTimeout`.
- This addresses the lint error `Identifier 'withTimeout' has already been declared` seen in CI.
- Verified lint passes locally.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Fix `SyntaxError: The requested module './lock-utils.mjs' does not provide an export named 'withTimeout'` by refactoring exports in `src/lock-utils.mjs`.
- Explicitly import `relayListLabel` and `mergeRelayList` from `src/utils.mjs` before exporting them to avoid ambiguous export behavior in some environments.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Mitigate command injection in `src/services/governance/index.js` by using explicit array arguments with `execFileSync` and adding a security comment.
- Add regression test `test/governance-security.test.mjs` verifying the fix against simulated exploit attempts.
- Fix CI build failures by resolving circular dependencies and duplicate declarations in `src/lock-utils.mjs`, `src/lock-ops.mjs`, `src/lock-publisher.mjs`, and `src/relay-health.mjs`.
- Resolve linting errors in tests and implementation files.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Removed `randomInt` from `src/lock-publisher.mjs` imports as it is no longer used (replaced by `secureRandom` from `src/lock-utils.mjs`).
- Verified lint passes locally.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Imported `secureRandom` from `src/lock-utils.mjs` in `src/lock-publisher.mjs`.
- Removed duplicate local definition of `secureRandom` in `src/lock-publisher.mjs`.
- Verified lint passes locally.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Mitigate command injection in `src/services/governance/index.js` by using explicit array arguments with `execFileSync` and adding a security comment.
- Add regression test `test/governance-security.test.mjs` verifying the fix against simulated exploit attempts.
- Fix CI build failures by resolving circular dependencies and duplicate declarations in `src/lock-utils.mjs`, `src/lock-ops.mjs`, `src/lock-publisher.mjs`, and `src/relay-health.mjs`.
- Resolve linting errors in tests and implementation files.
Co-authored-by: PR0M3TH3AN <[email protected]>
- 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]>