feat(incremental): a backend over a source that reports its changes (improvise-rnak)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VdfEGXA7aJ6ftMsCc9PJze
This commit is contained in:
Claude (dbsp-sources)
2026-10-10 18:12:04 -07:00
committed by Edward Langley
parent 315e271905
commit 9d675c9c33
13 changed files with 571 additions and 24 deletions
@@ -801,3 +801,44 @@ User-visible changes this evidence also covers: a cycle that only flips a zero's
same cycle over nonzero data always was; a cycle fed a NaN (`A = A + 1`, `A = A` with `A` NaN) settles on
NaN instead of `circular`.
### a_live_source_matches_eager_over_the_corpus_and_its_edits
improvise-rnak. `Incremental` over a `LiveTable` (the model's cells moved into the table, the model's
own store emptied) against `Eager` over the shipped documents, their views and `edits_for`
(trimmed to three edits above 40 cells, as `corpus_eager` does). Rivals, each failing it by name: `sync`
drains nothing; the model not put over the feed (formulas read an empty store); a shape built from an
empty store; the stems built from the model's own store.
### changes_named_by_the_caller_are_maintained_as_the_drain_would
`apply_changes` with the changes the table reports, against `Eager` after each of four edits (an
overwrite, a new record under an item the model lacks, a removal, a text), asking every probe of every
step so far. Rivals: `apply_changes` ignores its changes (only this test and no other fails it); the
stems from the owned store.
### a_write_is_invisible_until_it_is_drained
The contract of a `ChangeSource`: a read after a write and before the drain sees the old value, after
`sync` the new one, and a second `sync` changes nothing. Rivals: the table shows a write at once (this
test alone fails it, which is why the contract has a test of its own: the differential cannot see it,
since every shape it asks about was built before the write); `sync` drains nothing.
### the_cost_of_a_reported_change_does_not_depend_on_the_size_of_the_table
One overwrite reported by the table, after the shape is built, at 216 and at 864 cells: two group
updates and two sum updates, no build, equal meters, and zero snapshot rows served by the source
for the change. The build itself serves exactly the table (`n * n * 6` rows), so the zero is a count
that could have been positive. Rival: every sync rebuilds the shapes (`builds` and `built_cells` move,
and the table serves the snapshot again).
### an_overwrite_by_the_same_value_moves_nothing
A table that reports an overwrite of a cell by its own value leaves the fold where it was (23). Rival:
the model not over the feed fails it with the others.
### a_live_source_matches_eager_over_random_formula_and_cell_edits
`Fed` against `Eager` over random formula and cell edits on the formula fixture (no views, so the binary
stays under two seconds). Rivals: `sync` drains nothing, the model not over the feed, a shape built from an
empty store and the stems from the owned store all fail it.