Task — engineering-spec@1

"OBS compliance views: scoped JSON API + Ed25519 proof"

doneTASK-OBS-008
module obs · class product · priority p0 · created 2026-05-15 · shipped null
depends on TASK-OBS-002 · blocks TASK-OBS-009

TASK-OBS-008: OBS compliance views — tenant-scoped JSON API + Ed25519 proof

Summary

Ship a read-only obs-compliance-view service over the memory audit chain. As-built surface is a flat Rust crate: views.rs (four regulation kind-filters), auth.rs (auditor JWT + tenant scope), query.rs / summary.rs / window.rs / pii_scan.rs, proof.rs (Ed25519 over canonical JSON — not chain_proof.rs), and main.rs (axum JSON HTTP API on GET /:view + GET /healthz). Responses are { payload, proof } JSON envelopes.

Problem

The prior engineering-spec claimed a per-regime views/{eu_ai_act,pdpl,soc2,iso27001}.rs tree, chain_proof.rs, PDF/JSON exporters, Grafana compliance.json, and standalone integration tests. The live crate consolidates views into views.rs, names the signer proof.rs, serves JSON only from main.rs, and keeps unit tests inline in each module. FM-004 blocked re-entry (task@1 frontmatter + ## §N body).

Proposed Solution

Adopt the as-built layout:

Alternatives Considered

Success Metrics

Scope

In scope (as-built):

Out of scope / Non-Goals

Dependencies

depends_on: [TASK-OBS-002] (tenant-aware query proxy pattern). Soft: TASK-AUTH-004 JWT/JWKS; cyberos-audit-chain for access-audit emit; TASK-OBS-009 manifest builds on this crate.

1. Description (normative)

Acceptance criteria

Verification

cd services && cargo test -p cyberos-obs-compliance-view proof::
cd services && cargo test -p cyberos-obs-compliance-view views:: auth:: window:: pii_scan:: summary::
PathCovers
src/views.rs testsDEC-175 kind table + slug routing
src/auth.rs testsDEC-178 auditor role + tenant scope
src/window.rs tests365-day cap
src/proof.rs testsDEC-176 Ed25519 proof
src/pii_scan.rs testsResponse PII defence
src/summary.rs testsSummary block shape
src/main.rsJSON HTTP shell + handler pipeline

AI Authorship Disclosure


batch/9b-obs adopt — TASK-OBS-008 re-spec against as-built obs-compliance-view.