diff --git a/RELEASING.md b/RELEASING.md index db3c95d4a..296c294c0 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -334,6 +334,29 @@ If the key may have been exposed (for example printed in a log), remove it from first (`spiral workloads keys rm`), so it stops signing in at once, then add a new key and replace the secret as above. The job fails in between; that is the price of containment. +### Live SpiralDB source tests + +The read-only `SpiralDBTableSource` tests are opt-in. Sign in with spiral-sdk and set +`ORCAPOD_SPIRALDB_TEST_PROJECT`, `ORCAPOD_SPIRALDB_TEST_DATASET` and +`ORCAPOD_SPIRALDB_TEST_TABLE` to select a keyed table you can read. Set these optional +variables to match the table's column names. + +| Variable | Default | Role | +|---|---|---| +| `ORCAPOD_SPIRALDB_TEST_PREFIX_COLUMN` | `sensor_id` | A key column for the equality filter | +| `ORCAPOD_SPIRALDB_TEST_TIME_COLUMN` | `timestamp` | The time key column for range filters | +| `ORCAPOD_SPIRALDB_TEST_VALUE_COLUMN` | `reading_value` | A floating-point data column | + +The first row supplies the values used in the prefix filters. For full coverage, use more +than 1,000 rows and at least eight timestamps for the first full key prefix. + +```sh +uv run --extra spiraldb pytest tests/test_core/sources/test_spiraldb_table_source_live.py +``` + +These tests skip when any of the three settings is missing. The `spiral-integration` +job runs the connector conformance tests on a separate test project. + ### Moving the spiral-sdk pin `pyproject.toml` pins one version of `spiral-sdk` (the `spiraldb` extra): a pre-alpha that diff --git a/changelog.d/ITL-186.md b/changelog.d/ITL-186.md new file mode 100644 index 000000000..445985cc3 --- /dev/null +++ b/changelog.d/ITL-186.md @@ -0,0 +1,4 @@ +### Changed + +- SpiralDB source examples use synthetic identifiers. The read-only live source tests accept + the project, dataset, table and column roles through environment variables. diff --git a/docs/concepts/notebooks.md b/docs/concepts/notebooks.md index 71485d4ce..f8360282c 100644 --- a/docs/concepts/notebooks.md +++ b/docs/concepts/notebooks.md @@ -69,7 +69,7 @@ What it shows ([Looking at data](streams.md#looking-at-data) states each rule in - **The header line** names the object (its kind and its name) and says which rows are shown: here `first 10 of 64 rows, sorted by tags`. A source that reads only part of its table says so, as a [SpiralDB source](sources.md) does ("10 rows read, sorted by tags, of about - 63,349"). + 25,000"). - **Tag columns** come first and are marked, and so are data columns: in a notebook a tag's header is bold (in an accent colour), a data column's is underlined, a vertical rule separates the tags from the data columns, and a line under the header names the marks, diff --git a/docs/concepts/sources.md b/docs/concepts/sources.md index 602f07974..dfde5796b 100644 --- a/docs/concepts/sources.md +++ b/docs/concepts/sources.md @@ -571,15 +571,16 @@ Orcapod only reads SpiralDB for now. Writing a SpiralDB table (`SpiralDBConnecto whose database is on one) raises `SpiralDBWriteNotSupportedError`; store a job's results in another database, such as `DeltaTableDatabase`. -To find the tables of a project and their key columns: +Replace the example project, dataset and table names with identifiers you can access. +To find the tables of a dataset and their key columns: ```python from orcapod.databases import SpiralDBConnector -with SpiralDBConnector("edi-sample-v1-855632") as spiral: +with SpiralDBConnector("my-project-123456", dataset="my_dataset") as spiral: print(spiral.get_table_names()) - print(spiral.get_pk_columns("session")) + print(spiral.get_pk_columns("sensor_reading")) ``` The table's key columns become the tag columns, and every other column is a data column: @@ -588,10 +589,9 @@ The table's key columns become the tag columns, and every other column is a data ```python from orcapod.sources import SpiralDBTableSource -sessions = SpiralDBTableSource("edi-sample-v1-855632", "session") -experiments = SpiralDBTableSource("edi-sample-v1-855632", "experiment") -print(sessions.output_schema()) -sessions.as_df() # also as_polars_df(), as_pandas_df(), as_lazy_frame(), as_table() +readings = SpiralDBTableSource("my-project-123456", "sensor_reading", dataset="my_dataset") +print(readings.output_schema()) +readings.as_df() # also as_polars_df(), as_pandas_df(), as_lazy_frame(), as_table() ``` Things to know about Spiral tables: @@ -609,12 +609,12 @@ Things to know about Spiral tables: - **Source identity.** A Spiral source is identified by where its table is, never by its rows. The default `source_id` is `spiraldb_table_v1:..@`, for example - `spiraldb_table_v1:edi-tutorial-v1-841226.default.session@table_Jo7J0lpkLcOM`. The table id is + `spiraldb_table_v1:my-project-123456.my_dataset.sensor_reading@table_example12345`. The table id is SpiralDB's own, so tables with the same name in different projects stay apart, and a table that is dropped and created again under the same name is a different source: nothing recorded for the old table is reused. A renamed table also gets a new `source_id`. - **Record identity.** A row is identified by its primary key: its record ID is the - canonical JSON of its key columns (`{"session_id":"s1"}`). A row keeps its record ID when + canonical JSON of its key columns (`{"sensor_id":106,"site_id":2,"timestamp":0}`). A row keeps its record ID when other rows are added, and has the same one whichever read returned it. @@ -640,9 +640,11 @@ Orcapod applies to the rows it receives, and then the limit): ```python -first = SpiralDBTableSource("edi-tutorial-v1-841226", "spike_event", limit=1000) -unit = SpiralDBTableSource( - "edi-tutorial-v1-841226", "spike_event", where={"unit_id": 106} +first = SpiralDBTableSource( + "my-project-123456", "sensor_reading", dataset="my_dataset", limit=1000 +) +sensor = SpiralDBTableSource( + "my-project-123456", "sensor_reading", dataset="my_dataset", where={"sensor_id": 106} ) print(first.row_count_estimate) # rows in the whole table; reads every key to count them ``` @@ -701,12 +703,12 @@ rows, in one scan to which the row cap does not apply, so a table of any size ca at; `head(n)` reads `n`. The preview shows the rows it read in tag order (it asks for `sort_by_tags`, as does `head(columns={"sort_by_tags": True})` or `all_info=True`): the rows read, sorted, not the first `n` of the table in tag order. The header line says what is -shown, for example `SpiralDBTableSource[spike_event] — 10 rows read, sorted by tags, of -about 63,349` (the table's row count, from its keys; above 100,000 rows, or `max_rows` when +shown, for example `SpiralDBTableSource[sensor_reading] — 10 rows read, sorted by tags, of +about 25,000` (the table's row count, from its keys; above 100,000 rows, or `max_rows` when that is smaller, it says `of more than 100,000`), `all 4 rows, sorted by tags` when the source reads no more than that, or `10 matching rows read, sorted by tags -(where unit_id=106); the table has about 63,349 rows` with `where=`. The unsorted `head()` -says `first 10 rows of about 63,349`. Tag columns come first, and the line above the table +(where sensor_id=106); the table has about 25,000 rows` with `where=`. The unsorted `head()` +says `first 10 rows of about 25,000`. Tag columns come first, and the line above the table names them. To see more rows, use `as_df()` with a `limit=` or `where=` source. **Restrictions are not part of identity.** `where`, `limit` and `asof` choose rows of the @@ -722,11 +724,11 @@ sent downstream during a run are only the rows that run read. `source.where(column=value, ...)` returns a new source on the same table that reads only the rows in which every named column equals its value. Several conditions can be given in one call, as keywords or as a mapping, or across chained calls: -`events.where(unit_id=106, session_index=2)` and -`events.where(unit_id=106).where(session_index=2)` are the same restriction, reading the +`readings.where(sensor_id=106, site_id=2)` and +`readings.where(sensor_id=106).where(site_id=2)` are the same restriction, reading the same rows. The conditions are a `Condition` (`orcapod.types`): `where(...)` builds one with `Condition.of(...)`, which takes the same arguments, and a `Condition` built beforehand can be -given instead (`events.where(Condition.of(unit_id=106, session_index=2))`). A source +given instead (`readings.where(Condition.of(sensor_id=106, site_id=2))`). A source restricted by a condition, a `limit=`, or both is **restricted**. Every source states its restriction through two read-only properties: `condition` (the empty `Condition` when it reads every row) and `row_limit` (`None` without a limit). @@ -745,9 +747,9 @@ when it has none. from orcapod import col hour = 3_600_000_000 -first_hour = events.where(col("timestamp") >= 0, col("timestamp") < hour) -second_hour = events.where(col("timestamp") >= hour, col("timestamp") < 2 * hour) -one_unit = first_hour.where(unit_id=106) # a range and an equality +first_hour = readings.where(col("timestamp") >= 0, col("timestamp") < hour) +second_hour = readings.where(col("timestamp") >= hour, col("timestamp") < 2 * hour) +one_sensor = first_hour.where(sensor_id=106) # a range and an equality ``` Ranges and equalities all must hold, on one column or several, given in one call or across @@ -781,7 +783,7 @@ A restriction is not an operator: still keeps its record ID. It adds no node, so a job bound to a restricted source is the same job, run over fewer rows. -Use a restriction to work on part of a table (one subject, one session) with the pipeline you +Use a restriction to work on part of a table (one sensor, one site) with the pipeline you will later run on all of it: results computed under the restriction are stored under the same identities and reused by the full run. Use an operator when selecting rows is part of what the pipeline computes. Restrict on tag (key) columns where you can; a condition on a data @@ -802,14 +804,18 @@ selection lives: ```python from orcapod import col +readings = SpiralDBTableSource( + "my-project-123456", "sensor_reading", dataset="my_dataset", source_id="readings" +) + # Exploring: the source reads only these rows; no step is added and no hash moves. -explore = events.where(unit_id=106, session_index=2) +explore = readings.where(sensor_id=106, site_id=2) # The pipeline: the same selection as a step, part of every downstream identity. -kept = events.filter(unit_id=106, session_index=2) +kept = readings.filter(sensor_id=106, site_id=2) # Use a filter for conditions such as is_in that where cannot apply. -late = events.filter(col("spike_time_us") >= 1_000_000, col("unit_id").is_in([106, 107])) +late = readings.filter(col("timestamp") >= 1_000_000, col("sensor_id").is_in([106, 107])) ``` A filter directly over a source reads every row the source reads (the whole table, or what @@ -819,7 +825,7 @@ pushed into the source. `where` reads only the matching rows. On a large table, above apply to the source. This holds for equalities on integer, string, bytes, bool, date and timestamp columns, on a source without a `limit`. With a `limit` it does not: the source reads the first rows that match the `where`, so the `filter` sees other rows than it would -over the source alone (with `limit=2` and unit ids `[1, 2, 2]`, `filter(unit_id=2)` alone +over the source alone (with `limit=2` and sensor ids `[1, 2, 2]`, `filter(sensor_id=2)` alone keeps one row, the `where` and the `filter` together keep two). On a float column it does not either when the value is `0.0`: `where` matches by the table system's equality (`0.0` does not match `-0.0`), `filter` by Orcapod's (it does), so `where` can drop rows the `filter` @@ -827,31 +833,33 @@ alone would keep. For such a value, use `filter` on its own. ```python -events = SpiralDBTableSource("my-project-123456", "spike_event", source_id="spikes") -one_unit = events.where(unit_id=106) # or events.where({"unit_id": 106}) -one_session = one_unit.where(session_index=2) # conditions add up -same_session = events.where(unit_id=106, session_index=2) # both in one call -print(one_session.condition) -# unit_id=106, session_index=2 -print(one_session.row_limit) +readings = SpiralDBTableSource( + "my-project-123456", "sensor_reading", dataset="my_dataset", source_id="readings" +) +one_sensor = readings.where(sensor_id=106) # or readings.where({"sensor_id": 106}) +one_site = one_sensor.where(site_id=2) # conditions add up +same_site = readings.where(sensor_id=106, site_id=2) # both in one call +print(one_site.condition) +# sensor_id=106, site_id=2 +print(one_site.row_limit) # None -assert same_session.to_config() == one_session.to_config() -assert one_unit.content_hash() == events.content_hash() -job.bind(sources={"spikes": one_unit}) # the slot the unrestricted source fills +assert same_site.to_config() == one_site.to_config() +assert one_sensor.content_hash() == readings.content_hash() +job.bind(sources={"readings": one_sensor}) # the slot the unrestricted source fills summary = job.run() print(summary.conditions) -# {'spikes': Condition.of({'unit_id': 106})} +# {'readings': Condition.of({'sensor_id': 106})} print(summary.restricted_source_ids) -# {'spikes': 'spikes'} +# {'readings': 'readings'} ``` (This sample needs a SpiralDB project, so it is not run with the documentation; `job` is a -job built over `events`, whose slot is named by the source id.) +job built over `readings`, whose slot is named by the source id.) To restrict on two columns, pass separate equality keywords such as -`events.where(unit_id=106, session_index=2)`. Combining comparisons as -`(col("unit_id") == 106) and (col("session_index") == 2)` raises `TypeError`. +`readings.where(sensor_id=106, site_id=2)`. Combining comparisons as +`(col("sensor_id") == 106) and (col("site_id") == 2)` raises `TypeError`. When building a `Condition` to pass to `where()`, combine parenthesized equalities with `&`. ```python @@ -859,13 +867,13 @@ from orcapod import col from orcapod.types import Condition try: - Condition.of((col("unit_id") == 106) and (col("session_index") == 2)) + Condition.of((col("sensor_id") == 106) and (col("site_id") == 2)) except TypeError as error: print(str(error).split(".")[0]) # Condition has no truth value -both = (col("unit_id") == 106) & (col("session_index") == 2) -assert both == Condition.of(unit_id=106, session_index=2) +both = (col("sensor_id") == 106) & (col("site_id") == 2) +assert both == Condition.of(sensor_id=106, site_id=2) ``` A date or a time written as text is converted explicitly, with the function of its column's @@ -931,7 +939,7 @@ print(Condition.of(day=day, started=started, recorded=recorded)) two 01:30 of a daylight-saving overlap (`fold`) are two. This equality decides whether two restrictions are one restriction (for the one-restriction rule above); it does not decide which rows a source returns. - `str(condition)` (or `condition.text()`) reads `unit_id=106, session_index=2`, and + `str(condition)` (or `condition.text()`) reads `sensor_id=106, site_id=2`, and `condition.equalities` maps each column to its value. A `Condition` has a Python hash, consistent with that equality, so it can be a dictionary key or a set member; it never enters an Orcapod source or pipeline hash. @@ -991,30 +999,29 @@ type, never null: ```python -spikes = SpiralDBTableSource( - "edi-tutorial-v1-841226", "spike_event", tags_as_data={"timestamp": "spike_time_us"} +readings = SpiralDBTableSource( + "my-project-123456", + "sensor_reading", + dataset="my_dataset", + tag_only_columns=True, + tags_as_data={"timestamp": "reading_time"}, ) -unit_key = [ - "spike_extraction_hash", "subject_id", "session_start_datetime", - "recording_index", "probe_index", "unit_id", -] -per_unit = spikes.group_by(unit_key) -print(per_unit.keys()) -# (('spike_extraction_hash', 'subject_id', 'session_start_datetime', 'recording_index', 'probe_index', 'unit_id'), ('spike_amplitude_uv', 'spike_time_us')) +per_sensor = readings.group_by(["sensor_id", "site_id"]) +print(per_sensor.keys()) +# (('sensor_id', 'site_id'), ('temperature', 'reading_time')) ``` -`per_unit` has one row per unit, and its `spike_time_us` list is in time order: `group_by` -orders the members of a group by the tags outside the group key, and on the full unit key -the only such tag is `timestamp`. The `timestamp` tag itself is dropped, as `group_by` drops -every tag outside the key; its copy `spike_time_us` is data and stays. `group_by(["unit_id"])` alone sorts by -`spike_extraction_hash`, subject, session, recording, probe, then `timestamp`, so time order -holds only within one session and probe; group on the full unit key. +The example table is keyed by `sensor_id`, `site_id` and `timestamp` and stores `temperature`. +`per_sensor` has one row per sensor and site. `group_by` orders the members by `timestamp`, +the only tag outside the group key. It drops the `timestamp` tag and keeps its copy as the +time-ordered `reading_time` list. Grouping by `sensor_id` alone would order the members by +`site_id` and then `timestamp`, so time order would hold only within a site. The copies are data columns, so they are part of the schema, the `content_hash` and the `pipeline_hash`; the mapping itself is part of the `content_hash` too, because two mappings can give the same schema while the copy holds different values. The `source_id` and every row's record id are the same as without the option. Compared with -`DerivedSource(spikes, tags_as_data=...)`, which reads the whole table as soon as its schema +`DerivedSource(readings, tags_as_data=...)`, which reads the whole table as soon as its schema or rows are asked for (building a job asks for the schema), the option keeps a Spiral source, whose schema is known without a scan. diff --git a/docs/concepts/streams.md b/docs/concepts/streams.md index ac7626e55..809414342 100644 --- a/docs/concepts/streams.md +++ b/docs/concepts/streams.md @@ -282,7 +282,7 @@ whatever order the rows were computed in. A stream that has only some of its row those: a source that reads a bounded number of rows (such as a `SpiralDBTableSource`) shows the rows it read, in tag order, and a stream computed only in part shows the rows computed so far in tag order. It is not "the first `n` rows in tag order" of rows it never read, and the -preview's header line says so ("10 rows read, sorted by tags, of about 63,349"). A stream +preview's header line says so ("10 rows read, sorted by tags, of about 25,000"). A stream with no tag columns previews its rows in stream order. A head of an operator is never the operator applied to the heads of its inputs: a group over diff --git a/docs/dev/design_issues/ITL-186-SP4.md b/docs/dev/design_issues/ITL-186-SP4.md index 2cf386e49..ff5c5b0ae 100644 --- a/docs/dev/design_issues/ITL-186-SP4.md +++ b/docs/dev/design_issues/ITL-186-SP4.md @@ -6,7 +6,7 @@ **Issue:** ITL-186 `SpiralDBTableSource` inherited `DBTableSource`'s constructor, which read every row and built -provenance for the whole table: about 4.6 GB for the 8,087,906-row `spike_event`. Design and +provenance for the whole table: about 4.6 GB for a table with roughly 8 million rows. Design and measurements: `docs/dev/specs/2026-11-12-itl-186-streaming-spiral-source-design.md`. **Fix:** the source is built from metadata only (schema, key columns, SpiralDB's table id) and diff --git a/docs/dev/design_issues/ITL-926-SP2.md b/docs/dev/design_issues/ITL-926-SP2.md index 02f4b62e0..165e6aacf 100644 --- a/docs/dev/design_issues/ITL-926-SP2.md +++ b/docs/dev/design_issues/ITL-926-SP2.md @@ -5,8 +5,7 @@ **Severity:** high **Issue:** ITL-926 (follow-ups: ITL-186 streaming source) -Re-verified against the EDI sample project (`edi-sample-v1-855632`, read-only) and a -disk-backed pyspiral fake (`tests/test_databases/fake_pyspiral.py`). The workshop path works: +Re-verified against a live project (read-only) and a disk-backed pyspiral fake (`tests/test_databases/fake_pyspiral.py`). The workshop path works: a `SpiralDBTableSource` with a composite key, a `Join` of two Spiral sources, a function pod, a Delta database, a re-run with no function calls, save and load, and the same hashes in a fresh process. Findings, with repro scripts, are in `docs/dev/specs/itl-926-live/FINDINGS.md`. @@ -25,13 +24,13 @@ process. Findings, with repro scripts, are in `docs/dev/specs/itl-926-live/FINDI **Open (developer decisions pending):** -* Every column of the EDI sample tables is nullable, so a function pod over them must +* Every column of the tables examined is nullable, so a function pod over them must annotate `T | None`; recorded columns arrive as `T` (SP3, ITL-936). * `fixed_size_list` columns could not be hashed with starfix 0.4.0; they are hashed since Orcapod adopted starfix 0.5.0 (ITL-910, ITL-927). `map` columns are still refused: the - source raises `ValueError` naming every refused column (none in the EDI tables). -* The whole table is read at construction, which rules out tables such as `spike_event` - (8.1M rows); the streaming design is in + source raises `ValueError` naming every refused column (none in the tables examined). +* The whole table is read at construction, which rules out tables with millions of rows. + The streaming design is in `docs/dev/specs/2026-11-11-itl-186-spiral-streaming-source-design.md`. * Record IDs are positional; key-based IDs are approved for the streaming source work (ITL-186). diff --git a/docs/dev/design_issues/ITL-936-SP3.md b/docs/dev/design_issues/ITL-936-SP3.md index ace1c4dd1..1161ccfc9 100644 --- a/docs/dev/design_issues/ITL-936-SP3.md +++ b/docs/dev/design_issues/ITL-936-SP3.md @@ -5,7 +5,7 @@ **Severity:** high **Issue:** ITL-936 -Live, pyspiral 0.16.33, scratch table in `edi-tutorial-v1-841226` (November 11, 2026): a +Live, pyspiral 0.16.33, a scratch table in a live project (November 11, 2026): a table written with `k`, `v`, struct `g` and its field `g.x`, and list `l` with its items all declared non-null reports `Schema({k=i64?, l=fixed_size_list(f32)[2]?, v=i32?, w=i32?, g={x=i32?, y=i32?}?})`: every top-level column and struct field nullable; only list items keep diff --git a/docs/dev/design_issues/ITL-939-TD1.md b/docs/dev/design_issues/ITL-939-TD1.md index e6676dcd2..778cbd031 100644 --- a/docs/dev/design_issues/ITL-939-TD1.md +++ b/docs/dev/design_issues/ITL-939-TD1.md @@ -5,8 +5,7 @@ **Severity:** medium **Issue:** ITL-939 -A name cannot be in both the tag and the data group, so a key that a pod needs as data (EDI -`session_start_datetime`, for elapsed-time arithmetic) could not reach a pod without a +A name cannot be in both the tag and the data group, so a key that a pod needs as data (a session start timestamp for elapsed-time arithmetic) could not reach a pod without a workaround, and two of the obvious workarounds (keeping the column out of `tag_columns`, or reading the table twice and joining) give silently wrong joins. The developer rejected an operator for this (an operator must not put new content into the data group) and chose a diff --git a/docs/dev/design_issues/ITL-943-DN1.md b/docs/dev/design_issues/ITL-943-DN1.md index c5c1f03ac..d1d091382 100644 --- a/docs/dev/design_issues/ITL-943-DN1.md +++ b/docs/dev/design_issues/ITL-943-DN1.md @@ -5,7 +5,7 @@ **Severity:** medium **Issue:** ITL-943 -Many value columns are nullable by specification (EDI, Spiral tables), and a pod written as +Many value columns are nullable by specification (for example, in a SpiralDB table), and a pod written as `def f(x: int)` is refused on an `int | None` column. `PolarsFilter` could drop the null rows, but the column stayed `T | None`, so the pod was still refused; a nullable key column likewise could not be joined with a non-nullable one. diff --git a/docs/dev/design_issues/ITL-996-SP5.md b/docs/dev/design_issues/ITL-996-SP5.md index c14819687..f7b5b1e78 100644 --- a/docs/dev/design_issues/ITL-996-SP5.md +++ b/docs/dev/design_issues/ITL-996-SP5.md @@ -5,7 +5,7 @@ **Severity:** medium **Issue:** ITL-996 -In the EDI tables every time series has `timestamp` in its key, so the time of a spike is a +When a keyed time series includes `timestamp` in its key, the time of a reading is a tag, and a function pod never sees tags. Copying it into data took `DerivedSource(src, tags_as_data=...)`, which reads the whole origin as soon as its schema or rows are asked for, as building a job does (7 to 8 seconds per source, measured), and is no diff --git a/docs/dev/plans/2026-06-23-pyspiral-upgrade-plt-1773.md b/docs/dev/plans/2026-06-23-pyspiral-upgrade-plt-1773.md index b23adc2ed..537927681 100644 --- a/docs/dev/plans/2026-06-23-pyspiral-upgrade-plt-1773.md +++ b/docs/dev/plans/2026-06-23-pyspiral-upgrade-plt-1773.md @@ -133,7 +133,7 @@ integration tests. Project and server URL are configurable via env vars: -- ``SPIRAL_PROJECT_ID`` (default: ``test-orcapod-362211``) +- ``SPIRAL_PROJECT_ID`` (the configured integration test project) - ``SPIRAL_SERVER_URL`` (default: ``http://api.spiraldb.dev``) Version compatibility note (PLT-1773) diff --git a/docs/dev/plans/2026-11-11-itl-926-spiral-source-reverify.md b/docs/dev/plans/2026-11-11-itl-926-spiral-source-reverify.md index 47153140b..11c5684ca 100644 --- a/docs/dev/plans/2026-11-11-itl-926-spiral-source-reverify.md +++ b/docs/dev/plans/2026-11-11-itl-926-spiral-source-reverify.md @@ -52,7 +52,7 @@ DESIGN_ISSUES entry, full suite one Python version at a time, PR. - 2026-11-11 Phase 1 done: fake (`tests/test_databases/fake_pyspiral.py`), live kit (`superpowers/specs/itl-926-live/live_verify.py` read-only + write modes, `inspect_tables.py`), findings in `superpowers/specs/itl-926-live/FINDINGS.md`. - Developer decisions so far: workshop runs read-only on `edi-sample-v1-855632`; writes only + Developer decisions so far: examples run read-only on a live project; writes only to a separate test project (being provisioned); stay on a working pyspiral; CI restore nice-to-have. Live read-only probing from this terminal was blocked by the permission classifier after one successful call. Sent the Phase 1 `ask`; waiting for decisions. diff --git a/docs/dev/plans/2026-11-11-itl-936-spiral-nullability-record.md b/docs/dev/plans/2026-11-11-itl-936-spiral-nullability-record.md index 7df6413cb..cfe6c8241 100644 --- a/docs/dev/plans/2026-11-11-itl-936-spiral-nullability-record.md +++ b/docs/dev/plans/2026-11-11-itl-936-spiral-nullability-record.md @@ -66,7 +66,7 @@ into a struct of null fields ("SpiralDB doesn't allow struct-level nullability") * A path is a list of segments: the top-level column name, then a struct field name, or `"[]"` for the item of a `list` / `large_list` / `fixed_size_list`. Segments are read against the type, so a struct field literally named `"[]"` is not ambiguous. Map interiors are not - recorded (no EDI table has maps; SpiralDB maps unverified): writing a table whose map item + recorded (the inspected tables had no maps; SpiralDB maps unverified): writing a table whose map item field is declared non-null raises rather than silently widening it. * It asserts exactly: each listed field is non-nullable (Arrow meaning: no null in its array). Every field not listed keeps whatever nullability SpiralDB reports (list items stay @@ -225,7 +225,7 @@ if read_nullability_record(table.get_metadata()) != read_nullability_record(kv): - [ ] Full suite (one Python version), ruff, basedpyright, golden hashes unchanged. - [ ] Live check script under `superpowers/specs/itl-936-live/` + exact commands for the - coordinator on `edi-tutorial-v1-841226`. + coordinator to run against a test project. - [ ] Merge origin/main, push, PR (stacked on #305), attach, worker_done. ## Notes @@ -245,7 +245,7 @@ non-null flag SpiralDB does not keep: ### Pinned hashes for an UNRECORDED table (computed at 49956a6a, before any library change) -One-row `edi-sample-a/default/subject` (`subject_id`, `sex`; written non-null, stored nullable), +One-row synthetic fixture (`subject_id`, `sex`; written non-null, stored nullable), `source_id="subject"`: * `output_schema`: `({'subject_id': str | None}, {'sex': str | None})` diff --git a/docs/dev/plans/2026-11-11-itl-939-derived-source-tags-as-data.md b/docs/dev/plans/2026-11-11-itl-939-derived-source-tags-as-data.md index c0b3c12a6..c2ebc2ced 100644 --- a/docs/dev/plans/2026-11-11-itl-939-derived-source-tags-as-data.md +++ b/docs/dev/plans/2026-11-11-itl-939-derived-source-tags-as-data.md @@ -83,7 +83,7 @@ origin is a `RootSource`), plus `_identity_config()`. `from_config` rebuilds the **Files:** Create `tests/test_core/sources/test_derived_source_tags_as_data.py` -- [x] Fixtures: EDI-shaped `session` and `experiment` Arrow tables (`session_start_datetime` +- [x] Fixtures: synthetic `session` and `experiment` Arrow tables (`session_start_datetime` `timestamp[us, tz=UTC]`, not null; `experiment_index` `uint32`), `ArrowTableSource`s. - [x] Tests: columns and schema; copy equals tag; exact Arrow field (type, not-null, nullable, logical type `Path`, field metadata); fresh provenance (system-tag names differ from the diff --git a/docs/dev/plans/2026-11-11-itl-939-tag-and-data-same-name-spike.md b/docs/dev/plans/2026-11-11-itl-939-tag-and-data-same-name-spike.md index d9e8d5e05..ab7e938cc 100644 --- a/docs/dev/plans/2026-11-11-itl-939-tag-and-data-same-name-spike.md +++ b/docs/dev/plans/2026-11-11-itl-939-tag-and-data-same-name-spike.md @@ -9,7 +9,7 @@ and as data, compares four designs, and recommends the smallest safe feature. **Architecture:** throwaway experiment scripts under `superpowers/specs/itl-939-experiments/` drive only the public API (sources, stream methods, operators, `function_pod`) on a small -EDI-shaped table (`session`, `experiment`, keys `subject_id`, `session_start_datetime`, +synthetic table (`session`, `experiment`, keys `subject_id`, `session_start_datetime`, `experiment_index`). Each script prints what it observes; the outputs are pasted into the doc. **Tech Stack:** orcapod (this repo), pyarrow, `uv run`. @@ -27,7 +27,7 @@ EDI-shaped table (`session`, `experiment`, keys `subject_id`, `session_start_dat - [x] `function_pod` whose output key equals a tag name. - [x] Run with `uv run python ...`; save stdout to `exp01_same_name_today.out`. -### Task 2: Experiment 02, today's workarounds on the EDI-shaped table +### Task 2: Experiment 02, today's workarounds on the synthetic table **Files:** Create `superpowers/specs/itl-939-experiments/exp02_workarounds_today.py` @@ -51,7 +51,7 @@ EDI-shaped table (`session`, `experiment`, keys `subject_id`, `session_start_dat hashes. - [x] Save stdout to `exp03_copy_tag_prototype.out`. -### Task 4: Need analysis from the EDI schemas +### Task 4: Need analysis from representative keyed schemas - [x] List key columns that are plausibly computation inputs; 3-5 workshop computations. diff --git a/docs/dev/plans/2026-11-12-itl-1007-public-release.md b/docs/dev/plans/2026-11-12-itl-1007-public-release.md index f3146a9fc..c73260c67 100644 --- a/docs/dev/plans/2026-11-12-itl-1007-public-release.md +++ b/docs/dev/plans/2026-11-12-itl-1007-public-release.md @@ -1,10 +1,8 @@ # ITL-1007: make the repository ready for public release from nauticalab -Scope after the developer's decisions of 2026-11-12: Spiral project ids stay as they are (they -name only the sample dataset and sit behind credentials), and anything workshop related moves -to the ediop repository. So: no id scrub, no guard test; the workshop tool, its tests and its -plan are removed (they stay in git history); URLs, workflow repository guards, `lint.yml`, -`RELEASING.md` and the agent instructions stay. +The 2026-11-12 release plan scoped identifier cleanup separately. It removed the +workshop tool, tests and plan, with the originals preserved in git history. The +repository retained its URLs, workflow guards, lint workflow and release instructions. Facts checked: nauticalab main is 61d0f18e, an ancestor of our main; nauticalab has `tests.yml`, deleted on our main by 07e5a2ea (#267), so a fast-forward push deletes it. diff --git a/docs/dev/plans/2026-11-12-itl-1023-referential-tags-slice.md b/docs/dev/plans/2026-11-12-itl-1023-referential-tags-slice.md index f82257de7..ae8ad2474 100644 --- a/docs/dev/plans/2026-11-12-itl-1023-referential-tags-slice.md +++ b/docs/dev/plans/2026-11-12-itl-1023-referential-tags-slice.md @@ -79,7 +79,7 @@ keeps chosen tags plain, exactly v0.3. Hash terms enter only when a reference ex ## Tasks (in the order of the brief; keep every step green; push after each) -### Task 0: failing end-to-end EDI-shaped test +### Task 0: failing end-to-end synthetic test - [ ] `tests/test_core/referential_tags/test_edi_end_to_end.py`: spikes (k1..k5, spike_time, amplitude) and gaze (k1..k5, gaze_time, gx) as `DictSource` with tag_columns keys + time (referential by default); `trials` keyed on (k1, k2) with explicit `tag_only_columns`; @@ -142,7 +142,7 @@ keeps chosen tags plain, exactly v0.3. Hash terms enter only when a reference ex - 2026-11-12: developer: option is `tag_only_columns`; references become plain tags at a pod boundary. - Task 0 done: fc22de6a, draft PR #342. - 2026-11-12: Tasks 1-8 implemented (02b62358, c3c5e995, c42eece8, 853da828). Developer rename - rule implemented (map_tags both roles, tag_only=True, map_data data-only). EDI test uses + rule implemented (map_tags both roles, tag_only=True, map_data data-only). The synthetic test uses `timestamp` in both series. Existing tests pinned to `tag_only_columns=True` (79 files, 569 call sites). Remaining: full suite on 3.11/3.12/3.13, basedpyright, final report. - 2026-11-13: fall-through (ReferenceFallThroughPod) per developer ruling; format 0.3.0 with diff --git a/docs/dev/plans/2026-11-12-itl-186-notebook-preview.md b/docs/dev/plans/2026-11-12-itl-186-notebook-preview.md index d05f90197..76dc0bddc 100644 --- a/docs/dev/plans/2026-11-12-itl-186-notebook-preview.md +++ b/docs/dev/plans/2026-11-12-itl-186-notebook-preview.md @@ -39,9 +39,9 @@ manifest row count only when the head is not the whole read. A private class swi | Case | Header after `SpiralDBTableSource[