Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 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
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
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
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
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
188 changes: 153 additions & 35 deletions .zed/rules

Large diffs are not rendered by default.

189 changes: 153 additions & 36 deletions CLAUDE.md

Large diffs are not rendered by default.

97 changes: 97 additions & 0 deletions changelog.d/ITL-1491.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
### Breaking changes and migration

- **A stream whose source-info token does not have the shape of its data is refused.** A
token column's type is some list layers on top of a string, and those layers must be the
outer list layers of its data column: a `large_list` of tokens needs a `large_list` of
values, a fixed-size list a fixed-size list of the same size. Under its layers a token is
a string. The values may be deeper than their tokens, and a plain string token fits any
value. A token's list is never null at any level: a null is allowed only at the innermost
level, where the element is a string (`["a", null]` is valid, `[null, ["a"]]` under a
two-level token type is not); a plain string token may be null. The rule is checked where a stream is built from a table;
a stream that breaks it raises `InputValidationError` naming the token column, its data column and both
types. Sources, operators and functions always build tokens of the right shape, so only a
table built by hand with `_source_*` columns is affected. Such a table used to be accepted
because nothing checked it; downstream, a `Join` over a data-tag with a null list token
silently stored the characters of an internal marker as the merged token, and so did a
`Join` or `MergeJoin` over a list-of-lists token with a null inner list. (ITL-1491)
- **Inputs that declare one token column with two types are refused.** `MergeJoin` (a
colliding data column, or a data-tag both inputs hold) and `Join` (a data-tag both inputs
hold, whose tokens the join merges) raise `InputValidationError` naming the column and
both types, on the sync and the async path, whether or not a key matches. A `Join` over
such a data-tag used to fail with `ValueError: cannot merge the source info of a list
with that of a scalar` when a key matched and to complete when none did; `MergeJoin`
already refused a colliding column. See the known limitation below for the case that
ordinary sources reach. (ITL-1491)

### Changed

- **The type of a source-info token column is determined by the pipeline, never by the
tokens' values.** A source builds plain `large_string` tokens, and each operator determines
its output's token types from its inputs' types, as it does for every other column. A row
read from a stream keeps that type where it used to be typed again from its value: in the
table built from rows between two nodes, in a node's output, in a row shown as a table
(`data.as_table(columns={"source": True})`, and the Python type
`data.schema(columns={"source": True})` reports), in the rows an async `Join` merges, in
the element `Index` takes from a list of tokens, in a function pod's stream outside a job,
and in record batches. For the tokens that sources and operators build, nothing changes:
no hash, stored path or stored column type moves. A token is still typed from its value
where it is first created from a Python value and no Arrow type exists
(`Data(..., source_info=...)`, `with_source_info`). (ITL-1491)
- **A hand-built raw stream keeps the token type it declares.** A fixed-size list of tokens
(over a fixed-size list of values) stays a fixed-size list, where it used to become a
`large_list`, and a list of tokens keeps its item field's name, nullability and metadata,
also in an operator cache. (ITL-1491)
- **A data-tag that falls through a function pod keeps its source-info token with its type
unchanged.** The token used to be typed again from its value. A column a function returns
is not affected: its token points to the function. (ITL-1491)

### Fixed

- **Rows with a nested source-info token column behave the same on the sync and the async
path.** A row whose token column is nested (a list of tokens, or a list of such lists)
and whose tokens could not be typed again from their values (an empty list, or a null
string inside a list of lists, such as `[[null], []]`) raised an Arrow type error where
the sync path builds a table from rows between two nodes, while the async path recorded
the rows. Both paths now pass such rows on and store them, with the same token types and
the same entry, instance and record ids. (ITL-1491)
- **An async `Join` writes the token of a merged data-tag with the type its inputs
declare.** It rebuilt the merged token from its Python value, so a list token that the
sync path kept as declared became another list type on the async path, and a job run on
one path could not be continued on the other over the same store. (ITL-1491)
- **`Index` gives the element's token the type of the token list's items.** It typed the
token again from its value, so a list item's type could change (a fixed-size list became a
`large_list`). An element that is a null where the remaining token type is a list is
refused with `InputValidationError` naming the column, on both paths. (ITL-1491)
- **A function pod's stream outside a job shows list-valued source-info tokens.**
`pod(stream).as_table(columns={"source": True})` raised `ValueError: Unsupported Python
type` when a data-tag that falls through the function had a list token. (ITL-1491)
- **An async `Join` keeps a token that looks like its internal marker.** A column the join
does not merge keeps its own token on both paths. The async path used to replace a token
that began with the join's internal marker text by a `join_v1:` digest. (ITL-1491)
- **`MergeJoin` reports the same first disagreement in every process.** When several
columns of its two inputs disagree in type, the one first in name order is reported; which
one was reported used to follow the interpreter's hash seed. (ITL-1491)

### Known limitations

- **A `Batch` of single values cannot be joined with a source that already holds lists of
them, on that column.** The two have the same values and data type but different
source-info tokens: a list of tokens (one per member) after `Batch`, one plain token per
list in the source. A `Join` where that column is a data-tag of both inputs, or a
`MergeJoin` where it collides, refuses the inputs with `InputValidationError` naming the
token column and both types. Bring both inputs to one form before the join: batch both,
or neither. Whether the two forms should join is ITL-1522. (ITL-1491)
- **A record batch sent into a record-batch channel is not checked against the token-shape
rule.** The stream built from the channel's batches is. The channels are not used by jobs
yet; checking a batch where it is sent is ITL-1526. (ITL-1491)
- **An input that sends no row over a bare row channel declares no token type.** A `Join`
run directly through `async_execute` over row channels (outside a job) compares its
inputs' token types from their first rows, so it cannot refuse an input that sends none;
the sync call and a job on either orchestrator refuse it. Carrying the declared types over
row channels is ITL-1527. (ITL-1491)
- **Rows an async run holds instead of running are not checked against the token-shape
rule.** The rule is checked where a stream is built. The sync orchestrator builds a held
node's rows into a stream, and the async orchestrator hands them on without building one,
so a held row built by hand with an invalid token shape is refused on sync and accepted
on async. Rows that come from a stream were checked when it was built. Making the two
routes agree is ITL-1534. (ITL-1491)
11 changes: 11 additions & 0 deletions changelog.d/ITL-1543.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,21 @@
- A custom system-tag column on a source must be a non-nullable string column
with no null values. Sources also reject missing names in `system_tag_columns`.
Convert custom tags to text before building the source.
- Sources refuse Arrow field metadata on nominated custom system tags, including
tag copies nominated with `system_tag_columns`. Remove the field metadata before
building the source. Rebuild a source cache if it was written with field
metadata on a system tag. ITL-1561 tracks re-evaluating this restriction.

### Fixed

- Join uses the declared fields of inputs tied on pipeline hash to set the
sorted system tags' nullability. The tag is non-nullable when every
corresponding input field is non-nullable. Existing entry IDs, instance IDs,
record IDs and operator hashes for source inputs stay the same.
- Rows preserve the stream's Arrow fields for system tags, including width,
nullability, and metadata. Standalone async Join uses those fields as well.
IDs can change for hand-built streams with unusual system-tag fields.
- Standalone async Join uses the same fields as the table and sync rows for
sorted system tags of tied inputs, and leaves custom tags with their operands.
Entry-ID errors for a raw Arrow Null system
tag name the column and ask for a supported nullable type.
38 changes: 38 additions & 0 deletions docs/concepts/provenance.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,44 @@ print([(label, run.computed_here) for label, run in trace.function_runs()])
# [('per_animal', True), ('scores', False), ('scores', True)]
```

## The shape of a token

A value's token has the shape of the value. You see tokens in the `_source_<column>`
columns (`stream.as_table(columns={"source": True})`).

- **A plain token fits any value.** A source gives every value one token, a string
(`large_string`), whatever the value is: a number, a text, a list, an array. A function
gives each value it returns one token too. A plain token may be missing (null).
- **A list of tokens needs a list of values.** `Batch`, `GroupBy` and `MergeJoin` put
several rows' values into one list, and their tokens into a list beside it, one token per
member, in the same order: values `[0.8, 0.3]` with tokens
`["scores::...::accuracy", "scores::...::accuracy"]`. After two such steps both are lists
of lists.
- **The values may be deeper than their tokens.** A source column that holds lists has one
plain token per value, so after a `Batch` its values are lists of lists and its tokens a
list of plain tokens.
- **A list of tokens is never missing, at any level; only a token inside the innermost
list may be.** A batch of three rows of which one has no token gives
`["a::row_0::x", null, "a::row_2::x"]`. In a list of lists of tokens, `[null, ["a"]]` is
not valid: the missing inner list would have to be a list, `[[], ["a"]]` or
`[[null], ["a"]]`.

Orcapod's sources, operators and functions always keep these rules. They matter when you
build a table with `_source_*` columns by hand and hand it to `ArrowTableStream`: a list
token over a value that is not a list, a list of another kind (a fixed-size list of tokens
needs a fixed-size list of values of the same size), more list levels in the token than in
the value, a token that is not text, or a missing list of tokens at any level is refused with
`InputValidationError`, which names the token column, its data column and both types.

One case reaches ordinary pipelines. A `Batch` of single values and a source that already
holds lists of them have the same values but different tokens: a list of tokens (one per
member) in the first, one plain token per list in the second. A `Join` on such a column as
a data-tag, or a `MergeJoin` of it, refuses the two inputs and names the token column and
both types. Bring both inputs to one form before the join: batch both, or neither.
Whether the two forms should join is an open question (ITL-1522). The Arrow types, with a table of what is
accepted and refused, are in
[the hashing reference](../reference/hashing.md#the-shape-of-a-source-info-token-column).

## When there is nothing to trace

An operator or function node shows only the rows of its run in this process (see
Expand Down
4 changes: 3 additions & 1 deletion docs/dev/design_issues/ITL-1543-AS2.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ data was read. For example, a Join of streams tied on pipeline hash can declare
its sorted system tags nullable, although its rows have non-nullable system tags.

Part A corrects that Join schema and rejects Arrow Null in sources, including
nested Null. Part B remains open and makes rows use the stream's field definitions.
nested Null. Part B carries a stream's system-tag fields through row and batch
reads, including the standalone async Join. Source-info flag decisions remain
open in ITL-1557, and the existing row-built guard remains pending PR 601.
Loading
Loading