Skip to content

feat(nodes)!: three nested row ids, layouts pdb_v2, odb_v2 and tdb_v2 (ITL-1471) - #583

Merged
eywalker merged 45 commits into
mainfrom
eywalker/itl-1471-three-nested-row-ids-v2-table-layouts-and
Nov 27, 2026
Merged

eywalker merged 45 commits into
mainfrom
eywalker/itl-1471-three-nested-row-ids-v2-table-layouts-and

Conversation

@eywalker

@eywalker eywalker commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Fixes ITL-1471. Stage 1 of ITL-1466 (design and stage list on #575); stages 2 to 5 are not touched.

Plan: docs/dev/plans/itl-1471-plan.md.

What changes

A row that passes through a node has three nested ids, all defined in one new module, src/orcapod/core/row_ids.py, each beside its preimage:

Id Hash of Column
entry id user tags, system tags, the labelled input data hash __pipeline_entry_id
instance id the entry id (labelled), the input's source-info tokens in name order __pipeline_instance_id
record id the node's content hash (labelled), the instance id (labelled), the result id (__data_id) __pipeline_record_id
  • Function node (pdb_v2). A row is looked up by its instance id and keyed by its record id, which covers the content hash of the node that records it (developer's decision, 2026-11-26, below). __pipeline_base_entry_id and __pipeline_recomputation_index are gone, and so is the query before every write. A write skips only an identical record id; a recompute writes a new row; among the rows of one instance __recorded_at says which is the latest. An input whose tokens changed is a new instance: recorded, not computed.
  • Side effects and ctx functions (tdb_v2). Keyed by the entry id only. The log column record_id_hash is entry_id; InvocationContext._record_id_hash_ch is _entry_id_hash_ch.
  • Operator cache (odb_v2). Two columns are stored beside the row key and are part of no key: __pipeline_entry_id (the entry id of the row) and __recorded_at (first insertion). Every read of the cache drops both.
  • Tokens are read as the row carries them. The instance id reads a row's tokens through DataProtocol.source_info_table(): for a row read from an Arrow table, that table's typed columns (with a row's own nullable fields), never typed again from the token values.
  • Trace. A trace resolves a held row by its instance: among the entries with the row's system tags, result and input hash, the one whose stored input tokens are the input row's. Each job's trace finds its own record after a token-only rerun.
  • Placeholder (EmptyData). It carries the source-info tokens a real output would, with the sentinel EPHEMERAL_RESULT_GONE (one constant, row_ids.EPHEMERAL_RESULT_GONE) in place of the result id: <function uri>::EPHEMERAL_RESULT_GONE::<column>, built by the helper that builds a real output's tokens (data_function.output_source_info).

Breaking changes

  • Layouts pdb_v2, odb_v2, tdb_v2: a table at pdb_v1, odb_v1 or tdb_v1 is reported as another layout and not read; a side-effecting node refuses to run beside one, before any delivery.
  • Every invocation_hash and side-effect log key changes once (the entry id has no index column).
  • PostRunPayload.record_id_hash is renamed result_id.
  • FunctionRun.entry_id (provenance) is renamed record_id.
  • FunctionJobNode.compute_base_entry_id is renamed compute_instance_id; compute_pipeline_entry_id is removed.
  • DataProtocol gains a required method, source_info_table() (the one-row table of source-info columns); EmptyData's unused empty_source_info argument is replaced by source_info.
  • An operator cache (LOG / REPLAY) on a SQLite database is refused when the database is attached. The cache's __recorded_at is a timestamp, and the SQLite connector has no column type for one. The refusal comes from the generic storable-columns check (require_storable_tables now includes the two new columns), with no SQLite special case; UnstorableColumnError names the node and the column, before anything runs. A function node's pipeline table was already refused there. Before, a cache of storable columns ran on SQLite. Decided by the developer on November 26, 2026; timestamp support for the SQLite connector is the follow-up ITL-1482.

What a node does with a placeholder

A node given a placeholder computes its instance id from the placeholder's tokens. That id is not the one stored when the real result flowed (the tokens hold the sentinel), so the lookup by instance id misses. The node then asks the result store by the input data hash, which the placeholder keeps, and returns the stored result. The function is not called, and no pipeline row is written for a placeholder input (developer, November 26, 2026). FunctionJobNode._empty_data_cache_hit is the one place that holds that choice; ITL-1475 reconsiders it. The async route does the same (async_execute sends a placeholder to _empty_data_cache_hit, never to the function or the pipeline writer). Tests: test_a_node_given_a_placeholder_finds_its_result_by_the_input_hash (row by row), test_placeholders_fed_through_the_async_route_find_their_results (through channels), test_a_placeholder_whose_result_is_not_stored_is_refused (sync and async); 0 calls in each.

Behaviour changes by design, with their tests

  • The same input processed twice writes one pipeline row, not two (test_execute_data_second_call_same_input_is_one_record).
  • A rerun whose input tokens differ from the stored ones records new instances and computes nothing (test_tag_table_source_info.py, test_cross_session_miss_tags.py).

Review findings (independent review of b556376)

Finding Fix Regression test (failing on b556376) Commit
1. async_execute sent a placeholder whose instance is not stored to the function and the pipeline writer: EmptyDataAccessError although the result was stored the async route sends it to _empty_data_cache_hit, as the sync route: no call, no pipeline row test_row_ids_stored.py::test_placeholders_fed_through_the_async_route_find_their_results (two arrangements, three rows, through channels); ::test_a_placeholder_whose_result_is_not_stored_is_refused (sync and async) 941cf04
2. After a token-only rerun, a trace of the first job raised ProvenanceInconsistencyError: it matched on system tags and result id and found both records the entry is resolved by the row's instance (the stored input tokens equal the input row's); several records of one instance stay refused test_row_ids_stored.py::test_each_jobs_trace_finds_its_own_record_after_a_token_only_rerun (sync and async, two arrangements; both jobs' traces, their record ids disjoint, the first job's trace unchanged by the second run) 27b28ce
3. The lookup typed the tokens again from their values: valid Arrow-backed rows with a nested token column raised ArrowTypeError before an inactive function was reached Data keeps the typed source-info columns of the table it was read from; source_info_table() returns them; the events of test_held_rows_that_cannot_make_one_table_are_sent_on_async are main's again test_rows_on_read.py::test_an_inactive_function_node_passes_rows_with_nested_tokens (sync and async); test_row_ids.py::TestTokensAreReadAsTheRowCarriesThem (4 tests) 8fe95b8
4. docs/reference/hashing.md, section 9, named the removed base and pipeline entry ids names the entry, instance and record ids (documentation) a2803ea

The tests were committed first (e45e75f) and fail there: 7 in test_row_ids_stored.py, 3 in test_rows_on_read.py.

Stored token columns are the ones the instance id was made from

A pipeline row stores data.source_info_table(), the table the instance id's preimage reads (one helper builds both), in place of the token columns of as_table(columns={"source": True}), which are typed again from the token values. So every stored row gives its instance and record id again from its own columns.

  • Regression test (failing on 2d8a6a8, 8 cases): test_row_ids_stored.py::test_a_stored_row_keeps_the_token_columns_its_instance_id_was_made_from, sync and async, two arrangements, three rows, for list tokens beside a string column with a null, and for nested lists; stored, read back by a new node (0 calls), instance and record ids recomputed from each stored row.
  • A row with no token at all stores no token column, as before, and its ids are recomputed too (::test_rows_with_no_token_store_no_token_column_and_recompute_their_ids, sync and async).
  • Nothing moves for ordinary rows: ::test_an_ordinary_rows_stored_token_columns_are_what_they_were shows the two tables equal (names, order, Arrow types, nullable fields, values) for the rows of a source with and without data-tags, Join, MergeJoin, GroupBy, Batch, Batch of MergeJoin (nested lists), a function's output and an operator over it. The golden check matches with no golden file touched.

Known difference: held rows with a nested token column (ITL-1491)

For rows whose token column is valid Arrow of a nested list type but whose values cannot be typed again from Python values:

  • A function node reading such a stream directly stores every row with the stream's token types, identically on the sync and the async path. On main the two paths differed for these rows (sync stored 1 of 3 rows, async raised ArrowTypeError), and rows with a null in a list-typed token column failed with a write error on both.
  • The held-rows route still differs. When a held node's rows are passed to its successor, the sync orchestrator builds them into one table at the successor's edge through the operators' row-built form (StaticOutputOperatorPod._rows_to_table), which types each token again from its value and raises ArrowTypeError, as on main. The async orchestrator sends the same rows on as they are, and the function node now records them and completes (on main it raised at the record).
  • Decided for this PR (November 26, 2026): stage 1 stays as it is, with no check added only to reproduce an error. ITL-1491 makes the row-built form read the typed token columns everywhere, after which both paths accept such rows.
  • The tests that pin today's behaviour name ITL-1491: test_rows_on_read.py::test_held_rows_that_cannot_make_one_table_raise_at_the_successors_edge (sync raises) and ::test_held_rows_that_cannot_make_one_table_are_sent_on_async (async completes, both rows stored with the nested type).

Review findings, round 2 (independent review of f3f6842)

Finding Fix Regression test (failing on f3f6842) Commit
1. A stored row was lost across sessions: with the default pipeline-hash scope one table holds several nodes, and a second node that recorded a shared instance with the cached result was skipped as a duplicate of the first node's row first fix (fba3aec): the table's key was the pair of the node's content hash and the record id. Replaced by the developer's decision of 2026-11-26 (below): the node's content hash is in the record id, and the record id alone is the key; reads filter by the node's content hash as before test_row_ids_review_2.py::test_two_nodes_sharing_a_table_each_keep_their_row_of_a_shared_instance (sync and async, both orders), ::test_two_jobs_binding_one_slot_each_keep_their_stored_rows (both orchestrators, both orders) fba3aec
3. A trace of a function over its source refused after a token-only rerun: that branch took the one entry before choosing an instance, and the other branch compared token values a function node says which instance it holds each row under (held_instance_ids); provenance._entries_for keeps the stored records of that instance id, on every branch ::test_a_trace_over_the_source_finds_the_record_of_the_rows_own_instance (both orchestrators, both orders); round 1's test_each_jobs_trace_finds_its_own_record_after_a_token_only_rerun still passes ab58159
4. On the async route a placeholder without a stored result aborted the run and the good rows with it the async placeholder branch is under the row failure policy with the sync route's events: the row starts before the lookup; one failed row under continue, the run stops under fail_fast ::test_a_placeholder_without_a_result_is_one_failed_row_under_continue (sync and async, each position), ::test_the_events_of_placeholder_rows_are_the_same_on_both_routes, ::test_a_placeholder_without_a_result_stops_the_run_under_fail_fast fba3aec
5. docs/reference/hashing.md: the worked example said a result id is new in every run a result computed anew has a new id; a warm repeat reuses the stored result's id and so the record id (documentation) 2747f25

The tests were committed first (df42f2d) and fail there in 18 cases.

Finding 2: one canonical type per token value

Two sessions that share one pipeline table and declare an all-null token column with different Arrow types failed with ArrowInvalid on the second write (main completed both). Decided (November 26, 2026): a token column has one canonical type, a function of the token's value alone, used for the instance id's preimage and for the stored column alike:

  • a null token is a large_string null whatever type its column declares (main's rule);
  • a non-null token keeps the type of its typed column and is never typed again from its value.

So an id is a function of the row alone, never of the order sessions ran in. A row whose token column has another type than the rows already recorded in the table (a list token beside a string or null token) is refused with an InputValidationError naming the column and both types, raised as the cause of the write error that stops the run (main fails there too, with an ArrowInvalid about schemas).

  • Tests (committed first, 17 cases failing on 69d8ec1): test_row_ids_review_2.py::test_sessions_whose_null_tokens_are_typed_differently_share_a_table (sync and async, four pairs covering both orders), ::test_a_null_tokens_instance_id_does_not_follow_its_columns_type, ::test_a_non_null_token_keeps_the_type_of_its_column, ::test_sessions_whose_tokens_differ_in_type_are_refused_naming_the_column (both orders, sync and async), ::test_a_session_mixing_null_and_list_tokens_in_one_column_is_refused.
  • Ids that change versus the previous head (69d8ec1): only the instance id, and so the record id, of a row with a null token in a column declared with another type than large_string (it is now the id the same row has with a string-typed column). Nothing pinned: no golden value moves (generate_golden_hashes.py --check matches, no golden file touched), and no id or stored column type of an ordinary row moves (test_an_ordinary_rows_stored_token_columns_are_what_they_were, nine kinds of streams).
  • Restated: a session mixing nulls and lists in one token column is refused again, as on main, now with the clear message (the case null_in_a_list_column of the earlier test is replaced by this refusal test).

One stored column is added by finding 1: __pipeline_record_id (large_binary) in the pipeline table (pdb_v2, new in this PR).

Review findings, round 3 (independent review of 4a916ec)

Finding Fix Regression test (failing on 4a916ec) Commit
A database read error (or an identity error) in a placeholder's result lookup stops the run on both routes, but the async route reported the row's start only, the sync route its start and its crash the async route reports the row's crash before the error is raised; the error stays fatal whatever the policy test_row_ids_review_2.py::test_a_fatal_error_in_a_placeholders_lookup_gives_the_same_events_on_both_routes (both policies, both kinds of error; the events of both routes are compared, node start and end included) ddfc24b

Review findings, round 4 (CodeRabbit review of ddfc24b)

Finding Verdict Regression test Commit
A row built from Python values with no token and the same row read from an Arrow table had different token columns, so different instance ids Fixed: source_info_table() gives one column per data column on every path; a data column with no token has a null token (large_string) test_row_ids.py::TestTokensOfBuiltAndChangedRows::test_a_built_row_and_the_row_read_from_a_table_have_one_instance_id (no token, one, two; both column orders; built, read as a table, read as a stream row); test_row_ids_stored.py::test_rows_with_no_token_store_null_tokens_and_recompute_their_ids (sync and async) e851695 (tests first: 6607424)
select (and every other change of a row) dropped the typed token columns, so a kept nested token was typed again from its value and failed Fixed: select, drop, rename, with_columns and with_source_info keep the typed column of every token they keep (with_columns_of: see round 5) ::test_a_change_keeps_the_typed_column_of_every_token_it_keeps (nine changes, three rows with a nested token column) e851695 (tests first: 6607424)
The arrangement comparison ran on the sync orchestrator only Fixed test_row_ids_stored.py::test_the_two_arrangements_store_the_same_instance_ids (both orchestrators) e851695
The persistent-against-ephemeral test could not tell which record won Fixed: two valid records of one instance, the id of the result read back is asserted test_ephemeral_result.py::test_of_two_records_of_one_instance_the_one_recorded_last_wins (either record later) d72bc9d
Three documentation findings (when a new instance computes; where the two ids are read; why the entry id leaves out the node's content hash) and the wall-clock note Fixed (documentation; the new sample is run by the documentation test) 027d908
Ephemeral mode does not read the persistent result store on an instance miss Declined: unchanged from main, a design question about ephemeral results; reported as out of scope
On the async route two completions of one instance keep only the last pair in the node's in-memory cache Declined: main's behaviour (keyed by the entry id there); reported as out of scope
Six test nitpicks Fixed (listed in the triage comment) e851695, d72bc9d

Ids that change versus the previous head (ddfc24b): only the instance id, and so the record id, of a row built from Python values in which some data column has no token: it is now the id the same row has when read from an Arrow table, and its stored row has a large_string null _source_* column for that data column. Rows of streams, sources and function outputs are unchanged; no golden value moves (generate_golden_hashes.py --check matches, no golden file touched).

Developer decision, 2026-11-26: the node's content hash is in the record id

Decided by the developer on 2026-11-26; it reverses the earlier key choice (the pair of node content hash and record id).

  • Record id = hash of the node's content hash (labelled), the instance id (labelled) and the result id. One definition, row_ids.record_id(hasher, node_content_hash, instance, result_id), beside its preimage (__node_content_hash, __pipeline_instance_id, __data_id, all large_binary).
  • The pipeline table's key is the record id itself. row_ids.pipeline_row_key is removed.
  • The row still stores __node_content_hash, so every stored row gives its record id again from its own columns.
  • The entry id and the instance id are unchanged. Side effects (tdb_v2) stay keyed by the entry id.
  • Tests: test_row_ids.py::TestRecordId (the preimage column by column; one instance and result recorded by two nodes is two records); test_row_ids_stored.py (the record id of every stored row recomputed from __node_content_hash, __pipeline_instance_id and __data_id, and equal to the row's key; sync and async, two arrangements); test_row_ids_review_2.py::test_two_nodes_sharing_a_table_each_keep_their_row_of_a_shared_instance (sync and async, both orders: both nodes keep their rows, each stored view is complete, the two nodes' record ids of a shared instance and result differ, each recomputes from its own stored row).
  • Golden values: none moves. generate_golden_hashes.py --check matches and no golden file is touched: a record id holds a random result id, so no golden entry pins one (the golden cases pin a pipeline table's instance ids, which are unchanged).

Review findings, round 5 (verification of 20797df)

Finding Fix Regression test (committed first) Commit
P1. Round 4 made with_columns_of (a data-tag falling through a function) keep the typed token column. The sync edge between two nodes and a stored result type the token from its value, so a fixed-size-list token was a fixed-size list on the async route and a large list at the sync edge and from the store: one function output had two instance ids, and a second route over a shared store was refused for the column's type with_columns_of types the taken columns' tokens from their values again, as on ddfc24b (decided November 26, 2026): one instance id for that token on both routes and from the stored result (the case found; a stopgap, see "Stopgap" below) test_row_ids_review_2.py::test_both_routes_record_one_instance_per_row_in_a_shared_store (sync then async, async then sync, and four sessions in both orders, so a second session of each route; two data-tags in two tag arrangements), test_row_ids.py::TestTokensOfBuiltAndChangedRows::test_columns_taken_from_another_row_have_tokens_typed_from_their_values this head (tests: the commit before it)
P2. After a rename, a token given earlier for the destination name (while the row had no such column) could win in source_info() and as_table, while source_info_table() and the instance id used the renamed column's own token a rename moves the column's token with it and carries only the tokens of columns the row holds; every view agrees test_row_ids.py::TestARenameMovesTheToken::test_every_view_gives_the_renamed_columns_own_token (three mappings, the stale token held before or after the row's own; source_info, as_dict, as_table, source_info_table, the preimage and the instance id; built, table and stream rows) 5edd6e3 (test: the commit before it)

A follow-up to P2 (verification of fd94fb7): the "only the columns the row holds" rule emptied a placeholder's tokens, since a placeholder (EmptyData) holds no column, and rename({}) returned the row itself after changing it. Now an empty mapping returns the row itself, unchanged, and a placeholder's rename keeps every token (moving the ones the mapping names). Test, committed first: test_row_ids.py::TestARenameOfAPlaceholderKeepsItsTokens (an empty mapping, mappings that name no token, a mapping that names two; tokens, token table and instance id; two token orders).

Stopgap: a token's declared type is, in some places, inferred again from its value (ITL-1491)

Developer decision, 2026-11-27: the re-typing below is accepted as a stopgap only. It is not the proper solution.

  • The intended rule. A data-tag that falls through a function pod is meant to keep its source-info token with its type unchanged. A column a function returns is never a pass-through, even with an input's name and value: its token points to the function.
  • Where token types are meant to come from. The type of every source-info token column is fixed by the pipeline, like every other column type, and is not meant to be taken from values: each source and operator determines its output token columns' types from its inputs' types, by its own rule, in its own module.
  • Today. A token's declared type is, in some places, inferred again from its value (Data.as_table(columns={"source": True}) and so _rows_to_table, the row-built form, and with_columns_of). It can narrow a declared type (example: [None] in a token column a Batch declares with two list levels infers one; a fixed_size_list token copied by with_columns_of becomes a large_list).
  • ITL-1491 removes it.

The comments and docstrings, CLAUDE.md / .zed/rules, docs/reference/hashing.md (instance id inputs) and the changelog fragment ("Known limitations") say the same. Wording only: no behaviour, hash or golden change; the ASTs of the changed .py files, docstrings stripped, equal those of 52f2560.

Developer review, 2026-11-27

The decisions this PR rests on were each approved:

  • A trace resolves a held row by its instance id.
  • The instance id is made from the typed token columns.
  • The nested-token difference between the sync and the async route ships as it is, with ITL-1491 to follow.
  • A null token is a null large_string.
  • A rename brings the column's token along.
  • A placeholder input computes nothing and writes no pipeline row.
  • A placeholder on the async path follows the row failure policy.

Stopgaps, accepted as such: the re-typing of token columns from their values (above, until ITL-1491), and the refusal of an operator cache in a SQLite database (until ITL-1482).

Known limitations

  • Concurrent first writes to one shared, empty pipeline table. Two function job nodes that share one pipeline table (one pipeline hash), both run on the async route, both check the table before either has written, and then write token columns of different types (list tokens in one, string tokens in the other): the run that loses still stops, so nothing is lost silently, but its write error has an ArrowInvalid about schemas as its cause, not the InputValidationError that names the column and both types. A node learns the table's token column types when it first checks the table and from its own writes, not from another node's writes made since. The same holds on the previous heads. Concurrent first writes to one shared table are outside this stage; it is filed as its own issue.
  • The held-rows difference between the sync and the async orchestrator for rows with a nested token column: see "Known difference" above (ITL-1491).
  • A source-info token's declared type is, in some places, inferred again from its value, which can narrow a declared type: a stopgap, see "Stopgap" above (ITL-1491).
  • An operator cache cannot be kept in a SQLite database: a stopgap until the SQLite connector stores timestamps (ITL-1482).

Golden values

The golden diff equals the approved list (docs/dev/specs/itl-1466/golden-changes.md on #575, approved by the developer on November 25, 2026), checked entry by entry and value by value before and after writing:

  • 6 record-id pins removed (*.table[.../pdb_v1].record_ids): a record id holds the result id, a UUIDv7, and cannot be pinned.
  • 6 instance-id pins added (*.table[.../pdb_v2].instance_ids), each value equal to the listed one.
  • 6 *.table_paths entries moved: pdb_v1 to pdb_v2 only.
  • Files: pipeline-02.json (4 entries: job, drop_nulls_job), provisional/pipeline.json (8 entries: filter_job, polars_filter_expr_job, rejoin_job, rejoin_job_async), and the open revision of v1.json (the two file digests and the date).

Before writing, generate_golden_hashes.py --check reported exactly these 18 problems; the commands of the list were then run as written, and --check reports every group matching. The operator cache's entry-id column, the placeholder's tokens and the result_id rename move no golden value.

Tests

New: tests/test_core/test_row_ids.py (each preimage stated column by column and hashed by hand; token order; the placeholder with and without tokens; the sentinel can equal no result id, and a token with it splits at its first and last ::) and tests/test_pipeline/test_row_ids_stored.py (three rows, two tags and two data columns in two arrangements, sync and async): every stored row gives its instance and record id again from its own columns; the side-effect log's keys and entry_id column are the entry ids; invocation_hash ends in the entry id for a side effect and for a ctx function; a token-only change upstream records new instances with 0 calls and 0 deliveries; a recompute writes a new row; an identical repeat writes none; the operator cache's __pipeline_entry_id equals the recomputed entry id, neither stored column is part of the row key, a row passed again keeps its first time, and no read shows either column; the placeholder's tokens; a node given a placeholder.

tdb_v1 and pdb_v1 beside a side-effecting node are refused before any delivery: test_hash_step_combined.py::TestSideEffectNodeChecksEveryRun (the existing tests, now with v1 as the other layout).

Existing tests updated: 638, counted by running main's tests against this branch's library: 500 read the old columns or ids, 110 name a layout, 8 compare stored operator tables (now with an insertion time), 12 use a renamed name, 8 are behaviour changes by design. The table by file is in the first comment.

Checks

ruff check, ruff format --check, basedpyright (its own exit code 0), scripts/design_issues.py --check, scripts/assemble_changelog.py --check, scripts/data_function_types.py --check, the hash site inventory test and the golden check pass locally. Locally only targeted directories were run (tests/test_core, tests/test_pipeline, tests/test_databases, tests/test_arrays, tests/test_hashing, tests/test_docs, test-specification); CI runs the full suite.

core/row_ids.py sets reportImportCycles=false at file level, as core/data_tags.py does and for the same existing cycle (the protocols import side_effects); ITL-1206 is the issue that breaks it.

Open pull requests that touch the same files

Test-merged against each head of the ITL-1464 stack (#558 to #571): #565 and #567 conflict, both in src/orcapod/core/nodes/operator_node.py; the others merge cleanly. Not resolved here. One point merges cleanly but needs care: a data datagram kind added by that stack (#563, tokens kept as a recipe) has to implement DataProtocol.source_info_table().

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Pipeline records now distinguish input instances from recorded results, supporting cache lookup, provenance, and tracing when inputs or source information change.
    • Placeholder inputs can reuse cached results without recomputation; missing ephemeral results are reported explicitly.
    • Source information retains column types and can be inspected in tabular form. Operator caches now include entry and recording-time metadata.
  • Compatibility
    • Pipeline, tracking, and operator-cache storage layouts have changed; tables using earlier layouts are not read as current layouts.
    • SQLite operator logging and replay are rejected when timestamp storage is unsupported.
    • Provenance and post-run hook fields have been renamed; integrations using the previous field names may need updating.

eywalker and others added 6 commits November 26, 2026 01:17
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…(ITL-1471)

core/row_ids.py holds the three nested row ids and their preimages. A data
datagram gives its source-info tokens as a one-row table (source_info_table),
and the EmptyData placeholder carries tokens built as a real output's are, with
the sentinel EPHEMERAL_RESULT_GONE in place of the result id.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…_v2, tdb_v2 (ITL-1471)

A function node looks a row up by its instance id and keys it by its record id;
the recomputation index and the query before every write are gone. Side effects
and functions that take the invocation context are keyed by the entry id, the
log column record_id_hash is entry_id, and PostRunPayload.record_id_hash is
result_id. The operator cache stores the entry id and its insertion time beside
its row key, outside the key. FunctionRun.entry_id is record_id.

BREAKING CHANGE: stored pipeline tables, operator caches and side-effect logs
move to new layouts; every invocation hash changes once; an operator cache on a
SQLite database is refused when it is attached.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…n changes (ITL-1471)

A pipeline table's record id holds the result id, a UUIDv7, so it cannot be
pinned: the golden cases pin the instance ids instead. The 18 changes the
developer approved on 2026-11-25 (golden-changes.md of ITL-1466): 6 record-id
pins removed, 6 instance-id pins added, 6 table paths moved from pdb_v1 to
pdb_v2, in pipeline-02.json (4 entries) and provisional/pipeline.json (8), and
the open revision of v1.json. No other value moves.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…TL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

This change replaces recomputation-indexed pipeline identity with entry, instance, and record IDs. It updates pipeline caching and provenance, adds operator-cache metadata, changes side-effect delivery keys, and moves the pipeline, tracking, and operator layouts to v2.

Changes: Row identity and storage

Layer / File(s) Summary
Row-ID and source-info contracts
src/orcapod/core/row_ids.py, src/orcapod/core/datagrams/tag_data.py, src/orcapod/protocols/core_protocols/datagrams.py, src/orcapod/core/data_function.py, tests/test_core/test_row_ids.py, tests/test_pipeline/test_row_ids_stored.py, docs/reference/hashing.md, docs/dev/plans/itl-1471-plan.md, .zed/rules, CLAUDE.md, changelog.d/ITL-1471.md
Defines entry, instance, and record ID preimages and row keys. DataProtocol and datagrams expose source-info tables, including typed token data for placeholders.
Pipeline identity and result caching
src/orcapod/core/nodes/function_node.py, tests/test_core/function_pod/*, tests/test_core/nodes/*, tests/test_pipeline/*, tests/test_hashing/*, docs/reference/data-function-types.md, scripts/hash_audit_example.py
Function-node lookups and caches use instance IDs. Pipeline records use record IDs. Placeholder inputs look up results by input hash without computation or pipeline-row writes.
Side-effect and operator-cache storage
src/orcapod/side_effects.py, src/orcapod/core/nodes/operator_node.py, tests/test_core/side_effect_pod/*, tests/test_core/data_tags/test_operator_node_storage.py, tests/test_databases/test_unstorable_columns.py, docs/concepts/pipeline-job.md
Side-effect delivery keys and invocation logs use entry IDs. Operator-cache records store entry IDs and insertion timestamps; reads remove these stored-only columns.
Invocation context and provenance
src/orcapod/core/function_pod.py, src/orcapod/invocation.py, src/orcapod/hooks.py, src/orcapod/pipeline/provenance.py, src/orcapod/types/provenance.py, tests/test_pipeline/test_provenance.py, tests/test_pipeline/test_row_ids_review_2.py
Invocation contexts use entry-ID hashes, post-run payloads expose result_id, and provenance matches rows by instance ID and reports record IDs.
Layout versions and compatibility
src/orcapod/system_constants.py, src/orcapod/contexts/data/v1.json, tests/test_databases/test_list_table_paths.py, tests/test_pipeline/test_stored_data_context.py, docs/concepts/*, .zed/rules, CLAUDE.md
Updates the pipeline, tracking, and operator-cache layout markers to v2. Related documentation, fixtures, and path tests identify v1 layouts as earlier layouts.

Estimated code review effort: 4 (Complex) | ~60 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant FunctionJobNode
  participant row_ids
  participant ResultDatabase
  participant PipelineDatabase
  FunctionJobNode->>row_ids: Compute instance ID from input row
  FunctionJobNode->>ResultDatabase: Look up result by instance ID
  ResultDatabase-->>FunctionJobNode: Return cached result or miss
  FunctionJobNode->>row_ids: Derive record ID from node, instance, and result IDs
  FunctionJobNode->>PipelineDatabase: Write pipeline record using record ID
Loading

Possibly related PRs

  • metamorphic-labs/orcapod-python#313: Introduces the pdb_v2 and tdb_v2 layouts and the __data_context column. This PR changes the row-ID structure in those same layouts and makes v1 layouts incompatible with v2.

Suggested reviewers: brian-arnold

Merge Risk: Low · up to 994e6

The change introduces a new row-identity model and v2 table layouts. Three known edge cases remain open: duplicate async completions for one instance, wall-clock ordering of latest results, and a provenance test that does not verify which instance a traced record belongs to. All are narrow, so the change can be merged with owner awareness.

Security architecture risk: Moderate · up to 994e6

The upgrade changes which prior actions count as completed and which stored result counts as current. On stores that can discover older tables, the upgrade blocks delivery rather than silently repeating an action. On stores that cannot, previously completed actions can be delivered again. The new result ordering also depends on writer clocks.

Retained concerns

  • Medium · reliability · inferred: The v2 release no longer recognizes v1 completion records by path or key. A detectable v1 table blocks delivery, but a store that cannot list tables warns and proceeds. On such a store, rerunning previously completed inputs after the cutover can repeat their configured external actions. Callers that use the invocation hash for downstream deduplication also receive a different key. The impact requires pre-existing completion history and a rerun; it does not imply new authority to invoke a node.
  • Medium · reliability · inferred: For distinct results recorded for the same instance, the head selects the greatest writer timestamp rather than the greatest stored recomputation index. A later successful recomputation can therefore leave the older result current on a persisted read if the writer clock moves backward or writers disagree. This affects both result selection and whether a missing ephemeral result takes precedence over an available result. The base index was not a cross-writer transaction, but sequential increments did not depend on clock monotonicity.
Security review details

Security Blast Radius

  • inferred — The supported replay exposure is scoped to previously completed inputs for affected nodes rerun against incompatible completion history. A repeated action has the authority of the configured callable; the evidence does not establish cross-tenant reach or privilege gain.

Trust Boundaries and Controls

  • observed — The delivery path validates the row's data context and checks the entry ID in the node's versioned log before calling the configured function when tracking is enabled. The entry ID identifies a delivery; it does not grant authority to run one.

Resilience and Maintainability Implications

  • observed — The completion check, external call, and success write remain separate steps, as at the base. A successful external action followed by interruption or a failed log write can still leave no completion marker, and duplicate log suppression does not reserve the action against concurrent callers. The PR changes the identity used for these steps, not their atomicity.

Hardening Proposals

  • proposed — Require a verified completion-history handoff or an explicit fresh-store cutover before enabling delivery on v2. Block upgrades or rollbacks that cannot verify completion history, and coordinate any invocation-key change with downstream deduplication users.
  • proposed — Keep the recording timestamp for diagnostics, but use a storage-assigned ordering or an atomically updated current-record pointer where recovery depends on the latest successful publication.
Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: three nested row IDs (entry, instance, record) and the move of pipeline, operator-cache, and tracking layouts to v2. The changeset implements these items. It also mark…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: three nested row IDs (entry, instance, record) and the move of pipeline, operator-cache, and tracking layouts to v2. The changeset implements these items. It also marks the change as breaking with '!' and cites ITL-1471, which matches the changelog and plan. The title is specific and concise.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 52f2560 and 994e658.

Files selected for processing: 7

  • .zed/rules
  • CLAUDE.md
  • changelog.d/ITL-1471.md
  • docs/reference/hashing.md
  • src/orcapod/core/datagrams/tag_data.py
  • src/orcapod/core/operators/static_output_pod.py
  • tests/test_core/test_row_ids.py
Files skipped from review as they are similar to previous changes: 3

  • changelog.d/ITL-1471.md
  • src/orcapod/core/datagrams/tag_data.py
  • tests/test_core/test_row_ids.py

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Recent review details

Additional context used

Code guidelines: 1

CLAUDE.md — auto-discovered
Path-based instructions: 7

Source excerpt: No operator carries its inputs' `Data` meta (`__`) columns (developer, November 13, 2026, ITL-1080): on the sync and the async path, in rows and in the predicted output schema, for a raw `ArrowTableStream`'s `__` columns and...

CodeRabbit inference engine (CLAUDE.md)

Files:

  • src/orcapod/core/operators/static_output_pod.py
Source excerpt: Every fenced `python` block in `README.md`, `docs/index.md`, `docs/getting-started.md`, `docs/troubleshooting.md`, `docs/concepts/`, `docs/reference/` and `docs/tutorial/` is executed by `tests/test_docs/test_doc_samples.py`...

CodeRabbit inference engine (CLAUDE.md)

Files:

  • docs/reference/hashing.md
Source excerpt: Respect the Arrow types the inputs already have, normalized to their large variants (developer, November 10, 2026: large and non-large variants hash identically, so always normalize to large for consistency).

CodeRabbit inference engine (CLAUDE.md)

Files:

  • src/orcapod/core/operators/static_output_pod.py
Source excerpt: `docs/` is the only source.

CodeRabbit inference engine (CLAUDE.md)

Files:

  • docs/reference/hashing.md
Source excerpt: When adding or changing any instruction, update BOTH: `CLAUDE.md` (for Claude Code) `.zed/rules` (for Zed AI)

CodeRabbit inference engine (CLAUDE.md)

Files:

  • .zed/rules
  • CLAUDE.md
Source excerpt: Write pages as before: a `# <title>` first line, mkdocs-style admonitions (`!!!

CodeRabbit inference engine (CLAUDE.md)

Files:

  • docs/reference/hashing.md
Use [Google style](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings) Python docstrings everywhere.

CodeRabbit inference engine (CLAUDE.md)

Files:

  • src/orcapod/core/operators/static_output_pod.py

@eywalker

Copy link
Copy Markdown
Contributor Author

Existing tests updated, by class

Counted by running main's unchanged tests against this branch's library (the directories tests/test_core, tests/test_pipeline, tests/test_databases, tests/test_arrays, the affected tests/test_hashing files and test-specification): 638 tests failed there and pass here.

Class Tests Where What changed in the test
Reads the old columns or ids (__pipeline_base_entry_id, __pipeline_entry_id as the row key, the recomputation index, compute_base_entry_id, compute_pipeline_entry_id, a pinned pipeline record id) 500 test_cross_session_miss_tags 384, test_pipeline_record_metadata 44, test_function_commit_dependencies 14, test_function_node_caching 13, test_loaded_job_readback 7, test_node_content_hash_redundancy 6, test_ephemeral_result 5, test_tag_order_identity 5, test_job_crash_recovery 4, test_job_batched_commits 4, test_function_node_empty_data 4, test_provenance_review 3, test_function_node_get_cached 3, test_provenance 2, test_function_node_fetch_joined 1, test_chained_aggregation 1 reads the instance id; __recorded_at where the index chose a row; compares instance ids where a record id was compared
Names a layout (pdb_v1, odb_v1, tdb_v1) or crafts a table at one 110 test_stored_data_context 66, test_data_function_types 22, test_hash_step_combined 4, test_result_database 4, test_store_write_failure 4, test_zero_row_column_order 2, test_bind_narrower_source 2, test_function_node_arrow_types 2, test_hash_label_rule 2, test_wrong_hash_findings 1, test_type_hash_registration 1 the v2 names; where a test crafts a table of another layout, that layout is now v1
Compares stored operator tables, now with an insertion time 8 test_rows_on_read 5, test_order_invariance 3 compared without __recorded_at
Renamed names (entry_id log column, PostRunPayload.result_id, EmptyData tokens) 12 test_side_effect_pod 6, test_post_run_hooks 4, test_empty_data 2 the new names
Behaviour changes by design 8 test_function_pod_node 1 (one row for a repeated input), test_tag_table_source_info 2 (corrected tokens recorded as new instances, 0 calls), test_rows_on_read 1 (the error raised at the lookup), test_unstorable_columns 3 and test_operator_node_storage 1 (operator cache refused on SQLite at attach) restated, each with the reason in its docstring

No test injects a failure into the removed index query on main, so that class of the plan is empty. test_operator_cache_with_unstorable_column_refused_at_write is kept: SQLite is now refused at attach, so it reaches the write through a connector with SQLite's rules that takes a timestamp.

Posted by a Claude Code agent on behalf of @eywalker.

…ut (ITL-1471)

On the async path the second copy of an identical input either computes its
own result (two records) or takes the first's (one record), by scheduling.
The first CI run showed the second outcome.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@eywalker

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Posted by a Claude Code agent on behalf of @eywalker.

@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@eywalker

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Posted by a Claude Code agent on behalf of @eywalker.

@codecov

codecov Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.23320% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/orcapod/pipeline/provenance.py 83.33% 4 Missing ⚠️
src/orcapod/core/nodes/function_node.py 98.21% 2 Missing ⚠️
src/orcapod/core/nodes/operator_node.py 93.75% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/orcapod/core/data_function.py 92.04% <100.00%> (ø)
src/orcapod/core/datagrams/tag_data.py 98.84% <100.00%> (+1.57%) ⬆️
src/orcapod/core/function_pod.py 96.59% <100.00%> (-0.02%) ⬇️
src/orcapod/core/operators/static_output_pod.py 95.67% <ø> (+0.30%) ⬆️
src/orcapod/core/row_ids.py 100.00% <100.00%> (ø)
src/orcapod/hooks.py 100.00% <100.00%> (ø)
src/orcapod/invocation.py 97.05% <100.00%> (ø)
src/orcapod/side_effects.py 92.85% <100.00%> (ø)
src/orcapod/system_constants.py 95.95% <100.00%> (ø)
src/orcapod/types/provenance.py 91.69% <100.00%> (ø)
... and 4 more

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

eywalker and others added 12 commits November 26, 2026 01:57
…described (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Failing on b556376: placeholders fed through async_execute, both jobs' traces
after a token-only rerun, and an inactive function node given rows whose token
column cannot be typed again from its values.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…input hash (ITL-1471)

async_execute sent a placeholder whose instance is not stored to the function
like any miss; the pipeline writer then read it as a table and raised
EmptyDataAccessError although the result was stored. It now goes to
_empty_data_cache_hit, as on the sync route: no call, no pipeline row.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
After a token-only rerun a function's table holds two records of one entry that
name one result. The trace matched on system tags and result alone, found both
and refused every row of the first job. It now keeps the entry whose stored
input tokens are the input row's.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…L-1471)

A row read from an Arrow table keeps that table's source-info columns, and
source_info_table() returns them with a row's own nullable fields. A token's
type is never worked out again from its value, so a lookup no longer fails on
rows with a nested token column that the function is never called for.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…races and placeholders (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…lumn types (ITL-1471)

Failing on 2d8a6a8: a token column whose Arrow type is not the type its values
would be given again (a list column holding a null; a nested list).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…as made from (ITL-1471)

_add_pipeline_record stored the columns of as_table(columns={'source': True}),
typed again from the token values, while the instance id read the row's typed
columns. One helper, source_info_table(), now gives both, so every stored row
gives its instance and record id again from its own columns. For ordinary rows
the two tables are equal, so no stored column type and no id moves.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…nested tokens are recorded (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
source_info_table() of a row with no token has no column and no row; the
pipeline record leaves it out, as before the change, and the row's ids are
recomputed from the stored row all the same.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
eywalker and others added 3 commits November 26, 2026 03:31
…ference (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Failing on f3f6842 (18 cases): two nodes sharing a pipeline table, a trace over
the source after a rerun with other tokens, and a placeholder without a stored
result under the row failure policy on the async route.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…; placeholders under the row failure policy (ITL-1471)

One pipeline table holds the rows of every node with one pipeline hash. Keyed
by the record id alone, a second node that recorded a shared instance with the
cached result lost its row as a duplicate. The key is now the node's content
hash with the record id (row_ids.pipeline_row_key), and the record id is stored
in its own column; its recipe is unchanged.

On the async route a placeholder whose result is not stored is one failed row
under the row failure policy, with the sync route's events (the row starts
before the lookup), instead of aborting the run.

FunctionJobNode.held_instance_ids says which instance each held row is under.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@eywalker

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Posted by a Claude Code agent on behalf of @eywalker.

@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@eywalker

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Posted by a Claude Code agent on behalf of @eywalker.

@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

…he pipeline table's key (ITL-1471)

Developer decision of 2026-11-26. The record id is the hash of the recording
node's content hash (labelled), the instance id (labelled) and the result id;
the pipeline table is keyed by the record id itself, and pipeline_row_key is
removed. The row keeps storing __node_content_hash, so it gives its record id
again from its own columns. The entry id and the instance id are unchanged; no
golden value moves.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@eywalker

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Posted by a Claude Code agent on behalf of @eywalker.

@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

eywalker and others added 2 commits November 27, 2026 05:30
…s a stopgap until ITL-1491 (ITL-1471)

Wording only: comments, docstrings, agent instructions and the changelog
fragment. No behaviour, hash or golden change.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…verstated parity or shape rules (ITL-1471)

Wording only: comments, docstrings, agent instructions, the hashing
reference and the changelog fragment. The ASTs of the changed .py files,
docstrings stripped, equal those of 52f2560.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…e code guarantees (ITL-1471)

Wording only. Removes the per-operator examples, the statements about when
columns or ids are equal, and the contrast between the routes. The ASTs of
the changed .py files, docstrings stripped, equal those of 52f2560.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@eywalker

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Posted by a Claude Code agent on behalf of @eywalker.

@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@eywalker
eywalker merged commit f55ed6d into main Nov 27, 2026
16 checks passed
@eywalker
eywalker deleted the eywalker/itl-1471-three-nested-row-ids-v2-table-layouts-and branch November 27, 2026 23:15
eywalker added a commit that referenced this pull request Nov 28, 2026
…(ITL-1503) (#598)

* docs(plans): plan stage 1 of ITL-1466, three nested row ids (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(nodes): define the entry, instance and record ids in one module (ITL-1471)

core/row_ids.py holds the three nested row ids and their preimages. A data
datagram gives its source-info tokens as a one-row table (source_info_table),
and the EmptyData placeholder carries tokens built as a real output's are, with
the sentinel EPHEMERAL_RESULT_GONE in place of the result id.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(nodes)!: key rows by instance and record id; layouts pdb_v2, odb_v2, tdb_v2 (ITL-1471)

A function node looks a row up by its instance id and keys it by its record id;
the recomputation index and the query before every write are gone. Side effects
and functions that take the invocation context are keyed by the entry id, the
log column record_id_hash is entry_id, and PostRunPayload.record_id_hash is
result_id. The operator cache stores the entry id and its insertion time beside
its row key, outside the key. FunctionRun.entry_id is record_id.

BREAKING CHANGE: stored pipeline tables, operator caches and side-effect logs
move to new layouts; every invocation hash changes once; an operator cache on a
SQLite database is refused when it is attached.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(golden): pin a pipeline table's instance ids; the approved golden changes (ITL-1471)

A pipeline table's record id holds the result id, a UUIDv7, so it cannot be
pinned: the golden cases pin the instance ids instead. The 18 changes the
developer approved on 2026-11-25 (golden-changes.md of ITL-1466): 6 record-id
pins removed, 6 instance-id pins added, 6 table paths moved from pdb_v1 to
pdb_v2, in pipeline-02.json (4 entries) and provisional/pipeline.json (8), and
the open revision of v1.json. No other value moves.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: the three row ids, the v2 layouts and the changelog fragment (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: name the pipeline row key in two comments (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(pipeline): accept either async outcome for two copies of one input (ITL-1471)

On the async path the second copy of an identical input either computes its
own result (two records) or takes the first's (one record), by scheduling.
The first CI run showed the second outcome.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: name ITL-1482 where the SQLite refusal of an operator cache is described (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: regression tests for the review findings on the row ids (ITL-1471)

Failing on b556376: placeholders fed through async_execute, both jobs' traces
after a token-only rerun, and an inactive function node given rows whose token
column cannot be typed again from its values.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): a placeholder on the async route finds its result by the input hash (ITL-1471)

async_execute sent a placeholder whose instance is not stored to the function
like any miss; the pipeline writer then read it as a table and raised
EmptyDataAccessError although the result was stored. It now goes to
_empty_data_cache_hit, as on the sync route: no call, no pipeline row.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(provenance): a trace resolves a held row by its instance (ITL-1471)

After a token-only rerun a function's table holds two records of one entry that
name one result. The trace matched on system tags and result alone, found both
and refused every row of the first job. It now keeps the entry whose stored
input tokens are the input row's.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(datagrams): the instance id reads a row's typed token columns (ITL-1471)

A row read from an Arrow table keeps that table's source-info columns, and
source_info_table() returns them with a row's own nullable fields. A token's
type is never worked out again from its value, so a lookup no longer fails on
rows with a nested token column that the function is never called for.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: the Arrow hash summary names the three ids; rules for tokens, traces and placeholders (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(pipeline): build the inactive pod through the decorator (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(pipeline): a stored row recomputes its ids whatever its token column types (ITL-1471)

Failing on 2d8a6a8: a token column whose Arrow type is not the type its values
would be given again (a list column holding a null; a nested list).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): a pipeline row stores the token columns its instance id was made from (ITL-1471)

_add_pipeline_record stored the columns of as_table(columns={'source': True}),
typed again from the token values, while the instance id read the row's typed
columns. One helper, source_info_table(), now gives both, so every stored row
gives its instance and record id again from its own columns. For ordinary rows
the two tables are equal, so no stored column type and no id moves.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test, docs: ordinary rows keep their stored token columns; rows with nested tokens are recorded (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): a row with no token stores no token column (ITL-1471)

source_info_table() of a row with no token has no column and no row; the
pipeline record leaves it out, as before the change, and the row's ids are
recomputed from the stored row all the same.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(pipeline): name ITL-1491 on the tests that pin the held-rows difference (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: regression tests for the second review of the row ids (ITL-1471)

Failing on f3f6842 (18 cases): two nodes sharing a pipeline table, a trace over
the source after a rerun with other tokens, and a placeholder without a stored
result under the row failure policy on the async route.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): key the pipeline table by node content hash and record id; placeholders under the row failure policy (ITL-1471)

One pipeline table holds the rows of every node with one pipeline hash. Keyed
by the record id alone, a second node that recorded a shared instance with the
cached result lost its row as a duplicate. The key is now the node's content
hash with the record id (row_ids.pipeline_row_key), and the record id is stored
in its own column; its recipe is unchanged.

On the async route a placeholder whose result is not stored is one failed row
under the row failure policy, with the sync route's events (the row starts
before the lookup), instead of aborting the run.

FunctionJobNode.held_instance_ids says which instance each held row is under.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(provenance): select a held row's record by its instance id on every branch (ITL-1471)

The branch for a function over its source took the one entry before choosing an
instance, and the other branch compared token values. Both now keep the stored
records of the instance id the node holds the row under.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test, docs: the pipeline table's key, the trace by instance id and the placeholder policy (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(hashing): list the pipeline table's key in the hash site inventory (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: one canonical type per token value (ITL-1471)

Failing on 69d8ec1 (17 cases): sessions whose null tokens are typed
differently share a table; a null token's instance id does not follow its
column's type; differing token types in one table are refused naming the column.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(datagrams): one canonical type per token value; a clear refusal for two types in one column (ITL-1471)

A null token is a large_string null whatever type its column declares, for the
instance id's preimage and for the stored column alike; a non-null token keeps
its typed column. So sessions whose null token columns are declared differently
share a pipeline table again, and a null token's instance id is a function of
the row alone. A row whose token column has another type than the rows recorded
is refused naming the column and both types.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): read the stored token types with the preflight's one schema read (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(pipeline): a fatal error in a placeholder's lookup gives the same events on both routes (ITL-1471)

Failing on 4a916ec (4 cases): the async route reports the row's start only.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): the async route reports the crash of a placeholder row before a fatal error stops the run (ITL-1471)

A database error or an identity error in a placeholder's result lookup is never
a row failure. The async route raised it after the row's start event alone; it
now reports the row's crash first, as the sync route does.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(datagrams): a missing token is a null token; a kept token keeps its typed column (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(datagrams): a missing token is a null token, and a changed row keeps the typed columns of the tokens it keeps (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(reference): where the row ids are read, when a new instance computes, the clock behind 'recorded last' (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: review items of PR #583 (which record wins, several instance ids, valid synthetic records, the traced instance) (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(pipeline): compare stored instance ids as a set, the async route promises no order (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(datagrams): a rename moves a column's token with it in every view (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(datagrams): a rename carries only the tokens of the columns the row holds (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: a fall-through token has one type on both routes and from the stored result (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(datagrams): a column taken from another row has its token typed from its value, one type on every route (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(datagrams): a rename of a placeholder keeps its sentinel tokens (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(datagrams): an empty rename returns the row itself, and a placeholder's rename keeps its tokens (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): reuse persistent results and hold async emissions (ITL-1503)

* fix(nodes): carry fallback cache origin outside user tags (ITL-1503)

* feat(row_ids)!: the record id covers the node's content hash and is the pipeline table's key (ITL-1471)

Developer decision of 2026-11-26. The record id is the hash of the recording
node's content hash (labelled), the instance id (labelled) and the result id;
the pipeline table is keyed by the record id itself, and pipeline_row_key is
removed. The row keeps storing __node_content_hash, so it gives its record id
again from its own columns. The entry id and the instance id are unchanged; no
golden value moves.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(datagrams): the re-typing of a fallen-through data-tag's token is a stopgap until ITL-1491 (ITL-1471)

Wording only: comments, docstrings, agent instructions and the changelog
fragment. No behaviour, hash or golden change.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): persistent store first in ephemeral mode, and one result per input (ITL-1503)

Replace the fallback hook with a read-only probe of the persistent result
store in the node's ephemeral branches (a stopgap until ITL-1516), and
store a result only when none is stored for its input data hash.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(datagrams): state the token re-typing stopgap exactly, without overstated parity or shape rules (ITL-1471)

Wording only: comments, docstrings, agent instructions, the hashing
reference and the changelog fragment. The ASTs of the changed .py files,
docstrings stripped, equal those of 52f2560.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(datagrams): cut the token re-typing stopgap text down to what the code guarantees (ITL-1471)

Wording only. Removes the per-operator examples, the statements about when
columns or ids are equal, and the contrast between the routes. The ASTs of
the changed .py files, docstrings stripped, equal those of 52f2560.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(nodes): the three row paths fire the same post-run hooks (ITL-1503)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(nodes): readback per occurrence, two threads on one database, a failing persistent lookup (ITL-1503)

Regression tests for the review of c1d2b6f. Ten of them fail here; the
fixes follow.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): hold each async occurrence's row, lock the conditional write, report a failing persistent lookup (ITL-1503)

- An async run holds the rows it emitted, one per occurrence, so a read gives
  each occurrence what it was delivered.
- store_if_missing runs its lookup, write and flush under one process-wide
  lock, so two threads over one database object store one result.
- A persistent lookup that raises on the async job path reports the row's
  start and crash and names the node and row, as the sync path does.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(nodes): many repeats of one instance hold few rows in memory (ITL-1503)

Fails here: an async run holds one tag and data object per occurrence.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): share held rows between identical occurrences, and remove the conditional write's lock (ITL-1503)

- An async run holds each distinct row once and a position per occurrence,
  so many repeats of one instance hold one row in memory.
- store_if_missing is a lookup then a write with no lock: the guarantee is
  for one event loop or one thread. Threads are a stated limit (ITL-1517).
- The hit message is logged by the caller.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(nodes): readback keeps each occurrence's tag meta; a re-entrant write is a known limit (ITL-1503)

The two async tag-meta cases fail here: occurrences that differ only in a tag
meta column share one held row.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): share a held row only when the whole row is equal; qualify the conditional write to non-re-entrant writes (ITL-1503)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): one persistent lookup per instance in an async run; drop the per-occurrence held rows (ITL-1503)

- In ephemeral mode async_execute asks the persistent store once per
  instance; later occurrences take the first one's answer, so one instance
  gets one result in one run.
- The node holds a run as on the base branch again.
- The conditional write's guarantee excludes a write made inside a callback
  that runs during a commit of the same result table.
- The sync/async delivery difference for a repeated instance predates this
  work and is recorded as it is (ITL-1521).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(nodes): state the conditional write's exclusion and the remembered lookup exactly (ITL-1503)

Text only: docstrings, comments and the changelog fragment.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(nodes): the row starts before the persistent lookup; two input arrangements and a data-tag case (ITL-1503)

The four start-before-lookup cases fail here on the async job path.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): start the row before the persistent lookup on the async job path (ITL-1503)

In ephemeral mode the route stage reports the row's start before it asks the
persistent store, as the sync path does; a miss goes to the compute stage
already started, and the pod's start for it is not reported again.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(nodes): a row's observer events come from one task with one input on an async ephemeral miss (ITL-1503)

Four cases fail here: the start is reported by the route stage and the end or
crash by the compute stage.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* revert(nodes): report an async row's start from the compute stage again (ITL-1503)

Reporting the start before the persistent lookup split a row's observer
events between two tasks and gave a fall-through pod's observer two inputs.
The async job path reports a row's events as at 846d916; the difference in
position from the sync path is a known limit (ITL-1541).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(cache): preserve fatal ephemeral lookup errors

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
eywalker added a commit that referenced this pull request Nov 28, 2026
* docs(plans): plan stage 1 of ITL-1466, three nested row ids (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(nodes): define the entry, instance and record ids in one module (ITL-1471)

core/row_ids.py holds the three nested row ids and their preimages. A data
datagram gives its source-info tokens as a one-row table (source_info_table),
and the EmptyData placeholder carries tokens built as a real output's are, with
the sentinel EPHEMERAL_RESULT_GONE in place of the result id.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(nodes)!: key rows by instance and record id; layouts pdb_v2, odb_v2, tdb_v2 (ITL-1471)

A function node looks a row up by its instance id and keys it by its record id;
the recomputation index and the query before every write are gone. Side effects
and functions that take the invocation context are keyed by the entry id, the
log column record_id_hash is entry_id, and PostRunPayload.record_id_hash is
result_id. The operator cache stores the entry id and its insertion time beside
its row key, outside the key. FunctionRun.entry_id is record_id.

BREAKING CHANGE: stored pipeline tables, operator caches and side-effect logs
move to new layouts; every invocation hash changes once; an operator cache on a
SQLite database is refused when it is attached.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(golden): pin a pipeline table's instance ids; the approved golden changes (ITL-1471)

A pipeline table's record id holds the result id, a UUIDv7, so it cannot be
pinned: the golden cases pin the instance ids instead. The 18 changes the
developer approved on 2026-11-25 (golden-changes.md of ITL-1466): 6 record-id
pins removed, 6 instance-id pins added, 6 table paths moved from pdb_v1 to
pdb_v2, in pipeline-02.json (4 entries) and provisional/pipeline.json (8), and
the open revision of v1.json. No other value moves.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: the three row ids, the v2 layouts and the changelog fragment (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: name the pipeline row key in two comments (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(pipeline): accept either async outcome for two copies of one input (ITL-1471)

On the async path the second copy of an identical input either computes its
own result (two records) or takes the first's (one record), by scheduling.
The first CI run showed the second outcome.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: name ITL-1482 where the SQLite refusal of an operator cache is described (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: regression tests for the review findings on the row ids (ITL-1471)

Failing on b556376: placeholders fed through async_execute, both jobs' traces
after a token-only rerun, and an inactive function node given rows whose token
column cannot be typed again from its values.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): a placeholder on the async route finds its result by the input hash (ITL-1471)

async_execute sent a placeholder whose instance is not stored to the function
like any miss; the pipeline writer then read it as a table and raised
EmptyDataAccessError although the result was stored. It now goes to
_empty_data_cache_hit, as on the sync route: no call, no pipeline row.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(provenance): a trace resolves a held row by its instance (ITL-1471)

After a token-only rerun a function's table holds two records of one entry that
name one result. The trace matched on system tags and result alone, found both
and refused every row of the first job. It now keeps the entry whose stored
input tokens are the input row's.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(datagrams): the instance id reads a row's typed token columns (ITL-1471)

A row read from an Arrow table keeps that table's source-info columns, and
source_info_table() returns them with a row's own nullable fields. A token's
type is never worked out again from its value, so a lookup no longer fails on
rows with a nested token column that the function is never called for.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: the Arrow hash summary names the three ids; rules for tokens, traces and placeholders (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(pipeline): build the inactive pod through the decorator (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(pipeline): a stored row recomputes its ids whatever its token column types (ITL-1471)

Failing on 2d8a6a8: a token column whose Arrow type is not the type its values
would be given again (a list column holding a null; a nested list).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): a pipeline row stores the token columns its instance id was made from (ITL-1471)

_add_pipeline_record stored the columns of as_table(columns={'source': True}),
typed again from the token values, while the instance id read the row's typed
columns. One helper, source_info_table(), now gives both, so every stored row
gives its instance and record id again from its own columns. For ordinary rows
the two tables are equal, so no stored column type and no id moves.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test, docs: ordinary rows keep their stored token columns; rows with nested tokens are recorded (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): a row with no token stores no token column (ITL-1471)

source_info_table() of a row with no token has no column and no row; the
pipeline record leaves it out, as before the change, and the row's ids are
recomputed from the stored row all the same.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(pipeline): name ITL-1491 on the tests that pin the held-rows difference (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: regression tests for the second review of the row ids (ITL-1471)

Failing on f3f6842 (18 cases): two nodes sharing a pipeline table, a trace over
the source after a rerun with other tokens, and a placeholder without a stored
result under the row failure policy on the async route.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): key the pipeline table by node content hash and record id; placeholders under the row failure policy (ITL-1471)

One pipeline table holds the rows of every node with one pipeline hash. Keyed
by the record id alone, a second node that recorded a shared instance with the
cached result lost its row as a duplicate. The key is now the node's content
hash with the record id (row_ids.pipeline_row_key), and the record id is stored
in its own column; its recipe is unchanged.

On the async route a placeholder whose result is not stored is one failed row
under the row failure policy, with the sync route's events (the row starts
before the lookup), instead of aborting the run.

FunctionJobNode.held_instance_ids says which instance each held row is under.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(provenance): select a held row's record by its instance id on every branch (ITL-1471)

The branch for a function over its source took the one entry before choosing an
instance, and the other branch compared token values. Both now keep the stored
records of the instance id the node holds the row under.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test, docs: the pipeline table's key, the trace by instance id and the placeholder policy (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(hashing): list the pipeline table's key in the hash site inventory (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: one canonical type per token value (ITL-1471)

Failing on 69d8ec1 (17 cases): sessions whose null tokens are typed
differently share a table; a null token's instance id does not follow its
column's type; differing token types in one table are refused naming the column.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(datagrams): one canonical type per token value; a clear refusal for two types in one column (ITL-1471)

A null token is a large_string null whatever type its column declares, for the
instance id's preimage and for the stored column alike; a non-null token keeps
its typed column. So sessions whose null token columns are declared differently
share a pipeline table again, and a null token's instance id is a function of
the row alone. A row whose token column has another type than the rows recorded
is refused naming the column and both types.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): read the stored token types with the preflight's one schema read (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(pipeline): a fatal error in a placeholder's lookup gives the same events on both routes (ITL-1471)

Failing on 4a916ec (4 cases): the async route reports the row's start only.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): the async route reports the crash of a placeholder row before a fatal error stops the run (ITL-1471)

A database error or an identity error in a placeholder's result lookup is never
a row failure. The async route raised it after the row's start event alone; it
now reports the row's crash first, as the sync route does.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(datagrams): a missing token is a null token; a kept token keeps its typed column (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(datagrams): a missing token is a null token, and a changed row keeps the typed columns of the tokens it keeps (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(reference): where the row ids are read, when a new instance computes, the clock behind 'recorded last' (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: review items of PR #583 (which record wins, several instance ids, valid synthetic records, the traced instance) (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(pipeline): compare stored instance ids as a set, the async route promises no order (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(datagrams): a rename moves a column's token with it in every view (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(datagrams): a rename carries only the tokens of the columns the row holds (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: a fall-through token has one type on both routes and from the stored result (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(datagrams): a column taken from another row has its token typed from its value, one type on every route (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(datagrams): a rename of a placeholder keeps its sentinel tokens (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(datagrams): an empty rename returns the row itself, and a placeholder's rename keeps its tokens (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(row_ids)!: the record id covers the node's content hash and is the pipeline table's key (ITL-1471)

Developer decision of 2026-11-26. The record id is the hash of the recording
node's content hash (labelled), the instance id (labelled) and the result id;
the pipeline table is keyed by the record id itself, and pipeline_row_key is
removed. The row keeps storing __node_content_hash, so it gives its record id
again from its own columns. The entry id and the instance id are unchanged; no
golden value moves.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(datagrams): the re-typing of a fallen-through data-tag's token is a stopgap until ITL-1491 (ITL-1471)

Wording only: comments, docstrings, agent instructions and the changelog
fragment. No behaviour, hash or golden change.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(datagrams): state the token re-typing stopgap exactly, without overstated parity or shape rules (ITL-1471)

Wording only: comments, docstrings, agent instructions, the hashing
reference and the changelog fragment. The ASTs of the changed .py files,
docstrings stripped, equal those of 52f2560.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: source-info token columns keep the pipeline's type on the sync and the async route (ITL-1491)

New tests and the restated ones fail on the base: the sync edge and the async
Join typed tokens again from their values.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix: a source-info token column keeps the pipeline's type on every route (ITL-1491)

The type of a token column is determined by the pipeline and never taken from
values. Data.as_table gives the typed token columns a row carries, the
row-built form no longer types a column from its tokens, a data-tag that falls
through a function pod keeps its token's type, the async Join merges rows by
their typed token columns, and record batches of one stream declare one token
type.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(datagrams): cut the token re-typing stopgap text down to what the code guarantees (ITL-1471)

Wording only. Removes the per-operator examples, the statements about when
columns or ids are equal, and the contrast between the routes. The ASTs of
the changed .py files, docstrings stripped, equal those of 52f2560.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: the findings of the independent review of PR 601, failing before their fixes (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix: token types on the Join's async route, record batches, hand-built rows and standalone function streams (ITL-1491)

Review of PR 601: the async Join writes a merged data-tag's token with the type
its inputs declare; a Join refuses, on both routes, inputs that declare that
token column with two types; record batches of one stream declare one token
type, compared strictly, and may carry item-field metadata; the whole-table form
drops a source-info field's own metadata as a row does; with_columns_of adds no
token column the row holds no token for; a function pod's stream outside a job
takes its rows' token columns; the Python schema of a token follows its Arrow
type.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: say only what holds for token types, and state when a refusal may replace a completion (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: a Join never stores its pending marker in a merged token, failing before the fix (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* chore: types in the review fixes and tests (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: a source-info token's layers must be its data's outer layers, failing before the check (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(streams): refuse a stream whose source-info token does not have its data's shape (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: Index gives the element the declared token type less one layer, failing before the fix (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(index): the element's token has the declared type less one layer, and a null list token is refused (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: row-built form and rows-on-read fixtures give list tokens list data (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: session and data-tag token fixtures follow the token-shape rule (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: stored-row and row-id token fixtures follow the token-shape rule (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(streaming joins): a batch is held to its stream's token type; fixtures follow the token-shape rule (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: channel, record-batch and transport fixtures follow the token-shape rule (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: end-to-end and equivalence token fixtures follow the token-shape rule (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: the review findings restated under the token-shape rule; the Join guard (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: the token-shape rule, two declarations of one token column, and the changelog (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* chore: types in the token-shape test helpers (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: the last hand-built token fixture follows the token-shape rule; an order-proof refusal check (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: the findings of the second review of PR 601, failing before their fixes (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix: a string leaf in the token-shape rule, held rows on the async route, and the Join and MergeJoin checks (ITL-1491)

Second review of PR 601: a token's leaf under its layers must be a string; the
async orchestrator holds held rows to the token-shape rule; a three-input Join
compares every input's declaration; MergeJoin compares a merged data-tag's
token types before it renames one; a null inner list in a merged token is
refused naming the column; the async Join folds only the tokens it merged;
MergeJoin reports its first mismatch in name order.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: token rules match what is checked and where; the ordinary-source limitation; a job-level test (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: the findings of the third review of PR 601, failing before their fixes (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix: the held-row check reads one normalized form and a row's token layout; kernels name a null token list (ITL-1491)

The async orchestrator's check of held rows read raw row types (a null leaf
was refused where a stream reads it as a string), built a one-row table per
row, listed columns in another order than the sync route and checked rows
nothing reads. The record-batch join kernels raised a blank internal error.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: a token's list is never null at any level; guards for input no stream holds (ITL-1491)

Failing before the rule: the construction refusals at an inner level, the held
rows on both routes, and the restated fixtures that held a null inner list.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix: a token's list is never null at any level, checked where a stream is built (ITL-1491)

Developer decision of November 27, 2026: a null is allowed only at the
innermost level, where the element is a string. The construction check and
the async held-row check read every list level's validity and name the level.
The operator refusals for a null inner list stay as guards. Docs name the
follow-ups ITL-1522, ITL-1526 and ITL-1527.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: the findings of the fourth review of PR 601, failing before their fixes (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix: take the async held-row check out; the rule is checked where a stream is built (ITL-1491)

Developer decision of November 27, 2026: the async orchestrator's check of
held rows is handled on its own, in ITL-1534. The check hashed Arrow types,
and the extension type of a logical list cannot be hashed, so a replay over a
batch of paths failed on async. Removed with everything that existed only for
it; async_orchestrator.py and the datagram files are as at 76f5398. Kept: the
rule at stream construction, the operator guards, the kernels' named errors.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: say which Index outcome the aside means; state the ITL-1534 limit once (ITL-1491)

Text only: a test docstring and the agent instructions.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(arrow): declare Join system tags non-nullable and validate sources (ITL-1543)

* fix(sources): reject missing custom system tag columns (ITL-1543)

* fix(arrow): honor Join field declarations and validate raw source reads (ITL-1543)

* fix(streams): preserve declared system tag fields in rows (ITL-1543)

* fix(streams): reconcile system tag fields across source and Join paths (ITL-1543)

* fix(streams): declare source-info token fields nullable (ITL-1557)

* fix(streams): validate replayed source tags and share tied Join sorting (ITL-1543)

* fix(sources): validate Arrow exporters before Polars conversion (ITL-1543)

* fix(streams): use shared token fields for empty sinks

* test(sources): expect refusal of integer system tags (ITL-1543)

* test(datagrams): expect preserved Arrow system tag fields (ITL-1543)

* fix(cache): store declared operator output fields (ITL-1562)

* fix(cache): preserve declared token fields on operator replay

* fix(provenance): preserve declared types when replacing source tokens

* test(cache): type list-valued provenance fixtures

* fix(streams): enforce declared provenance fields at cache and transport boundaries

* fix(streams): preserve declared fields across async routes

* test(async): align placeholder schema with producer

* fix(provenance): keep declared fields on source and tag inputs

* fix(provenance): enforce declared token and system-tag types

* fix(provenance): refuse a null replacement of a held list token

Restate the PR 601 item-metadata channel test for the declared-type rule,
and document the held-type replacement rule and the first-batch rule (ITL-1557).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(provenance): clarify null constructor token handling

* fix(provenance): preserve declared fields across join and channel paths

* fix(join): canonicalize full pipeline ties with missing system tags

* fix(join): preserve system tag pairs across hash ties

* fix(join): preserve symmetric tie ordering and reject missing fields

* fix(join): retain tied provenance on standalone rows

* fix(join): keep tied custom metadata at declared positions

* fix(join): restore main's tie handling

* docs(provenance): qualify instance ID equivalence for list tokens

* fix(pods): index token columns once per row

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
eywalker added a commit that referenced this pull request Nov 29, 2026
…s token on every read (ITL-1524) (#615)

* docs(plans): plan stage 1 of ITL-1466, three nested row ids (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(nodes): define the entry, instance and record ids in one module (ITL-1471)

core/row_ids.py holds the three nested row ids and their preimages. A data
datagram gives its source-info tokens as a one-row table (source_info_table),
and the EmptyData placeholder carries tokens built as a real output's are, with
the sentinel EPHEMERAL_RESULT_GONE in place of the result id.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(nodes)!: key rows by instance and record id; layouts pdb_v2, odb_v2, tdb_v2 (ITL-1471)

A function node looks a row up by its instance id and keys it by its record id;
the recomputation index and the query before every write are gone. Side effects
and functions that take the invocation context are keyed by the entry id, the
log column record_id_hash is entry_id, and PostRunPayload.record_id_hash is
result_id. The operator cache stores the entry id and its insertion time beside
its row key, outside the key. FunctionRun.entry_id is record_id.

BREAKING CHANGE: stored pipeline tables, operator caches and side-effect logs
move to new layouts; every invocation hash changes once; an operator cache on a
SQLite database is refused when it is attached.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(golden): pin a pipeline table's instance ids; the approved golden changes (ITL-1471)

A pipeline table's record id holds the result id, a UUIDv7, so it cannot be
pinned: the golden cases pin the instance ids instead. The 18 changes the
developer approved on 2026-11-25 (golden-changes.md of ITL-1466): 6 record-id
pins removed, 6 instance-id pins added, 6 table paths moved from pdb_v1 to
pdb_v2, in pipeline-02.json (4 entries) and provisional/pipeline.json (8), and
the open revision of v1.json. No other value moves.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: the three row ids, the v2 layouts and the changelog fragment (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: name the pipeline row key in two comments (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(pipeline): accept either async outcome for two copies of one input (ITL-1471)

On the async path the second copy of an identical input either computes its
own result (two records) or takes the first's (one record), by scheduling.
The first CI run showed the second outcome.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: name ITL-1482 where the SQLite refusal of an operator cache is described (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: regression tests for the review findings on the row ids (ITL-1471)

Failing on b556376: placeholders fed through async_execute, both jobs' traces
after a token-only rerun, and an inactive function node given rows whose token
column cannot be typed again from its values.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): a placeholder on the async route finds its result by the input hash (ITL-1471)

async_execute sent a placeholder whose instance is not stored to the function
like any miss; the pipeline writer then read it as a table and raised
EmptyDataAccessError although the result was stored. It now goes to
_empty_data_cache_hit, as on the sync route: no call, no pipeline row.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(provenance): a trace resolves a held row by its instance (ITL-1471)

After a token-only rerun a function's table holds two records of one entry that
name one result. The trace matched on system tags and result alone, found both
and refused every row of the first job. It now keeps the entry whose stored
input tokens are the input row's.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(datagrams): the instance id reads a row's typed token columns (ITL-1471)

A row read from an Arrow table keeps that table's source-info columns, and
source_info_table() returns them with a row's own nullable fields. A token's
type is never worked out again from its value, so a lookup no longer fails on
rows with a nested token column that the function is never called for.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: the Arrow hash summary names the three ids; rules for tokens, traces and placeholders (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(pipeline): build the inactive pod through the decorator (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(pipeline): a stored row recomputes its ids whatever its token column types (ITL-1471)

Failing on 2d8a6a8: a token column whose Arrow type is not the type its values
would be given again (a list column holding a null; a nested list).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): a pipeline row stores the token columns its instance id was made from (ITL-1471)

_add_pipeline_record stored the columns of as_table(columns={'source': True}),
typed again from the token values, while the instance id read the row's typed
columns. One helper, source_info_table(), now gives both, so every stored row
gives its instance and record id again from its own columns. For ordinary rows
the two tables are equal, so no stored column type and no id moves.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test, docs: ordinary rows keep their stored token columns; rows with nested tokens are recorded (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): a row with no token stores no token column (ITL-1471)

source_info_table() of a row with no token has no column and no row; the
pipeline record leaves it out, as before the change, and the row's ids are
recomputed from the stored row all the same.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(pipeline): name ITL-1491 on the tests that pin the held-rows difference (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: regression tests for the second review of the row ids (ITL-1471)

Failing on f3f6842 (18 cases): two nodes sharing a pipeline table, a trace over
the source after a rerun with other tokens, and a placeholder without a stored
result under the row failure policy on the async route.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): key the pipeline table by node content hash and record id; placeholders under the row failure policy (ITL-1471)

One pipeline table holds the rows of every node with one pipeline hash. Keyed
by the record id alone, a second node that recorded a shared instance with the
cached result lost its row as a duplicate. The key is now the node's content
hash with the record id (row_ids.pipeline_row_key), and the record id is stored
in its own column; its recipe is unchanged.

On the async route a placeholder whose result is not stored is one failed row
under the row failure policy, with the sync route's events (the row starts
before the lookup), instead of aborting the run.

FunctionJobNode.held_instance_ids says which instance each held row is under.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(provenance): select a held row's record by its instance id on every branch (ITL-1471)

The branch for a function over its source took the one entry before choosing an
instance, and the other branch compared token values. Both now keep the stored
records of the instance id the node holds the row under.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test, docs: the pipeline table's key, the trace by instance id and the placeholder policy (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(hashing): list the pipeline table's key in the hash site inventory (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: one canonical type per token value (ITL-1471)

Failing on 69d8ec1 (17 cases): sessions whose null tokens are typed
differently share a table; a null token's instance id does not follow its
column's type; differing token types in one table are refused naming the column.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(datagrams): one canonical type per token value; a clear refusal for two types in one column (ITL-1471)

A null token is a large_string null whatever type its column declares, for the
instance id's preimage and for the stored column alike; a non-null token keeps
its typed column. So sessions whose null token columns are declared differently
share a pipeline table again, and a null token's instance id is a function of
the row alone. A row whose token column has another type than the rows recorded
is refused naming the column and both types.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): read the stored token types with the preflight's one schema read (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(pipeline): a fatal error in a placeholder's lookup gives the same events on both routes (ITL-1471)

Failing on 4a916ec (4 cases): the async route reports the row's start only.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): the async route reports the crash of a placeholder row before a fatal error stops the run (ITL-1471)

A database error or an identity error in a placeholder's result lookup is never
a row failure. The async route raised it after the row's start event alone; it
now reports the row's crash first, as the sync route does.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(datagrams): a missing token is a null token; a kept token keeps its typed column (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(datagrams): a missing token is a null token, and a changed row keeps the typed columns of the tokens it keeps (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(reference): where the row ids are read, when a new instance computes, the clock behind 'recorded last' (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: review items of PR #583 (which record wins, several instance ids, valid synthetic records, the traced instance) (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(pipeline): compare stored instance ids as a set, the async route promises no order (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(datagrams): a rename moves a column's token with it in every view (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(datagrams): a rename carries only the tokens of the columns the row holds (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: a fall-through token has one type on both routes and from the stored result (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(datagrams): a column taken from another row has its token typed from its value, one type on every route (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(datagrams): a rename of a placeholder keeps its sentinel tokens (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(datagrams): an empty rename returns the row itself, and a placeholder's rename keeps its tokens (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(row_ids)!: the record id covers the node's content hash and is the pipeline table's key (ITL-1471)

Developer decision of 2026-11-26. The record id is the hash of the recording
node's content hash (labelled), the instance id (labelled) and the result id;
the pipeline table is keyed by the record id itself, and pipeline_row_key is
removed. The row keeps storing __node_content_hash, so it gives its record id
again from its own columns. The entry id and the instance id are unchanged; no
golden value moves.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(datagrams): the re-typing of a fallen-through data-tag's token is a stopgap until ITL-1491 (ITL-1471)

Wording only: comments, docstrings, agent instructions and the changelog
fragment. No behaviour, hash or golden change.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(datagrams): state the token re-typing stopgap exactly, without overstated parity or shape rules (ITL-1471)

Wording only: comments, docstrings, agent instructions, the hashing
reference and the changelog fragment. The ASTs of the changed .py files,
docstrings stripped, equal those of 52f2560.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: source-info token columns keep the pipeline's type on the sync and the async route (ITL-1491)

New tests and the restated ones fail on the base: the sync edge and the async
Join typed tokens again from their values.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix: a source-info token column keeps the pipeline's type on every route (ITL-1491)

The type of a token column is determined by the pipeline and never taken from
values. Data.as_table gives the typed token columns a row carries, the
row-built form no longer types a column from its tokens, a data-tag that falls
through a function pod keeps its token's type, the async Join merges rows by
their typed token columns, and record batches of one stream declare one token
type.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(datagrams): cut the token re-typing stopgap text down to what the code guarantees (ITL-1471)

Wording only. Removes the per-operator examples, the statements about when
columns or ids are equal, and the contrast between the routes. The ASTs of
the changed .py files, docstrings stripped, equal those of 52f2560.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: the findings of the independent review of PR 601, failing before their fixes (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix: token types on the Join's async route, record batches, hand-built rows and standalone function streams (ITL-1491)

Review of PR 601: the async Join writes a merged data-tag's token with the type
its inputs declare; a Join refuses, on both routes, inputs that declare that
token column with two types; record batches of one stream declare one token
type, compared strictly, and may carry item-field metadata; the whole-table form
drops a source-info field's own metadata as a row does; with_columns_of adds no
token column the row holds no token for; a function pod's stream outside a job
takes its rows' token columns; the Python schema of a token follows its Arrow
type.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: say only what holds for token types, and state when a refusal may replace a completion (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: a Join never stores its pending marker in a merged token, failing before the fix (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* chore: types in the review fixes and tests (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: a source-info token's layers must be its data's outer layers, failing before the check (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(streams): refuse a stream whose source-info token does not have its data's shape (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: Index gives the element the declared token type less one layer, failing before the fix (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(index): the element's token has the declared type less one layer, and a null list token is refused (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: row-built form and rows-on-read fixtures give list tokens list data (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: session and data-tag token fixtures follow the token-shape rule (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: stored-row and row-id token fixtures follow the token-shape rule (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(streaming joins): a batch is held to its stream's token type; fixtures follow the token-shape rule (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: channel, record-batch and transport fixtures follow the token-shape rule (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: end-to-end and equivalence token fixtures follow the token-shape rule (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: the review findings restated under the token-shape rule; the Join guard (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: the token-shape rule, two declarations of one token column, and the changelog (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* chore: types in the token-shape test helpers (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: the last hand-built token fixture follows the token-shape rule; an order-proof refusal check (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: the findings of the second review of PR 601, failing before their fixes (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix: a string leaf in the token-shape rule, held rows on the async route, and the Join and MergeJoin checks (ITL-1491)

Second review of PR 601: a token's leaf under its layers must be a string; the
async orchestrator holds held rows to the token-shape rule; a three-input Join
compares every input's declaration; MergeJoin compares a merged data-tag's
token types before it renames one; a null inner list in a merged token is
refused naming the column; the async Join folds only the tokens it merged;
MergeJoin reports its first mismatch in name order.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: token rules match what is checked and where; the ordinary-source limitation; a job-level test (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: the findings of the third review of PR 601, failing before their fixes (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix: the held-row check reads one normalized form and a row's token layout; kernels name a null token list (ITL-1491)

The async orchestrator's check of held rows read raw row types (a null leaf
was refused where a stream reads it as a string), built a one-row table per
row, listed columns in another order than the sync route and checked rows
nothing reads. The record-batch join kernels raised a blank internal error.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: a token's list is never null at any level; guards for input no stream holds (ITL-1491)

Failing before the rule: the construction refusals at an inner level, the held
rows on both routes, and the restated fixtures that held a null inner list.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix: a token's list is never null at any level, checked where a stream is built (ITL-1491)

Developer decision of November 27, 2026: a null is allowed only at the
innermost level, where the element is a string. The construction check and
the async held-row check read every list level's validity and name the level.
The operator refusals for a null inner list stay as guards. Docs name the
follow-ups ITL-1522, ITL-1526 and ITL-1527.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: the findings of the fourth review of PR 601, failing before their fixes (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix: take the async held-row check out; the rule is checked where a stream is built (ITL-1491)

Developer decision of November 27, 2026: the async orchestrator's check of
held rows is handled on its own, in ITL-1534. The check hashed Arrow types,
and the extension type of a logical list cannot be hashed, so a replay over a
batch of paths failed on async. Removed with everything that existed only for
it; async_orchestrator.py and the datagram files are as at 76f5398. Kept: the
rule at stream construction, the operator guards, the kernels' named errors.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: say which Index outcome the aside means; state the ITL-1534 limit once (ITL-1491)

Text only: a test docstring and the agent instructions.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(arrow): declare Join system tags non-nullable and validate sources (ITL-1543)

* fix(sources): reject missing custom system tag columns (ITL-1543)

* fix(arrow): honor Join field declarations and validate raw source reads (ITL-1543)

* fix(streams): preserve declared system tag fields in rows (ITL-1543)

* fix(streams): reconcile system tag fields across source and Join paths (ITL-1543)

* fix(streams): declare source-info token fields nullable (ITL-1557)

* fix(streams): validate replayed source tags and share tied Join sorting (ITL-1543)

* fix(sources): validate Arrow exporters before Polars conversion (ITL-1543)

* fix(streams): use shared token fields for empty sinks

* test(sources): expect refusal of integer system tags (ITL-1543)

* test(datagrams): expect preserved Arrow system tag fields (ITL-1543)

* fix(cache): store declared operator output fields (ITL-1562)

* fix(cache): preserve declared token fields on operator replay

* fix(provenance): preserve declared types when replacing source tokens

* fix(function_node): preserve output provenance on stored reads (ITL-1524)

* fix(function_node): namespace stored input provenance (ITL-1524)

* test(cache): type list-valued provenance fixtures

* test(function_node): align record checks with pdb_v3 (ITL-1524)

* feat(identity): compute structure, source and name chains

* fix(identity): preserve chains across binding and persistence

* fix(identity): address three-chain review findings

* fix(identity): preserve saved job bytes and chain inputs

* fix(identity): reject combined hashes for collapsed symmetry

* fix(identity): resolve live bindings and canonical chain order

* fix(identity): guard row reads and unbound derived origins

* fix(identity): preserve safe polling and loaded Index chains

* fix(identity): keep step-one chain reads callback-free

* fix(identity): reuse polling digests through source wrappers

* fix(identity): restore chains for saved single-input built-ins

* docs(identity): clarify saved single-input operator chains

* docs(identity): clarify step-one hash limits and review coverage

* test(function_node): align merged provenance fixtures with pdb_v3

* fix(function_node): retain input provenance in joined records

* test(function_node): check joined input token alignment

* feat(identity): hash typed source and name entries at every node

* docs(identity): record typed chain tree decisions

* fix(function_node): retain pdb_v2 for input provenance rename

* fix(identity): preserve explicit empty source slot names

* feat(identity)!: use the source chain for content hashes

* fix(identity): handle graph declarations and refresh bound identity

* test(identity): update content and record hash pins

* fix(pipeline): reuse the captured key for active slots

* fix(identity): handle unbound slot copies and partial job saves

* docs(hashing): inventory graph declarations and drop unused slot memo

* test(identity): distinguish slot hashes in invocation transitions

* test(identity): align remaining hash callers and diagram examples

* fix(identity): report source execution without a binding

* test(observers): compare attribution across content hash versions

* fix(identity): keep main's behaviour for slot keys, repeated inputs and cold polling (ITL-1559)

First independent review of step 5:
- a bound slot takes its source's Python object hash, so it stays one key with
  the source it compares equal to (Join()(a, slot) keeps main's pipeline hash);
  a check over the golden jobs that equal streams and nodes hash equal
- a repeated input and a cold PollingSource whose first batch supplies the
  schema give a content hash and are captured, as on main; the guards stay on
  a standalone node_hash() read
- a loaded node with no recorded run hash raises UnboundSourceError while
  unbound and returns the live content hash once bound; the descriptor's graph
  key never stands in for a content hash

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(pipeline): pin implicit slot names after the content hash switch

* docs(pipeline): reference the follow-up for implicit slot names

* test(golden): regenerate the approved content-hash entries (ITL-1559)

* fix(identity): honor explicit hashers for raw stream leaves

* fix(pipeline): reject outputs from earlier slot bindings

* fix(streams): preserve reads without graph metadata

* test(function_node): update input provenance row ID pins

* test(golden): add data-tag stream and job identity cases

* fix(pipeline): refresh rebound lazy streams and stored sources

* fix(sources): refresh direct cached reads after the origin reruns

* test(pipeline): use stable identities to exercise proxy cycles

* docs: document function input provenance prefix

* test(golden): regenerate the approved rename and data-tag entries (ITL-1524)

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
eywalker added a commit that referenced this pull request Dec 3, 2026
… key; the cache records when each row was written (ITL-1396) (#630)

* docs(plans): plan stage 1 of ITL-1466, three nested row ids (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(nodes): define the entry, instance and record ids in one module (ITL-1471)

core/row_ids.py holds the three nested row ids and their preimages. A data
datagram gives its source-info tokens as a one-row table (source_info_table),
and the EmptyData placeholder carries tokens built as a real output's are, with
the sentinel EPHEMERAL_RESULT_GONE in place of the result id.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(nodes)!: key rows by instance and record id; layouts pdb_v2, odb_v2, tdb_v2 (ITL-1471)

A function node looks a row up by its instance id and keys it by its record id;
the recomputation index and the query before every write are gone. Side effects
and functions that take the invocation context are keyed by the entry id, the
log column record_id_hash is entry_id, and PostRunPayload.record_id_hash is
result_id. The operator cache stores the entry id and its insertion time beside
its row key, outside the key. FunctionRun.entry_id is record_id.

BREAKING CHANGE: stored pipeline tables, operator caches and side-effect logs
move to new layouts; every invocation hash changes once; an operator cache on a
SQLite database is refused when it is attached.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(golden): pin a pipeline table's instance ids; the approved golden changes (ITL-1471)

A pipeline table's record id holds the result id, a UUIDv7, so it cannot be
pinned: the golden cases pin the instance ids instead. The 18 changes the
developer approved on 2026-11-25 (golden-changes.md of ITL-1466): 6 record-id
pins removed, 6 instance-id pins added, 6 table paths moved from pdb_v1 to
pdb_v2, in pipeline-02.json (4 entries) and provisional/pipeline.json (8), and
the open revision of v1.json. No other value moves.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: the three row ids, the v2 layouts and the changelog fragment (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: name the pipeline row key in two comments (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(pipeline): accept either async outcome for two copies of one input (ITL-1471)

On the async path the second copy of an identical input either computes its
own result (two records) or takes the first's (one record), by scheduling.
The first CI run showed the second outcome.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: name ITL-1482 where the SQLite refusal of an operator cache is described (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: regression tests for the review findings on the row ids (ITL-1471)

Failing on b556376: placeholders fed through async_execute, both jobs' traces
after a token-only rerun, and an inactive function node given rows whose token
column cannot be typed again from its values.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): a placeholder on the async route finds its result by the input hash (ITL-1471)

async_execute sent a placeholder whose instance is not stored to the function
like any miss; the pipeline writer then read it as a table and raised
EmptyDataAccessError although the result was stored. It now goes to
_empty_data_cache_hit, as on the sync route: no call, no pipeline row.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(provenance): a trace resolves a held row by its instance (ITL-1471)

After a token-only rerun a function's table holds two records of one entry that
name one result. The trace matched on system tags and result alone, found both
and refused every row of the first job. It now keeps the entry whose stored
input tokens are the input row's.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(datagrams): the instance id reads a row's typed token columns (ITL-1471)

A row read from an Arrow table keeps that table's source-info columns, and
source_info_table() returns them with a row's own nullable fields. A token's
type is never worked out again from its value, so a lookup no longer fails on
rows with a nested token column that the function is never called for.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: the Arrow hash summary names the three ids; rules for tokens, traces and placeholders (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(pipeline): build the inactive pod through the decorator (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(pipeline): a stored row recomputes its ids whatever its token column types (ITL-1471)

Failing on 2d8a6a8: a token column whose Arrow type is not the type its values
would be given again (a list column holding a null; a nested list).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): a pipeline row stores the token columns its instance id was made from (ITL-1471)

_add_pipeline_record stored the columns of as_table(columns={'source': True}),
typed again from the token values, while the instance id read the row's typed
columns. One helper, source_info_table(), now gives both, so every stored row
gives its instance and record id again from its own columns. For ordinary rows
the two tables are equal, so no stored column type and no id moves.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test, docs: ordinary rows keep their stored token columns; rows with nested tokens are recorded (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): a row with no token stores no token column (ITL-1471)

source_info_table() of a row with no token has no column and no row; the
pipeline record leaves it out, as before the change, and the row's ids are
recomputed from the stored row all the same.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(pipeline): name ITL-1491 on the tests that pin the held-rows difference (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: regression tests for the second review of the row ids (ITL-1471)

Failing on f3f6842 (18 cases): two nodes sharing a pipeline table, a trace over
the source after a rerun with other tokens, and a placeholder without a stored
result under the row failure policy on the async route.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): key the pipeline table by node content hash and record id; placeholders under the row failure policy (ITL-1471)

One pipeline table holds the rows of every node with one pipeline hash. Keyed
by the record id alone, a second node that recorded a shared instance with the
cached result lost its row as a duplicate. The key is now the node's content
hash with the record id (row_ids.pipeline_row_key), and the record id is stored
in its own column; its recipe is unchanged.

On the async route a placeholder whose result is not stored is one failed row
under the row failure policy, with the sync route's events (the row starts
before the lookup), instead of aborting the run.

FunctionJobNode.held_instance_ids says which instance each held row is under.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(provenance): select a held row's record by its instance id on every branch (ITL-1471)

The branch for a function over its source took the one entry before choosing an
instance, and the other branch compared token values. Both now keep the stored
records of the instance id the node holds the row under.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test, docs: the pipeline table's key, the trace by instance id and the placeholder policy (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(hashing): list the pipeline table's key in the hash site inventory (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: one canonical type per token value (ITL-1471)

Failing on 69d8ec1 (17 cases): sessions whose null tokens are typed
differently share a table; a null token's instance id does not follow its
column's type; differing token types in one table are refused naming the column.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(datagrams): one canonical type per token value; a clear refusal for two types in one column (ITL-1471)

A null token is a large_string null whatever type its column declares, for the
instance id's preimage and for the stored column alike; a non-null token keeps
its typed column. So sessions whose null token columns are declared differently
share a pipeline table again, and a null token's instance id is a function of
the row alone. A row whose token column has another type than the rows recorded
is refused naming the column and both types.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): read the stored token types with the preflight's one schema read (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(pipeline): a fatal error in a placeholder's lookup gives the same events on both routes (ITL-1471)

Failing on 4a916ec (4 cases): the async route reports the row's start only.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(nodes): the async route reports the crash of a placeholder row before a fatal error stops the run (ITL-1471)

A database error or an identity error in a placeholder's result lookup is never
a row failure. The async route raised it after the row's start event alone; it
now reports the row's crash first, as the sync route does.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(datagrams): a missing token is a null token; a kept token keeps its typed column (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(datagrams): a missing token is a null token, and a changed row keeps the typed columns of the tokens it keeps (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(reference): where the row ids are read, when a new instance computes, the clock behind 'recorded last' (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: review items of PR #583 (which record wins, several instance ids, valid synthetic records, the traced instance) (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(pipeline): compare stored instance ids as a set, the async route promises no order (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(datagrams): a rename moves a column's token with it in every view (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(datagrams): a rename carries only the tokens of the columns the row holds (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: a fall-through token has one type on both routes and from the stored result (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(datagrams): a column taken from another row has its token typed from its value, one type on every route (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(datagrams): a rename of a placeholder keeps its sentinel tokens (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(datagrams): an empty rename returns the row itself, and a placeholder's rename keeps its tokens (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(row_ids)!: the record id covers the node's content hash and is the pipeline table's key (ITL-1471)

Developer decision of 2026-11-26. The record id is the hash of the recording
node's content hash (labelled), the instance id (labelled) and the result id;
the pipeline table is keyed by the record id itself, and pipeline_row_key is
removed. The row keeps storing __node_content_hash, so it gives its record id
again from its own columns. The entry id and the instance id are unchanged; no
golden value moves.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(datagrams): the re-typing of a fallen-through data-tag's token is a stopgap until ITL-1491 (ITL-1471)

Wording only: comments, docstrings, agent instructions and the changelog
fragment. No behaviour, hash or golden change.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(datagrams): state the token re-typing stopgap exactly, without overstated parity or shape rules (ITL-1471)

Wording only: comments, docstrings, agent instructions, the hashing
reference and the changelog fragment. The ASTs of the changed .py files,
docstrings stripped, equal those of 52f2560.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: source-info token columns keep the pipeline's type on the sync and the async route (ITL-1491)

New tests and the restated ones fail on the base: the sync edge and the async
Join typed tokens again from their values.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix: a source-info token column keeps the pipeline's type on every route (ITL-1491)

The type of a token column is determined by the pipeline and never taken from
values. Data.as_table gives the typed token columns a row carries, the
row-built form no longer types a column from its tokens, a data-tag that falls
through a function pod keeps its token's type, the async Join merges rows by
their typed token columns, and record batches of one stream declare one token
type.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(datagrams): cut the token re-typing stopgap text down to what the code guarantees (ITL-1471)

Wording only. Removes the per-operator examples, the statements about when
columns or ids are equal, and the contrast between the routes. The ASTs of
the changed .py files, docstrings stripped, equal those of 52f2560.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: the findings of the independent review of PR 601, failing before their fixes (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix: token types on the Join's async route, record batches, hand-built rows and standalone function streams (ITL-1491)

Review of PR 601: the async Join writes a merged data-tag's token with the type
its inputs declare; a Join refuses, on both routes, inputs that declare that
token column with two types; record batches of one stream declare one token
type, compared strictly, and may carry item-field metadata; the whole-table form
drops a source-info field's own metadata as a row does; with_columns_of adds no
token column the row holds no token for; a function pod's stream outside a job
takes its rows' token columns; the Python schema of a token follows its Arrow
type.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: say only what holds for token types, and state when a refusal may replace a completion (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: a Join never stores its pending marker in a merged token, failing before the fix (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* chore: types in the review fixes and tests (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: a source-info token's layers must be its data's outer layers, failing before the check (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(streams): refuse a stream whose source-info token does not have its data's shape (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: Index gives the element the declared token type less one layer, failing before the fix (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(index): the element's token has the declared type less one layer, and a null list token is refused (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: row-built form and rows-on-read fixtures give list tokens list data (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: session and data-tag token fixtures follow the token-shape rule (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: stored-row and row-id token fixtures follow the token-shape rule (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(streaming joins): a batch is held to its stream's token type; fixtures follow the token-shape rule (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: channel, record-batch and transport fixtures follow the token-shape rule (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: end-to-end and equivalence token fixtures follow the token-shape rule (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: the review findings restated under the token-shape rule; the Join guard (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: the token-shape rule, two declarations of one token column, and the changelog (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* chore: types in the token-shape test helpers (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: the last hand-built token fixture follows the token-shape rule; an order-proof refusal check (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: the findings of the second review of PR 601, failing before their fixes (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix: a string leaf in the token-shape rule, held rows on the async route, and the Join and MergeJoin checks (ITL-1491)

Second review of PR 601: a token's leaf under its layers must be a string; the
async orchestrator holds held rows to the token-shape rule; a three-input Join
compares every input's declaration; MergeJoin compares a merged data-tag's
token types before it renames one; a null inner list in a merged token is
refused naming the column; the async Join folds only the tokens it merged;
MergeJoin reports its first mismatch in name order.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: token rules match what is checked and where; the ordinary-source limitation; a job-level test (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: the findings of the third review of PR 601, failing before their fixes (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix: the held-row check reads one normalized form and a row's token layout; kernels name a null token list (ITL-1491)

The async orchestrator's check of held rows read raw row types (a null leaf
was refused where a stream reads it as a string), built a one-row table per
row, listed columns in another order than the sync route and checked rows
nothing reads. The record-batch join kernels raised a blank internal error.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: a token's list is never null at any level; guards for input no stream holds (ITL-1491)

Failing before the rule: the construction refusals at an inner level, the held
rows on both routes, and the restated fixtures that held a null inner list.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix: a token's list is never null at any level, checked where a stream is built (ITL-1491)

Developer decision of November 27, 2026: a null is allowed only at the
innermost level, where the element is a string. The construction check and
the async held-row check read every list level's validity and name the level.
The operator refusals for a null inner list stay as guards. Docs name the
follow-ups ITL-1522, ITL-1526 and ITL-1527.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test: the findings of the fourth review of PR 601, failing before their fixes (ITL-1491)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix: take the async held-row check out; the rule is checked where a stream is built (ITL-1491)

Developer decision of November 27, 2026: the async orchestrator's check of
held rows is handled on its own, in ITL-1534. The check hashed Arrow types,
and the extension type of a logical list cannot be hashed, so a replay over a
batch of paths failed on async. Removed with everything that existed only for
it; async_orchestrator.py and the datagram files are as at 76f5398. Kept: the
rule at stream construction, the operator guards, the kernels' named errors.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs: say which Index outcome the aside means; state the ITL-1534 limit once (ITL-1491)

Text only: a test docstring and the agent instructions.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(arrow): declare Join system tags non-nullable and validate sources (ITL-1543)

* fix(sources): reject missing custom system tag columns (ITL-1543)

* fix(arrow): honor Join field declarations and validate raw source reads (ITL-1543)

* fix(streams): preserve declared system tag fields in rows (ITL-1543)

* fix(streams): reconcile system tag fields across source and Join paths (ITL-1543)

* fix(streams): declare source-info token fields nullable (ITL-1557)

* fix(streams): validate replayed source tags and share tied Join sorting (ITL-1543)

* fix(sources): validate Arrow exporters before Polars conversion (ITL-1543)

* fix(streams): use shared token fields for empty sinks

* test(sources): expect refusal of integer system tags (ITL-1543)

* test(datagrams): expect preserved Arrow system tag fields (ITL-1543)

* fix(cache): store declared operator output fields (ITL-1562)

* fix(cache): preserve declared token fields on operator replay

* fix(provenance): preserve declared types when replacing source tokens

* test(cache): type list-valued provenance fixtures

* fix(streams): enforce declared provenance fields at cache and transport boundaries

* fix(streams): preserve declared fields across async routes

* test(async): align placeholder schema with producer

* fix(sources): a cached source refuses a changed row under an existing key; the cache records when each row was written (ITL-1396)

A CachedSource stored a changed row beside the old one and presented both under
one record id. A delivery holding a row whose record id the cache holds under
another record hash is now refused before anything is written
(CachedSourceChangedRowError), for key columns and positional record ids alike.
The sdb_v2 table gains __recorded_at, stored only and in no hash.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(provenance): keep declared fields on source and tag inputs

* fix(sources): validate cached deliveries against the current table

* fix(provenance): enforce declared token and system-tag types

* fix(provenance): refuse a null replacement of a held list token

Restate the PR 601 item-metadata channel test for the declared-type rule,
and document the held-type replacement rule and the first-batch rule (ITL-1557).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(sources): check only generated cached record ids

* docs(provenance): clarify null constructor token handling

* fix(sources): validate nested cache deliveries before writing

* test(sources): pin open positional derivation cache case

* fix(provenance): preserve declared fields across join and channel paths

* fix(join): canonicalize full pipeline ties with missing system tags

* fix(sources): refuse conflicts across nested cache reads

* fix(join): preserve system tag pairs across hash ties

* fix(sources): refuse a cache holding two contents for one record id on read

A cache table that already holds two contents for one record id is refused
whenever it is read (ITL-1396): every read of the cache's rows, the delivery
check, the freshness check and head().

Review fixes: the append preview is asked of the store through the database
protocol, so a wrapped Delta store appends as Delta does, and the stored rows
are not held to the declared types before a delivery that evolves the table.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(join): preserve symmetric tie ordering and reject missing fields

* fix(sources): validate conflicts on every cache read

* fix(database): type projected filter column names

* fix(sources): resolve record IDs from the cache schema

* fix(join): retain tied provenance on standalone rows

* fix(sources): resolve cached provenance from stored fields

* fix(join): keep tied custom metadata at declared positions

* fix(sources): preserve clean Delta cache reads across declarations

* fix(join): restore main's tie handling

* fix(sources): refuse cache appends that alias generated record ids

* fix(sources): resolve cached record IDs without name resemblance

* docs(provenance): qualify instance ID equivalence for list tokens

* fix(pods): index token columns once per row

* fix(sources): reject cycles in cached-source freshness checks

* fix(sources): preserve cache validation across reads and previews

* fix(cache): preserve pending projections and skip unchanged scans

* fix(delta): place the Arrow schema type suppression on the call

* fix(sources): preserve cache reads across review edge cases

* fix(cache): narrow provenance and partition lookup review fixes

* fix(cache): validate adapted deliveries and append previews

* fix(cache): project delivery checks and reject incompatible connector previews

* test(cache): hyphenate data-tag in the refusal docstring

* fix(cache): share append validation with previews

* fix(cache): use real readback for append previews

* test(cache): narrow the fixture converter type

* refactor(cache): share strict Arrow append checks

* fix(cache): use actual appends for all database readback

* test(cache): narrow append test values for type checking

* test(cache): check positional derivation against Delta readback

* docs(cache): clarify positional delivery refusal

* fix(cache): preserve held state during previews and refusals

* docs(cache): name the SQLite storage follow-up

* test(databases): exercise queue promotion with a new key

* test(cache): document cache I/O and refusal invariants

* fix(sources): reject conflicting warm cache deliveries during freshness checks

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant