How to verify the turnkey compliance report generator end-to-end
The compliance report generator is part of Talon's proof layer — reports are generated from the signed evidence records that budgets, policies, and routing decisions already produce, so verifying it means verifying that chain end to end. Use this checklist after upgrading Talon or before a release demo to confirm the Turnkey Compliance Report Generator (epic #109) still works: EU policy packs, the compliance HTTP API, the metrics snapshot cross-checks, and the signed control-plane evidence each export leaves.
This is the portable, repo-canonical version of the interactive verification canvas. The steps and expected outcomes are the same; work through the checkboxes here in any editor, terminal, or CI prep session.
Prerequisites: Go 1.22+, curl, jq, a free port 8080, and optionally a real LLM key to seed evidence. Run phases in order in one shell session — later steps assume the server and exports from earlier ones.
Learn the flow first? See the Turnkey compliance reports tutorial (~15 minutes, one happy path).
Time: about 45 minutes with all optional steps; ~25 minutes if you skip the wizard, smoke suite, and evidence seeding.
Phase 0 — Setup
Build current main and prepare a clean workspace.
-
Not completed: Build the latest binary
cd ~/tmp/dativo/talon && git checkout main && git pullgo build -o /tmp/talon ./cmd/talon && /tmp/talon --helpExpect: build succeeds; help text prints.
-
Not completed: Create a clean test workspace
mkdir -p ~/talon-epic-test && cd ~/talon-epic-testExpect: empty directory; all following commands run from here unless noted.
-
Not completed: Export session keys (same shell for
serveandcurl)export TALON_SECRETS_KEY=$(openssl rand -hex 32)export TALON_ADMIN_KEY=test-admin-keyExpect: both variables set. The admin key gates the metrics snapshot and all
/v1/compliance/*endpoints.
Phase 1 — EU policy packs
Compliance packs in talon init: catalog, wizard, scaffold, scripted, validation.
-
Not completed: Browse the pack catalog
/tmp/talon init --list-complianceExpect: four packs (
gdpr,nis2,dora,eu-ai-act), each with a description and supported articles, plus a disclaimer that packs support controls and are not a certification. -
Not completed: Interactive wizard with pack multi-select (optional)
Run
/tmp/talon initinteractively. Accept defaults until Apply EU compliance policy packs?, then enter1,2(GDPR + NIS2).Expect: summary shows
Compliance packs: gdpr, nis2;agent.talon.yamlandtalon.config.yamlare written. -
Not completed: Inspect generated annotations
head -30 agent.talon.yamlExpect: header
# Compliance packs applied: …followed bysupports:lines linking articles (e.g.gdpr Art. 30) to Talon controls and source files;compliance.frameworkslists the selected packs. -
Not completed: Scaffold path with packs
/tmp/talon init --scaffold --compliance gdpr,eu-ai-act --force --skip-verifyhead -30 agent.talon.yamlExpect: annotated header with both packs;
eu-ai-actsetsai_act_risk_levelandhuman_oversight;gdprsetsdata_residency: eu. -
Not completed: Scripted path, cross-pack effect
/tmp/talon init --provider openai --name epic-test --compliance dora --force --skip-verifyhead -30 agent.talon.yamlExpect: header lists
dora; merged policy carries DORA retention (5 years). -
Not completed: Invalid pack is rejected
/tmp/talon init --scaffold --compliance hipaa --force --skip-verifyExpect: command fails with
unsupported compliance pack "hipaa"naming the valid values. -
Not completed: Merged config validates
/tmp/talon init --scaffold --compliance all --force --skip-verify/tmp/talon validateExpect: all four overlays merged together;
validatereports no errors.
Phase 2 — Serve with declarations
Declare a controller identity, start the server, optionally seed evidence.
-
Not completed: Reset to a known config
/tmp/talon init --scaffold --name epic-agent --compliance gdpr --force --skip-verifyExpect: fresh
agent.talon.yamlandtalon.config.yaml. -
Not completed: Declare the controller identity (feeds RoPA, clears warnings)
cat >> talon.config.yaml <<'EOF'compliance:controller:name: "Example GmbH"contact: "privacy@example.eu"EOFExpect: block appended. RoPA exports name this controller instead of a placeholder warning.
-
Not completed: Start the server with the gateway enabled
Use a second terminal with the same key exports, or background the process.
/tmp/talon serve --port 8080 --gatewayExpect:
curl -s localhost:8080/healthreturns ok.--gatewayis required for Phase 5: without it,/api/v1/metricsreturns plain-text404(a common symptom isjq: Cannot index numberon the"404"body). Works even whentalon.config.yamlhas nogateway:block — defaults apply. -
Not completed: Optional: seed real evidence
/tmp/talon secrets set openai-api-key "sk-..."/tmp/talon run "Say hello in one word"/tmp/talon audit listExpect: run completes;
audit listshows signed records. Phases 3–5 also work against an empty store (zero counts, empty tables).
Phase 3 — Compliance HTTP API
Admin-only /v1/compliance/*: coverage, exports, auth, control-plane evidence.
-
Not completed: Coverage JSON
curl -s -H "X-Talon-Admin-Key: $TALON_ADMIN_KEY" \"localhost:8080/v1/compliance/coverage" \| jq '{frameworks: [.frameworks[].framework], warnings: .declaration_warnings, note: .claim_note}'Expect: at least five frameworks (
gdpr,eu-ai-act,nis2,dora,iso-27001);declaration_warningshasropaandannex_ivkeys;claim_notesays the output is not a completed legal filing. -
Not completed: RoPA export (HTML + JSON)
curl -sOJ -H "X-Talon-Admin-Key: $TALON_ADMIN_KEY" \"localhost:8080/v1/compliance/ropa?format=html"grep -o "Example GmbH" talon-ropa.html | head -1curl -s -H "X-Talon-Admin-Key: $TALON_ADMIN_KEY" \"localhost:8080/v1/compliance/ropa?format=json" | jq .titleExpect:
talon-ropa.htmlnames Example GmbH; JSON title isRecord of Processing Activities. -
Not completed: Annex IV export
curl -s -H "X-Talon-Admin-Key: $TALON_ADMIN_KEY" \"localhost:8080/v1/compliance/annex-iv?format=json" | jq .titleExpect: valid JSON whose title mentions Annex IV.
-
Not completed: Framework-filtered report
curl -s -H "X-Talon-Admin-Key: $TALON_ADMIN_KEY" \"localhost:8080/v1/compliance/report?format=json&framework=gdpr" \| jq '{framework, controls: (.controls | length)}'Expect:
frameworkisgdpr; only GDPR control mappings. -
Not completed: Auth and validation matrix
curl -s -o /dev/null -w '%{http_code}\n' "localhost:8080/v1/compliance/coverage"curl -s -o /dev/null -w '%{http_code}\n' -H "X-Talon-Admin-Key: wrong" \"localhost:8080/v1/compliance/report"curl -s -o /dev/null -w '%{http_code}\n' -H "X-Talon-Admin-Key: $TALON_ADMIN_KEY" \"localhost:8080/v1/compliance/ropa?format=pdf"curl -s -o /dev/null -w '%{http_code}\n' -H "X-Talon-Admin-Key: $TALON_ADMIN_KEY" \"localhost:8080/v1/compliance/coverage?from=12-31-2026"Expect:
401,401,400,400— in that order. No key and wrong key rejected;format=pdfand malformed date rejected. (Tenant-key rejection is covered by smoke section 34 with a gateway agent configured.) -
Not completed: Exports record signed control-plane evidence
curl -s -H "X-Talon-Admin-Key: $TALON_ADMIN_KEY" \"localhost:8080/v1/evidence?invocation_type=control_plane&limit=10" \| jq '.entries[] | {id, action: .policy_decision}' | head -20Expect: one control-plane record per export above (
compliance_export_ropa,compliance_export_annex_iv,compliance_export_report), each signed.
Phase 4 — Legacy browser surfaces are gone
The embedded dashboards were removed; nothing in this checklist runs in a browser.
-
Not completed: No HTML dashboard at the root or under
/dashboardcurl -s -o /dev/null -w '%{http_code}\n' localhost:8080/curl -s -o /dev/null -w '%{http_code}\n' -H "X-Talon-Admin-Key: $TALON_ADMIN_KEY" localhost:8080/dashboardcurl -s -o /dev/null -w '%{http_code}\n' -H "X-Talon-Admin-Key: $TALON_ADMIN_KEY" localhost:8080/gateway/dashboardExpect:
404,404,404. -
Not completed: No admin key in the URL
curl -s -o /dev/null -w '%{http_code}\n' "localhost:8080/v1/compliance/coverage?talon_admin_key=$TALON_ADMIN_KEY"Expect:
401— only theX-Talon-Admin-Keyheader orAuthorization: Bearerauthenticates.
Phase 5 — Metrics snapshot cross-checks
Budget, cache, spend breakdowns, denials-by-reason. Requires Phase 2 server with --gateway.
-
Not completed: Snapshot shape
curl -s -H "X-Talon-Admin-Key: $TALON_ADMIN_KEY" \"localhost:8080/api/v1/metrics" | jq '{budget: .budget_status, cache: .cache_stats, by_agent: .agent_stats, by_provider: .provider_breakdown}'Expect:
budget_statusandcache_statsobjects plusagent_stats/provider_breakdownarrays. Without gateway traffic, zeros and empty arrays are correct. -
Not completed: CLI parity
talon metrics --json --url http://localhost:8080 | jq '.[0]'Expect: the same
agent_statsrows as the snapshot (same server, same collector). -
Not completed: Denials by reason
curl -s -H "X-Talon-Admin-Key: $TALON_ADMIN_KEY" \"localhost:8080/api/v1/metrics" | jq '.denials_by_reason'Expect:
nullwith no denials, otherwise per-reason buckets (pii_block,policy_deny,session_budget_exceeded, …) sorted by count.
Phase 6 — Regression and cleanup
Automated suites plus teardown.
-
Not completed: Full Go test suite (from repo root)
cd ~/tmp/dativo/talon && go test ./...Expect: all packages pass.
-
Not completed: Smoke suite (optional; long-running)
cd ~/tmp/dativo/talon && bash tests/smoke_test.shExpect: SECTION 34 — Compliance API passes. Needs port 8080 free,
curl, andjq. -
Not completed: Cleanup
kill %1 2>/dev/null; rm -rf ~/talon-epic-testExpect: server stopped (or Ctrl-C in its terminal); test workspace removed.
You're done
You verified policy packs, the compliance API, the absence of the legacy browser surfaces, the metrics snapshot cross-checks, and (optionally) the automated regression suites.
| I want to… | Doc |
|---|---|
| Walk a new teammate through the happy path | Turnkey compliance reports tutorial |
| Export for a real auditor handoff | Compliance export runbook |
| Understand each pack | EU compliance policy packs |
| Metrics snapshot field reference | Gateway metrics API reference |
Commands in this guide are aligned with tests/smoke_sections/34_compliance_api.sh and internal/server/handlers_compliance.go.