Skip to content

fix(side-effects): mark side-effect and context-taking pods provisional in 0.4.0 - #651

Merged
eywalker merged 7 commits into
mainfrom
eywalker/itl-555-side-effect-pod-provisional
Nov 29, 2026
Merged

eywalker merged 7 commits into
mainfrom
eywalker/itl-555-side-effect-pod-provisional

Conversation

@eywalker

@eywalker eywalker commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Fixes ITL-555

SideEffectPod, its decorators, and function pods configured with ctx_arg are provisional
in 0.4.0. Each kind issues one ProvisionalHashWarning per process on construction or
when restored from a saved job or blueprint. The golden guard requires cases that
depend on either kind to declare it provisional.

The 0.4.0 freeze excludes each provisional pod's identity, firing rule, stored tables,
and downstream hashes. Ordinary function pods retain the 0.4.0 freeze. The sync and
async comparisons against origin/main matched for calls, hashes, output rows, and
stored schemas and paths.

ITL-947 tracks the shared design for firing levels, per-arrival delivery status,
coordination, and a dedicated table arrangement for context-taking functions.
ITL-1682 is related and remains open.

Verification

  • Targeted pytest run including side-effect pods, provisional features, golden hashes, hash inventory, documentation samples, and site content
  • Golden generator, design issues, and changelog checks
  • Ruff lint and format checks and basedpyright
  • Context-taking function pod warning routes, golden guard, and sync/async comparisons against origin/main
  • All 105 registered golden cases were evaluated with provisional-use recording. No case used a context-taking function pod, and the golden check matched all seven frozen files.

Independent review classification

Reproduced against origin/main (a958449a) and the reviewed PR head (e796c719).

Finding Classification Evidence
Saved jobs and blueprints bypass the provisional warning INCOMPLETE PipelineJob.load and Pipeline.load each restore nodes from their own unmodified saved files with zero warnings on both refs. The PR promises a warning for every construction route, including restoration.
Golden cases can freeze hashes from restored sinks INCOMPLETE A case loading a saved job and returning the sink's pipeline hash is accepted undeclared as frozen on both refs. The hash agrees between refs. The reviewed head already refuses an undeclared case that builds its sink directly.

Found in review, present on main, not addressed here

  • PRE-EXISTING: Wrap an async def delivery with sink_pod and call await job.run_async(). Both refs report that the coroutine was never awaited and deliver no rows.
  • PRE-EXISTING: Call function_pod(output_keys="y", ctx_arg_name="ctx")(fn). Both refs raise TypeError because PythonDataFunction.__init__ rejects ctx_arg_name.

The other review checks confirmed the intended behavior for live jobs, direct construction, the marker and registry, and the documentation.

Review finding → regression test

Finding Regression test Coverage
Saved jobs and blueprints bypass the provisional warning test_loading_side_effect_nodes_shares_the_pod_construction_warning Starts with each public loader in turn and checks that subsequent loads and live construction share the one warning.
Golden cases can freeze hashes from restored sinks test_a_case_loading_a_sink_requires_a_provisional_declaration Loads a saved job and blueprint in separate cases, refuses both without a declaration, and checks that declaring SideEffectPod preserves the saved hash in the provisional set.

All four new cases failed before the fix. The sync and async live-job probes matched main for deliveries, returned rows, table paths, schemas, stable stored values, and content and pipeline hashes.

Removed the redundant category-wide filter from the direct-construction golden test. The repository's existing pytest warning policy still applies.

Summary by CodeRabbit

  • Documentation
    • Marked SideEffectPod and function pods using invocation context as provisional in version 0.4.0. Their identities, execution or delivery behavior, and storage layouts may change; stored data may move, and an upgrade may repeat a delivery or side effect once.
    • Clarified hash guarantees, warning conditions, and golden-case declarations for provisional pods. Ordinary function pods remain covered by the 0.4.0 freeze.
    • Updated API references, tutorials, and troubleshooting guidance with these provisional-status warnings.
  • Runtime Warnings
    • Provisional-hash warnings are issued when affected pods are constructed or restored from saved jobs and pipelines.

@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The change marks SideEffectPod and function pods configured with ctx_arg as provisional in version 0.4.0. It adds warnings and golden-hash tracking for these pod types. Documentation describes their provisional scope, possible storage changes, and the possibility of one repeated delivery or side effect after an upgrade.

Changes: Side-Effect Pod Provisional Status

Layer / File(s) Summary
Pod classification, warning, and use tracking
src/orcapod/core/provisional_pods.py, src/orcapod/core/data_function.py, src/orcapod/core/function_pod.py, src/orcapod/core/nodes/function_node.py, src/orcapod/side_effects.py, src/orcapod/pipeline/loaded_side_effects.py, src/orcapod/errors.py, src/orcapod/utils/provisional.py, tests/test_core/function_pod/*, tests/test_core/operators/test_provisional_operators.py, tests/test_core/side_effect_function/*, tests/test_pipeline/*
SideEffectPod and context-argument function pods use provisional warnings and use tracking. Construction and saved-graph loading are covered, and tests check warning behavior and ordinary function pods.
Golden-hash declaration and freeze rules
.zed/rules, CLAUDE.md, docs/reference/golden-hashes.md, docs/reference/hashing.md, tests/test_hashing/golden/*
Golden-hash guidance and tests include provisional pods. Cases that use these pods must declare them, and the resulting hashes are marked provisional.
Release and API guidance
changelog.d/ITL-555.md, docs/api/*, docs/concepts/*, docs/dev/design_issues/*, docs/reference/data-function-types.md, docs/troubleshooting.md, docs/tutorial/*
Release notes and documentation describe the provisional status, possible identity, firing, delivery, and storage changes, and the possibility of one repeated delivery or side effect after an upgrade.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Possibly related PRs

Merge Risk: Minimal · up to 607b9

This change marks side-effect pods and context-taking function pods as provisional in 0.4.0, adding one-time warnings and documentation of possible upgrade effects. No concrete merge-blocking risk was found in the supplied evidence.

Security architecture risk: Low · up to 607b9

The narrowed compatibility guarantee does not itself move stored results or rerun side effects. The immediate upgrade risk is that applications treating warnings as errors can no longer open an otherwise compatible saved job or blueprint containing either newly provisional pod kind without adjusting that warning policy.

Retained concerns

  • Low · reliability · observed: With a warning policy that promotes ProvisionalHashWarning to an exception, restoring either newly provisional pod kind can abort the entire saved job or blueprint load, blocking access to otherwise readable results, including those of unrelated nodes in the same job. The base did not emit these pod warnings on restore. Retrying under the same policy does not recover because a raised warning is not marked as issued.
Security review details

Trust Boundaries and Controls

  • observed — Saved descriptor types select the new informational warning through existing restore branches. The warning adds no callback binding or execution authority: restored function blueprints still receive no function pod, and restored side-effect nodes still have no live producer.
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 two main changes in the changeset: marking SideEffectPod and its decorators, and function pods configured with ctx_arg, as provisional for 0.4.0. The changeset implements this acro…
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 two main changes in the changeset: marking SideEffectPod and its decorators, and function pods configured with ctx_arg, as provisional for 0.4.0. The changeset implements this across src/orcapod/side_effects.py, src/orcapod/core/provisional_pods.py, function_pod.py, errors.py, the golden-hash tests, and the docs. The title is concise and specific. The fix() prefix fits the added warnings and restore-path corrections.

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

Usage-based review receipt

Note

This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 6c5f7cc and 607b93c.

Files selected for processing: 30

  • .zed/rules
  • CLAUDE.md
  • changelog.d/ITL-555.md
  • docs/api/function-pods.md
  • docs/concepts/arrays.md
  • docs/concepts/function-pods.md
  • docs/concepts/pipeline-job.md
  • docs/concepts/sources.md
  • docs/dev/design_issues/ITL-555-SE3.md
  • docs/dev/design_issues/ITL-947-SL4.md
  • docs/reference/data-function-types.md
  • docs/reference/golden-hashes.md
  • docs/reference/hashing.md
  • src/orcapod/core/data_function.py
  • src/orcapod/core/function_pod.py
  • src/orcapod/core/nodes/function_node.py
  • src/orcapod/core/provisional_pods.py
  • src/orcapod/errors.py
  • src/orcapod/pipeline/loaded_side_effects.py
  • src/orcapod/side_effects.py
  • src/orcapod/utils/provisional.py
  • tests/test_core/function_pod/test_function_pod_ctx_arg.py
  • tests/test_core/function_pod/test_provisional_context_function.py
  • tests/test_core/operators/test_provisional_operators.py
  • tests/test_core/side_effect_function/test_side_effect_function_pod.py
  • tests/test_hashing/golden/cases.py
  • tests/test_hashing/golden/generate_golden_hashes.py
  • tests/test_hashing/golden/test_golden_store.py
  • tests/test_pipeline/loaded_job/test_loaded_side_effect_nodes.py
  • tests/test_pipeline/test_function_pod_concurrency.py
Files skipped from review as they are similar to previous changes: 3

  • src/orcapod/errors.py
  • src/orcapod/utils/provisional.py
  • tests/test_hashing/golden/generate_golden_hashes.py

Limit details: You’ve used the included review currently available. Your 99 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Recent review details

Context from checks skipped due to timeout: 1

  • GitHub Check: CodeRabbit
Additional context used

Code guidelines: 1

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

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/concepts/function-pods.md
  • docs/concepts/pipeline-job.md
  • docs/reference/data-function-types.md
  • docs/reference/golden-hashes.md
  • docs/reference/hashing.md
  • docs/concepts/arrays.md
  • docs/concepts/sources.md
Source excerpt: A failing golden entry means a hash moved.

CodeRabbit inference engine (CLAUDE.md)

Files:

  • tests/test_hashing/golden/cases.py
  • tests/test_hashing/golden/test_golden_store.py
Source excerpt: Never move or rename the fixtures in `tests/test_hashing/golden/cases.py`: function pods, dataclasses and pydantic models hash with their module path.

CodeRabbit inference engine (CLAUDE.md)

Files:

  • tests/test_hashing/golden/cases.py
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: The API reference is generated from the source by `scripts/docs_site_api.py` (griffe).

CodeRabbit inference engine (CLAUDE.md)

Files:

  • docs/api/function-pods.md
Source excerpt: 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/data_function.py
  • src/orcapod/core/function_pod.py
  • src/orcapod/core/nodes/function_node.py
  • src/orcapod/core/provisional_pods.py
  • src/orcapod/pipeline/loaded_side_effects.py
  • src/orcapod/side_effects.py
  • tests/test_core/function_pod/test_function_pod_ctx_arg.py
  • tests/test_core/function_pod/test_provisional_context_function.py
  • tests/test_core/operators/test_provisional_operators.py
  • tests/test_core/side_effect_function/test_side_effect_function_pod.py
  • tests/test_hashing/golden/cases.py
  • tests/test_hashing/golden/test_golden_store.py
  • tests/test_pipeline/loaded_job/test_loaded_side_effect_nodes.py
  • tests/test_pipeline/test_function_pod_concurrency.py
Learnings: 1

Common learnings

Learnt from: CR
Repo: metamorphic-labs/orcapod-python

Timestamp: 2026-11-29T01:53:27.771Z
Learning: Source excerpt:
# Claude Code instructions for orcapod-python

## Changelog

A pull request never edits `CHANGELOG.md` (developer, November 11, 2026; ITL-961). It adds
exactly one file, `changelog.d/<ISSUE-ID>.md` (e.g. `changelog.d/ITL-955.md`; a PR that
resolves several issues uses its primary issue's id).
ast-grep (0.51.3)

tests/test_core/function_pod/test_provisional_context_function.py

[error] 138-147: Command coming from incoming request
Context: subprocess.run(
[
sys.executable,
"-c",
"import warnings; warnings.simplefilter('error'); import orcapod",
],
capture_output=True,
text=True,
check=False,
)
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(subprocess-from-request)

LanguageTool

changelog.d/ITL-555.md

[grammar] ~7-~7: Use a hyphen to join words.
Context: ...ue a ProvisionalHashWarning once per process on construction or when loaded f...

(QB_NEW_EN_HYPHEN)

docs/concepts/function-pods.md

[style] ~1050-~1050: Using many exclamation marks might seem excessive (in this case: 6 exclamation marks for a text that’s 934 characters long)
Context: ...b: delivered by a run, never by a read !!! warning "Provisional" In 0.4.0, `Si...

(EN_EXCESSIVE_EXCLAMATION)

docs/concepts/pipeline-job.md

[style] ~209-~209: Using many exclamation marks might seem excessive (in this case: 6 exclamation marks for a text that’s 1114 characters long)
Context: ...be repeated once after an upgrade. !!! warning "Provisional" In 0.4.0, fun...

(EN_EXCESSIVE_EXCLAMATION)

docs/dev/design_issues/ITL-555-SE3.md

[style] ~11-~11: Some style guides suggest that commas should set off the year in a month-day-year date.
Context: ...gn is ready. Fix: The November 28, 2026 decision (SE1) keeps the entire pod and...

(MISSING_COMMA_AFTER_YEAR)

docs/reference/data-function-types.md

[style] ~20-~20: Using many exclamation marks might seem excessive (in this case: 3 exclamation marks for a text that’s 329 characters long)
Context: !!! warning "Provisional" In 0.4.0, fun...

(EN_EXCESSIVE_EXCLAMATION)

docs/reference/golden-hashes.md

[style] ~49-~49: Using many exclamation marks might seem excessive (in this case: 6 exclamation marks for a text that’s 786 characters long)
Context: ...lare provisional=("SideEffectPod",). !!! warning "Provisional" In 0.4.0, fun...

(EN_EXCESSIVE_EXCLAMATION)

docs/reference/hashing.md

[style] ~1467-~1467: Using many exclamation marks might seem excessive (in this case: 6 exclamation marks for a text that’s 2145 characters long)
Context: ...be repeated once after an upgrade. !!! warning "Provisional" In 0.4.0, fun...

(EN_EXCESSIVE_EXCLAMATION)

docs/api/function-pods.md

[style] ~17-~17: Using many exclamation marks might seem excessive (in this case: 6 exclamation marks for a text that’s 627 characters long)
Context: ...be repeated once after an upgrade. !!! warning "Provisional" In 0.4.0, fun...

(EN_EXCESSIVE_EXCLAMATION)

docs/concepts/arrays.md

[style] ~51-~51: Using many exclamation marks might seem excessive (in this case: 6 exclamation marks for a text that’s 627 characters long)
Context: ...be repeated once after an upgrade. !!! warning "Provisional" In 0.4.0, fun...

(EN_EXCESSIVE_EXCLAMATION)

docs/concepts/sources.md

[style] ~1123-~1123: Using many exclamation marks might seem excessive (in this case: 3 exclamation marks for a text that’s 296 characters long)
Context: !!! warning "Provisional" In 0.4.0, `Si...

(EN_EXCESSIVE_EXCLAMATION)

@eywalker eywalker changed the title fix(side-effects): mark SideEffectPod provisional in 0.4.0 fix(side-effects): mark side-effect and context-taking pods provisional in 0.4.0 Nov 29, 2026
@eywalker

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

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

@coderabbitai

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

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