What
Finding F85 from audit/02-static-audit.md records a DB connection leak in flashcore/cli/_review_logic.py. The connection opened during review_logic() is not guaranteed to be closed in all exit paths, including the typer.Exit(code=1) path added by the F82 fix at _review_logic.py:45-47.
Why deferred
Explicitly classified as nice-to-have / separate PR in both .aiv/plans/c2-f82-plan.md §6 OUT OF SCOPE and the PR completion contract's OUT-OF-SCOPE REMINDERS:
"F85 (DB connection leak in _review_logic.py) — separate PR for F85."
F85 is a distinct audit finding from F82 (infinite retry loop). Bundling it into the F82 PR would violate the atomic-commit contract and complicate the evidence trail.
Acceptance criteria
review_logic() closes the DB connection in all exit paths (normal return, typer.Exit, and uncaught exception) — use a context manager or try/finally
- The
typer.Exit(code=1) path added in _review_logic.py:45-47 by the F82 fix does not leak a connection
- Tests verify connection closure under: normal completion, all-fail (triggering
typer.Exit), and exception from submit_review
aiv check on the F85 AIV packet exits with 0 blocking errors
audit/02-static-audit.md F85 entry updated to record CORRECTED: <commit-sha>
Reference
Audit source: https://github.com/ImmortalDemonGod/flashcore/blob/5bb2ea2ab72239e0d2de7cc51fd4b5b766e44bfb/audit/02-static-audit.md (locate the F85 entry)
What
Finding F85 from
audit/02-static-audit.mdrecords a DB connection leak inflashcore/cli/_review_logic.py. The connection opened duringreview_logic()is not guaranteed to be closed in all exit paths, including thetyper.Exit(code=1)path added by the F82 fix at_review_logic.py:45-47.Why deferred
Explicitly classified as nice-to-have / separate PR in both
.aiv/plans/c2-f82-plan.md §6 OUT OF SCOPEand the PR completion contract's OUT-OF-SCOPE REMINDERS:F85 is a distinct audit finding from F82 (infinite retry loop). Bundling it into the F82 PR would violate the atomic-commit contract and complicate the evidence trail.
Acceptance criteria
review_logic()closes the DB connection in all exit paths (normal return,typer.Exit, and uncaught exception) — use a context manager ortry/finallytyper.Exit(code=1)path added in_review_logic.py:45-47by the F82 fix does not leak a connectiontyper.Exit), and exception fromsubmit_reviewaiv checkon the F85 AIV packet exits with 0 blocking errorsaudit/02-static-audit.mdF85 entry updated to recordCORRECTED: <commit-sha>Reference
Audit source:
https://github.com/ImmortalDemonGod/flashcore/blob/5bb2ea2ab72239e0d2de7cc51fd4b5b766e44bfb/audit/02-static-audit.md(locate the F85 entry)