Skip to content

feat(models): add ucp-lock.json provenance and draft channel on main - #109

Merged
gsmith85 merged 1 commit into
mainfrom
feat/ucp-lock-and-draft-channel
Nov 19, 2026
Merged

gsmith85 merged 1 commit into
mainfrom
feat/ucp-lock-and-draft-channel

Conversation

@gsmith85

@gsmith85 gsmith85 commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds commit-pinned ucp-lock.json provenance, switches main to the git-native 0.0.0.dev0 draft channel, regenerates Pydantic models against Universal-Commerce-Protocol/ucp@main (ucp-schema 2.0.0), and updates CI to verify model drift deterministically from ucp-lock.json across main and release/** branches.

  • Provenance Lockfile & Repo-Native Codegen (ucp-lock.json, generate_models.sh, scripts/generate_models.py): Introduces 2-space formatted ucp-lock.json (channel, ucp_ref, ucp_sha, ucp_schema_version, vertical), reduces generate_models.sh to a minimal executable shim, and implements the flag-only CLI contract ([--from-lock] [--spec-dir <dir>], --ref <ref> [--channel draft|release] [--spec-dir <dir>] [--write-lock], and --spec-dir <dir>) plus deterministic AST schemas/__init__.py lazy index generation in scripts/generate_models.py (excluded from published wheels).
  • Draft Package Version & Runtime Metadata (pyproject.toml, src/ucp_sdk/__init__.py): Sets version = "0.0.0.dev0" on main (while release/YYYY-MM-DD branches publish YYYYMMDD.MINOR.PATCH releases to PyPI) and resolves ucp_sdk.__version__ via importlib.metadata.version("ucp-sdk") with a "0.0.0.dev0" fallback.
  • Regenerated Draft DTOs & Cross-Channel Unit Tests (src/ucp_sdk/models/schemas/, tests/test_models.py): Regenerates _generated.py and __init__.py against ucp@main (1be6f77) using ucp-schema 2.0.0, adds unit tests covering ucp-lock.json schema invariants, scripts/generate_models.py CLI flag validation, and ucp_sdk.__version__, and gates channel-specific CheckoutCompleteRequest / CheckoutCreateRequest assertions so unit tests pass cleanly on both main (draft) and release/2026-08-25 (release).
  • Deterministic CI & Documentation (.github/workflows/tests.yml, .github/workflows/linter.yml, README.md): Expands Tests and Lint triggers to [main, "release/**"], updates model-drift to install the SHA256-verified ucp-schema release binary and regenerate against the pinned ucp_sha in ucp-lock.json, and updates README.md with CalVer (YYYYMMDD.MINOR.PATCH, >= 2026-08-25), SHA-pinned git-native draft installation, and flag-only ./generate_models.sh usage.

Verification

  • ./generate_models.sh (--from-lock) reproduces _generated.py, __init__.py, and ucp-lock.json with zero git diff.
  • uv run python -m unittest discover -s tests -p "test_*.py" passes (30 tests, verified on both draft and release/2026-08-25).
  • uv run ruff check . && uv run ruff format --check . && uv build (confirming scripts/ is excluded from the built wheel) and uvx zizmor pass with zero findings.

@damaz91 damaz91 added the status:needs-triage Signal that the PR is ready for human triage label Nov 18, 2026
@gsmith85
gsmith85 force-pushed the feat/ucp-lock-and-draft-channel branch 3 times, most recently from 511baf0 to f0b7453 Compare November 18, 2026 23:27
@gsmith85
gsmith85 force-pushed the feat/ucp-lock-and-draft-channel branch from f0b7453 to 79bbf75 Compare November 19, 2026 04:09
@gsmith85
gsmith85 merged commit 8212d91 into main Nov 19, 2026
15 of 16 checks passed
@gsmith85
gsmith85 deleted the feat/ucp-lock-and-draft-channel branch November 19, 2026 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:needs-triage Signal that the PR is ready for human triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants