mars
MARS-603
db-mars-cc: correct setArchiveContext GUC key for manual psql writes (app.user_id, not app.archive_actor_id)
Done low
unassigned
db-mars-cc used GUC key app.archive_actor_id instead of app.user_id when calling setArchiveContext via manual psql for the Cami Baroni email-sync fix (2026-08-02, MARS-602 thread) -- archiveReason landed correctly but archivedBy is NULL on that archive row (append-only, unfixable retroactively). Fix the go-forward habit/helper so future manual archive-context psql writes use the correct key. Low priority, procedural not app-code.
Activity
-
Closed after verified corrective convention: applied migrations 161, 162, and 163 set app.user_id and app.archive_reason transaction-locally via set_config before writes; live archive rows have non-NULL archivedBy and archiveReason (including 8 comisionesArchive rows from 161). psql cannot call src/lib/archive-context.ts because it is server-only TypeScript; the trigger reads these GUCs through current_setting.
task
2026-08-02 by wi-cli-venus
4w ago
2026-09-13 03:30