Jeremy Blankenship
Jeremy Blankenship
**Severity**: P1 (duplicate admission risk under concurrency) **Component**: `enoch_control_plane/control_plane/supabase_store.py:1713` (Postgres adapter) **Evidence**: ```python def _insert_research_admission(self, *, idempotency_key, candidate_id, ...): existing = self._query( "SELECT admission_id, candidate_id, ... FROM research_admissions WHERE idempotency_key...
**Severity**: P1 (dispatch metadata loss on retries) **Component**: `enoch_control_plane/control_plane/store.py:4783` (dispatch claim) **Evidence**: ```python def mark_dispatch_started(self, *, run_id, project_id, ...): with self._connect() as conn: inserted = self._append_event_in_conn(...) # SELECT-then-INSERT if not...
**Severity**: P1 (audit-trail integrity + 500 on duplicates) **Component**: `enoch_control_plane/control_plane/store.py:1905` (SQLite event log) **Evidence**: ```python def _append_event_in_conn(self, conn, *, idempotency_key, ...): row = conn.execute( "SELECT event_id, event_type, payload FROM events...
**Severity**: P1 (resilience) — most transient Supabase errors cause immediate hard failure **Component**: `enoch_control_plane/control_plane/supabase_store.py:1664,2581-2598` **Evidence**: ```python def _query(self, sql: str, params: Sequence[Any] = ()) -> list[dict[str, Any]]: last_exc: Exception |...
**Severity**: P2 (in-flight `claim_dispatch_candidate` flips `status` to `dispatching` between SELECT and UPDATE; import's UPDATE then overwrites `status` back to `queued`, silently un-claiming an active dispatch) **Component**: `enoch_control_plane/control_plane/store.py:702` **Evidence**: ```python def...
**Severity**: P2 (50k-row snapshot holds the SQLite write lock for the full duration; bounded only by what the caller sends) **Component**: `enoch_control_plane/control_plane/store.py:2060` (`ControlPlaneStore.import_snapshot`) **Evidence**: ```python def import_snapshot(self, request): queue_rows =...
**Severity**: P2 (promotion-batch latency scales linearly) **Component**: `enoch_control_plane/control_plane/router.py:4503` (research promotions) **Evidence**: ```python def _promote_research_rows(self, promotion_candidates, max_promotions=10): results = [] for row in promotion_candidates[:max_promotions]: result = store.promote_research_candidate(row) # 6 inserts: event,...
**Severity**: P2 (2× full-table scans per notion sync) **Component**: `enoch_control_plane/control_plane/supabase_store.py:4181` (notion sync) **Evidence**: ```python def notion_execution_update_projection(self): papers = self.paper_rows() # full SELECT with 5 LEFT JOINs for queue_item in self.queue_rows():...
**Severity**: P2 (backfill latency scales linearly with paper count) **Component**: `enoch_control_plane/control_plane/store.py:2692` (paper review backfill) **Evidence**: ```python def _paper_review_backfill_candidate(self, paper): queue_row = self.queue_row(_text(paper.get('project_id'))) # full SELECT with ~12 correlated subqueries ......
**Severity**: P2 (dashboard latency grows with paper count) **Component**: `enoch_control_plane/control_plane/store.py:2637` (paper review) **Evidence**: ```python def paper_review_row(self, *, paper_id): for row in self._paper_review_join_rows(): if row['paper_id'] == paper_id: return row return None...