Align with TEA spec v0.4.0#11
Conversation
- Update TEA_SPEC_VERSION from 0.3.0-beta.2 to 0.4.0 - Add Artifact.distribution_ids (replaces distribution_types in spec v0.4.0, both kept for backward compatibility with older servers) - Add ReleaseDistribution.distribution_id (required in v0.4.0, optional here for backward compatibility with pre-0.4.0 servers) - Document CLE event ordering requirement (descending by id per spec) - Update all version references across docs, tests, and CLAUDE.md - Add 5 tests for new v0.4.0 fields and backward compatibility
There was a problem hiding this comment.
Pull request overview
Updates libtea to align its default behavior and documentation with TEA spec v0.4.0, while adding model fields and tests to preserve backward compatibility with pre-v0.4.0 servers.
Changes:
- Bump default
TEA_SPEC_VERSIONto0.4.0and update version references across docs/tests. - Add v0.4.0 model fields:
Artifact.distribution_idsandReleaseDistribution.distribution_id(keeping legacy fields for backward compatibility). - Add tests covering parsing of the new fields and compatibility with older server payloads.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Updates locked editable package version metadata. |
| tests/client/test_discovery.py | Updates discovery/version negotiation tests to use 0.4.0. |
| tests/client/test_client.py | Adds tests for new v0.4.0 model fields and backward compatibility. |
| tests/cli/test_cli_fmt.py | Updates CLI formatting test fixture version strings. |
| tests/cli/test_cli.py | Updates CLI discovery tests to use 0.4.0 URLs. |
| src/libtea/models.py | Adds new v0.4.0 fields and updates related docstrings. |
| src/libtea/client.py | Bumps TEA_SPEC_VERSION default to 0.4.0. |
| docs/cli.md | Updates CLI documentation to reference v0.4.0. |
| README.md | Updates README version references/examples to v0.4.0. |
| CLAUDE.md | Updates project overview TEA version reference to v0.4.0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…RE.md Update _cli_fmt.py to prefer distribution_id over distribution_type and distribution_ids over distribution_types in all four rendering paths (model-based and dict-based). Add tests for empty distributionIds array, old+new field coexistence, and formatter v0.4.0 field display. Track deprecation warnings and conformance checks in FUTURE.md.
… UUID fixtures
- Rename test_semver_matches_with_prerelease → test_semver_exact_match and
add test_semver_prerelease_exact_match for true prerelease matching
- Rename test_prerelease_compatibility → test_release_client_downgrades_to_prerelease_server
and test_prerelease_same_minor → test_release_client_compatible_with_older_prerelease_server
- Add test_prerelease_client_downgrades_to_prerelease_server for prerelease-to-prerelease
- Clarify ReleaseDistribution and Artifact docstrings to explicitly state
fields are kept optional in the model for backward compatibility
- Replace placeholder IDs ("abc", "id-1", "d-1") with UUID-shaped strings
in TestSpecV040Fields
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 12 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…t table header - Use `is not None` checks instead of `or` for distribution_ids/distributionIds fallback so an explicitly empty v0.4.0 list does not fall through to legacy distribution_types (empty tuple is falsy in Python) - Change inspect distributions table header from "Type" to "ID / Type" to match the model-based _distributions_table - Add test_artifacts_table_empty_distribution_ids_no_fallback to verify empty distribution_ids does not fall back to legacy field
Verify backward compatibility across all three server scenarios: - Pre-v0.4.0 server (distributionType only) — existing test - v0.4.0 server (distributionId/distributionIds) — new - Transitional server (both old and new fields) — new
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Fix 11.0.6 → 11.0.7 version mismatch in TOMCAT_RELEASE and TOMCAT_RELEASE_V040 fixture PURLs and URLs (release is 11.0.7) - Improve FUTURE.md Publisher API serialization note: use by_alias=True, explicitly exclude deprecated fields, gate by negotiated spec version
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
TEA_SPEC_VERSIONfrom0.3.0-beta.2to0.4.0Artifact.distribution_ids(array of UUIDs, replacesdistribution_typesin spec v0.4.0; both kept for backward compat with older servers)ReleaseDistribution.distribution_id(required in v0.4.0, optional here for pre-0.4.0 backward compat)Backward compatibility
distribution_types,distribution_type) retained alongside new onesTest plan