Commit 2c55fae
committed
design: explicit reclock + INTEGRATE combinator; resolve mz_diff as data; no DELTA TABLE kind
Reworks the surface per review discussion:
- Resolve the diff fork: change_diff is DATA (not the persist multiplicity).
CHANGES emits it as a +1 row with the signed count in the column.
- Sharpen the duality: differentiate/integrate are the carrier-preserving inverse
pair (both domain A); the A->B move and the commit-time/freeze non-determinism
live ONLY in RECORD. INTEGRATE is the pure, definite inverse.
- INTEGRATE becomes a SQL combinator INTEGRATE(rel, TIME=>, DIFF=>, RECLOCK=>) that
accumulates diff per row and thresholds at max(0, sum) (safe by construction; not
repeat_row). Stateful reduce; memory proportional to live output.
- Collapse DELTA TABLE into a regular table + an explicit, named, relation-valued,
engine-written/user-read-only reclock object (source-remap precedent). No new
collection kind. Kills impl M2; reshapes M3 (no -1/+1 consolidation).
- Bounding is an ordinary DELETE of changelog rows (real retraction); the
integral-preserving form is data-domain compaction, now the named primitive.
- Columns are ordinary user-named data (no reserved mz_ names; change_ts/change_diff
illustrative).
- Propagate through both docs: duality, surface, time domains, reclock decision,
bounding, dependencies, MVP, feasibility, alternatives, open questions; impl
context/architecture/change-map/risks (M2/M3/M4)/phases/open-Qs.
https://claude.ai/code/session_015YFH7J7PaEqkBSrAQYaq8H1 parent 123a768 commit 2c55fae
2 files changed
Lines changed: 410 additions & 358 deletions
0 commit comments