Skip to content

test(storage): exercise pipeline store conformance (ITL-1446) - #541

Closed
eywalker wants to merge 2 commits into
mainfrom
eywalker/itl-1446-spiral-store-conformance
Closed

eywalker wants to merge 2 commits into
mainfrom
eywalker/itl-1446-spiral-store-conformance

Conversation

@eywalker

Copy link
Copy Markdown
Contributor

Scope

Part 2 of ITL-1446. Run pipeline tests over Delta, in-memory, SQLite and disk-backed fake SpiralDB. The database type and append-refusal suites use the same store factory. The change is tests-only plus the changelog fragment.

The store-protocol tests exercise batched publication and failed-result cleanup on all four backends, with both a shared store and separate stores. Operator-only jobs without stored caches run and can reload with a caller-supplied store. The cache tests retain the real storage schema and expose where graph construction or cache attachment stops before the behavior under test.

Strict expected failures

Cause Cases Count
TODO-ITL · SpiralDB reserves the __ prefix on value columns Function result, side-effect completion, operator LOG/REPLAY and CachedSource cases. Graph construction, cache attachment or cache setup is refused before a write. 84
TODO-ITL · SQLite lacks an Arrow list-of-structs mapping for __pf_exec_executor_info Function pipeline cases stop at graph construction, before a write. 61
TODO-ITL · Connector record paths can map to the same table test_distinct_record_paths_keep_distinct_rows on SQLite and SpiralDB. 2
TODO-ITL · PipelineJob.load does not reconstruct a saved connector database (ITL-1391) test_job_load_restores_the_saved_database on SQLite and SpiralDB. The test first checks explicit database injection. 2

ITL-1381 did not reproduce on this base, including the existing test double that returns the committed key as NOT NULL. ITL-1408 supplies the separate-result-store API and ITL-1412 supplies the commit guards exercised here.

Case inventory by cause

Distinct record paths sanitize to the same connector table name.

Suite Cases
test_connector_store_conformance test_distinct_record_paths_keep_distinct_rows[sqlite]
test_distinct_record_paths_keep_distinct_rows[spiral]

PipelineJob.load cannot reconstruct a saved connector database (ITL-1391).

Suite Cases
test_connector_store_conformance test_job_load_restores_the_saved_database[sqlite]
test_job_load_restores_the_saved_database[spiral]

SQLite cannot store the function executor's list of structs.

Suite Cases
test_job_run_summary test_some_rows_fail[sync-sqlite]
test_some_rows_fail[async-sqlite]
test_every_row_fails[sync-sqlite]
test_every_row_fails[async-sqlite]
test_clean_run_is_quiet[sync-sqlite]
test_clean_run_is_quiet[async-sqlite]
test_rerun_counts_rows_from_the_store[sync-sqlite]
test_rerun_counts_rows_from_the_store[async-sqlite]
test_a_new_function_version_computes_again[sync-sqlite]
test_a_new_function_version_computes_again[async-sqlite]
test_fail_fast_still_raises[sqlite]
test_run_async_returns_the_same_summary[sqlite]
test_sync_async_stored_records test_async_stores_the_records_a_sync_run_stores[sqlite-automatic_select-mixed]
test_async_stores_the_records_a_sync_run_stores[sqlite-automatic_select-reordered]
test_async_stores_the_records_a_sync_run_stores[sqlite-explicit_select-mixed]
test_async_stores_the_records_a_sync_run_stores[sqlite-explicit_select-reordered]
test_async_stores_the_records_a_sync_run_stores[sqlite-explicit_drop-mixed]
test_async_stores_the_records_a_sync_run_stores[sqlite-explicit_drop-reordered]
test_load_only_run test_a_load_only_run_over_a_full_store_equals_a_run_and_computes_nothing[sqlite-sync]
test_a_load_only_run_over_a_full_store_equals_a_run_and_computes_nothing[sqlite-async]
test_inputs_without_a_stored_result_are_skipped_and_counted[sqlite-sync]
test_inputs_without_a_stored_result_are_skipped_and_counted[sqlite-async]
test_a_load_only_run_over_an_empty_store_fills_nothing_and_writes_nothing[sqlite-sync]
test_a_load_only_run_over_an_empty_store_fills_nothing_and_writes_nothing[sqlite-async]
test_a_load_only_run_delivers_no_side_effect_and_passes_the_rows_on[sqlite-sync]
test_a_load_only_run_delivers_no_side_effect_and_passes_the_rows_on[sqlite-async]
test_a_log_operator_writes_nothing_in_a_load_only_run[sqlite-sync]
test_a_log_operator_writes_nothing_in_a_load_only_run[sqlite-async]
test_run_async_takes_load_only[sqlite]
test_result_database TestSharing::test_a_second_job_computes_nothing_the_first_stored[sync-sqlite-names0]
TestSharing::test_a_second_job_computes_nothing_the_first_stored[sync-sqlite-names1]
TestSharing::test_a_second_job_computes_nothing_the_first_stored[async-sqlite-names0]
TestSharing::test_a_second_job_computes_nothing_the_first_stored[async-sqlite-names1]
TestSharing::test_only_inputs_not_stored_are_computed[sync-sqlite]
TestSharing::test_only_inputs_not_stored_are_computed[async-sqlite]
TestSideEffectingFunctions::test_only_inputs_no_job_delivered_are_delivered[sync-sqlite]
TestSideEffectingFunctions::test_only_inputs_no_job_delivered_are_delivered[async-sqlite]
test_provenance test_trace_reaches_every_source_cell[sqlite-False-sync]
test_trace_reaches_every_source_cell[sqlite-False-async]
test_trace_reaches_every_source_cell[sqlite-True-sync]
test_trace_reaches_every_source_cell[sqlite-True-async]
test_job_batched_commits test_records_read_right_after_the_run_are_complete[sqlite-s-sync]
test_records_read_right_after_the_run_are_complete[sqlite-s-async]
test_records_read_right_after_the_run_are_complete[sqlite-None-sync]
test_records_read_right_after_the_run_are_complete[sqlite-None-async]
test_loaded_operator_cache test_every_node_keeps_its_identity_and_schema_through_save_and_load[sqlite-non_null]
test_every_node_keeps_its_identity_and_schema_through_save_and_load[sqlite-nullable_tag]
test_every_node_keeps_its_identity_and_schema_through_save_and_load[sqlite-nullable_data]
test_every_node_keeps_its_identity_and_schema_through_save_and_load[sqlite-nullable_tag_and_data]
test_loaded_replay_operator_reads_the_rows_its_run_stored[sqlite-non_null-as_table]
test_loaded_replay_operator_reads_the_rows_its_run_stored[sqlite-non_null-iter_data]
test_loaded_replay_operator_reads_the_rows_its_run_stored[sqlite-non_null-head]
test_loaded_replay_operator_reads_the_rows_its_run_stored[sqlite-nullable_tag-as_table]
test_loaded_replay_operator_reads_the_rows_its_run_stored[sqlite-nullable_tag-iter_data]
test_loaded_replay_operator_reads_the_rows_its_run_stored[sqlite-nullable_tag-head]
test_loaded_replay_operator_reads_the_rows_its_run_stored[sqlite-nullable_data-as_table]
test_loaded_replay_operator_reads_the_rows_its_run_stored[sqlite-nullable_data-iter_data]
test_loaded_replay_operator_reads_the_rows_its_run_stored[sqlite-nullable_data-head]
test_loaded_replay_operator_reads_the_rows_its_run_stored[sqlite-nullable_tag_and_data-as_table]
test_loaded_replay_operator_reads_the_rows_its_run_stored[sqlite-nullable_tag_and_data-iter_data]
test_loaded_replay_operator_reads_the_rows_its_run_stored[sqlite-nullable_tag_and_data-head]

SpiralDB reserves the '__' prefix on value columns.

Suite Cases
test_job_run_summary test_some_rows_fail[sync-spiral]
test_some_rows_fail[async-spiral]
test_every_row_fails[sync-spiral]
test_every_row_fails[async-spiral]
test_clean_run_is_quiet[sync-spiral]
test_clean_run_is_quiet[async-spiral]
test_rerun_counts_rows_from_the_store[sync-spiral]
test_rerun_counts_rows_from_the_store[async-spiral]
test_a_new_function_version_computes_again[sync-spiral]
test_a_new_function_version_computes_again[async-spiral]
test_fail_fast_still_raises[spiral]
test_run_async_returns_the_same_summary[spiral]
test_sync_async_stored_records test_async_stores_the_records_a_sync_run_stores[spiral-automatic_select-mixed]
test_async_stores_the_records_a_sync_run_stores[spiral-automatic_select-reordered]
test_async_stores_the_records_a_sync_run_stores[spiral-explicit_select-mixed]
test_async_stores_the_records_a_sync_run_stores[spiral-explicit_select-reordered]
test_async_stores_the_records_a_sync_run_stores[spiral-explicit_drop-mixed]
test_async_stores_the_records_a_sync_run_stores[spiral-explicit_drop-reordered]
test_load_only_run test_a_load_only_run_over_a_full_store_equals_a_run_and_computes_nothing[spiral-sync]
test_a_load_only_run_over_a_full_store_equals_a_run_and_computes_nothing[spiral-async]
test_inputs_without_a_stored_result_are_skipped_and_counted[spiral-sync]
test_inputs_without_a_stored_result_are_skipped_and_counted[spiral-async]
test_a_load_only_run_over_an_empty_store_fills_nothing_and_writes_nothing[spiral-sync]
test_a_load_only_run_over_an_empty_store_fills_nothing_and_writes_nothing[spiral-async]
test_a_load_only_run_delivers_no_side_effect_and_passes_the_rows_on[spiral-sync]
test_a_load_only_run_delivers_no_side_effect_and_passes_the_rows_on[spiral-async]
test_a_log_operator_writes_nothing_in_a_load_only_run[spiral-sync]
test_a_log_operator_writes_nothing_in_a_load_only_run[spiral-async]
test_run_async_takes_load_only[spiral]
test_result_database TestSharing::test_a_second_job_computes_nothing_the_first_stored[sync-spiral-names0]
TestSharing::test_a_second_job_computes_nothing_the_first_stored[sync-spiral-names1]
TestSharing::test_a_second_job_computes_nothing_the_first_stored[async-spiral-names0]
TestSharing::test_a_second_job_computes_nothing_the_first_stored[async-spiral-names1]
TestSharing::test_only_inputs_not_stored_are_computed[sync-spiral]
TestSharing::test_only_inputs_not_stored_are_computed[async-spiral]
TestSideEffectingFunctions::test_only_inputs_no_job_delivered_are_delivered[sync-spiral]
TestSideEffectingFunctions::test_only_inputs_no_job_delivered_are_delivered[async-spiral]
test_provenance test_trace_reaches_every_source_cell[spiral-False-sync]
test_trace_reaches_every_source_cell[spiral-False-async]
test_trace_reaches_every_source_cell[spiral-True-sync]
test_trace_reaches_every_source_cell[spiral-True-async]
test_job_batched_commits test_records_read_right_after_the_run_are_complete[spiral-s-sync]
test_records_read_right_after_the_run_are_complete[spiral-s-async]
test_records_read_right_after_the_run_are_complete[spiral-None-sync]
test_records_read_right_after_the_run_are_complete[spiral-None-async]
test_loaded_operator_cache test_every_node_keeps_its_identity_and_schema_through_save_and_load[spiral-non_null]
test_every_node_keeps_its_identity_and_schema_through_save_and_load[spiral-nullable_tag]
test_every_node_keeps_its_identity_and_schema_through_save_and_load[spiral-nullable_data]
test_every_node_keeps_its_identity_and_schema_through_save_and_load[spiral-nullable_tag_and_data]
test_loaded_replay_operator_reads_the_rows_its_run_stored[spiral-non_null-as_table]
test_loaded_replay_operator_reads_the_rows_its_run_stored[spiral-non_null-iter_data]
test_loaded_replay_operator_reads_the_rows_its_run_stored[spiral-non_null-head]
test_loaded_replay_operator_reads_the_rows_its_run_stored[spiral-nullable_tag-as_table]
test_loaded_replay_operator_reads_the_rows_its_run_stored[spiral-nullable_tag-iter_data]
test_loaded_replay_operator_reads_the_rows_its_run_stored[spiral-nullable_tag-head]
test_loaded_replay_operator_reads_the_rows_its_run_stored[spiral-nullable_data-as_table]
test_loaded_replay_operator_reads_the_rows_its_run_stored[spiral-nullable_data-iter_data]
test_loaded_replay_operator_reads_the_rows_its_run_stored[spiral-nullable_data-head]
test_loaded_replay_operator_reads_the_rows_its_run_stored[spiral-nullable_tag_and_data-as_table]
test_loaded_replay_operator_reads_the_rows_its_run_stored[spiral-nullable_tag_and_data-iter_data]
test_loaded_replay_operator_reads_the_rows_its_run_stored[spiral-nullable_tag_and_data-head]
test_a_pipeline_loaded_and_bound_to_its_sources_reuses_the_operator_cache[spiral-non_null]
test_a_pipeline_loaded_and_bound_to_its_sources_reuses_the_operator_cache[spiral-nullable_tag]
test_a_pipeline_loaded_and_bound_to_its_sources_reuses_the_operator_cache[spiral-nullable_data]
test_a_pipeline_loaded_and_bound_to_its_sources_reuses_the_operator_cache[spiral-nullable_tag_and_data]
test_cached_source TestCachedSourceStreaming::test_as_table_matches_source[spiral]
TestCachedSourceStreaming::test_iter_data_count[spiral]
TestCachedSourceStreaming::test_iter_data_tags_and_data[spiral]
TestCachedSourceStreaming::test_system_tags_preserved[spiral]
TestCachedSourceStreaming::test_source_info_preserved[spiral]
TestCachedSourceKeyPolicy::test_one_source_id_two_key_policies_get_separate_caches[spiral]
TestCachedSourceCumulative::test_dedup_on_same_data[spiral]
TestCachedSourceCumulative::test_clear_cache_rebuilds[spiral]
TestCachedSourceCumulative::test_source_modified_time_triggers_rebuild[spiral]
TestCachedSourceCumulative::test_cumulative_across_runs[spiral]
TestCachedSourceIntegration::test_join_with_cached_source[spiral]
TestCachedSourceIntegration::test_function_pod_with_cached_source[spiral]
TestCachedSourceWithSourceProxy::test_serves_cached_data_when_inner_source_unrecoverable[spiral]
TestCachedSourceWithSourceProxy::test_inner_source_is_source_proxy[spiral]
TestCachedSourceWithSourceProxy::test_identity_preserved_with_proxy[spiral]
TestCachedSourceWithSourceProxy::test_empty_cache_returns_empty_stream[spiral]
TestCachedConvenienceMethod::test_cached_returns_cached_source[spiral]
TestCachedConvenienceMethod::test_cached_with_path_prefix[spiral]
TestCachedConvenienceMethod::test_cached_data_matches_source[spiral]

Fake fidelity and live follow-up

Compared the fake with the installed pyspiral 0.16.33 client docstrings and the repository's existing live-suite observations.

Surface Where the fake accepts more or fails to model the service
Project and table creation Any local project is usable without authentication, permissions, routing, or API-side identifier/key-schema validation. root_uri and transaction options are ignored. drop_table succeeds for an absent table. The live identifier length and key-type limits remain to be measured.
Writes and metadata Duplicate keys within one transaction are left unvalidated. The client documents that such writes have undefined behavior. The fake rewrites local files and lacks transactional visibility, server conflict handling and remote failures. Metadata limits and upsert semantics are modeled, but the metadata race is not.
Scans and batches asof is accepted and ignored. The fake materializes the file ahead of filtering and slicing, so limit verifies returned rows but not bounded reads. It ignores batch options, including the documented view-type toggle. Its local batch partitioning and binary representation are approximations.
Raw type handling It preserves input struct-child order, while a live write can reorder children. It checks and pushes down struct-level nulls only in top-level struct columns. Nested coercions, dictionary decoding and raw extension handling are approximations. The fake also refuses changes to a raw table's column set which the service can accept.

Source inspection confirmed point lookups can use a pending row directly, while committed reads materialize the table. skip_existing scans the table and filters Python keys. Plain upsert overwrites by key and the writers have no coordination. The connector derives the recorded value schema from the first write. The test for colliding path names reproduces the sanitization ambiguity.

Verification

  • Targeted serial suite with the locked dependencies. An equivalent pipeline/type selection on main took 24.98 s and the expanded selection took 26.64 s locally. This is a local measure of the added test cost, about 1.7 s.
  • Ruff check and format clean, whole-repo basedpyright reports 0 errors, golden hashes and changelog check pass.
  • The existing live suite and full CI suite were left to their usual runners.

@coderabbitai

coderabbitai Bot commented Nov 24, 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

@eywalker

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

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

@coderabbitai

coderabbitai Bot commented Nov 24, 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.

@codecov

codecov Bot commented Nov 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
see 5 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). Superseded by the conformance tests of the writable SpiralDB database in #692 and #693. 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