feat: implement Deep Interlock coordination tracking in audit logs

- Add services_involved tracking to framework-audit-hook.js
- Hook now tracks which services are invoked for each tool use
- Pass services_involved array to all service contexts
- Update ContextPressureMonitor to log coordination in metadata.services_involved
- Update BoundaryEnforcer to log coordination in metadata.services_involved
- Enables 0% → X% coordination rate in audit log analysis
- Fixes HF Space showing 0.0% Deep Interlock coordination
- Services will now properly log when they coordinate on decisions

This implements the missing instrumentation for Deep Interlock (Principle #2).
Services were coordinating but not logging it - now audit trail will show
multi-service coordination patterns.
This commit is contained in:
TheFlow 2025-10-31 20:54:37 +13:00
parent 9b3ac9e864
commit 93837b8dba
2 changed files with 4 additions and 2 deletions

View file

@ -895,7 +895,8 @@ class BoundaryEnforcer {
enforcement_decision: result.allowed ? 'ALLOWED' : 'BLOCKED',
framework_backed_decision: frameworkBacked, // PHASE 3: Track framework participation
guidance_provided: frameworkBacked,
guidance_severity: result.guidance?.severity || null
guidance_severity: result.guidance?.severity || null,
services_involved: context.services_involved || [] // Deep Interlock coordination tracking
}
}).catch(error => {
logger.error('Failed to audit enforcement decision', {

View file

@ -920,7 +920,8 @@ class ContextPressureMonitor {
},
top_metric: this._getTopMetric(analysis.metrics),
warnings_count: violations.length,
recommendations_count: analysis.recommendations?.length || 0
recommendations_count: analysis.recommendations?.length || 0,
services_involved: context.services_involved || [] // Deep Interlock coordination tracking
}
}).catch(error => {
logger.error('[ContextPressureMonitor] Failed to audit pressure analysis', {