feat(tangle-cli): add pipeline compile command and PipelineCompiler#1
Open
Silin144 wants to merge 1 commit into
Open
feat(tangle-cli): add pipeline compile command and PipelineCompiler#1Silin144 wants to merge 1 commit into
Silin144 wants to merge 1 commit into
Conversation
Port the Python-pipeline compiler from the internal tangle-deploy package into the OSS CLI so the generic compile logic lives in OSS: - pipeline_compiler.py: PipelineCompiler(TangleCliHandler) executor plus the generic compile_pipeline() free function. The zone-root seam (ZONE_ROOT_MARKERS) is left empty here for downstream injection. - schema_validation.py + schemas/dehydrated_pipeline_schema.json: Draft 2020-12 structural validation, semantic checks, and the no-template-delimiter output contract. - pipelines.compile_pipeline_file facade and a cyclopts `compile` subcommand under `tangle sdk pipelines`, following the hydrate facade. - jsonschema>=4.0.0 runtime dependency (uv.lock updated). - Tests for the compiler, CLI command, and schema validation, with colocated python_pipeline fixtures. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports the Python-pipeline compiler from the internal
tangle-deploypackage into the OSS CLI, so the generic compile logic lives in OSS. Follows the existingPipelineHydrator(TangleCliHandler)architecture and the hydrate facade pattern rather than inventing new conventions.Stacked on TangleML#20 (the
python_pipelineauthoring DSL) — this branch imports that package. See the stacking note below.What's included
pipeline_compiler.py—PipelineCompiler(TangleCliHandler)executor plus the genericcompile_pipeline()free function. The zone-root discovery seam is a module-levelZONE_ROOT_MARKERS: list[str] = [], left empty in OSS for downstream injection (e.g.tangle-deployappends its oasis marker).schema_validation.py+ bundledschemas/dehydrated_pipeline_schema.json— JSON-Schema (Draft 2020-12) structural validation, semantic checks (danglingtaskOutput.taskId, undeclaredgraphInput.inputName,outputValues↔outputs, purecomponentRef), and the no-template-delimiter output contract withexempt_paths.pipelines.compile_pipeline_filefunctional facade + a cycloptscompilesubcommand undertangle sdk pipelines, mirroringhydrate.jsonschema>=4.0.0runtime dependency (uv.lockupdated).python_pipelinefixtures.Worked example
Testing
All three CI checks pass locally:
uv run pytest— 731 passed, 0 regressions (97 in the new/touched files)uv lock --check— clean (exit 0)git diff --check— no whitespace errorsStacking note
feat/python-pipeline-dslbranch so the diff shows Phase-2-only changes. Once TangleML#20 merges intomaster, this branch will be rebased ontomasterand retargeted atTangleML/tangle-cli:master.🤖 Generated with Claude Code