Skip to content

Align with TEA spec: missing endpoints, artifact URL fix, v0.5.1#15

Merged
vpetersson merged 3 commits intosbomify:masterfrom
aurangzaib048:feat/spec-alignment-v0.5.1
Mar 12, 2026
Merged

Align with TEA spec: missing endpoints, artifact URL fix, v0.5.1#15
vpetersson merged 3 commits intosbomify:masterfrom
aurangzaib048:feat/spec-alignment-v0.5.1

Conversation

@aurangzaib048
Copy link
Collaborator

Summary

  • Fix get_artifact() URL: changed from /artifact/{uuid} (not in spec) to /artifact/{uuid}/latest
  • Add get_artifact_version(): new endpoint for /artifact/{uuid}/{version}
  • Add component search/list endpoints: list_components(), search_components(), list_component_releases(), search_component_releases() with pagination models, CLI commands, rich formatters, and auto-paginating iterators
  • Add ComplianceDocumentType enum (20 values) and COMPLIANCE_DOCUMENT identifier type per spec
  • Add Artifact.version and Artifact.created_date fields from spec
  • Add WARN status to conformance framework with check_artifact_formats_required (27 checks total)
  • Bump version to 0.5.1

All 23 consumer endpoints in the TEA OpenAPI spec now have corresponding client methods.

Changes by layer

Layer Changes
Models PaginatedComponentResponse, PaginatedComponentReleaseResponse, ComplianceDocumentType, Artifact.version, Artifact.created_date
Client 7 new methods + 1 URL fix
CLI search-components, search-component-releases, get-artifact-version
Formatters fmt_search_components, fmt_search_component_releases, WARN styling
Conformance WARN status, check_artifact_formats_required
Docs cli.md, conformance.md, FUTURE.md, CLAUDE.md updated

Test plan

  • 877 tests passing, 95% coverage
  • ruff check . clean
  • ruff format --check . clean
  • mypy clean
  • Pre-commit hooks pass
  • Verify against a live TEA v0.4.0 server when available

Copilot AI review requested due to automatic review settings March 12, 2026 18:54
… v0.5.1

Fix get_artifact() to hit /artifact/{uuid}/latest (spec-correct path).
Add get_artifact_version() for /artifact/{uuid}/{version}.
Add list/search endpoints for components and component releases with
pagination models, CLI commands, rich formatters, and iterator helpers.
Add ComplianceDocumentType enum (20 values) and COMPLIANCE_DOCUMENT
identifier type. Add Artifact.version and Artifact.created_date fields.
Add WARN status to conformance framework with artifact_formats_required
check. Update all docs to reflect 27 conformance checks and new commands.

877 tests, 95% coverage, ruff/mypy clean.
@aurangzaib048 aurangzaib048 force-pushed the feat/spec-alignment-v0.5.1 branch from d5d68a1 to ef64090 Compare March 12, 2026 18:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR bumps libtea to v0.5.1 and expands the client/CLI/conformance suite to support component search/list pagination, artifact version retrieval, and a new conformance “WARN” status for non-fatal findings.

Changes:

  • Add paginated component/component-release response models plus client methods & iterators for /components and /componentReleases.
  • Update artifact retrieval to use /artifact/{uuid}/latest, add get_artifact_version(), and add artifact version validation + model fields.
  • Introduce conformance WARN status (including a new artifact formats warning check) and update CLI/docs/tests accordingly.

Reviewed changes

Copilot reviewed 25 out of 26 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
uv.lock Updates locked version metadata for libtea to 0.5.1.
pyproject.toml Bumps project version to 0.5.1.
src/libtea/models.py Adds ComplianceDocumentType, artifact version/created_date, and paginated component response models.
src/libtea/_validation.py Adds _validate_artifact_version() helper.
src/libtea/client.py Adds component list/search APIs + iterators; changes get_artifact() to /latest; adds get_artifact_version().
src/libtea/_cli_fmt.py Adds formatters for component searches; updates conformance output to include WARN; expands pagination header typing.
src/libtea/cli.py Adds search-components, search-component-releases, and get-artifact-version commands; updates get-artifact wording.
src/libtea/init.py Exposes new models via the lazy-import public API.
src/libtea/conformance/_types.py Adds CheckStatus.WARN and ConformanceResult.warned.
src/libtea/conformance/_checks.py Adds _warn() helper and new check_artifact_formats_required check; registers it in ALL_CHECKS.
src/libtea/conformance/init.py Updates example output to include warned count.
src/libtea/conformance/plugin.py Treats WARN as a pytest warning (instead of pass/fail/skip only).
tests/unit/test_version.py Ensures new pagination models are importable and exposed via lazy imports.
tests/unit/test_validation.py Adds unit tests for _validate_artifact_version().
tests/unit/test_models.py Adds model tests for new enums and paginated component responses; extends artifact optional-field assertions.
tests/unit/test_conformance_types.py Verifies ConformanceResult.warned counting.
tests/unit/test_conformance_runner.py Updates total-count assertion to include warned results.
tests/unit/test_conformance_checks.py Updates artifact endpoint expectations to /latest; adds tests for the new WARNing conformance check.
tests/client/test_iterators.py Adds iterator tests for components and component releases; updates artifact fetch URL to /latest.
tests/client/test_client.py Adds client tests for components/component-releases; adds artifact version tests; updates artifact /latest URL.
tests/cli/test_cli.py Adds CLI tests for new component search + artifact version; updates artifact /latest URL.
tests/cli/test_cli_fmt.py Adds formatter tests for new component search outputs; updates console width; adds (currently weak) artifact “version” formatter tests.
docs/FUTURE.md Notes new artifact formats conformance check and adds a future item for component conformance checks.
docs/conformance.md Updates docs for 27 checks and introduces WARN status description.
docs/cli.md Documents new CLI commands and updates conformance check count / get-artifact wording.
CLAUDE.md Updates documentation about conformance check count (26 → 27).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

…sion rendering

- Fix "one of three statuses" → "one of four statuses" in conformance.md
- Change warnings.warn stacklevel from 1 to 2 in conformance plugin
  so warnings point at the test call site, not the plugin internals
- Add version and created_date rendering to fmt_artifact panel
- Fix misleading test names and assertions to actually verify version
  field presence/absence in the rendered output
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 25 out of 26 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Add list_components, search_components, list_component_releases,
search_component_releases, get_artifact_version, iter_components,
and iter_component_releases to the protocol so downstream
type-checking and mocking stays in sync with TeaClient.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 26 out of 27 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.

You can also share your feedback on Copilot code review. Take the survey.

@vpetersson vpetersson merged commit 0403803 into sbomify:master Mar 12, 2026
9 checks 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.

3 participants