Cut the dead attic workers, and file what the audit left standing
attic/worker_ocr.py and attic/worker_parse.py are 224 lines imported by nothing and named in no doc. The OCR stage was removed when narration moved to the director beat. The two design notes in attic/ stay, they are history. worker_vision._panel_size had one reference and it was the definition. The audit's larger finding is filed rather than fixed: call_gemma4, _extract_json and _strip_thought exist in both worker_vision and worker_script and have already diverged. That matters because the JSON repair pass can fabricate dialogue, so a fix would land in one copy and not the other. It is caveats/audit-open.md#gemma-helpers-duplicated with its revisit trigger. HANDOFF.md carries the rest: _wrap2 against textwrap, the duplicated ONNX preprocessing, and worker_layers pointing at a legacy/ directory that was never tracked in git. Checked: ruff clean, worker_vision and worker_render self-checks pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -367,16 +367,6 @@ def _mark_has_face(img, chars: list) -> list:
|
||||
return chars
|
||||
|
||||
|
||||
def _panel_size(path: str) -> tuple:
|
||||
"""(width, height) of a panel image, or (0, 0) when it cannot be read."""
|
||||
import cv2
|
||||
img = cv2.imread(path)
|
||||
if img is None:
|
||||
return (0, 0)
|
||||
h, w = img.shape[:2]
|
||||
return (w, h)
|
||||
|
||||
|
||||
@app.post("/vision")
|
||||
async def vision(data: VisionInput):
|
||||
local = transport.get(data.panel_uri, f"{SHM}/vision_{uuid.uuid4().hex[:8]}.png")
|
||||
|
||||
Reference in New Issue
Block a user