Skip to content

Show diagrams and previews for read-only loaded jobs - #716

Merged
eywalker merged 5 commits into
mainfrom
eywalker/itl-1988-read-only-loaded-job-sourceonlypipelinejob
Dec 5, 2026
Merged

eywalker merged 5 commits into
mainfrom
eywalker/itl-1988-read-only-loaded-job-sourceonlypipelinejob

Conversation

@eywalker

@eywalker eywalker commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Fixes ITL-1988

Read-only loaded jobs render their saved graph with the existing pipeline diagram. The node panel shows saved schemas and whether a stored-result reader is configured. The job, node mapping, and stored sources have readable text representations. Stored sources use the existing head() preview for ordinary columns. Sources with logical columns show the saved schema and let users request a preview explicitly with head().

Coverage Regression test
Saved labels, edges, schemas, highlights, and layout in both directions and collapse modes test_read_only_diagram_matches_the_loaded_graph
No I/O or execution during diagram creation, notebook rendering, or text representation test_read_only_diagram_display_computes_nothing
Schema and reader configuration in the selected node's details test_selecting_a_saved_node_shows_its_schema_and_availability
Stored-source notebook previews follow head() rules test_stored_node_source_display_uses_head
Documented output matches the runnable examples test_doc_page_samples_run[docs/concepts/pipeline-job.md]

Review fixes

Finding Regression test
Saved logical-type displays accessed user-class attributes test_schema_display_runs_no_user_type_hooks
Recoverable CSV bindings lost source details and layout in the read-only diagram test_recoverable_csv_sources_match_loaded_job
Default read-only geometry differed from normally loaded geometry test_default_diagrams_have_the_same_geometry
An empty result store was described as having results available test_availability_does_not_claim_rows_in_an_empty_store
Read-only operator display names invoked a registered metaclass property test_registered_operator_class_descriptor_does_not_run_during_display
Read-only source display names invoked a registered metaclass property test_registered_source_class_descriptor_does_not_run_during_display
Ordinary diagram construction swallowed schema formatter errors test_normal_job_diagram_preserves_schema_formatter_errors
Read-only collapse classification invoked an unrelated registered operator's metaclass test_collapse_does_not_visit_other_operator_metaclasses
Ordinary diagrams ignored operator names supplied by a metaclass test_ordinary_diagram_keeps_operator_metaclass_name
Read-only stored-source repr, str, and HTML metadata could invoke a registered source metaclass after ABC cache invalidation test_saved_source_display_never_visits_registered_source_classes

All 406 targeted tests passed. Ordinary diagram output and stored-source displays matched main in the parity checks. Ruff lint and format, basedpyright, and the changelog check passed.

Existing row-preview behavior

On main, head() and the notebook row preview for a stored source obtained with PipelineJob.load(...).nodes[label].as_source() can invoke registered source metaclass hooks after ABC cache invalidation. This remains a separate follow-up, ITL-1990; the decision is not to address it in this PR. The new regression exercises the read-only metadata header independently of the existing row preview.

Summary by CodeRabbit

  • New Features
    • Read-only saved pipeline jobs now display a text summary and graph diagram, including node types and whether stored results are available.
    • Inspect stored sources with their saved schema and, where available, a row preview.
    • Saved-job diagrams use stored metadata, while reading results checks for matching rows.
  • Documentation
    • Expanded the pipeline-job guide with examples of inspecting read-only jobs, nodes, schemas, and graph diagrams.

@coderabbitai

coderabbitai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 8089f8c and f6b2b19.

Files selected for processing: 10

  • changelog.d/ITL-1988.md
  • docs/concepts/pipeline-job.md
  • src/orcapod/core/sources/derived_source.py
  • src/orcapod/core/sources/display_names.py
  • src/orcapod/pipeline/diagram.py
  • src/orcapod/pipeline/job.py
  • src/orcapod/pipeline/serialization.py
  • src/orcapod/pipeline/source_only_job.py
  • tests/test_pipeline/loaded_job/test_source_only_diagram.py
  • tests/test_pipeline/loaded_job/test_source_only_display_regressions.py

Limit details: You’ve used the included review currently available. Your 135 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: 2

  • GitHub Check: CodeRabbit
  • GitHub Check: Tests (3.13)
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/pipeline-job.md
Source excerpt: Developer, November 19, 2026 (ITL-1179, ITL-1251); see `docs/reference/hashing.md` section 9.

CodeRabbit inference engine (CLAUDE.md)

Files:

  • changelog.d/ITL-1988.md
  • docs/concepts/pipeline-job.md
  • src/orcapod/core/sources/derived_source.py
  • src/orcapod/core/sources/display_names.py
  • src/orcapod/pipeline/diagram.py
  • src/orcapod/pipeline/job.py
  • src/orcapod/pipeline/serialization.py
  • src/orcapod/pipeline/source_only_job.py
  • tests/test_pipeline/loaded_job/test_source_only_diagram.py
  • tests/test_pipeline/loaded_job/test_source_only_display_regressions.py
Source excerpt: Frozen hash values must stay identical across releases (developer, November 10, 2026).

CodeRabbit inference engine (CLAUDE.md)

Files:

  • changelog.d/ITL-1988.md
  • docs/concepts/pipeline-job.md
  • src/orcapod/core/sources/derived_source.py
  • src/orcapod/core/sources/display_names.py
  • src/orcapod/pipeline/diagram.py
  • src/orcapod/pipeline/job.py
  • src/orcapod/pipeline/serialization.py
  • src/orcapod/pipeline/source_only_job.py
  • tests/test_pipeline/loaded_job/test_source_only_diagram.py
  • tests/test_pipeline/loaded_job/test_source_only_display_regressions.py
Source excerpt: Write pages as before: a `# <title>` first line, mkdocs-style admonitions (`!!!

CodeRabbit inference engine (CLAUDE.md)

Files:

  • docs/concepts/pipeline-job.md
Source excerpt: What is published is decided in `scripts/docs_site_content.py` (`PUBLISHED_FILES`, `PUBLISHED_FOLDERS`, `EXCLUDED`).

CodeRabbit inference engine (CLAUDE.md)

Files:

  • docs/concepts/pipeline-job.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/sources/derived_source.py
  • src/orcapod/core/sources/display_names.py
  • src/orcapod/pipeline/diagram.py
  • src/orcapod/pipeline/job.py
  • src/orcapod/pipeline/serialization.py
  • src/orcapod/pipeline/source_only_job.py
  • tests/test_pipeline/loaded_job/test_source_only_diagram.py
  • tests/test_pipeline/loaded_job/test_source_only_display_regressions.py
Additional comments: 1

docs/concepts/pipeline-job.md: 1

150-153: Functional Correctness

The node display order follows the documented saved order.

view.nodes renders labels in the saved order that labels documents. The example's printed output matches that order. The documented contract makes this output stable, so it does not need sorting under the guideline on unguaranteed order.

Walkthrough

Read-only loaded jobs now retain saved DAG, schema, and source display metadata. They can render diagrams with node details and stored-result availability, and provide readable job and source representations in notebooks. Documentation and tests cover these displays.

Changes: Read-only job display

Layer / File(s) Summary
Saved metadata loading
src/orcapod/core/sources/display_names.py, src/orcapod/pipeline/serialization.py, src/orcapod/pipeline/job.py, src/orcapod/pipeline/source_only_job.py
Read-only job loading now carries saved schemas and source display details into SourceOnlyPipelineJob. Helpers format saved schemas, source kinds, and reader availability.
Read-only diagram rendering
src/orcapod/pipeline/diagram.py, tests/test_pipeline/loaded_job/test_source_only_diagram.py, tests/test_pipeline/loaded_job/test_source_only_display_regressions.py
PipelineDiagram accepts read-only jobs and uses their saved metadata for node details, schemas, operator roles, and stored-result facts. Tests compare diagram output and geometry with loaded jobs and check display behavior.
Job and source representations
src/orcapod/core/sources/derived_source.py, src/orcapod/pipeline/source_only_job.py, docs/concepts/pipeline-job.md, changelog.d/ITL-1988.md, tests/test_pipeline/loaded_job/test_source_only_diagram.py, tests/test_pipeline/loaded_job/test_source_only_display_regressions.py
Read-only jobs and stored sources gain text, HTML, and notebook displays. Documentation and tests cover saved schemas, reader availability, and stored-row previews.

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant PipelineJob
  participant SourceOnlyPipelineJob
  participant PipelineDiagram
  PipelineJob->>SourceOnlyPipelineJob: Passes saved DAG, schemas, and source details
  SourceOnlyPipelineJob->>PipelineDiagram: Delegates diagram rendering with options
  PipelineDiagram->>PipelineDiagram: Builds diagram from saved metadata
Loading

Possibly related PRs

Merge Risk: Minimal · up to f6b2b

This change adds display-only behavior for read-only loaded jobs, including diagrams, schemas and readable text and notebook representations. It does not alter persisted formats or stored results. No actionable merge-blocking risk was found.

Security architecture risk: Minimal · up to f6b2b

Read-only jobs can now show their saved graph and schemas without running the pipeline or reading result rows. Ordinary stored-source notebook previews still read rows as before; previews with logical columns now require an explicit head() call. The diagram reports whether a reader is configured, not whether matching rows exist.

Security review details

Security Blast Radius

  • observed — The new output makes a loaded job's graph, labels, saved schemas, source kinds, and reader status visible in the diagram. Anyone given the rendered output can see that metadata; rendering the diagram does not grant access to the stored result rows.

Trust Boundaries and Controls

  • observed — Saved labels and schema text are escaped in diagram HTML and in embedded JSON, and the details panel inserts them as text. The stored-source HTML representation escapes its metadata header, and the inherited preview renderer escapes the saved label in its own header.

Dependencies

  • observed — Diagram edge roles and collapse classification still depend on locally registered operator classes. For saved jobs, the renderer looks up the saved operator name and inspects static declarations and ancestry rather than instantiating an operator or using ABC subclass checks.

Data and control flow

  • observed — Read-only job loading validates saved source configuration, derives a display name from its saved kind, and skips live source reconstruction. The renderer receives the name, not the source configuration.

Resilience and Maintainability Implications

  • observed — Callers can use the diagram or text representation without probing the result store. A configured reader is not a readiness check: matching rows are checked on read. Ordinary stored-source notebook HTML still invokes the inherited head() preview; for logical columns, the system skips that implicit read and the caller must request it explicitly.
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 "Show diagrams and previews for read-only loaded jobs" matches the main change. The PR makes read-only loaded jobs render their saved pipeline diagram and node details, and adds previews and…
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 "Show diagrams and previews for read-only loaded jobs" matches the main change. The PR makes read-only loaded jobs render their saved pipeline diagram and node details, and adds previews and text representations for stored sources. The title is specific and concise, and it does not include noise or vague terms.

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.

@eywalker
eywalker merged commit 4a1d32d into main Dec 5, 2026
12 checks passed
@eywalker
eywalker deleted the eywalker/itl-1988-read-only-loaded-job-sourceonlypipelinejob branch December 5, 2026 02:20
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