Skip to content

Generate the deterministic recipe-wrangle runtime contract manifest - #1196

Closed
mborodii-prog wants to merge 1 commit into
mainfrom
feat/Generate-and-publish-a-versioned-runtime-manifest-for-every-WranglesPY-release
Closed

mborodii-prog wants to merge 1 commit into
mainfrom
feat/Generate-and-publish-a-versioned-runtime-manifest-for-every-WranglesPY-release

Conversation

@mborodii-prog

Copy link
Copy Markdown
Contributor

Related to #1195.

Adds a versioned runtime manifest so Wrangles-Docs can reconcile its Registry against the executable contract of a specific WranglesPY version and commit.

This brings forward Eric’s existing generate_wrangle_manifest.py implementation and integrates it into the current CI and tagged-release workflows.

Changes

  • Discover stock recipe operations from the actual runtime namespace, including nested operations, executable aliases, and reserved recipe names.
  • Export signatures, public and internal parameters, defaults, embedded schemas, and supported recipe controls.
  • Record the package version and full source commit SHA.
  • Validate the generated manifest against the version 0.1 JSON Schema.
  • Generate a SHA-256 checksum alongside the manifest.
  • Preserve the original --output option and default output filename.
  • Update runtime-manifest documentation and release instructions.

Tagged exports verify that the selected tag, package version, and checkout commit agree. Uncommitted runtime or exporter changes are rejected unless explicitly generating a local preview.

Catalog identity support

Adds wrangles.utils.catalog_identity to attach an already allocated catalog ID to a callable.

The exporter preserves this ID as a decimal string, validates PostgreSQL BIGINT bounds, and rejects duplicate identities. Functions without an annotation are exported without catalog_id.

This PR does not allocate IDs or add annotations to existing operations.

Local examples

Install the required dependencies:

python -m pip install -r requirements-full.txt jsonschema pytest

Generate a validated manifest from committed source:

python schema/generate_wrangle_manifest.py --artifact-dir output_files/runtime-manifest

Generate a development preview containing uncommitted changes:

python schema/generate_wrangle_manifest.py --allow-dirty --artifact-dir output_files/runtime-manifest

Output:

output_files/runtime-manifest/
├── wrangles-runtime-manifest.json
└── wrangles-runtime-manifest.json.sha256

Workflow integration

Both ci.yml and publish-tagged.yml run the focused tests, generate the manifest, and upload:

  • schema: recipe schema, legacy manifest filename, and manifest validation schema.
  • runtime-manifest: manifest JSON and SHA-256 checksum.

CI produces preview artifacts. Successful stable tagged-release runs provide the version-specific runtime contract.

Automatic download, Registry content updates, and import into Wrangles-Docs remain part of wrangleworks/Wrangles-Docs#35. DEV/RC exports and GitHub Release assets are outside this change.

Validation

  • 25 focused tests passed, covering discovery, compatibility with selected existing Docs contracts, catalog identities, deterministic output, CLI behavior, and source/tag validation.
  • Both workflows passed actionlint.
  • Tag verification passed with shallow checkouts for lightweight and annotated tags.
  • Full GitHub Actions execution remains to be verified.

@mborodii-prog
mborodii-prog deleted the feat/Generate-and-publish-a-versioned-runtime-manifest-for-every-WranglesPY-release branch September 25, 2026 06:18
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.

Generate and publish a versioned runtime manifest for every WranglesPY release

1 participant