Skip to content

docs(dev): measurement and plan for a function pod that reads only its own columns (ITL-1518) - #602

Closed
eywalker wants to merge 46 commits into
mainfrom
eywalker/itl-1518-a-function-pod-reads-only-its-own-columns
Closed

eywalker wants to merge 46 commits into
mainfrom
eywalker/itl-1518-a-function-pod-reads-only-its-own-columns

Conversation

@eywalker

Copy link
Copy Markdown
Contributor

Stacked on #583 (eywalker/itl-1471-three-nested-row-ids-v2-table-layouts-and), which is not merged yet: until it is, this pull request also shows its commits. The only commit of its own adds files under docs/dev/specs/. It is updated by merging the base in, never by a rebase.

The implementation of ITL-1518 is deferred by the developer's decision of 2026-11-27. This pull request holds the measurement and the plan only. It changes no library code, no test, no golden file and no agent rule: pod(a) still places the automatic SelectDataColumns step (ITL-807).

What it adds

docs/dev/specs/itl-1518-drops-extra-columns.md, with its evidence in docs/dev/specs/itl-1518/:

  • Golden entries that would move, measured on the head of feat(nodes)!: three nested row ids, layouts pdb_v2, odb_v2 and tdb_v2 (ITL-1471) #583 with a local prototype (--check and --stdout only): 34 entries, all in provisional/pipeline.json, in the cases rejoin_job and rejoin_job_async. No frozen file has an entry that moves.
  • How the automatic-drop mode would be declared provisional, modelled on the provisional operators and sources. No frozen golden case would have to be relocated.
  • What an existing store sees, measured on a Delta store: no function is called again; result tables do not move and get no new row; the pipeline table of each node whose pod drops columns, and of each node downstream of one, moves to a new path, and the old table is left unused.
  • The implementation plan (files, sync and async paths, saved and loaded jobs, strict=True, process, several inputs, data-tags, tests) and the open points, one of them to be measured before any implementation: whether a side-effect pod downstream of a moved node would deliver again.

Checks

ruff check, ruff format --check, scripts/assemble_changelog.py --check and scripts/design_issues.py --check pass. No changelog fragment: the pull request changes developer documents only, and the fragment check does not ask for one.

Related: ITL-1518 (not resolved by this pull request), ITL-1472, ITL-1471.

🤖 Generated with Claude Code

eywalker and others added 30 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>
…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>
…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>
…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>
…ry 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>
…e placeholder policy (ITL-1471)

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

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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>
…or 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>
…ma read (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…e 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>
…fore 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>
eywalker and others added 15 commits November 26, 2026 06:24
…its typed column (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…eps the typed columns of the tokens it keeps (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…utes, the clock behind 'recorded last' (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…s, valid synthetic records, the traced instance) (ITL-1471)

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

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

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

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

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…rom its value, one type on every route (ITL-1471)

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

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…lder's rename keeps its tokens (ITL-1471)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…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>
…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>
…s own columns (ITL-1518)

The implementation is deferred (developer, November 27, 2026). No library code, test,
golden file or agent rule changes.

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

coderabbitai Bot commented Nov 27, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

…idence

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

codecov Bot commented Nov 27, 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 4 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.

@eywalker

eywalker commented Dec 3, 2026

Copy link
Copy Markdown
Contributor Author

Closing without merging, by the developer's decision (2026-12-03). The design is deferred; ITL-1518 keeps it for later. The branch is kept.

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

@eywalker eywalker closed this Dec 3, 2026
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