test(FN-704): add comprehensive AgentStore test suite

- Add 62 tests covering all AgentStore public methods (init, CRUD, state transitions, heartbeats, assignments)
- Test event emissions (agent:created, agent:updated, agent:deleted, agent:heartbeat, agent:stateChanged)
- Test error paths, state transition validation, and concurrency locking
- Verify filesystem persistence across store re-initialization
- Update coverage gaps doc to mark agent-store.ts as covered
This commit is contained in:
gsxdsm
2026-04-01 10:00:41 -07:00
parent 0ec0dab300
commit 83cbced678
2 changed files with 818 additions and 1 deletions

View File

@@ -11,7 +11,7 @@ Source files that have no corresponding test file (checked both co-located `*.te
| File | Lines | Category | Priority | Notes |
|------|-------|----------|----------|-------|
| `agent-store.ts` | 597 | Business Logic | **High** | Agent state management store — critical runtime component with no test coverage |
| `agent-store.ts` | 597 | Business Logic | ~~High~~ | Agent state management store — **covered by FN-704** (62 tests in `agent-store.test.ts`) |
| `automation.ts` | 143 | Types/Constants | Low | Pure type definitions and constant mappings — tested indirectly via `automation-store.test.ts` |
| `mission-types.ts` | 253 | Types/Constants | Low | Type definitions for missions — tested indirectly via `mission-store.test.ts` |
| `types.ts` | 1228 | Types/Constants | Low | Core type definitions — no runtime logic to test |