Files
acdl/metrics
Jon Chery 3a7604dec0 feat(P3): powerbi export — CSV/JSON views + 8 placeholder views + data dictionary (REQ-190,199,208,209)
P3 (Wave 2, feat) — REQ-190, REQ-199, REQ-208, REQ-209

New components:
- core/metrics/powerbi_export.py — exports fact/dim tables + 8 placeholder views to CSV/JSON
- tests/test_powerbi_export.py — 6 tests (all pass)
- docs/METRICS_VIEWS.md — column-level data dictionary (REQ-209)
- metrics/powerbi/NOVA_DASHBOARD_README.md — folder-connector import guide + starter visual model (REQ-208)

8 placeholder views (deferred metrics, headers only):
- placeholder_live_infra_health (D-096)
- placeholder_live_outbox_rate (D-096)
- placeholder_tamper_evident_checkpoints (D-083)
- placeholder_onboarding_funnel (D-113/D-114/D-119)
- placeholder_drift_detection (D-096 + no scheduler)
- placeholder_live_cur_reconciliation (D-096)
- placeholder_sla_downtime (D-096)
- placeholder_predictive_reactive (future emitter)

D-120: Nova-native (CSV/JSON files, no live connector)
D-129: PowerBI ingests via folder connector

---ci---
project: acdl
phase: 3
milestone: v1.17
status: execute
---/ci---
2026-08-04 20:03:12 +00:00
..

Nova Metrics Directory

v1.17 — Strategic Direction, Leadership Metrics & Unified Story (D-128)

This directory holds Nova's telemetry/observability artifacts. The metrics layer is Nova-native (D-120): JSONL event log + SQLite cold store + hash-chained Decision Ledger. No Kafka, Prometheus, ClickHouse, or QLDB.

Artifact inventory

Artifact Type Regenerable? Description
events.jsonl Append-only event log No (append-only state) CloudEvents 1.0 envelopes from all emitters (REQ-187)
decision_ledger.db SQLite append-only hash-chain No (append-only state) Decision Ledger: ai.decision.made + attestation.recorded events (REQ-188, D-121)
nova_metrics.db SQLite cold store Yes (regenerate via collector) Normalized fact/dimension tables (REQ-189, P2)
runs/<run_id>.json Per-run manifest Yes (regenerate from events) Run lifecycle: stages, durations, exit, confidence, HITL (REQ-187)
runs/<run_id>/ Durable run artifacts Yes (regenerate from $WORK) Persisted copies of pcr.json, signal.json, event.json, etc. (REQ-187)
lifecycle/<module>-<env>.json Lifecycle report Yes (regenerate from lifecycle runs) Per-module apply/modify/destroy results (REQ-205)
test-results.xml JUnit XML Yes (regenerate via pytest) Test results (REQ-187, P1 addopts)
test-report.json JSON test report Yes (regenerate via pytest) Test results in JSON (REQ-187, P1 addopts)
coverage.json Coverage report Yes (regenerate via pytest) Code coverage (REQ-206, P1 addopts)
powerbi/ PowerBI export Yes (regenerate via powerbi_export) CSV/JSON views for PowerBI ingestion (REQ-190, P3)
TRUST_SNAPSHOT.md Trust snapshot report Yes (regenerate via trust_snapshot) 5 trust metrics + chain-integrity verdict (REQ-211, P4)

Backup + restore

Append-only state (events.jsonl, decision_ledger.db): these are the source of truth. They should be committed to git (events.jsonl) or snapshotted (decision_ledger.db). If lost, they CANNOT be regenerated — the events they captured are gone.

Regenerable artifacts (nova_metrics.db, runs/, lifecycle/, test-results.xml, coverage.json, powerbi/): these are derived from the append-only state + the source signals (REGRESSION_REPORT.json, $WORK/*.json, junit XML). If lost, re-run the collector (core/metrics/collector.py, P2) to rebuild nova_metrics.db, then re-run the PowerBI export (core/metrics/powerbi_export.py, P3) to rebuild powerbi/.

Restore procedure:

  1. Recover events.jsonl + decision_ledger.db from git/snapshot.
  2. python3 core/metrics/collector.py → rebuilds nova_metrics.db.
  3. python3 core/metrics/powerbi_export.py → rebuilds powerbi/.
  4. python3 core/metrics/trust_snapshot.py → rebuilds TRUST_SNAPSHOT.md.

Concurrency model

Single-writer per run: the run manifest writer is the only writer per run. SQLite WAL mode + BEGIN IMMEDIATE prevents concurrent-write corruption on the Decision Ledger (P1 risk mitigation).