Skip to content

Resolve PAD model review findings - #293

Merged
quarj0 merged 3 commits into
mainfrom
fix/281-pr222-pad-review
Aug 13, 2026
Merged

Resolve PAD model review findings#293
quarj0 merged 3 commits into
mainfrom
fix/281-pr222-pad-review

Conversation

@quarj0

@quarj0 quarj0 commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Refs #281

Summary

  • convert OpenCV BGR frames to RGB and honor fixed ONNX batch dimensions
  • exclude frames without exactly one face and fail closed when video evidence is insufficient
  • require the configured PAD asset in the verified manifest and validate its ONNX input/output contract during bootstrap and readiness
  • download and checksum models before atomically replacing an existing trusted asset
  • default MiniFASNetV2 genuine/live scoring to class index 1

Historical review threads addressed

Verification

  • PYTHONPATH=backend/ai-service backend/.venv/bin/pytest -q backend/ai-service/tests (45 passed)
  • targeted Ruff checks across every changed Python file
  • git diff --check

Safety notes

  • invalid or tampered PAD artifacts never replace an existing verified model
  • real-mode readiness remains fail closed for missing, unlisted, unloadable, or contract-incompatible PAD models
  • PAD inference never scores zero-face or multi-face frames

@quarj0
quarj0 marked this pull request as ready for review August 12, 2026 17:45
@quarj0

quarj0 commented Aug 12, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d30f5218d8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread backend/ai-service/app/pipeline.py Outdated
Comment thread backend/ai-service/app/pipeline.py Outdated
Comment thread backend/ai-service/app/pad.py
Comment thread backend/ai-service/app/settings.py
Comment thread backend/ai-service/app/pad.py
@quarj0

quarj0 commented Aug 12, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4e5b50ef03

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread backend/ai-service/app/settings.py
Comment thread backend/ai-service/app/pad.py
@quarj0

quarj0 commented Aug 12, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 8cbbe644cf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@quarj0
quarj0 merged commit 4b914b6 into main Aug 13, 2026
39 checks passed
@quarj0
quarj0 deleted the fix/281-pr222-pad-review branch August 13, 2026 12:28
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.

1 participant