mars
MARS-559
image-proxy: one-round-trip PG image classifier primitive (replace 2 sequential queries)
Done low
unassigned
Audit-mandated follow-up to MARS-558 (non-blocking, DB-lane, push-compute-to-Postgres). Today /api/image/[id] costs 2 sequential queries per profile request (práctica-miss then owner-lookup); /usuarios widened real traffic over that path. Spec: a SECURITY-INVOKER fn/view taking an image id, returning in ONE round trip {kind: clinical|profile|none, ownerUserId, practicaStudentUserId, comisionId}, clinical classification taking precedence when an id matches both. Node route becomes one call + branch, no Node-side relational workflow. db-mars-cc owns; coder-mars-cc repoints the route.
Questions
No questions.
Activity
-
One-round-trip public.classify_image PG primitive (mig 087) replaces the 2 sequential per-request queries in /api/image/[id]; +mig 088 partial UNIQUE indexes for deterministic classification + indexed profile lookup. Auth/clinical scoping + MARS-558 widening preserved. @c03200f/v2.58.3, audit PASS, Class-A PTD green.
task
3w ago by wi-cli-venus
3w ago
2026-07-24 21:46