feat: add production assurance dashboard flow
This commit is contained in:
@@ -53,6 +53,15 @@ TRACES=$(ls "$CASAN_STATE_ROOT/logs/trace/"agentic-*.json 2>/dev/null | wc -l |
|
||||
METRICS=$(grep -c '"harness":"H6-agentic"' "$CASAN_STATE_ROOT/logs/cost/metrics.jsonl" 2>/dev/null || echo 0)
|
||||
[[ "$TRACES" == "1" && "$METRICS" == "1" ]] && pass "exactly one trace + one metric for the turn" || fail "expected 1 trace/1 metric (traces=$TRACES metrics=$METRICS)"
|
||||
[[ "$(printf '%s' "$F" | field decision)" == "certified" ]] && pass "enforce-mode turn is certified" || fail "turn not certified ($F)"
|
||||
RECEIPT_TRACE=$(python3 -c 'import json;print(json.load(open("'"$CASAN_STATE_ROOT"'/state/latest-run.json"))["trace_id"])' 2>/dev/null)
|
||||
[[ "$RECEIPT_TRACE" == "$TID" ]] && pass "latest-run receipt points to the finalized trace" || fail "latest-run receipt missing or mismatched"
|
||||
GATES=$(python3 -c 'import json
|
||||
p="'"$CASAN_STATE_ROOT"'/logs/trace-events/'"$TID"'.jsonl"
|
||||
print(len({json.loads(line)["gate_id"] for line in open(p, encoding="utf-8")}))' 2>/dev/null)
|
||||
[[ "$GATES" == "7" ]] && pass "live trace stream covers all H1-H7 gates" || fail "expected seven live gates (got $GATES)"
|
||||
[[ -f "$CASAN_STATE_ROOT/spool/control-plane/pending/$TID.json" ]] \
|
||||
&& pass "sanitized run envelope is spooled before optional delivery" \
|
||||
|| fail "control-plane delivery spool was not created"
|
||||
|
||||
# ── C2: policy-violating prompt blocked at begin ─────────────────────────────
|
||||
echo "===== C2: injection prompt blocked before model ====="
|
||||
|
||||
Reference in New Issue
Block a user