Skip to content

Slice 250.2b Phase 3: BiometricExecutionMatrix + Zero-Trust OOM Circuit Breaker - #69511

Open
drussell23 wants to merge 1 commit into
topology/slice-250.2b-phase2-preprocessorfrom
topology/slice-250.2b-phase3-ecapa-matrix
Open

Slice 250.2b Phase 3: BiometricExecutionMatrix + Zero-Trust OOM Circuit Breaker#69511
drussell23 wants to merge 1 commit into
topology/slice-250.2b-phase2-preprocessorfrom
topology/slice-250.2b-phase3-ecapa-matrix

Conversation

@drussell23

@drussell23 drussell23 commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Summary

Phase 3 (stacked on #69510). The ECAPA execution matrix + a fail-secure OOM circuit breaker for unified-memory volatility. tests/ml/ only; fully decoupled by structural injection (no unified_supervisor/backend imports).

  • BiometricExecutionMatrix: consumes uniform tensors (Phase 2) → embedder (ecapa_facade via lazy structural injection / stand-in) → cosine eval vs stored baseline voiceprint.
  • Zero-Trust OOM breaker (LocalOOMCircuitBreaker, structurally AdvancedCircuitBreaker-shaped + injectable): fail-secure — breaker-open / MemoryError / generic error always return VERDICT_REJECTED (never ACCEPTED on error).
  • Async RESOURCE_PRESSURE swarm telemetry: on OOM, fire-and-forget ("resource_pressure", {...}) to injected EventSink + SwarmTrigger (loop-task or daemon-thread fallback) — never blocks the secure-lock verdict.

Test Plan

  • 57 passed, 3 skipped (real-ECAPA seam)
  • Happy path B-accept / C-reject on preprocessed fixtures
  • Fail-secure: breaker-open (embedder not called) / OOM / generic error → REJECTED
  • OOM proof: sync REJECT + record_failure + resource_pressure event fired + swarm triggered
  • Non-blocking: verdict ~1.7ms vs slow sink completing ~302ms later (ordering asserted)
  • Breaker trips after N=3 OOMs → 4th short-circuits without invoking the model

🤖 Generated with Claude Code


Summary by cubic

Adds a fail-secure ECAPA biometric execution matrix with a zero-trust OOM circuit breaker and non-blocking telemetry, implemented in tests/ml/ via structural injection. Prevents ACCEPT on errors and shields the pipeline from unified-memory OOM storms.

  • New Features
    • BiometricExecutionMatrix: embeds a uniform tensor, compares cosine similarity to a baseline, and applies an accept threshold; returns REJECTED on any error.
    • Zero-trust OOM breaker: LocalOOMCircuitBreaker (shape-compatible with AdvancedCircuitBreaker) trips after N OOMs; while open, short-circuits to REJECT without calling the embedder.
    • Async telemetry: on OOM, fire-and-forget resource_pressure events to injected EventSink and SwarmTrigger; never blocks the verdict and works without a running loop (daemon thread fallback).
    • Structural injection: no backend or supervisor imports; optional lazy probe of ecapa_facade; pure NumPy implementation with focused unit tests covering accept/reject paths, breaker-open short-circuiting, OOM handling, and telemetry behavior.

Written for commit 3d50f42. Summary will update on new commits.

Review in cubic

…uit breaker (sync fail-secure REJECT + async RESOURCE_PRESSURE swarm telemetry)

[integrity-verified: 7d16d7285d91]
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

📊 PR Size Analysis

Size: L
Files Changed: 3
Lines Added: +889
Lines Deleted: -0
Total Changes: 889

💡 This PR is large. Ensure it focuses on a single feature or fix.

Review Checklist

  • All tests passing
  • Code follows project style guidelines
  • Documentation updated if needed
  • No sensitive data exposed
  • Breaking changes documented

@drussell23

Copy link
Copy Markdown
Owner Author

HELD (not merging this session) per operator review: production-shaped component (BiometricExecutionMatrix + OOM breaker) parked in the test tree with no production consumer yet; headline proofs run against stand-in embedders. Hold until the real ECAPA/biometric pipeline is scoped so this is built/validated against reality rather than banked as orphaned scaffolding. Green + isolated; safe to land later. Bases on the P2 branch (now merged to main via #69510).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant