Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
190 commits
Select commit Hold shift + click to select a range
4205619
docs(plans): plan stage 1 of ITL-1466, three nested row ids (ITL-1471)
eywalker Nov 26, 2026
e64c73c
feat(nodes): define the entry, instance and record ids in one module …
eywalker Nov 26, 2026
f5cdbc8
feat(nodes)!: key rows by instance and record id; layouts pdb_v2, odb…
eywalker Nov 26, 2026
eba3220
test(golden): pin a pipeline table's instance ids; the approved golde…
eywalker Nov 26, 2026
01024ff
docs: the three row ids, the v2 layouts and the changelog fragment (I…
eywalker Nov 26, 2026
8308b01
docs: name the pipeline row key in two comments (ITL-1471)
eywalker Nov 26, 2026
756facb
test(pipeline): accept either async outcome for two copies of one inp…
eywalker Nov 26, 2026
b556376
docs: name ITL-1482 where the SQLite refusal of an operator cache is …
eywalker Nov 26, 2026
e45e75f
test: regression tests for the review findings on the row ids (ITL-1471)
eywalker Nov 26, 2026
941cf04
fix(nodes): a placeholder on the async route finds its result by the …
eywalker Nov 26, 2026
27b28ce
fix(provenance): a trace resolves a held row by its instance (ITL-1471)
eywalker Nov 26, 2026
8fe95b8
fix(datagrams): the instance id reads a row's typed token columns (IT…
eywalker Nov 26, 2026
a2803ea
docs: the Arrow hash summary names the three ids; rules for tokens, t…
eywalker Nov 26, 2026
2d8a6a8
test(pipeline): build the inactive pod through the decorator (ITL-1471)
eywalker Nov 26, 2026
086e70f
test(pipeline): a stored row recomputes its ids whatever its token co…
eywalker Nov 26, 2026
1f39198
fix(nodes): a pipeline row stores the token columns its instance id w…
eywalker Nov 26, 2026
6fe86ef
test, docs: ordinary rows keep their stored token columns; rows with …
eywalker Nov 26, 2026
f5a7bf0
fix(nodes): a row with no token stores no token column (ITL-1471)
eywalker Nov 26, 2026
5d1ebee
Merge branch 'main' into eywalker/itl-1471-three-nested-row-ids-v2-ta…
eywalker Nov 26, 2026
f3f6842
test(pipeline): name ITL-1491 on the tests that pin the held-rows dif…
eywalker Nov 26, 2026
df42f2d
test: regression tests for the second review of the row ids (ITL-1471)
eywalker Nov 26, 2026
fba3aec
fix(nodes): key the pipeline table by node content hash and record id…
eywalker Nov 26, 2026
ab58159
fix(provenance): select a held row's record by its instance id on eve…
eywalker Nov 26, 2026
2747f25
test, docs: the pipeline table's key, the trace by instance id and th…
eywalker Nov 26, 2026
69d8ec1
docs(hashing): list the pipeline table's key in the hash site invento…
eywalker Nov 26, 2026
5f8eba1
test: one canonical type per token value (ITL-1471)
eywalker Nov 26, 2026
296e877
fix(datagrams): one canonical type per token value; a clear refusal f…
eywalker Nov 26, 2026
4a916ec
fix(nodes): read the stored token types with the preflight's one sche…
eywalker Nov 26, 2026
fdd265c
test(pipeline): a fatal error in a placeholder's lookup gives the sam…
eywalker Nov 26, 2026
ddfc24b
fix(nodes): the async route reports the crash of a placeholder row be…
eywalker Nov 26, 2026
6607424
test(datagrams): a missing token is a null token; a kept token keeps …
eywalker Nov 26, 2026
e851695
fix(datagrams): a missing token is a null token, and a changed row ke…
eywalker Nov 26, 2026
027d908
docs(reference): where the row ids are read, when a new instance comp…
eywalker Nov 26, 2026
d72bc9d
test: review items of PR #583 (which record wins, several instance id…
eywalker Nov 26, 2026
20797df
test(pipeline): compare stored instance ids as a set, the async route…
eywalker Nov 26, 2026
3e90d4d
test(datagrams): a rename moves a column's token with it in every vie…
eywalker Nov 26, 2026
5edd6e3
fix(datagrams): a rename carries only the tokens of the columns the r…
eywalker Nov 26, 2026
03d7abe
test: a fall-through token has one type on both routes and from the s…
eywalker Nov 26, 2026
fd94fb7
fix(datagrams): a column taken from another row has its token typed f…
eywalker Nov 26, 2026
9b65574
test(datagrams): a rename of a placeholder keeps its sentinel tokens …
eywalker Nov 26, 2026
9361884
fix(datagrams): an empty rename returns the row itself, and a placeho…
eywalker Nov 26, 2026
52f2560
feat(row_ids)!: the record id covers the node's content hash and is t…
eywalker Nov 26, 2026
262a0cc
docs(datagrams): the re-typing of a fallen-through data-tag's token i…
eywalker Nov 27, 2026
3298bf5
docs(datagrams): state the token re-typing stopgap exactly, without o…
eywalker Nov 27, 2026
07ca350
test: source-info token columns keep the pipeline's type on the sync …
eywalker Nov 27, 2026
fb8c01e
fix: a source-info token column keeps the pipeline's type on every ro…
eywalker Nov 27, 2026
3577548
Merge branch 'eywalker/itl-1471-three-nested-row-ids-v2-table-layouts…
eywalker Nov 27, 2026
994e658
docs(datagrams): cut the token re-typing stopgap text down to what th…
eywalker Nov 27, 2026
ac1f269
Merge branch 'eywalker/itl-1471-three-nested-row-ids-v2-table-layouts…
eywalker Nov 27, 2026
2907816
test: the findings of the independent review of PR 601, failing befor…
eywalker Nov 27, 2026
d698ea9
fix: token types on the Join's async route, record batches, hand-buil…
eywalker Nov 27, 2026
749ddf5
docs: say only what holds for token types, and state when a refusal m…
eywalker Nov 27, 2026
65c1965
test: a Join never stores its pending marker in a merged token, faili…
eywalker Nov 27, 2026
47b146e
chore: types in the review fixes and tests (ITL-1491)
eywalker Nov 27, 2026
a13e53f
test: a source-info token's layers must be its data's outer layers, f…
eywalker Nov 27, 2026
81582a3
feat(streams): refuse a stream whose source-info token does not have …
eywalker Nov 27, 2026
891a089
test: Index gives the element the declared token type less one layer,…
eywalker Nov 27, 2026
584dbfa
fix(index): the element's token has the declared type less one layer,…
eywalker Nov 27, 2026
789222e
test: row-built form and rows-on-read fixtures give list tokens list …
eywalker Nov 27, 2026
6c61599
test: session and data-tag token fixtures follow the token-shape rule…
eywalker Nov 27, 2026
37beb11
test: stored-row and row-id token fixtures follow the token-shape rul…
eywalker Nov 27, 2026
f5685cd
fix(streaming joins): a batch is held to its stream's token type; fix…
eywalker Nov 27, 2026
b94dc7f
test: channel, record-batch and transport fixtures follow the token-s…
eywalker Nov 27, 2026
0d2f1c7
test: end-to-end and equivalence token fixtures follow the token-shap…
eywalker Nov 27, 2026
838f948
test: the review findings restated under the token-shape rule; the Jo…
eywalker Nov 27, 2026
94ae454
docs: the token-shape rule, two declarations of one token column, and…
eywalker Nov 27, 2026
dca30c9
chore: types in the token-shape test helpers (ITL-1491)
eywalker Nov 27, 2026
76f5398
test: the last hand-built token fixture follows the token-shape rule;…
eywalker Nov 27, 2026
5bd029e
test: the findings of the second review of PR 601, failing before the…
eywalker Nov 27, 2026
128c38a
fix: a string leaf in the token-shape rule, held rows on the async ro…
eywalker Nov 27, 2026
79fd36d
docs: token rules match what is checked and where; the ordinary-sourc…
eywalker Nov 27, 2026
04de92a
test: the findings of the third review of PR 601, failing before thei…
eywalker Nov 27, 2026
05b5ce8
fix: the held-row check reads one normalized form and a row's token l…
eywalker Nov 27, 2026
7b32524
test: a token's list is never null at any level; guards for input no …
eywalker Nov 27, 2026
6c1c9d6
fix: a token's list is never null at any level, checked where a strea…
eywalker Nov 27, 2026
159da25
test: the findings of the fourth review of PR 601, failing before the…
eywalker Nov 27, 2026
ab8a94b
fix: take the async held-row check out; the rule is checked where a s…
eywalker Nov 27, 2026
e4af3a2
docs: say which Index outcome the aside means; state the ITL-1534 lim…
eywalker Nov 27, 2026
ce0cc26
chore: merge main into ITL-1491
eywalker Nov 27, 2026
789c1a2
fix(arrow): declare Join system tags non-nullable and validate source…
eywalker Nov 27, 2026
08d2c67
fix(sources): reject missing custom system tag columns (ITL-1543)
eywalker Nov 27, 2026
969ed09
fix(arrow): honor Join field declarations and validate raw source rea…
eywalker Nov 27, 2026
705d60b
fix(streams): preserve declared system tag fields in rows (ITL-1543)
eywalker Nov 28, 2026
88fd5de
Merge remote-tracking branch 'origin/main' into eywalker/itl-1543-part-b
eywalker Nov 28, 2026
d74dd59
fix(streams): reconcile system tag fields across source and Join path…
eywalker Nov 28, 2026
5ac1301
Merge remote-tracking branch 'origin/main' into eywalker/itl-1543-part-b
eywalker Nov 28, 2026
376bdb6
fix(streams): declare source-info token fields nullable (ITL-1557)
eywalker Nov 28, 2026
0c9b2b8
chore(branch): merge ITL-1543 part B into ITL-1557
eywalker Nov 28, 2026
5d3f24b
fix(streams): validate replayed source tags and share tied Join sorti…
eywalker Nov 28, 2026
ab136d0
fix(sources): validate Arrow exporters before Polars conversion (ITL-…
eywalker Nov 28, 2026
4ca8850
fix(streams): use shared token fields for empty sinks
eywalker Nov 28, 2026
cc249b0
chore(branch): merge updated ITL-1543 part B
eywalker Nov 28, 2026
d902f4e
test(sources): expect refusal of integer system tags (ITL-1543)
eywalker Nov 28, 2026
1f210fd
Merge branch 'eywalker/itl-1543-a-row-must-take-exactly-its-streams-a…
eywalker Nov 28, 2026
5f518d8
test(datagrams): expect preserved Arrow system tag fields (ITL-1543)
eywalker Nov 28, 2026
ecb9ffb
fix(cache): store declared operator output fields (ITL-1562)
eywalker Nov 28, 2026
f624760
Merge remote-tracking branch 'origin/eywalker/itl-1543-part-b' into e…
eywalker Nov 28, 2026
c62f82a
fix(cache): preserve declared token fields on operator replay
eywalker Nov 28, 2026
4f2a63f
Merge remote-tracking branch 'origin/main' into eywalker/itl-1543-part-b
eywalker Nov 28, 2026
8083d19
Merge remote-tracking branch 'origin/main' into eywalker/itl-1543-part-b
eywalker Nov 28, 2026
403ff6f
fix(provenance): preserve declared types when replacing source tokens
eywalker Nov 28, 2026
a9a3794
chore: merge PR 606 into ITL-1491
eywalker Nov 28, 2026
2486c63
chore: merge main into ITL-1491 after API reference fix
eywalker Nov 28, 2026
7ecc2c4
fix(streams): merge declared token types into the provenance stack
eywalker Nov 28, 2026
42197e9
chore: merge main into the provenance stack
eywalker Nov 28, 2026
87a3b0f
test(cache): type list-valued provenance fixtures
eywalker Nov 28, 2026
864a46f
fix(streams): enforce declared provenance fields at cache and transpo…
eywalker Nov 28, 2026
b4e029e
Merge branch 'main' of https://github.com/metamorphic-labs/orcapod-py…
eywalker Nov 28, 2026
4809ad3
fix(streams): preserve declared fields across async routes
eywalker Nov 28, 2026
b256508
test(async): align placeholder schema with producer
eywalker Nov 28, 2026
cb7c7ae
Merge branch 'main' of https://github.com/metamorphic-labs/orcapod-py…
eywalker Nov 28, 2026
7480bb7
fix(sources): a cached source refuses a changed row under an existing…
eywalker Nov 28, 2026
490ebf1
fix(provenance): keep declared fields on source and tag inputs
eywalker Nov 28, 2026
41f2ede
Merge remote-tracking branch 'origin/eywalker/itl-1557-re-evaluate-a-…
eywalker Nov 28, 2026
17cce02
fix(sources): validate cached deliveries against the current table
eywalker Nov 28, 2026
b525d7a
fix(provenance): enforce declared token and system-tag types
eywalker Nov 28, 2026
432c7a6
fix(provenance): refuse a null replacement of a held list token
eywalker Nov 28, 2026
4cc5648
Merge branch 'eywalker/itl-1557-re-evaluate-a-sources-source-info-tok…
eywalker Nov 28, 2026
fec02ff
chore(branch): merge main into ITL-1557
eywalker Nov 28, 2026
e27cfda
fix(sources): check only generated cached record ids
eywalker Nov 28, 2026
7280ed1
docs(provenance): clarify null constructor token handling
eywalker Nov 28, 2026
d3cf41b
chore(branch): merge main and enforce typed null token rejection
eywalker Nov 28, 2026
c2f0b05
Merge remote-tracking branch 'origin/eywalker/itl-1557-re-evaluate-a-…
eywalker Nov 28, 2026
23cceb3
fix(sources): validate nested cache deliveries before writing
eywalker Nov 28, 2026
9319724
test(sources): pin open positional derivation cache case
eywalker Nov 28, 2026
2648cb6
chore(branch): merge main into ITL-1557
eywalker Nov 28, 2026
91c5c02
fix(provenance): preserve declared fields across join and channel paths
eywalker Nov 28, 2026
19784af
fix(join): canonicalize full pipeline ties with missing system tags
eywalker Nov 28, 2026
cf1f02a
Merge remote-tracking branch 'origin/eywalker/itl-1557-re-evaluate-a-…
eywalker Nov 28, 2026
7691232
fix(sources): refuse conflicts across nested cache reads
eywalker Nov 28, 2026
a23a973
Merge remote-tracking branch 'origin/eywalker/itl-1557-re-evaluate-a-…
eywalker Nov 28, 2026
5717c06
Merge remote-tracking branch 'origin/main' into eywalker/itl-1557-re-…
eywalker Nov 28, 2026
c11f85b
fix(join): preserve system tag pairs across hash ties
eywalker Nov 28, 2026
abdbb50
fix(sources): refuse a cache holding two contents for one record id o…
eywalker Nov 28, 2026
fb269a3
Merge remote-tracking branch 'origin/eywalker/itl-1557-re-evaluate-a-…
eywalker Nov 28, 2026
12c6edd
fix(join): preserve symmetric tie ordering and reject missing fields
eywalker Nov 28, 2026
fd957d7
fix(sources): validate conflicts on every cache read
eywalker Nov 28, 2026
eb85914
Merge remote-tracking branch 'origin/eywalker/itl-1557-re-evaluate-a-…
eywalker Nov 28, 2026
0746b0d
fix(database): type projected filter column names
eywalker Nov 28, 2026
972c289
fix(sources): resolve record IDs from the cache schema
eywalker Nov 28, 2026
0340bc0
fix(join): retain tied provenance on standalone rows
eywalker Nov 28, 2026
6055d4d
chore(sources): merge the updated ITL-1557 base
eywalker Nov 28, 2026
5abde3f
fix(sources): resolve cached provenance from stored fields
eywalker Nov 28, 2026
a124fcf
fix(join): keep tied custom metadata at declared positions
eywalker Nov 28, 2026
9bdbd62
chore(sources): merge the updated ITL-1557 base
eywalker Nov 28, 2026
2f5ea30
fix(sources): preserve clean Delta cache reads across declarations
eywalker Nov 28, 2026
ad8f10c
fix(join): restore main's tie handling
eywalker Nov 28, 2026
553e2c9
Merge remote-tracking branch 'origin/eywalker/itl-1557-re-evaluate-a-…
eywalker Nov 28, 2026
1cee9f9
fix(sources): refuse cache appends that alias generated record ids
eywalker Nov 28, 2026
fb4fbce
fix(sources): resolve cached record IDs without name resemblance
eywalker Nov 28, 2026
23f2c37
docs(provenance): qualify instance ID equivalence for list tokens
eywalker Nov 28, 2026
fe879bd
chore(branch): merge origin/main into ITL-1557
eywalker Nov 28, 2026
076c949
chore(sources): merge the updated ITL-1557 base
eywalker Nov 28, 2026
a61816e
chore(branch): merge origin/main into ITL-1557
eywalker Nov 28, 2026
708a861
fix(pods): index token columns once per row
eywalker Nov 28, 2026
6e6d154
chore(sources): merge the updated ITL-1557 base
eywalker Nov 28, 2026
84b70c1
fix(sources): reject cycles in cached-source freshness checks
eywalker Nov 28, 2026
c637b3f
chore(sources): sync with main after the stacked base merged
eywalker Nov 28, 2026
dac0720
fix(sources): preserve cache validation across reads and previews
eywalker Nov 28, 2026
40b53ee
chore(sources): merge main after context identity and job serializati…
eywalker Nov 28, 2026
7793d79
fix(cache): preserve pending projections and skip unchanged scans
eywalker Nov 28, 2026
259a462
fix(delta): place the Arrow schema type suppression on the call
eywalker Nov 28, 2026
82f589f
chore(sources): merge main with identity chain support
eywalker Nov 29, 2026
16c8474
chore(cache): merge main with Delta storage validation
eywalker Nov 29, 2026
548c413
chore(sources): merge main with system tag validation
eywalker Nov 29, 2026
6cf904e
chore(sources): merge main with provisional tags as data
eywalker Nov 29, 2026
c54d486
fix(sources): preserve cache reads across review edge cases
eywalker Nov 29, 2026
ce6db3f
chore(sources): merge main with source validation and logical hashes
eywalker Nov 29, 2026
3341549
fix(cache): narrow provenance and partition lookup review fixes
eywalker Nov 29, 2026
4442954
fix(cache): validate adapted deliveries and append previews
eywalker Nov 29, 2026
4162068
chore: merge main into the cached-source change
eywalker Nov 29, 2026
375befc
fix(cache): project delivery checks and reject incompatible connector…
eywalker Nov 29, 2026
6cad625
test(cache): hyphenate data-tag in the refusal docstring
eywalker Nov 29, 2026
bd04574
Merge remote-tracking branch 'origin/main' into eywalker/itl-1396-cac…
eywalker Nov 29, 2026
6b63129
fix(cache): share append validation with previews
eywalker Nov 29, 2026
8989c93
fix(cache): use real readback for append previews
eywalker Nov 29, 2026
77c649d
test(cache): narrow the fixture converter type
eywalker Nov 29, 2026
849c81f
refactor(cache): share strict Arrow append checks
eywalker Nov 29, 2026
68f4407
fix(cache): use actual appends for all database readback
eywalker Nov 29, 2026
f3c4fae
test(cache): narrow append test values for type checking
eywalker Nov 29, 2026
949e5b0
test(cache): check positional derivation against Delta readback
eywalker Nov 29, 2026
20a3dc1
docs(cache): clarify positional delivery refusal
eywalker Nov 29, 2026
923e0a6
chore(sources): merge main into the cached-source change (ITL-1396)
eywalker Nov 29, 2026
418386e
fix(cache): preserve held state during previews and refusals
eywalker Nov 29, 2026
cb00bfb
chore(sources): merge main into PR 630
eywalker Nov 29, 2026
a77f3b4
docs(cache): name the SQLite storage follow-up
eywalker Nov 29, 2026
002551f
test(databases): exercise queue promotion with a new key
eywalker Nov 29, 2026
f3d670c
test(cache): document cache I/O and refusal invariants
eywalker Nov 29, 2026
3a508a3
chore(sources): merge main into the cached-source change
eywalker Dec 3, 2026
7321c0e
fix(sources): reject conflicting warm cache deliveries during freshne…
eywalker Dec 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion .zed/rules
Original file line number Diff line number Diff line change
Expand Up @@ -1041,6 +1041,8 @@ are also provisional and will be designed alongside the side-effect log (ITL-947
their input-token columns become `_input_source_<column>` (ITL-1524). Once
released, a change to the common bookkeeping columns moves the layout version,
so the table gets a new path.
ITL-1396 adds `__recorded_at` to the unreleased `sdb_v2` at the same path. An earlier
prerelease `sdb_v2` table without the column must be rebuilt.
- A plain function's result table is at
<function>/<output schema hash>/v<function major>/python.function.v1/rev1/rdb_v1, three
components with three owners (docs/reference/data-function-types.md):
Expand Down Expand Up @@ -1547,6 +1549,35 @@ data. The rules:
of the token values and of any list item fields. CachedSource writes these fields
and their record hashes under `sdb_v2`. The operator cache stores and hashes the
output stream's declared fields under `odb_v3` (ITL-1562).
A cached-source table (`sdb_v2`) also stores `__recorded_at`
(`cached_source.SOURCE_RECORDED_AT_COL`, `timestamp[us, tz=UTC]`, non-nullable; the
developer's "written-at" column, November 28, 2026, ITL-1396): when the cache wrote the
row, one time per write. It is appended after the record hashes, so it is in no hash,
record id or token; every read of the cache drops it (`CachedSource._STORED_ONLY_COLUMNS`);
a row delivered again is skipped and keeps its first time. Nothing selects by it: it
exists so that "present the latest" can be offered later without a new layout. A
`CachedSource` refuses, before anything is written, a delivery holding a row whose
record id the cache holds under another `_record_hash` (`CachedSourceChangedRowError`,
`_require_no_changed_rows`): one rule for every wrapped source, key columns or
position. A positional edit, reorder, insertion or removal is refused when it changes
the content delivered at a cached position. Rows at new positions are accepted if
every delivered cached position keeps its content. A cache table that already holds two
contents for one record id (two writers that both passed the check and both wrote, or
a table written by hand) is refused on read, with the same error, when the stored
schema identifies the generated record-id column
(developer, November 28, 2026: "(b) for now"; `_require_one_content_per_record_id`,
called by every read of the cache's rows, by the delivery check, by cold or changed
freshness checks and by `head()` when it holds no rows). A conflict requires different hashes
for one record id. A source object that holds rows it already read shows them without
reading the cache again, on a full read and on `head()` alike. An unchanged warm
freshness check uses the last read and the wrapped source's modified time. The two-writer race
itself stays open (both can still write). Resolving the case by
time or another tie-breaker instead of refusing is ITL-1592; never add it here. Tests
build the state with `tests/test_core/sources/cache_versions.write_outside_the_rule`.
Each cache validates its delivery before calling the database's append. Nested
caches use actual database readback. An inner cache can commit its own accepted
delivery before an enclosing cache refuses a changed row (ITL-1396-CS1).
The same applies to sibling cached sources: one may write before another refuses.
A row built by `Data` still gives an untyped null the `large_string` type.
PolarsFilter is the one operator that still round-trips its columns through Polars; it
casts them back to the normalized input types (arrow_utils.restore_column_types and
Expand Down Expand Up @@ -1766,7 +1797,8 @@ data. The rules:
each source feeding them (node_run.check_sources) before the state rule judges any node;
head() and the preview never do. A source that finds new data takes it in and moves its
modified time to NOW (never to a time the data reports, such as a cursor's modified_at);
one that finds nothing moves nothing. A check that raises warns once
one that finds nothing moves nothing. A `CachedSourceChangedRowError` fails the run
(ITL-1396). Any other failing check warns once
(SourceCheckFailedWarning), keeps the source's data and modified time, lists the source
in RunSummary.unchecked_sources, and the run proceeds (a PollingSource a run reads
is polled again by that read, and a failing poll raises: ITL-1139). A SourceJobNode's run() checks
Expand Down
34 changes: 33 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,8 @@ are also provisional and will be designed alongside the side-effect log (ITL-947
tables keep `pdb_v2` when their input-token columns become `_input_source_<column>`
(ITL-1524). Once released, a change to the common bookkeeping columns moves the
layout version, so the table gets a new path.
ITL-1396 adds `__recorded_at` to the unreleased `sdb_v2` at the same path. An earlier
prerelease `sdb_v2` table without the column must be rebuilt.
- A plain function's result table is at
`<function>/<output schema hash>/v<function major>/python.function.v1/rev1/rdb_v1`, three
components with three owners (`docs/reference/data-function-types.md`):
Expand Down Expand Up @@ -1592,6 +1594,35 @@ data. The rules:
of the token values and of any list item fields. CachedSource writes these fields
and their record hashes under `sdb_v2`. The operator cache stores and hashes the
output stream's declared fields under `odb_v3` (ITL-1562).
A cached-source table (`sdb_v2`) also stores `__recorded_at`
(`cached_source.SOURCE_RECORDED_AT_COL`, `timestamp[us, tz=UTC]`, non-nullable; the
developer's "written-at" column, November 28, 2026, ITL-1396): when the cache wrote the
row, one time per write. It is appended after the record hashes, so it is in no hash,
record id or token; every read of the cache drops it (`CachedSource._STORED_ONLY_COLUMNS`);
a row delivered again is skipped and keeps its first time. Nothing selects by it: it
exists so that "present the latest" can be offered later without a new layout. A
`CachedSource` refuses, before anything is written, a delivery holding a row whose
record id the cache holds under another `_record_hash` (`CachedSourceChangedRowError`,
`_require_no_changed_rows`): one rule for every wrapped source, key columns or
position. A positional edit, reorder, insertion or removal is refused when it changes
the content delivered at a cached position. Rows at new positions are accepted if
every delivered cached position keeps its content. A cache table that already holds two
contents for one record id (two writers that both passed the check and both wrote, or
a table written by hand) is refused on read, with the same error, when the stored
schema identifies the generated record-id column
(developer, November 28, 2026: "(b) for now"; `_require_one_content_per_record_id`,
called by every read of the cache's rows, by the delivery check, by cold or changed
freshness checks and by `head()` when it holds no rows). A conflict requires different hashes
for one record id. A source object that holds rows it already read shows them without
reading the cache again, on a full read and on `head()` alike. An unchanged warm
freshness check uses the last read and the wrapped source's modified time. The two-writer race
itself stays open (both can still write). Resolving the case by
time or another tie-breaker instead of refusing is ITL-1592; never add it here. Tests
build the state with `tests/test_core/sources/cache_versions.write_outside_the_rule`.
Each cache validates its delivery before calling the database's append. Nested
caches use actual database readback. An inner cache can commit its own accepted
delivery before an enclosing cache refuses a changed row (ITL-1396-CS1).
The same applies to sibling cached sources: one may write before another refuses.
A row built by `Data` still gives an untyped null the `large_string` type.
`PolarsFilter` is the one operator that still round-trips its columns through Polars; it
casts them back to the normalized input types (`arrow_utils.restore_column_types` and
Expand Down Expand Up @@ -1812,7 +1843,8 @@ data. The rules:
each source feeding them (`node_run.check_sources`) before the state rule judges any node;
`head()` and the preview never do. A source that finds new data takes it in and moves its
modified time to NOW (never to a time the data reports, such as a cursor's `modified_at`);
one that finds nothing moves nothing. A check that raises warns once
one that finds nothing moves nothing. A `CachedSourceChangedRowError` fails the run
(ITL-1396). Any other failing check warns once
(`SourceCheckFailedWarning`), keeps the source's data and modified time, lists the source
in `RunSummary.unchecked_sources`, and the run proceeds (a `PollingSource` a run reads
is polled again by that read, and a failing poll raises: ITL-1139). A `SourceJobNode`'s `run()` checks
Expand Down
73 changes: 73 additions & 0 deletions changelog.d/ITL-1396.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
### Breaking changes and migration

- A `CachedSource` refuses a changed row under a record id its cache holds
(`CachedSourceChangedRowError`, ITL-1396). When the wrapped source delivers a row whose
record id is already cached with other content (any tag, data, system-tag or source-info
value), that cache refuses the delivery. A freshness check that sees the conflict
raises the same error and preserves the held rows and freshness timestamps. The error
names the source id, the first five record ids and the count. Before, the changed row
was cached beside the old one and both were presented. Use a new `cache_path` or cache
database for changed data. With an automatic cache path, a new `source_id` also selects
a new cache. The same row delivered again writes nothing, and a row under a new record
id is added, as before.
- A cache table that already holds two different rows for one record id (written by two
processes at the same moment, or by hand) is refused on read when the cache can identify
its generated record-id column. The same error reaches job runs, `as_table()`,
`iter_data()`, `run()`, nested caches and `head()`
(the notebook preview shows the error). Before, both rows were presented. Rebuild the
cache from the source in a new cache.
- For a source without key columns, the record id is the row's position. An edit,
reorder, insertion or removal is refused when it changes the content delivered at a
cached position. Rows at new positions are accepted if every delivered cached position
keeps its content. Declare `record_id_columns` for data whose rows may move.
- A cached-source table (`sdb_v2`) stores a new column, `__recorded_at`
(`timestamp[us, tz=UTC]`): when the cache wrote the row. An `sdb_v2` cache written by a
development version without the column is refused on read or ingestion with a message
to rebuild it from the source. Rebuilding from the live source can omit cached rows
that were removed from that source. Preserve the old table and rebuild from the
original inputs if you need the full history.
- SQLite cannot store the `__recorded_at` timestamp. Constructing a `CachedSource` with
a SQLite cache database raises `UnstorableColumnError` before any rows are read
(follow-up ITL-1766). Use a cache database that supports the timestamp type.

### Added

- `orcapod.errors.CachedSourceChangedRowError`.
- Each row of a cached-source table records when the cache wrote it (`__recorded_at`). No
read presents it and it is part of no record id, source-info token or hash; a row
delivered again keeps its first time.

### Fixed

- A `CachedSource` no longer presents two rows for one record id after its source changes
a value, even when stored or delivered columns arrive in a different order. An
enclosing cache checks the inner cache's actual readback. Cold freshness checks also
refuse conflicting caches when the source is unchanged.
Direct reads refresh long-lived database handles, and reloaded caches with an unbound
source proxy still detect conflicts when custom provenance columns are present.
Cold freshness checks, an unheld `head()`, and the notebook preview validate the stored
IDs and hashes without loading application columns. Warm freshness checks skip the cache
scan while the wrapped source's modified time stays unchanged. The checks also use the
stored record-id column when its generated
name differs from the current declaration, including when writer and reader assign
different roles to a custom provenance pair. Clean Delta caches remain readable
when the reader adds a nullable column or removes a data-tag role. An append that
uses the cache's generated record-id column for custom provenance is refused before
writing (ITL-1396).
- Projected Delta reads retain stored Arrow types, nullability, and nested fields when
all matching rows are still buffered (ITL-1396).
- A cached-source freshness check refuses circular proxy bindings with
`SourceSpecMismatchError` (ITL-1559).

### Known limitations

- Two processes writing one cache at the same moment can still both write a row for one
record id. The next read refuses when the generated record-id column is identifiable.
- Read-side conflict validation uses the writer's field order. If the stored schema
cannot establish the generated record-id column, reads proceed without that check.
- The cached sources of one job are checked one by one: when one is refused, another may
already have added its own new rows to its cache before the run fails.
- A positional derivation between caches reads the origin cache in database order. The
origin may commit an append before the enclosing cache refuses a changed position.
- An inner cache may commit its own accepted delivery before an enclosing cache refuses
a changed row.
2 changes: 2 additions & 0 deletions docs/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ These exceptions and warnings report problems identifying, binding, or reading s

::: orcapod.errors.CachedSourceIdMismatchError

::: orcapod.errors.CachedSourceChangedRowError

::: orcapod.errors.SourceSlotNameCollisionError

## Pipeline execution
Expand Down
Loading
Loading