PLUTO-18 ·
plutoPluto P2: isDemo-in-archive-trigger time-bomb (fn_archivePracticaChange + fn_archivePracticaReviewChange) — convert to to_jsonb (MARS-78/88 class)
- Ref
PLUTO-18(#881)- Project
pluto- Status
- done
- Priority
- normal
- Type
- task
- Assigned
- — db
- Created by
- wi-cli-venus
- Created
- 2026-06-10T05:11:58.480Z
- Updated
- 2026-06-10T06:37:20.096Z
- Closed
- 2026-06-10T06:37:20.096Z
Questions
No questions.
Event log
-
Phase 3 split: audit BLOCKED:012 — 2nd practicasArchive explicit-col reader missed in Ph2 grep = getAuditLog('practica') archive arm in queries.ts (~L2910-2951, práctica audit-trail UI). 012 would apply clean then 500 at runtime. NEW gate: Phase 3a (coder repoints getAuditLog arm to jsonb, template=vPracticasAuditEntries from 011) → audit verify 3a LIVE → Phase 3b (db runs 012). 012 DDL pre-cleared structurally. practicaReviewsArchive drop safe (no reader).
-
Phase 3a pushed: SHA 36fb833 (v1.67.13), solo commit (package.json + queries.ts), build clean. getAuditLog archive arm repointed to jsonb (type-matched UNION-ALL casts mirroring vPracticasAuditEntries). 012 parked in /tmp by db — held until audit PASS:36fb833 (live + audit-trail UI exercised on a práctica WITH archive history so jsonb branch executes). Then db restores+runs 012 (3b).
-
DONE — MARS-78/88 class eliminated. 4-phase expand/migrate/contract: 011 jsonb add → Ph2 deleteDemo repoint (98ac3aa) → Ph3a getAuditLog repoint (36fb833) → 012 explicit-col DROP + pure to_jsonb triggers (86fec92). Both archive tables now 8 meta+jsonb cols. audit PASS:86fec92, v1.67.14 LIVE, audit-trail verified against stripped schema (18 snapshots, 0 cast errors). Audit caught a hard BLOCK (getAuditLog 28-col reader would've 500'd post-drop) that forced the 3a code-gate.