Skip to content

shim: expose BlinkAnalyzer + compute_ear via spoof_detector public namespace#18

Closed
ahmetabdullahgultekin wants to merge 1 commit into
mainfrom
fix/2026-05-12-expose-blink-analyzer-shim
Closed

shim: expose BlinkAnalyzer + compute_ear via spoof_detector public namespace#18
ahmetabdullahgultekin wants to merge 1 commit into
mainfrom
fix/2026-05-12-expose-blink-analyzer-shim

Conversation

@ahmetabdullahgultekin

Copy link
Copy Markdown
Contributor

Summary

Adds spoof_detector.infrastructure.analyzers.blink_analyzer as a thin re-export of src.infrastructure.analyzers.blink_analyzer. The 2026-05-11 blink-cache + EAR recalibration work landed in src/ but was never reachable through the public shim, forcing downstream consumers (FIVUCSAS biometric-processor /verify wiring) to either reach into src.* or recompute EAR locally.

Per repo policy (feedback_spoof_detector_architecture), algorithms live here and biometric-processor only imports + wires. This shim closes the last public-API gap for that policy.

Companion biometric-processor PR (Bug 2 — wire EAR into /verify): Rollingcat-Software/biometric-processor#102

Test plan

  • pytest tests/unit/test_public_shim_blink_analyzer.py — 3 pass (re-export identity, index lists, synthetic EAR round-trip)

🤖 Generated with Claude Code

…mespace

Adds `spoof_detector.infrastructure.analyzers.blink_analyzer` as a thin
re-export of `src.infrastructure.analyzers.blink_analyzer`. The 2026-05-11
blink-cache + EAR recalibration work landed in `src/` but was never reachable
through the public shim, forcing downstream consumers (FIVUCSAS
biometric-processor `/verify` wiring) to either reach into `src.*` or
recompute EAR locally.

Per repo policy (`feedback_spoof_detector_architecture`), algorithms live
here and biometric-processor only imports + wires. This shim closes the
last public-API gap for that policy.

Tests:
  * tests/unit/test_public_shim_blink_analyzer.py — pins identity of the
    re-export (public alias `is` private function), shape of LEFT_EYE /
    RIGHT_EYE index lists, and a synthetic EAR round-trip.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 12, 2026 17:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@ahmetabdullahgultekin

Copy link
Copy Markdown
Contributor Author

Merge order note (2026-05-12)

This PR is the upstream dependency for the bio + web puzzle wiring:

  1. This PR (spoof-detector shim: expose BlinkAnalyzer + compute_ear via spoof_detector public namespace #18) — exposes BlinkAnalyzer + compute_ear in the public spoof_detector.* namespace via a new shim, per feedback_spoof_detector_architecture (algorithms in spoof-detector, biometric-processor only imports).
  2. biometric-processor fix(mirror): re-sync active_liveness_detector to bio FaceLandmarker port (drift reconcile) #102 — imports those symbols from the public namespace to wire EAR liveness into /verify and enforce the anti-spoof recommended_action='block' verdict. Bio CI fails ImportError if its submodule pointer hasn't advanced past this PR's merge commit.
  3. web-app fix(amispoof): incident-aware threat type + COOP/COEP multi-threading + drop dead launcher.js #90 — calls the new /biometric/puzzles/verify-challenge endpoint (with 404 soft-pass during rollout).

Please merge in that order. Operator coordination items live in parent PR Rollingcat-Software/FIVUCSAS#67 OPERATOR_ACTIONS_2026-05-12.md items 6–10.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@ahmetabdullahgultekin

Copy link
Copy Markdown
Contributor Author

Superseded: BlinkAnalyzer + compute_ear shim already on main (PR #19, b04856d); diff vs main is empty. Closing as already-applied.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants