policy.yaml
⇠ Swipe to view full code ⇢
# CAL-APPROVAL-001
version: 1
policy_id: CAL-APPROVAL-001
description: "Calibration change requires training, SoD, and drift within tolerance."
controls:
- id: TRAINING_VALID
require: actor.training.calibration == true
- id: SOD_ENFORCED
require: actor.id != request.requested_by
- id: DRIFT_THRESHOLD
require: metrics.drift_ppm <= params.max_ppm
params:
max_ppm: 25
approvals:
- role: "Supervisor"
mfa: true
gate.rego (predictive extension)
⇠ Swipe to view full code ⇢
package gates.calibration
default allow = false
deny[msg] {
future_drift := input.simulation.drift_ppm
future_drift > input.params.max_ppm
msg := sprintf("predicted drift above threshold: %v > %v", [future_drift, input.params.max_ppm])
}
allow { count(deny) == 0 }
evidence_bundle.json (excerpt)
⇠ Swipe to view full code ⇢
{
"bundle_id": "EVD-2025-0915-001",
"scope": {"system": "WattsProtect", "policy_id": "CAL-APPROVAL-001"},
"forecast": {"predicted_drift_ppm": 18, "confidence": 0.97, "simulated_outcome": "allow", "ts": "2025-10-15T22:47:00Z"},
"roots": {"event_hash": "0xabc...", "log_merkle_root": "0xdef..."}
}
Evidence API (OpenAPI excerpt)
⇠ Swipe to view full code ⇢
openapi: 3.0.3
info: { title: WattsProtect Evidence API, version: "1.0" }
paths:
/events: { post: { summary: Ingest signed event } }
/attestations: { post: { summary: Submit TPM/TEE quote (JWT permit) } }
/evidence/{id}: { get: { summary: Fetch evidence packet by id } }
“Each layer adds a digital signature. Together, they form the WattsProtect™ Proof Fabric.”