- Extracted scheduler logic into `scheduler-config.mjs`, `scheduler-logger.mjs`, and `scheduler-state.mjs`.
- Updated `run-scheduler-cycle.mjs` to import from these new modules.
- Updated `scripts/validate-scheduler-flow-parity.mjs` to check the new modules for required prompt snippets.
- Updated `test/scheduler-lock-failure-schema.contract.test.mjs` and `test/scheduler-preflight-lock.e2e.test.mjs` to copy the new dependency modules and `src/torch-config.mjs` into test fixtures.
- Reduced `run-scheduler-cycle.mjs` size by ~333 lines.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Extracted scheduler logic into `scheduler-config.mjs`, `scheduler-logger.mjs`, and `scheduler-state.mjs`.
- Updated `run-scheduler-cycle.mjs` to import from these new modules.
- Updated `scripts/validate-scheduler-flow-parity.mjs` to check the new modules for required prompt snippets.
- Updated `test/scheduler-lock-failure-schema.contract.test.mjs` to copy the new dependency modules into the test fixture.
- Reduced `run-scheduler-cycle.mjs` size by ~333 lines.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Fixes `ERR_MODULE_NOT_FOUND` in scheduler-preflight-lock e2e tests
- Ensures scheduler configuration module is available in the test temp directory
Co-authored-by: PR0M3TH3AN <[email protected]>
- Fixes `ERR_MODULE_NOT_FOUND` in `scheduler-preflight-lock.e2e.test.mjs` caused by missing `src/torch-config.mjs` in the temporary test environment.
- Ensures `scripts/agent/run-scheduler-cycle.mjs` can successfully import the config module during integration tests.
Co-authored-by: PR0M3TH3AN <[email protected]>
Renames the unused catch error variable `e` to `_` in `test/playwright/dashboard.spec.js` to satisfy the ESLint `no-unused-vars` rule. This fixes the CI failure.
Co-authored-by: PR0M3TH3AN <[email protected]>
- 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]>