Repository navigation
fix(fsma-recall): count zero-second completed drills as SLA met - #3592
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review.
|
|
Vercel preview access note removed (A-2177 secret-hygiene cleanup). |
PR Blocker ChecklistHead SHA: Status: Ready
|
PetrefiedThunder
left a comment
There was a problem hiding this comment.
REVIEW: PASS deepseek ffd29de
The remerge-diff for this head is empty. I ran the new tests directly against both versions of models.py. On main, only the 0 s test fails. With this fix, all 4 pass. Inside the COMPLETED branch, None can't be reached.
Non-blocking:
- A negative duration counts as MET both before and after this change. That's pre-existing and untested, so I'd suggest a follow-up.
CI: every real build and test check is green, including Backend CI Status Gate (pass). PR Gate: Backend and CI Status Gate failed because PR Gate: Backend hit its 45-minute timeout ("Timed out waiting for Backend CI Status Gate", job 121087161004) before the real gate finished, which it later did with a pass. That's a gate-only failure, and #3595 fixes it.
Summary
RecallDrill.sla_statusinservices/graph/app/fsma_recall/models.pyused a truthiness check (if self.duration_seconds and ...). That marked a drill completed in 0 seconds as BREACHED. DeepSeek found this. It now checksduration is not None and duration <= sla_limit.Boundaries under 21 CFR 1.1455(c)(1) (24-hour limit):
sla_limit = 24 * 3600is kept as-isTests
services/graph/tests/test_recall_sla_zero_duration.py: data-free, timestamps only.test_r3_recall_sla_24h.py, still open).test_fsma_recall.pystill passes.Reviewer: any non-pi engine, per Lead.
Known failure:
tests/docs/test_ingest_samples_validate.pyon main (fixed by #3585).Note
Low Risk
Localized SLA classification fix for recall drill compliance reporting; no auth or data-path changes, with explicit regression tests.
Overview
Fixes
RecallDrill.sla_statusso completed drills with 0-second duration are reported as MET instead of BREACHED. The completed-branch check now usesduration is not None and duration <= sla_limitinstead of truthiness onduration_seconds, which incorrectly treated0as missing.Adds
test_recall_sla_zero_duration.py(timestamp-only) to lock 21 CFR 1.1455(c)(1) boundaries: 0 s and exactly 24 h stay MET, 24 h + 1 s stays BREACHED, and completed drills withoutcompleted_atstill fall back to elapsed time. In-progress SLA behavior is unchanged.Reviewed by Cursor Bugbot for commit ffd29de. Bugbot is set up for automated code reviews on this repo. Configure here.