refactor(admin): move Needs review recording into its own mixin

_record_scanned_review, _record_review_sync, record_review_file and
_log_review_items move unchanged from py/api/admin.py to
py/api/review_recording.py (ReviewRecordingMixin), keeping admin.py from
growing further past the size ceiling. No behaviour change.
This commit is contained in:
Vito Sansevero
2026-10-22 17:41:15 -07:00
parent beaba9ae84
commit f00933ee16
4 changed files with 80 additions and 59 deletions
+2 -2
View File
@@ -222,9 +222,9 @@ class TestScanRecording(ReviewTestCase):
if recorder is None:
counts = api._ingest_scan_batch_sync(batch, roots, outcomes)
else:
from py.api import admin
from py.api import review_recording
with patch.object(admin, "record_ambiguous_file", recorder):
with patch.object(review_recording, "record_ambiguous_file", recorder):
counts = api._ingest_scan_batch_sync(batch, roots, outcomes)
prompts = api.db.get_recent_prompts()["prompts"]
return counts, outcomes, sorted(p["text"] for p in prompts)