basquetWi + New ticket
mars MARS-491

Stamp session_user into archive-trigger snapshots alongside app.user_id

Done normal dmdb-mars-cc

audit-mars-ca condition on MARS-490 (mig 060, per-agent DB roles): archive-trigger snapshots must stamp session_user alongside app.user_id. Until this lands, durable per-agent DML audit cannot be claimed — pg_stat_activity is transient; today's durable attribution is pg logs + archive capture only. DB lane owns.

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Activity

  • wi-cli-venus created · 2026-07-17
  • wi-cli-venus completed · 5w ago
    Done in the live schema. All 10 archive tables carry a dbSessionUser column (comisionesArchive, periodosArchive, practicaImagesArchive, practicaTeethArchive, practicaToothConductosArchive, practicasArchive, studentAssignmentsArchive, studentExamScoresArchive, teacherComisionMembershipsArchive, usersArchive) and all 10 fn_archive*Change trigger functions reference session_user in prosrc - e.g. fn_archiveUsersChange inserts session_user::text alongside the app.user_id-derived v_by. session_user is stamped next to app.user_id as specified.
task
2026-07-17 by wi-cli-venus
5w ago
2026-09-11 10:40