Skip to content

test(tangle-cli): guard tangle-deploy pipeline-compile compat surface#31

Merged
Silin144 merged 1 commit into
TangleML:masterfrom
Silin144:feat/compat-guard-compile-surface
Jul 17, 2026
Merged

test(tangle-cli): guard tangle-deploy pipeline-compile compat surface#31
Silin144 merged 1 commit into
TangleML:masterfrom
Silin144:feat/compat-guard-compile-surface

Conversation

@Silin144

Copy link
Copy Markdown
Collaborator

What

Extends tests/test_tangle_deploy_compat_imports.py to guard the pipeline-compile surface that the internal tangle-deploy package will consume from tangle_cli once its pipeline compile from-python command delegates to the OSS driver (merged in #28).

This is the OSS-side of Phase 3 of the compile migration. The compat file already pins the general tangle_cli.* surface TD imports; this adds the compile symbols so any future OSS refactor that would break TD's delegation fails here, in this repo, rather than downstream at the submodule bump.

Guarded surface (all import + assert)

  • python_pipeline DSL: cfg (Cfg, load_cfg, _coerce_override), compiler_context (BroadcastLayer, CompileContext, PipelineCompileKey, canonical_repo_path, overrides_fingerprint), emit (emit_pipeline, _TASK_URL_PLACEHOLDER), errors.CompileError, pipeline.PipelineFn, ref.CallableRef, registered._REGISTERED_URL_PLACEHOLDER, subpipeline (SubpipelineRef, _SUBPIPELINE_URL_PLACEHOLDER), trace.trace_pipeline, types.In
  • schema_validation: SchemaValidationError, validate_dehydrated_pipeline
  • pipeline_compiler: compile_pipeline, CompileResult, PipelineCompiler (asserts it subclasses TangleCliHandler and exposes compile_file), ZONE_ROOT_MARKERS

Seam test

test_zone_root_markers_seam_is_empty_and_mutable_for_downstream pins the contract the discovery-side delegation depends on: OSS ships ZONE_ROOT_MARKERS == [], and it's a mutable module-level list a downstream distribution appends its own zone-root marker to (e.g. the oasis component-root marker) — mirroring the existing mutable-CI-vars provider-override contract already guarded in this file. The test appends/asserts/restores so it leaves no global state behind.

Testing

  • uv run pytest tests/test_tangle_deploy_compat_imports.py → 4 passed (2 existing + 2 new)
  • Full suite: 774 passed
  • uv lock --check clean, git diff --check clean

🤖 Generated with Claude Code

Extend the tangle-deploy import-compat guard to cover the compile driver
migrated into OSS: the python_pipeline DSL submodules, schema_validation,
and pipeline_compiler (compile_pipeline, CompileResult, and the
PipelineCompiler(TangleCliHandler) executor). These are the exact
tangle_cli.* symbols the internal `tangle-deploy pipeline compile
from-python` command will import once it delegates here.

Also guard the ZONE_ROOT_MARKERS seam: OSS ships it empty and it must be
a mutable list so a downstream distribution (tangle-deploy) can append
its own zone-root marker, mirroring the existing mutable-CI-vars
provider-override contract.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Silin144
Silin144 requested review from Ark-kun and Volv-G as code owners July 16, 2026 17:32

@Volv-G Volv-G left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(AI-assisted) Reviewed — clean, test-only PR that hardens the Phase-3 migration seam.

It pins the exact tangle_cli.* compile surface tangle-deploy will import once pipeline compile from-python delegates to the OSS driver, plus the key structural contracts (PipelineCompiler subclasses TangleCliHandler + exposes compile_file; ZONE_ROOT_MARKERS is an empty-in-OSS mutable list). The seam test appends/asserts/restores cleanly (try/finally + [:] = original), leaving no global state. Good safety net so an OSS refactor breaks here rather than downstream at the submodule bump.

Two non-blocking notes: it guards several private underscore symbols (intentional, but formalizes a downstream dependency on OSS internals — they can't be renamed without a coordinated bump), and it's an existence/callability guard rather than a signature-level one (a param change to compile_pipeline/compile_file wouldn't trip it). Both fine for the stated purpose.

LGTM.

@Silin144
Silin144 merged commit b476b29 into TangleML:master Jul 17, 2026
1 check passed
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.

2 participants