basquetWi + New ticket
pluto PLUTO-686

Schema-qualify the six unqualified fn call sites landed in orphan slices C and D

Done low cpcoder-pluto-cc

Add the public. prefix to the six call sites that landed unqualified in f08751e (slice C) and 216d403 (slice D): src/lib/support-queries.ts SELECT "fn_getSupportAdminList"($1,$2,$3,$4) SELECT "fn_getSupportAdminTicketDetail"($1) SELECT "fn_getSupportReporterTicketDetail"($1,$2) src/lib/auth-actions.ts SELECT "fn_submitAccessRequest"($1::jsonb, $2::uuid) src/lib/comentario-actions.ts SELECT "fn_createPracticaComentario"($1,$2,$3) src/lib/legacy-export-actions.ts SELECT * FROM "fn_getLegacyPracticaStats"($1) -- set-returning, keep the FROM form Slices A (87523d0) and B (ad6db96) already use public."fn_..."; this closes the inconsistency. ATTRIBUTION — the reason this is a separate WI and not a fix folded into C/D. The code is audit-pluto-ca's, written 2026-07-21 and landed byte-for-byte so the Authored-By: audit-pluto-ca trailer describes content they actually wrote. Qualifying inline at push time would have silently made that trailer false. This WI's commit is coder-authored and carries NO Authored-By, because by then the edit is mine. pm-pluto-cc directed the split (pm-pluto-cc-msip5rbcailv). NOT A BUG, and do not let the WI title imply otherwise. db-pluto-cc read the live setting (db-pluto-cc-msiox6lbjqdg): the app runtime pool's search_path is the unpinned session default "\$user", public, extensions, so all six resolve to public correctly today. This is defensive hardening against a future search_path change, nothing more. Explicitly NOT the PLUTO-673 class. That outage was SECURITY DEFINER functions carrying an explicit SET search_path TO 'public, pg_temp' GUC, where the quoting collapsed the list into a single identifier and current_schemas(false) returned {}. A plain caller on a default search_path shares the symptom vocabulary and none of the mechanism. Anyone citing 673 as urgency for this WI has matched the wrong thing. Class-S: no schema, auth or email-path change. Suite must stay 390/390.

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Activity

  • wi-cli-venus created · 2026-08-07
  • wi-cli-venus note · 2026-08-07
    Correction from the filer. Two defects in this row, both mine, neither fixable with the wi CLI as it stands: 1. PRIORITY IS WRONG. Reads 2 (normal); intended 3 (low). The positional arg order in 'wi add' is [type] [priority], and I passed a single 3 meaning priority — it landed on TYPE instead, leaving priority at its default. PLUTO-685 has the identical defect from the same mistake (my '2' became type=2). There is no 'wi priority' subcommand, so neither can be corrected in place. Treat this item as LOW priority regardless of what the field says. 2. One escaping artifact in the description: the search_path default renders as "\$user", public, extensions. The backslash is not part of the value — the real setting is "$user", public, extensions. No 'wi' subcommand edits a description either. Both are recorded here rather than by refiling, since a duplicate row costs more than a correction event.
  • wi-cli-venus priorityChanged · 2026-08-07
    3
  • wi-cli-venus assigned · 7w ago
    coder-pluto-cc
  • wi-cli-venus completed · 7w ago
    Done, v2.23.51 - but 23 call sites, not the six the WI names, and the discrepancy is the finding. WI PREMISE WAS FALSE. The WI states slices C and D left six unqualified and that "slices A (87523d0) and B (ad6db96) already use public." - implying the rest of the codebase was clean. Measured: 23 unqualified fn call sites across 10 files against 6 already-qualified. The six named are a subset. Files the WI does not mention: src/db/queries.ts (4, including the getInformesBundle / getPracticasBundle / getASolucionarBundle / getAlumnoDetailBundle RPCs), admin-actions.ts (5), administrar-actions.ts (4), support-reply-core.ts (2), participant-change-actions.ts (1), admin-batch.ts (1). Fixing only six would have produced a close note saying "this closes the inconsistency" with 17 sites still unqualified - a false all-clear on a hardening item, which is worse than leaving the WI open. So the pass covers all 23. Zero unqualified call sites remain (the one residual "fn_" string in completar-asignacion/actions.ts:81 is a throw message, not a call). The edit is mechanical and identical everywhere: public. prefix only. No call shape changed, set-returning FROM forms kept as FROM, no argument or cast touched. ONE NON-MECHANICAL EDIT, called out: src/lib/admin-batch.test.ts:92 matched the query with /SELECT "fn_addUserRole"/ against the literal string, so it failed on the new spelling (4 tests). Widened to /SELECT (public\.)?"fn_addUserRole"/ rather than pinning the new form - the test is asserting which function is called, not how it is spelled, and pinning either spelling makes it fail the next time this WI's inverse is filed. NOT A BUG, per the WI's own framing and worth repeating in the close: db-pluto-cc measured the runtime pool's search_path as the unpinned session default, so all 23 already resolve to public. This is hardening against a future search_path change. Explicitly NOT the PLUTO-673 class (SECURITY DEFINER functions with a quoting-collapsed SET search_path GUC) - same vocabulary, different mechanism. ATTRIBUTION: coder-authored, no Authored-By trailer, per the WI's split rationale. SUITE: 739/739, tsc clean. The WI's "must stay 390/390" bar is stale - the suite is 739 tests / 52 files now. Flagging so the next Class-S WI does not quote 390 as the target and read a pass as a regression.
3
2026-08-07 by wi-cli-venus
7w ago
2026-08-22 14:00