Audit guardrail refusals as status: "refused" — plan
Design: ../specs/2026-07-09-refusal-audit-status-design.md. TDD; pnpm check
green; ship DORMANT (AUDIT_REDIS_URL unset); no deploy without Efran's
explicit go-ahead.
packages/orchestrator-types/plan.ts—RefusalCodeunion + optional
codeonRefusal.guards/input-patterns.ts— import canonicalRefusal(drop the local
dup); setcode(PII vs entity) on each L1 refusal.steps/plan.ts—NO_TOOLS,GUARDRAIL_PLAN_REFUSED,PLAN_UNPARSEABLE.lib/audit/emit.ts(new) —buildRefusalEvent(pure) +emitRefusalAudit
(fire-and-forget XADD; dormant on unsetAUDIT_REDIS_URL).orchestrate.ts—turnStartMs; emit in theisRefusalbranch (surface,
userId=sessionId, traceId=turnTraceId, code, total_ms, policy version).infra/env/public.env.example—AUDIT_REDIS_URL(dormant) +AUDIT_STREAM.infra/compose.public.yaml— join externalahu-platform_defaultnetwork.- Tests — guards codes, plan codes, emit unit, orchestrate integration.
Gate pnpm check; completion + upload. Deploy (public-web image + ahu-public
recreate, leaving AUDIT_REDIS_URL unset) only on go-ahead; the flip + the 4
observatory verification steps are Efran's.