Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 43 additions & 16 deletions .zed/rules
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,9 @@ Developer, November 12, 2026 (ITL-981); see `docs/concepts/arrays.md` and
(developer, November 13, 2026, ITL-1068; moved past 0.4.0rc1 on November 17, 2026): their
extension names are listed in `provisional` of `contexts/logical_types.json`, and using
one issues `ProvisionalHashWarning` once per type
per process. A new library value type must be added to that list. The list never enters a
per process. A new library value type must be added to that list. Its golden entries live in the
provisional golden files (ITL-1324), and so do those of a user class with a field of such a
type, whose identity embeds the type's identifier. The list never enters a
hash, identifier or stored path.

## User classes: exact and structural
Expand Down Expand Up @@ -498,29 +500,54 @@ Orcapod stores or embeds in a name is pinned in the golden folder of the current
the release step for every version. A withdrawn version is never released again.
- Provisional operators are outside the freeze (developer, November 18, 2026, ITL-1266):
`orcapod.operators.PROVISIONAL_OPERATORS` (`core/operators/provisional.py`) is the one
list (name to the issue deciding its identity; today `PolarsFilter`), and each listed class
sets `PROVISIONAL = True` (a test checks they agree). Building one issues
`ProvisionalHashWarning` once per operator per process. A golden case that depends on one
list (name to the issue deciding its identity), and each listed class sets
`PROVISIONAL = True` (a test checks they agree, and that every exported operator is either
provisional or frozen). The list (developer, November 19, 2026, ITL-1279: "anything whose
identity choice isn't obvious and feels solid should be put into provisional first"):
`PolarsFilter`, `GroupBy`, `TagBy`, `AddTags`, `MergeJoin`, `MapTags`, `MapColumns`,
`Pick`, `Index`, `Batch`. Frozen: `Join`, `SemiJoin`, `MapData`, the Select/Drop column
operators, `DropNulls`. An operator joins the group only while no release has frozen its
values, and leaves it when its identity is decided (before or at a release), never the other
way after a release. Building one (directly, through a stream method, or by loading a saved
job) issues `ProvisionalHashWarning` once per operator per process. A golden case that depends on one
declares it (`@case(..., provisional=("PolarsFilter",))`; `compute_group_kinds` refuses a
case that builds an undeclared one); its entries live in
case that builds, hashes or applies an undeclared one, also one built before the case);
its entries live in
`data/<folder>/provisional/<group>.json`, listed in `golden.provisional` of the manifest,
outside the history, so no release freezes them. They are checked like every other value
and change only with the developer's approval of the exact list, without a new data
context. `generate_golden_hashes.py --relocate` moves entries, values unchanged, between
frozen and provisional files; an operator leaving the group has its entries relocated into
a frozen file before the release step. Never put a value that depends on a provisional
operator in a frozen file.
operator in a frozen file. The provisional library value types are outside the freeze the
same way (ITL-1324): a case declares one by extension name
(`provisional=("orcapod.numpy.ndarray",)`), and each use of one is noted for the refusal.
The refusal sees a direct use only: a user class with a field of such a type embeds its
identifier in an identity built once and cached, so golden items are split by
`cases.provisional_types_of` (checked against every fixture class's identity record).
- Provisional sources are outside the freeze too (developer, November 21, 2026, ITL-1314:
"make polling source provisional"): orcapod.sources.PROVISIONAL_SOURCES
(core/sources/provisional.py) is the one list (today PollingSource, its identity
decided by ITL-1316), each listed class sets PROVISIONAL = True (declared on
RootSource, which warns when one is constructed, also through from_config), and building
one issues ProvisionalHashWarning once per source kind per process. The warning and the
use record are one helper, utils/provisional.warn_provisional_use (operators use it
too). Unlike a provisional operator, a provisional source is never pinned, in no golden
file: only operators can be declared by a golden case, so compute_group_kinds refuses a
case that builds one. The mark never enters a hash, an identifier, a config or a stored
path.
"make polling source provisional"; ITL-1331: "Let's also make DerivedSource as
provisional?", both forms): `orcapod.sources.PROVISIONAL_SOURCES`
(`core/sources/provisional.py`) is the one list (today `PollingSource`, its identity
decided by ITL-1316, and `DerivedSource`, plain and `tags_as_data`, by ITL-1317), each
listed class sets `PROVISIONAL = True` (declared on `RootSource`, which warns when one is
constructed, also through `node.as_source()`, `from_config` and a loaded job), and building
one issues `ProvisionalHashWarning` once per source kind per process. Everything downstream
of a provisional source is provisional. The warning and the use record are one helper,
`utils/provisional.warn_provisional_use` (operators use it too); a source notes its use
again where its identity is read (`source_id`, `content_hash`, `pipeline_hash`, the
identity structures; a `DerivedSource` also on every read or `head` of rows, and in
`from_config`, so a loaded job over a job node it cannot rebuild warns too), as an
operator does where its identity is read or it is applied (one helper pair,
`provisional_class_name` and `note_provisional_use`). A `ProvisionalHashWarning` turned
into an error propagates from a load: no reconstruction catch swallows a `Warning`.
A golden case declares a `DerivedSource` as it does an operator
(`provisional=("DerivedSource",)`; `cases.DECLARABLE_PROVISIONAL_SOURCES`), and its
entries live in the provisional files; a case that builds a `PollingSource` is refused,
declared or not (its pins were removed, ITL-1314). The guard sees a provisional object
built or read inside a case, not one behind a hash cached before it, so golden cases
build their pipeline objects inside the case (`test_cases_hold_no_prebuilt_pipeline_objects`).
The mark never enters a hash, an identifier, a config or a stored path.
- The unit of immutability is the golden file. The manifest's `golden.history`
(`src/orcapod/contexts/data/<version>.json`) lists every file with the sha256 of its bytes;
a release appends a revision with `added: {}`, pinned in
Expand Down
57 changes: 42 additions & 15 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,9 @@ Developer, November 12, 2026 (ITL-981); see `docs/concepts/arrays.md` and
(developer, November 13, 2026, ITL-1068; moved past 0.4.0rc1 on November 17, 2026): their
extension names are listed in `provisional` of `contexts/logical_types.json`, and using
one issues `ProvisionalHashWarning` once per type
per process. A new library value type must be added to that list. The list never enters a
per process. A new library value type must be added to that list. Its golden entries live in the
provisional golden files (ITL-1324), and so do those of a user class with a field of such a
type, whose identity embeds the type's identifier. The list never enters a
hash, identifier or stored path.

## User classes: exact and structural
Expand Down Expand Up @@ -509,29 +511,54 @@ Orcapod stores or embeds in a name is pinned in the golden folder of the current
the release step for every version. A withdrawn version is never released again.
- Provisional operators are outside the freeze (developer, November 18, 2026, ITL-1266):
`orcapod.operators.PROVISIONAL_OPERATORS` (`core/operators/provisional.py`) is the one
list (name to the issue deciding its identity; today `PolarsFilter`), and each listed class
sets `PROVISIONAL = True` (a test checks they agree). Building one issues
`ProvisionalHashWarning` once per operator per process. A golden case that depends on one
list (name to the issue deciding its identity), and each listed class sets
`PROVISIONAL = True` (a test checks they agree, and that every exported operator is either
provisional or frozen). The list (developer, November 19, 2026, ITL-1279: "anything whose
identity choice isn't obvious and feels solid should be put into provisional first"):
`PolarsFilter`, `GroupBy`, `TagBy`, `AddTags`, `MergeJoin`, `MapTags`, `MapColumns`,
`Pick`, `Index`, `Batch`. Frozen: `Join`, `SemiJoin`, `MapData`, the Select/Drop column
operators, `DropNulls`. An operator joins the group only while no release has frozen its
values, and leaves it when its identity is decided (before or at a release), never the other
way after a release. Building one (directly, through a stream method, or by loading a saved
job) issues `ProvisionalHashWarning` once per operator per process. A golden case that depends on one
declares it (`@case(..., provisional=("PolarsFilter",))`; `compute_group_kinds` refuses a
case that builds an undeclared one); its entries live in
case that builds, hashes or applies an undeclared one, also one built before the case);
its entries live in
`data/<folder>/provisional/<group>.json`, listed in `golden.provisional` of the manifest,
outside the history, so no release freezes them. They are checked like every other value
and change only with the developer's approval of the exact list, without a new data
context. `generate_golden_hashes.py --relocate` moves entries, values unchanged, between
frozen and provisional files; an operator leaving the group has its entries relocated into
a frozen file before the release step. Never put a value that depends on a provisional
operator in a frozen file.
operator in a frozen file. The provisional library value types are outside the freeze the
same way (ITL-1324): a case declares one by extension name
(`provisional=("orcapod.numpy.ndarray",)`), and each use of one is noted for the refusal.
The refusal sees a direct use only: a user class with a field of such a type embeds its
identifier in an identity built once and cached, so golden items are split by
`cases.provisional_types_of` (checked against every fixture class's identity record).
- Provisional sources are outside the freeze too (developer, November 21, 2026, ITL-1314:
"make polling source provisional"): `orcapod.sources.PROVISIONAL_SOURCES`
"make polling source provisional"; ITL-1331: "Let's also make DerivedSource as
provisional?", both forms): `orcapod.sources.PROVISIONAL_SOURCES`
(`core/sources/provisional.py`) is the one list (today `PollingSource`, its identity
decided by ITL-1316), each listed class sets `PROVISIONAL = True` (declared on
`RootSource`, which warns when one is constructed, also through `from_config`), and building
one issues `ProvisionalHashWarning` once per source kind per process. The warning and the
use record are one helper, `utils/provisional.warn_provisional_use` (operators use it
too). Unlike a provisional operator, a provisional source is never pinned, in no golden
file: only operators can be declared by a golden case, so `compute_group_kinds` refuses a
case that builds one. The mark never enters a hash, an identifier, a config or a stored
path.
decided by ITL-1316, and `DerivedSource`, plain and `tags_as_data`, by ITL-1317), each
listed class sets `PROVISIONAL = True` (declared on `RootSource`, which warns when one is
constructed, also through `node.as_source()`, `from_config` and a loaded job), and building
one issues `ProvisionalHashWarning` once per source kind per process. Everything downstream
of a provisional source is provisional. The warning and the use record are one helper,
`utils/provisional.warn_provisional_use` (operators use it too); a source notes its use
again where its identity is read (`source_id`, `content_hash`, `pipeline_hash`, the
identity structures; a `DerivedSource` also on every read or `head` of rows, and in
`from_config`, so a loaded job over a job node it cannot rebuild warns too), as an
operator does where its identity is read or it is applied (one helper pair,
`provisional_class_name` and `note_provisional_use`). A `ProvisionalHashWarning` turned
into an error propagates from a load: no reconstruction catch swallows a `Warning`.
A golden case declares a `DerivedSource` as it does an operator
(`provisional=("DerivedSource",)`; `cases.DECLARABLE_PROVISIONAL_SOURCES`), and its
entries live in the provisional files; a case that builds a `PollingSource` is refused,
declared or not (its pins were removed, ITL-1314). The guard sees a provisional object
built or read inside a case, not one behind a hash cached before it, so golden cases
build their pipeline objects inside the case (`test_cases_hold_no_prebuilt_pipeline_objects`).
The mark never enters a hash, an identifier, a config or a stored path.
- The unit of immutability is the golden file. The manifest's `golden.history`
(`src/orcapod/contexts/data/<version>.json`) lists every file with the sha256 of its bytes;
a release appends a revision with `added: {}`, pinned in
Expand Down
36 changes: 36 additions & 0 deletions changelog.d/ITL-1279.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
### Changed

- **Nine more operators are provisional:** `GroupBy`, `TagBy`, `AddTags`, `MergeJoin`,
`MapTags`, `MapColumns`, `Pick`, `Index` and `Batch`, beside `PolarsFilter`
(`orcapod.operators.PROVISIONAL_OPERATORS`). Their identities are not frozen with data
context v1: a later release may change one, and then the steps built on it compute their
results again instead of reusing them (nothing stored is lost or wrong). Building one,
directly, through a stream method (`stream.group_by`, `stream.add_tags`, ...) or by
loading a saved job, issues `ProvisionalHashWarning` once per operator per process; to
silence it, `warnings.filterwarnings("ignore", category=orcapod.errors.ProvisionalHashWarning)`.
Every other operator is frozen: `Join`, `SemiJoin`, `MapData`, the column selections and
`DropNulls`. No operator's identity or output changes. (ITL-1279)
- **The golden values of the provisional library value types are no longer frozen with v1:**
NumPy arrays, torch tensors and pandas and Polars frames and series, and a user class with a
field of one of them, whose identity embeds that type's identifier (ITL-1324). No value
changes.

### Fixed

- **A `ProvisionalHashWarning` turned into an error propagates from `PipelineJob.load`:**
under `warnings.simplefilter("error", ProvisionalHashWarning)`, loading a saved job that
holds a provisional source or operator raises the warning. It was caught as a source that
could not be rebuilt, and the job loaded with that source unbound and no error.
(ITL-1331)

### Known limitations

- **`DerivedSource` is provisional, in both forms:** `node.as_source()` (and
`DerivedSource(origin)`) and `DerivedSource(origin, tags_as_data=...)` are in
`orcapod.sources.PROVISIONAL_SOURCES` beside `PollingSource`. Their source ids and hashes
are not frozen with data context v1, so a later release may change them, and every step
built on one then computes its results again instead of reusing them (nothing stored is
lost or wrong). Building one, also through `node.as_source()`, from a saved config or by
loading a saved job, issues `ProvisionalHashWarning` once per process. No id, hash, config
or stored path changes, and their golden values moved, unchanged, to the provisional
golden files. (ITL-1331)
5 changes: 5 additions & 0 deletions docs/concepts/arrays.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ process, on whichever use comes first: a value hashed, a source column of the ty
pod with a parameter or output of the type, or stored results of the type read back. It names
the type, for example `orcapod.numpy.ndarray`.

A user class with a field of one of these types is provisional too: its identity holds the
identifier of each field's type, so if the audit changes the array type's identifier, the
class's own identity, and every hash it feeds, changes with it. Registering such a class, or
storing its values, issues the same warning (for the field's type).

In practice nothing needs to change. Use these types as described on this page. If the audit
changes how one of them is hashed, a result Orcapod computed earlier from such a value gets a
different identity, so the release that carries the change computes it again instead of reusing
Expand Down
46 changes: 35 additions & 11 deletions docs/concepts/operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -838,14 +838,36 @@ The provisional operators are listed in one place:
from orcapod.operators import PROVISIONAL_OPERATORS

print(sorted(PROVISIONAL_OPERATORS))
# ['PolarsFilter']
```

Each name maps to the issue that decides the operator's identity (`PolarsFilter`: whether
the order of its predicates belongs to it). Building a provisional operator, directly or
through a stream method such as `polars_filter`, issues `orcapod.errors.ProvisionalHashWarning`
once per operator per process. To silence it once you have taken note, filter its class after
importing Orcapod:
# ['AddTags', 'Batch', 'GroupBy', 'Index', 'MapColumns', 'MapTags', 'MergeJoin', 'Pick', 'PolarsFilter', 'TagBy']
```

They are the operators whose identity choice is not yet obvious and solid (developer,
November 19, 2026). Each name maps to the issue that decides its identity or output:

| Operator | What is still open |
|---|---|
| `GroupBy`, `Batch` | their output for a data-tag and its data column (ITL-1017) |
| `MergeJoin` | its rules for data-tags (ITL-1018); it became ordered in this release |
| `MapTags` | its rename rules for data-tags (ITL-1018) |
| `MapColumns` | its behaviour with data-tags (ITL-1022) |
| `Pick`, `Index` | the policy for a miss, which changes the output (ITL-439) |
| `PolarsFilter` | whether the order of its predicates belongs to its identity (ITL-1247) |
| `TagBy`, `AddTags` | days old, their identities just changed: the review of the tag operators (ITL-1290) |

Every other operator is frozen with data context v1: `Join`, `SemiJoin`, `MapData`, the
column selections (`SelectTagColumns`, `SelectDataColumns`, `DropTagColumns`,
`DropDataColumns`, `SelectColumns`, `DropColumns`) and `DropNulls`.

What you get with a provisional operator: the same results as with any other operator, a
warning, and, should a later release change the operator's identity, a recomputation of its
steps (and of every step downstream) instead of reuse; nothing stored is lost or wrong.
Building one, directly, through a stream method such as `group_by` or `polars_filter`, or by
loading a saved job that holds one, issues `orcapod.errors.ProvisionalHashWarning` once per
operator per process. It reads, for example, `GroupBy is provisional: its identity is not
frozen with data context v1 and may change in a later release. ...` and points to this
section. A notebook shows it once, below the first cell that builds the operator; it is a
warning, not an error, and the cell runs. To silence it once you have taken note, filter its
class after importing Orcapod:

```python
import warnings
Expand All @@ -855,9 +877,11 @@ from orcapod.errors import ProvisionalHashWarning
warnings.filterwarnings("ignore", category=ProvisionalHashWarning)
```

An operator leaves the group at a release: from that release on its identity is frozen like
every other operator's. Its golden values then move into the frozen golden files (see
[Golden hashes](../reference/golden-hashes.md#provisional-files)).
An operator leaves the group (its identity is decided) at a release, or before one: from then
on its identity is frozen like every other operator's, and its golden values move into the
frozen golden files (see [Golden hashes](../reference/golden-hashes.md#provisional-files)). An
operator can join the group only while no release has frozen its values: a frozen identity
never becomes provisional again.

## Arrow types of operator outputs

Expand Down
Loading
Loading