mars
MARS-107
Mars appEvents conform to fleet standard (evolutiva-appevents-standard.md): add categoryId uuid FK->lookupOptions + seed appEventCategory group (16 canonical + practica/studentAssignment/assignment) + backfill 18 free-text values w/ mapping; add 4 promoted cols (httpStatus/durationMs/path/failureCode); add logError/logWarn/logInfo wrappers + pickKnown + isCritical sync-bypass; append-only trigger (GUC-bypass) AFTER appEventRelays sidecar cutover (replace detail.relay.delivered UPDATE pattern); replace level-only prune with 5-cat-security tiered retention; canonical v_appEvents_* views; legacy_events sink. Staged db+coder. BLOCKED on committed SSOT + Elazar priority call.
Backlog normal
unassigned
Questions
No questions.
Activity
-
Fleet rulings from venus appEvents analysis (Elazar, 2026-06-13) to honor in conform: (a) 404 is a DEFECT — level at warn/error, never info 'expected churn' (the old Mars convention venus inherited); surface each. Mars has NO middleware.ts so server-side 404 capture is likely incomplete → track a request-instrumentation gap. (b) viewport/client-env telemetry = ONE event per session + skip bot UAs (venus had 60/89 events as viewport spam, burns egress). Mars recent-window scan showed zero viewport events — confirm Mars doesn't fire/capture it; add the 1/session+skip-bots rule regardless. Both also belong in the appevents-standard SSOT text.
-
Fleet rulings from venus appEvents analysis (Elazar 2026-06-13) for conform: (a) 404 is a DEFECT - level at warn/error never info 'expected churn'; surface each. Mars has NO middleware.ts so server-side 404 capture likely incomplete -> track request-instrumentation gap. (b) viewport/client-env telemetry = ONE event per session + skip bot UAs (venus had 60/89 viewport spam, burns egress). Mars recent scan showed zero viewport events - confirm Mars doesn't fire/capture; add 1/session+skip-bots rule regardless. Both belong in appevents-standard SSOT text.
-
TRIGGER ERRATUM (pm-venus 2026-07-03, found in VENUS-4 backfill): the appEvents append-only immutability trigger (SSOT §5.1) uses RETURN OLD on a BEFORE UPDATE OR DELETE trigger. In a BEFORE-UPDATE trigger RETURN OLD writes the UNCHANGED row, so any GUC-bypassed correction/backfill UPDATE (this WI's categoryId backfill + re-level of 18 free-text values) silently NO-OPS — reports 'UPDATE N' success but changes nothing. Only DELETE (retention) exercises the path, so it was never noticed. WHEN BUILDING THIS WI: do NOT trust the UPDATE rowcount — verify every bypassed UPDATE with a read-back. General fix = fn body 'IF TG_OP=''DELETE'' THEN RETURN OLD ELSE RETURN NEW', but that's a semantics change to the ratified trigger → needs a fleet decision + SSOT §5.1 erratum before applying. Venus workaround (one-time backfill): drop+recreate the trigger byte-identical inside the migration txn (ACCESS EXCLUSIVE lock covers the gap). Mars has NOT yet run any bypassed appEvents UPDATE (this WI still backlog), so no data was silently dropped.
-
TRIGGER ERRATUM (pm-venus 2026-07-03, VENUS-4): appEvents append-only trigger (SSOT 5.1) uses RETURN OLD on a BEFORE UPDATE OR DELETE trigger. In BEFORE-UPDATE, RETURN OLD writes the UNCHANGED row, so any GUC-bypassed backfill/correction UPDATE (this WI's categoryId backfill + re-level of 18 free-text values) silently NO-OPS: reports UPDATE N success but changes nothing. Only DELETE (retention) exercises it, so never noticed. WHEN BUILDING: do NOT trust the UPDATE rowcount, verify every bypassed UPDATE with a read-back. General fix = IF TG_OP=DELETE THEN RETURN OLD ELSE RETURN NEW, but that is a semantics change to the ratified trigger -> needs fleet decision + SSOT 5.1 erratum first. Venus one-time workaround: drop+recreate trigger byte-identical inside the migration txn (ACCESS EXCLUSIVE lock covers the gap). Mars has NOT yet run any bypassed appEvents UPDATE (WI still backlog), no data silently dropped.
task
2026-06-13 by wi-cli-venus
6w ago