Repository navigation
Show diagrams and previews for read-only loaded jobs - #716
Conversation
|
No actionable comments were generated in the recent review.
|
| 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
Possibly related PRs
- metamorphic-labs/orcapod-python#706: Adds the
SourceOnlyPipelineJobview that this change uses to display saved job diagrams, node details, and source previews.
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: 
4
-
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
- Mode: Review on demand
- Reviewed files: 10
- Charged: $2.50
- View usage details
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.
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 withhead().test_read_only_diagram_matches_the_loaded_graphtest_read_only_diagram_display_computes_nothingtest_selecting_a_saved_node_shows_its_schema_and_availabilityhead()rulestest_stored_node_source_display_uses_headtest_doc_page_samples_run[docs/concepts/pipeline-job.md]Review fixes
test_schema_display_runs_no_user_type_hookstest_recoverable_csv_sources_match_loaded_jobtest_default_diagrams_have_the_same_geometrytest_availability_does_not_claim_rows_in_an_empty_storetest_registered_operator_class_descriptor_does_not_run_during_displaytest_registered_source_class_descriptor_does_not_run_during_displaytest_normal_job_diagram_preserves_schema_formatter_errorstest_collapse_does_not_visit_other_operator_metaclassestest_ordinary_diagram_keeps_operator_metaclass_nametest_saved_source_display_never_visits_registered_source_classesAll 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 withPipelineJob.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