basquetWi + New ticket
venus VENUS-309

users.updatedAt not DB-maintained — raw SQL writes leave it stale

Done normal unassigned

coder-venus-cc found while writing VENUS-305's bindColumnWithEvent: users.updatedAt is APP-maintained only, not DB-maintained (users' only trigger is preventNestedPersona — no BEFORE UPDATE touch trigger exists). Confirmed live: db-venus-cc's raw UPDATE bound 2 authId/googleSub rows and updatedAt still reads the row's original createdAt value. Any raw-SQL write to users (migrations, db-lane repairs, ad-hoc UPDATEs) silently leaves updatedAt stale. Nothing may treat users.updatedAt as authoritative for change detection, cache invalidation, sync, or 'recently modified' reporting until fixed. Fix: a BEFORE UPDATE DB-side trigger (matches the pattern already used elsewhere for auto-touch columns), OR failing that a documented fleet-wide ban on trusting this column specifically. Also cost us the ability to reconstruct a real bind timestamp for the 34 pre-invariant rows in VENUS-308 bucket (1).

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Questions

No questions.

Activity

  • wi-cli-venus created · 2w ago
  • wi-cli-venus completed · 2w ago
    DB-side BEFORE UPDATE trigger (venus60-users-updatedat-trigger.sql) live in prod; doc-of-record pushed SHA 7d8b612/v1.11.7 (db-venus-cc authored, coder-venus-cc pushed, no push authority in db lane). App-side identity-stamp updatedAt maintenance also landed in 785fb35. Class-S self-PTD: live /api/health v1.11.7==package.json, dbOk true.
task
2w ago by wi-cli-venus
2w ago
2026-07-30 06:59