Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
1e4899b
fix(sources): name the origin job in derived source ids
eywalker Nov 28, 2026
f6ede1f
test(sources): align standalone and data-tag identity fixtures
eywalker Nov 28, 2026
e90b19d
docs(sources): clarify plain derived identity and provenance
eywalker Nov 28, 2026
c639122
Merge remote-tracking branch 'origin/main' into eywalker/itl-1564-a-s…
eywalker Nov 28, 2026
cd9750e
Merge remote-tracking branch 'origin/main' into eywalker/itl-1564-a-s…
eywalker Nov 28, 2026
2cc9e9b
fix(sources): stamp derived rows with folded lineage
eywalker Nov 28, 2026
b55fe0b
Merge remote-tracking branch 'origin/main' into eywalker/itl-1564-a-s…
eywalker Nov 28, 2026
720c050
test(sources): check folded derived-row alignment
eywalker Nov 28, 2026
98c7532
Merge remote-tracking branch 'origin/main' into eywalker/itl-1564-a-s…
eywalker Nov 28, 2026
f6a252b
test(sources): distinguish timestamp winners from stored history
eywalker Nov 28, 2026
de45524
fix(sources): validate derived input lineage for every key policy
eywalker Nov 28, 2026
2ae5e92
Merge remote-tracking branch 'origin/main' into eywalker/itl-1564-a-s…
eywalker Nov 28, 2026
4ddfe5c
test(sources): make cache history setup explicit
eywalker Nov 28, 2026
401a2e3
fix(sources): validate held lineage before slicing derived previews
eywalker Nov 28, 2026
c7fc164
docs(sources): clarify derived reads and provisional identities
eywalker Nov 28, 2026
c482b51
test(sources): pin derived read, identity and provisional warning wor…
eywalker Nov 28, 2026
4238ef4
chore(sources): merge main into job-derived source IDs
eywalker Dec 3, 2026
28aaace
fix(sources): preserve binding validation for derived sources
eywalker Dec 3, 2026
432c23b
test(sources): align derived storage fixtures with lineage rules
eywalker Dec 3, 2026
83784c5
fix(sources): put the derived record-id policy into the identity
eywalker Dec 3, 2026
38cd3a8
fix(cache): preserve derived record ID policy on reload
eywalker Dec 3, 2026
849d0d2
test(golden): regenerate the 9 approved provisional DerivedSource ent…
eywalker Dec 3, 2026
d642e3c
fix(cache): match repeated key ids and keep ordinary saved cache paths
eywalker Dec 3, 2026
05a0869
docs(hashing): count every commutative input occurrence; cover tag co…
eywalker Dec 3, 2026
eb083a8
chore: merge main into derived source IDs
eywalker Dec 3, 2026
cb48f47
fix(sources): validate derived cache copies and bound preview work
eywalker Dec 3, 2026
07a48a5
fix(sources): scope fixed derived caches by tag copies
eywalker Dec 3, 2026
5790739
fix(sources): honor bound proxy cache policy and cap preview enrichment
eywalker Dec 3, 2026
8a18a3e
chore: merge main into the derived source branch
eywalker Dec 3, 2026
4770363
test(sources): expect latest lineage after cache rebind
eywalker Dec 3, 2026
ecdd273
fix(sources): inherit derived context and limit preview gathers
eywalker Dec 3, 2026
4de3b8a
test(sources): set the derived specification origin context
eywalker Dec 3, 2026
fe3a4b3
fix(sources): keep repeated keys valid in derived previews
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
52 changes: 39 additions & 13 deletions .zed/rules
Original file line number Diff line number Diff line change
Expand Up @@ -653,8 +653,10 @@ algorithm produced it.**
hex digest: `to_hex()`. A name later fed into a hash (the function `uri` in a pod's
identity, system-tag column names in an entry-id table) is still a name.
- Source ids: every source id is `<kind>_v<N>:<name>` (ITL-1425). A default name built from
a hash is `<label>:<hex>` (`derived_v1:semantic_v1:<hex>`, via `to_string()`, never a
label literal; built by `hash_source_name`). A value folded by an operation is
a hash is `<label>:<hex>` (via `to_string()`, never a label literal; built by
`hash_source_name`). A job-backed derived source prefixes the labelled node hash with the
job path, giving `derived_v1:<job path>:<label>:<hex>` (`derived_source_name`, ITL-1564).
A value folded by an operation is
`<operation label>:<hex>` (`batch_v1:` / `group_v1:`, for the folded source id and record id
alike).
- Record ids (developer, November 16, 2026, ITL-1154): the record-id system tag holds the row
Expand All @@ -664,6 +666,7 @@ algorithm produced it.**
`row_identifiers` writes the same text for whole columns, and a property test in CI checks
that the two agree byte for byte over generated keys. Never format a record id by hand
or build it with `uuid5`. It is not a hash, holds no source id and carries no label.
Derived sources also use the labelled lineage fold (ITL-1564).
A source-info token is `<source id>::<record id>::<column>`.
- A hash stored as a value in its own column or field carries its label: `to_string()` as
text, `to_prefixed_digest()` in a binary column.
Expand Down Expand Up @@ -928,15 +931,34 @@ element come from a tag value, or from anywhere other than the input's data elem
the step is not an operator: it is a derived source. So a tag's value is offered as data only
by a source, DerivedSource(origin, tags_as_data={tag: data_name}) (ITL-939), never by an
operator. That form is a new root: fresh provenance through SourceStreamBuilder, schema-only
pipeline_hash, and a source_id the user must give (developer, November 21, 2026, ITL-1313:
"simply make them throw an error if source id is not provided"): it has no default, and
DerivedSource(..., tags_as_data=...) and node.as_source(tags_as_data=...) raise
ValueError without one, before the origin is read; a saved config without one is refused
too. The given string is its name (derived_v1:<name> in system-tag values and source-info
pipeline_hash, and a full source id. A derivation over another root source requires an explicit
source_id and refuses its absence before reading the origin, including when loaded
from a saved config (ITL-1313). A job-backed derivation uses the same default id with
or without tag copies (ITL-1564). The given string is its name (derived_v1:<name> in system-tag values and source-info
tokens, ITL-1425), and with the sorted mapping the source id is the source's identity (the
origin enters only through the schema). The
config type key stays derived. DerivedSource without tags_as_data (a job node's stored records)
keeps its old identity; do not change it (ITL-956).
uses the root source identity: full source id, Arrow schema identity and an empty key
tuple. The default source id carries the job path and the node's labelled content hash
(ITL-1564). A given source name also enters the content hash. Both forms put the
record-id policy into the content hash when it is not key columns: the marker
`("record_id_policy", "lineage_fold")` for the default fold, `"position"` for explicit
`record_id_columns=()`, so a cache kept under the hash never mixes two policies' rows.
A derived source keeps its origin's user-column order and appends tag copies in sorted
new-name order.

Both forms stamp one pair and fresh tokens through SourceStreamBuilder. The default
record id folds all upstream pairs with arrow_utils.fold_system_tag_values, sorting by
full record-id column name and flattening each triple (record-id column name, source-id
value, record-id value). DerivedSource defines the derived_row_v1 label once. An explicit
record_id_columns for tags_as_data keeps its configured key policy. A job node serves the
most recent readable stored record per lineage, breaking a function recording-time tie by
the greater result UUIDv7. Rows still tied (an operator's rows of one recording time, a
function's rows sharing the recording time and the result id) are refused, naming the
lineage fold and both candidates' stored row indices, recording times, and result IDs
when available. Other selection rules are planned. The source refuses missing
or incomplete pairs and repeated lineages that survive selection.

The tags_as_data argument is provisional and may be removed (ITL-1020), so when in
doubt start with a data-tag, or start with data and promote it to a data-tag if needed.

Expand Down Expand Up @@ -1739,7 +1761,9 @@ data. The rules:
SourceNameWarning; never refused. The id is built only by source_ids.build_source_id and
parsed only by source_ids.parse_source_id (split at the first :; the kind part never holds
:, the name may). Bump a kind's version when a row read before a change could read
differently after it (other values, Arrow types or record id). A saved config holds
differently after it (other values, Arrow types or record id). The provisional
DerivedSource is an exception. It retains derived_v1 when its default record IDs move
from positional IDs to folded upstream lineage (ITL-1564). A saved config holds
source_name, source_name_given (given or default: read back, never guessed, by
RootSource._from_saved_name) and source_version apart (the kind is source_type); loaded where the class
declares another version, the source has the installed version's id
Expand All @@ -1756,8 +1780,10 @@ data. The rules:
legacy config (source_id, no source_name) is refused, also nested, by PipelineJob.load.
The name-shaped-like-an-id warning is for a given name only, not a default location.
Tokens, system tags and source_id show the full id; a record id
never holds the source id. A DerivedSource with tags_as_data has no default: it requires
a source_id (ITL-1313). A default name built from a hash is <algorithm label>:<hex>, built
never holds the source id. A job-backed derivation takes the job path from PipelineJob.name, joining its components with
`/`. A missing or empty name or a component containing `/` or `:` requires an explicit
source_id. The database location does not enter the id (ITL-1564).
A default name built from a hash is <algorithm label>:<hex>, built
only by core/sources/source_ids.hash_source_name (an in-memory source hashes its table as
given; hash_in_key_order=True, refused without key columns or with a source_id, hashes
it sorted by the key columns in key order, arrow_utils.key_row_order, an Arrow sort after
Expand Down Expand Up @@ -1792,8 +1818,8 @@ data. The rules:
origin's source id is never written into a default id. SourceStreamBuilder.build needs
the kind part (kind_part) and takes the name (source_name) or makes the hash default.
- ArrowTableStream requires at least one data column; raises ValueError otherwise.
- A job node shows its current run; node.as_source() shows everything stored for it
(developer, November 13, 2026, ITL-1095). After a run, a FunctionJobNode returns exactly
- A job node shows its current run. node.as_source() reads the most recent readable
stored row for each lineage (ITL-1564). After a run, a FunctionJobNode returns exactly
the rows of that run's inputs, sync or async (ITL-1093). Before a run in this process (a
fresh or loaded job), after a run that raised, after clear_cache(), and while stale, every
function and operator job node reads empty (zero typed rows; head() is not_computed and
Expand Down
50 changes: 38 additions & 12 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -664,8 +664,10 @@ algorithm produced it.**
hex digest: `to_hex()`. A name later fed into a hash (the function `uri` in a pod's
identity, system-tag column names in an entry-id table) is still a name.
- Source ids: every source id is `<kind>_v<N>:<name>` (ITL-1425). A default name built from
a hash is `<label>:<hex>` (`derived_v1:semantic_v1:<hex>`, via `to_string()`, never a
label literal; built by `hash_source_name`). A value folded by an operation is
a hash is `<label>:<hex>` (via `to_string()`, never a label literal; built by
`hash_source_name`). A job-backed derived source prefixes the labelled node hash with the
job path, giving `derived_v1:<job path>:<label>:<hex>` (`derived_source_name`, ITL-1564).
A value folded by an operation is
`<operation label>:<hex>` (`batch_v1:` / `group_v1:`, for the folded source id and record id
alike).
- Record ids (developer, November 16, 2026, ITL-1154): the record-id system tag holds the row
Expand All @@ -675,6 +677,7 @@ algorithm produced it.**
`row_identifiers` writes the same text for whole columns, and a property test in CI checks
that the two agree byte for byte over generated keys. Never format a record id by hand
or build it with `uuid5`. It is not a hash, holds no source id and carries no label.
Derived sources also use the labelled lineage fold (ITL-1564).
A source-info token is `<source id>::<record id>::<column>`.
- A hash stored as a value in its own column or field carries its label: `to_string()` as
text, `to_prefixed_digest()` in a binary column.
Expand Down Expand Up @@ -948,15 +951,34 @@ element come from a tag value, or from anywhere other than the input's data elem
the step is not an operator: it is a derived source. So a tag's value is offered as data only
by a source, `DerivedSource(origin, tags_as_data={tag: data_name})` (ITL-939), never by an
operator. That form is a new root: fresh provenance through `SourceStreamBuilder`, schema-only
`pipeline_hash`, and a `source_id` the user must give (developer, November 21, 2026, ITL-1313:
"simply make them throw an error if source id is not provided"): it has no default, and
`DerivedSource(..., tags_as_data=...)` and `node.as_source(tags_as_data=...)` raise
`ValueError` without one, before the origin is read; a saved config without one is refused
too. The given string is its name (`derived_v1:<name>` in system-tag values and source-info
`pipeline_hash`, and a full source id. A derivation over another root source requires an explicit
source_id and refuses its absence before reading the origin, including when loaded
from a saved config (ITL-1313). A job-backed derivation uses the same default id with
or without tag copies (ITL-1564). The given string is its name (`derived_v1:<name>` in system-tag values and source-info
tokens, ITL-1425), and with the sorted mapping the source id is the source's identity (the
origin enters only through the schema). The
config type key stays `derived`. `DerivedSource` without `tags_as_data` (a job node's stored records)
keeps its old identity; do not change it (ITL-956).
uses the root source identity: full source id, Arrow schema identity and an empty key
tuple. The default source id carries the job path and the node's labelled content hash
(ITL-1564). A given source name also enters the content hash. Both forms put the
record-id policy into the content hash when it is not key columns: the marker
`("record_id_policy", "lineage_fold")` for the default fold, `"position"` for explicit
`record_id_columns=()`, so a cache kept under the hash never mixes two policies' rows.
A derived source keeps its origin's user-column order and appends tag copies in sorted
new-name order.

Both forms stamp one pair and fresh tokens through SourceStreamBuilder. The default
record id folds all upstream pairs with arrow_utils.fold_system_tag_values, sorting by
full record-id column name and flattening each triple (record-id column name, source-id
value, record-id value). DerivedSource defines the derived_row_v1 label once. An explicit
record_id_columns for tags_as_data keeps its configured key policy. A job node serves the
most recent readable stored record per lineage, breaking a function recording-time tie by
the greater result UUIDv7. Rows still tied (an operator's rows of one recording time, a
function's rows sharing the recording time and the result id) are refused, naming the
lineage fold and both candidates' stored row indices, recording times, and result IDs
when available. Other selection rules are planned. The source refuses missing
or incomplete pairs and repeated lineages that survive selection.

The `tags_as_data` argument is provisional and may be removed (ITL-1020), so when in
doubt start with a data-tag, or start with data and promote it to a data-tag if needed.

Expand Down Expand Up @@ -1785,7 +1807,9 @@ data. The rules:
`source_ids.build_source_id` and parsed only by `source_ids.parse_source_id` (split at the
first `:`; the kind part never holds `:`, the name may). Bump a kind's version when a row
read before a change could read differently after it (other values, Arrow types or record
id). A saved config holds `source_name`, `source_name_given` (given or default:
id). The provisional `DerivedSource` is an exception. It retains `derived_v1` when its
default record IDs move from positional IDs to folded upstream lineage (ITL-1564).
A saved config holds `source_name`, `source_name_given` (given or default:
read back, never guessed, by `RootSource._from_saved_name`) and `source_version` apart (the kind is
`source_type`); loaded where the class declares another version, the source has the
installed version's id (`SourceVersionWarning`), never a rewritten one. A slot (a
Expand All @@ -1802,7 +1826,9 @@ data. The rules:
by `PipelineJob.load`. The name-shaped-like-an-id warning is for a given name only, not a
default location. Tokens,
system tags and `source_id` show the full id; a record id never holds the source id. A
`DerivedSource` with `tags_as_data` has no default: it requires a `source_id` (ITL-1313).
job-backed derivation takes the job path from PipelineJob.name, joining its components with
`/`. A missing or empty name or a component containing `/` or `:` requires an explicit
source_id. The database location does not enter the id (ITL-1564).
A default name built from a hash is `<algorithm label>:<hex>`, built
only by `core/sources/source_ids.hash_source_name` (an in-memory source hashes its table as
given; `hash_in_key_order=True`, refused without key columns or with a `source_id`, hashes
Expand Down Expand Up @@ -1838,8 +1864,8 @@ data. The rules:
origin's source id is never written into a default id. `SourceStreamBuilder.build` needs
the kind part (`kind_part`) and takes the name (`source_name`) or makes the hash default.
- `ArrowTableStream` requires at least one data column; raises `ValueError` otherwise.
- A job node shows its current run; `node.as_source()` shows everything stored for it
(developer, November 13, 2026, ITL-1095). After a run, a `FunctionJobNode` returns exactly
- A job node shows its current run. `node.as_source()` reads the most recent readable
stored row for each lineage (ITL-1564). After a run, a `FunctionJobNode` returns exactly
the rows of that run's inputs, sync or async (ITL-1093). Before a run in this process (a
fresh or loaded job), after a run that raised, after `clear_cache()`, and while stale, every
function and operator job node reads empty (zero typed rows; `head()` is `not_computed` and
Expand Down
37 changes: 37 additions & 0 deletions changelog.d/ITL-1564.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
### Breaking changes and migration

- A source over a job node's stored results now defaults to
`derived_v1:<job path>:<hash label>:<node hash>` (ITL-1564). Pass an explicit
`source_id` when a job name is unavailable or contains a separator.
- The full source id now enters the content hash of a plain derived source,
including when you provide the name. Default source-cache paths and downstream
pipeline-entry keys change. The origin job's stored results are still readable.
- Plain derived sources now emit one new system-tag pair and a fresh token for each
data column. Both forms fold upstream system tags for record IDs by default.
Explicitly positional `tags_as_data` sources keep positional IDs. The record-id
policy (folded or positional) now enters a derived source's content hash, so each
policy has its own content hash and default cache path. Saved cache configs now
record whether their path was automatic. Reloading a config saved without that
record, whose automatic path followed a derived source with default (lineage-fold)
record IDs, recomputes the path from the rebuilt source of the same ID, leaving the
legacy positional cache intact. Every other saved cache, and every cache-only
reload, keeps the saved base path. Explicit paths with tag copies add a component
based on the sorted copy mapping before the layout version. Each mapping opens a
separate cache table, including on a cache-only reload with its saved mapping.
Rebuild any pre-0.4.0 explicit tag-copy cache from its source to populate the new path.
At an explicit path, the encoding of stored derived record IDs in the current data
context is checked before ingest. If it indicates a different policy, use a new cache path.
When a node has stored multiple versions of one input lineage, a read takes the
most recent readable version. Versions that still tie are refused, naming the
lineage fold and both candidates' stored row indices, recording times, and result
IDs when available. This covers operator rows with one recording time and function
rows that share the recording time and the result ID. Rebuild downstream pipeline
tables and caches in fresh storage. A separately configured result store can be reused.

### Fixed

- Derived source previews reject repeated lineage across all rows held by the
origin, including rows outside the preview limit.
- Directly constructed derived sources inherit their origin's data context by default.
- Unsorted previews of stored results gather payload rows only for the displayed
winners, while checking all stored lineages for ties.
Loading
Loading