MCPcopy Create free account
hub / github.com/SethGammon/Citadel / snapshotTelemetry

Function snapshotTelemetry

scripts/skill-bench.js:580–591  ·  view source on GitHub ↗

* Snapshot telemetry line counts before execution (used with --verify-hooks).

(tmpDir)

Source from the content-addressed store, hash-verified

578 * Snapshot telemetry line counts before execution (used with --verify-hooks).
579 */
580function 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.

Callers 2

assertHooksFiredFunction · 0.85
mainFunction · 0.85

Calls 1

readFunction · 0.85

Tested by

no test coverage detected