docs(bd-129): note integration test already exists
The integration test for parsing real NEEDLE worker logs was already created in bead bd-6q2 at src/parser.real-logs.integration.test.ts. All 19 tests pass, covering: - Worker extraction (worker_id) - Bead extraction (bead_id) - Timestamp extraction (ISO to NeedleEvent) - Event information (event_type, data, session_id, sequence) - Multiple event types (worker lifecycle, bead lifecycle) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
a1b1ea3287
commit
eda03a80b6
1 changed files with 28 additions and 0 deletions
28
notes/bd-129.md
Normal file
28
notes/bd-129.md
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# BD-129: Integration Test for Real NEEDLE Worker Logs
|
||||
|
||||
## Task
|
||||
Create a vitest integration test that reads actual NEEDLE log files from ~/.needle/logs/ and verifies the parser correctly extracts worker, bead, timestamp and event information from production logs.
|
||||
|
||||
## Finding
|
||||
The integration test already exists in `src/parser.real-logs.integration.test.ts`, created in bead `bd-6q2`.
|
||||
|
||||
## Existing Test Coverage
|
||||
The file contains 467 lines with 19 comprehensive tests:
|
||||
|
||||
1. **Log directory sanity checks** - verifies .jsonl files exist and are valid JSONL
|
||||
2. **NeedleEvent shape assertions** - validates canonical format parsing, session_id preservation, monotonically increasing sequence numbers, nested data fields, and bead_id preservation
|
||||
3. **Worker lifecycle events** - tests worker.started, worker.idle, worker.state_transition, worker.stopped
|
||||
4. **Bead lifecycle events** - tests bead.claim.*, bead.completed, bead.released
|
||||
5. **Adapter round-trip** - verifies consistency between parseNeedleEvent and parseLogLine
|
||||
6. **Cross-file consistency** - tests multiple log files, worker_id consistency, event type variety
|
||||
|
||||
All 19 tests pass successfully.
|
||||
|
||||
## Test Results
|
||||
```
|
||||
Test Files 1 passed (1)
|
||||
Tests 19 passed (19)
|
||||
```
|
||||
|
||||
## Conclusion
|
||||
Task already completed in previous bead. No changes needed.
|
||||
Loading…
Add table
Reference in a new issue