AUDIT-drift-detector
Purpose
The federation has multiple registries (tool_registry.json, agent cards, SKILL_ALIAS_TABLE, affordances.yaml). Drift between them causes routing failures, orphaned skills, and silent capability loss.
Drift Dimensions
- Build vs Runtime Manifest Drift — Canonical drift check via
arifOS/runtime/manifest.py(build_manifestvsruntime_manifest). This is the primary drift detection mechanism post-KSR Epoch 1+2. - Tool Manifest Drift — Live MCP tools vs registered tools vs agent card references
- Skill Registry Drift — SKILL_ALIAS_TABLE vs actual directories vs agent card skill IDs
- Agent Card Drift — Card skill IDs vs existing skill directories
- Schema Drift — Tool input schemas vs documented schemas
- Floor Drift — Declared floor_scope vs actual floor enforcement
- Verdict Taxonomy Drift — Verdict emissions vs closed 6-value set (OBSERVE_ONLY|SEAL|SABAR|VOID|HOLD|888_HOLD)
Detection Pipeline
- Snapshot — Capture current state of all registries
- Compare — Diff against saved baseline (or last-known-good)
- Classify — Each mismatch: CRITICAL (breaks routing), WARNING (orphan), INFO (cosmetic)
- Report — Structured drift report with fix recommendations
- Escalate — CRITICAL drift → 888_HOLD before any SEAL operation
⚠️ Runtime-Injected Files (2026-07-19)
Some organ services modify files at runtime. Known patterns:
- WELL
index.html: WebMCP adapter injected on service start → dirty after commit - arifOS session-state: Runtime state files that change during operation
When dirty after clean commit: check if injected content was already committed → if yes, re-commit; if no, actual drift.
Baselines
- Canonical drift check:
arifOS/runtime/manifest.py—build_manifestvsruntime_manifest(post-KSR Epoch 1+2) - Tool registry:
/root/arifOS/tool_registry.json - Agent cards:
/root/AAA/a2a-server/agent-cards/ - Skill alias:
/root/AAA/skills/SKILL_ALIAS_TABLE.json - MCP surface: Live
tools/listfrom each organ - Verdict taxonomy:
arifOS/runtime/verdict.py— closed 6-value set
Floors
- F2 TRUTH: Report only what is actually observed. No inference without evidence.
- F4 CLARITY: Drift report must be actionable, not noise.
- F11 AUDITABILITY: Every drift check logged with timestamp and findings.