* Snapshot telemetry line counts before execution (used with --verify-hooks).
(tmpDir)
| 578 | * Snapshot telemetry line counts before execution (used with --verify-hooks). |
| 579 | */ |
| 580 | function snapshotTelemetry(tmpDir) { |
| 581 | const read = (rel) => { |
| 582 | const full = path.join(tmpDir, rel); |
| 583 | if (!fs.existsSync(full)) return 0; |
| 584 | return fs.readFileSync(full, 'utf8').split('\n').filter(Boolean).length; |
| 585 | }; |
| 586 | return { |
| 587 | timing: read('.planning/telemetry/hook-timing.jsonl'), |
| 588 | audit: read('.planning/telemetry/audit.jsonl'), |
| 589 | errors: read('.planning/telemetry/hook-errors.log'), |
| 590 | }; |
| 591 | } |
| 592 | |
| 593 | /** |
| 594 | * Assert hooks fired by comparing telemetry before/after. |
no test coverage detected