Parent issue: #2265
Depends on: #2660, kedro-org/kedro#5668 the stable upstream Kedro node-source API
Summary
Use Kedro inspection's node-source metadata to serve task code and filepath without looking up a live Kedro node. Task IDs remain the existing Kedro-Viz IDs restored by #2715/#2716.
Scope
- Read source location information from the stable Kedro inspection API.
- Map it to task IDs with the shared node-ID helper.
- Resolve project-relative paths against the project root, validate paths according to the final upstream contract, use Python-aware source-file decoding, and validate the 1-based inclusive line range before slicing.
- Support the same static source path in full and lite mode.
- Treat missing source as an expected optional case.
- Keep task and dataset previews on the live-object path.
Acceptance criteria
- Source content matches the current full-mode response when Kedro reports a source location.
- Project-relative POSIX paths from Kedro are converted to the existing Viz filepath response shape, or an intentional response-format change is documented and tested.
- Source lookup does not change graph IDs or introduce an ID-translation map.
- Lite mode serves available source without a
KedroSession or DataCatalog.
source=None, unreadable files, and unsupported functions do not cause a server error.
Parent issue: #2265
Depends on: #2660, kedro-org/kedro#5668 the stable upstream Kedro node-source API
Summary
Use Kedro inspection's node-source metadata to serve task
codeandfilepathwithout looking up a live Kedro node. Task IDs remain the existing Kedro-Viz IDs restored by #2715/#2716.Scope
Acceptance criteria
KedroSessionorDataCatalog.source=None, unreadable files, and unsupported functions do not cause a server error.