Topic GUID: 64f8e823-8464-57a9-be8d-114e41d5bd34
Why
Context / problem:
- The recently added agent scripts have no unit test coverage:
- keepalive_loop.js (435 lines) - core loop evaluation logic
- keepalive_state.js (209 lines) - state persistence and comment formatting
- agents_verifier_context.js (207 lines) - post-merge verification context builder
- These scripts contain critical logic for checkbox parsing, iteration counting, stop condition evaluation, and PR state management.
- Without tests, regressions can silently break the keepalive and autofix functionality.
- The existing test patterns in tests/ provide a template but these new scripts are not covered.
Goal:
- Add comprehensive Jest test suites for all new agent scripts.
- Achieve >80% code coverage for the critical path functions.
- Include edge case testing for malformed inputs, API failures, and boundary conditions.
Tasks
Acceptance criteria
- All three test files exist and pass in CI.
- Combined coverage for keepalive_loop.js, keepalive_state.js, and agents_verifier_context.js exceeds 80%.
- Tests catch at least one real bug or edge case during development.
- Test output is integrated into the existing Jest test run (npm test).
Implementation notes
Not provided.
Synced by workflow run.
Topic GUID: 64f8e823-8464-57a9-be8d-114e41d5bd34
Why
Context / problem:
Goal:
Tasks
Acceptance criteria
Implementation notes
Not provided.
Synced by workflow run.