chore: remove uncertain orphaned definitions

Co-authored-by: Copilot App <[email protected]>
This commit is contained in:
Jim Lancaster
2026-08-23 18:53:54 -05:00
co-authored by Copilot App
parent c52d41ec33
commit d4ae97c1b1
4 changed files with 0 additions and 56 deletions
-18
View File
@@ -13,24 +13,6 @@ class BenchmarkModel(BaseModel):
model_config = ConfigDict(extra="forbid", frozen=True) model_config = ConfigDict(extra="forbid", frozen=True)
class BenchmarkItem(BenchmarkModel):
"""One private benchmark item referenced by archival identity."""
source_id: UUID
source_digest_sha256: str = Field(pattern=r"^[0-9a-f]{64}$")
categories: frozenset[str] = Field(min_length=1)
reference_transcription: str = Field(min_length=1)
class BenchmarkManifest(BenchmarkModel):
"""Versioned private benchmark definition without copied source media."""
schema_name: str = "transcription.private-benchmark"
schema_version: str = "1"
name: str = Field(min_length=1)
items: tuple[BenchmarkItem, ...] = Field(min_length=1)
class EditorialAssessment(BenchmarkModel): class EditorialAssessment(BenchmarkModel):
"""Manually reviewed errors not represented adequately by CER or WER.""" """Manually reviewed errors not represented adequately by CER or WER."""
-11
View File
@@ -73,14 +73,3 @@ async def dispose_engine(database_url: str) -> None:
engine = _ENGINES.pop(database_url, None) engine = _ENGINES.pop(database_url, None)
if engine is not None: if engine is not None:
await engine.dispose() await engine.dispose()
async def dispose_all_engines() -> None:
while _ENGINES:
_, engine = _ENGINES.popitem()
await engine.dispose()
async def refresh_engine(database_url: str) -> AsyncEngine:
await dispose_engine(database_url)
return get_engine(database_url)
@@ -10,7 +10,6 @@ from typing import TypeVar
from nicegui import ui from nicegui import ui
from transcription.errors import AppError from transcription.errors import AppError
from transcription.errors import ErrorCategory
from transcription.errors import canonical_error_category from transcription.errors import canonical_error_category
from transcription.errors import classify_unexpected_error from transcription.errors import classify_unexpected_error
@@ -70,11 +69,3 @@ def show_error(exc: Exception, *, title: str, operation: str) -> None:
def display_error_category(error: AppError) -> str: def display_error_category(error: AppError) -> str:
"""Return the canonical UI-facing category label for an AppError.""" """Return the canonical UI-facing category label for an AppError."""
return canonical_error_category(error) return canonical_error_category(error)
def summarize_error(exc: Exception, *, operation: str) -> str:
"""Return short one-line summary for status labels."""
error = to_app_error(exc, operation=operation)
if error.category == ErrorCategory.INTERNAL_UNEXPECTED:
return f"Unexpected error (ref: {error.error_id})"
return f"{error.message} (ref: {error.error_id})"
-18
View File
@@ -31,11 +31,6 @@ REGISTRATION_DECORATOR_PREFIXES = ("router.", "app.", "ui.page")
# rationale. Removing the code means removing the entry; adding an entry means an # rationale. Removing the code means removing the entry; adding an entry means an
# explicit decision to keep unreferenced code. # explicit decision to keep unreferenced code.
KNOWN_ORPHANS: dict[str, str] = { KNOWN_ORPHANS: dict[str, str] = {
"BenchmarkManifest": (
"Benchmark manifest model in benchmarking.py with no current caller. "
"Uncertain - follow-up: confirm whether the benchmarking entrypoint is still "
"intended before removing."
),
"DocumentService.is_document_type_referenced": ( "DocumentService.is_document_type_referenced": (
"Read helper currently bypassed by callers in favor of direct delete guards. " "Read helper currently bypassed by callers in favor of direct delete guards. "
"Retained for now to preserve service API stability during cleanup." "Retained for now to preserve service API stability during cleanup."
@@ -92,19 +87,6 @@ KNOWN_ORPHANS: dict[str, str] = {
"Public read helper currently unused by runtime flows, but retained as part of " "Public read helper currently unused by runtime flows, but retained as part of "
"the SourceService API pending endpoint consolidation." "the SourceService API pending endpoint consolidation."
), ),
"dispose_all_engines": (
"Engine lifecycle helper in db/engine.py. Uncertain - follow-up: operational "
"teardown utility with no runtime or test caller."
),
"refresh_engine": (
"Engine lifecycle helper in db/engine.py. Uncertain - follow-up: paired with "
"dispose_all_engines and equally unreferenced."
),
"summarize_error": (
"Error-presentation helper in ui/components/error_presenter.py that no page or "
"component calls. Uncertain - follow-up: superseded by the presenter's other "
"entrypoints."
),
} }