Part of #1028. It covers what the supplier's release screen needs from the API (mockup RL3h, board "Prüfwerk, Zulieferer: Freigaben eines Prüfobjekts"). The screen itself follows in a stacked PR.
Draft
GET /api/v1/targets/{id}/versions/draft describes the next version without storing anything. It returns:
components: how many components the version would list.
scanned_at: when the scan it comes from finished.
changes: what it adds, updates and removes compared with the latest published version, with up to 3 names each. This reuses component_changes::diff over both released documents, and added + updated + unchanged always equals components.
blocked: why the version cannot be published (empty, too_many_components). This comes back as a 200 so the screen can show it, not as an error.
When there is no earlier version, or its document can't be read, changes is null.
Customers per version
deliver() records each release a version reached ($addToSet). This also counts acceptances that happen after publishing. The list shows the count as customers.
Two fixes found while checking the screen
A released SBOM no longer passes on addresses. Yocto pkg:generic purls carry download_url / vcs_url qualifiers, which can name the supplier's own git server or feed. The released document (from #1049) passed them on in purl and bom-ref. They are now removed, along with repository_url; other qualifiers and the subpath stay. A bom-ref that becomes a duplicate gets " (2)" appended.
A 404 from the registry for a tenant's connections now lists none. Before tenant-registry#138 the registry has no such route, and the screen would otherwise warn on every visit that connections cannot be read. Other errors still answer 503.
Tests
Unit tests: the count invariant, including two copies of one package, and an unchanged version.
Integration tests (connections.rs): customers 1, 1 and then 0 after the release ends; a draft against 1.6.0; a draft without components that comes back blocked.
Unit tests for the address strip and for unique bom-refs; an integration test for the 404.
Part of #1028. It covers what the supplier's release screen needs from the API (mockup RL3h, board "Prüfwerk, Zulieferer: Freigaben eines Prüfobjekts"). The screen itself follows in a stacked PR.
**Draft**
`GET /api/v1/targets/{id}/versions/draft` describes the next version without storing anything. It returns:
- `components`: how many components the version would list.
- `scanned_at`: when the scan it comes from finished.
- `changes`: what it adds, updates and removes compared with the latest published version, with up to 3 names each. This reuses `component_changes::diff` over both released documents, and `added + updated + unchanged` always equals `components`.
- `blocked`: why the version cannot be published (`empty`, `too_many_components`). This comes back as a 200 so the screen can show it, not as an error.
When there is no earlier version, or its document can't be read, `changes` is null.
**Customers per version**
`deliver()` records each release a version reached (`$addToSet`). This also counts acceptances that happen after publishing. The list shows the count as `customers`.
**Two fixes found while checking the screen**
- **A released SBOM no longer passes on addresses.** Yocto `pkg:generic` purls carry `download_url` / `vcs_url` qualifiers, which can name the supplier's own git server or feed. The released document (from #1049) passed them on in `purl` and `bom-ref`. They are now removed, along with `repository_url`; other qualifiers and the subpath stay. A `bom-ref` that becomes a duplicate gets " (2)" appended.
- **A 404 from the registry for a tenant's connections now lists none.** Before tenant-registry#138 the registry has no such route, and the screen would otherwise warn on every visit that connections cannot be read. Other errors still answer 503.
**Tests**
- Unit tests: the count invariant, including two copies of one package, and an unchanged version.
- Integration tests (`connections.rs`): customers 1, 1 and then 0 after the release ends; a draft against 1.6.0; a draft without components that comes back blocked.
- Unit tests for the address strip and for unique `bom-ref`s; an integration test for the 404.
- Clippy 1.94 is clean.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
The supplier's release screen (mockup RL3h) shows what publishing now
would change and how many customers each version reached; neither was
in the API.
- GET /api/v1/targets/{id}/versions/draft: the next version's component
count, the scan it comes from, and its additions, updates and removals
against the latest published version (component_changes::diff over
both released documents), with a few names. A target that cannot be
published answers 200 with `blocked` (empty, too_many_components).
- Each version records the releases it was delivered over
($addToSet in deliver(), so acceptances after publishing count too);
the list shows the count as `customers`.
- released_entries split out of released_document; the refusal codes
are an enum.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
Before tenant-registry#138 the registry has no connections route; the
release screen would warn on every visit that connections cannot be
read. A 404 now lists no connections; other errors still answer 503.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
Yocto recipes give pkg:generic purls a download_url or vcs_url
qualifier, which can name the supplier's own git server or feed. The
released document passed them on in purl and bom-ref. They are now left
out (download_url, vcs_url, repository_url); other qualifiers and the
subpath stay. A bom-ref that becomes a duplicate gets " (2)" appended.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang
merged commit d3500d4be4 into main2026-11-19 17:36:23 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part of #1028. It covers what the supplier's release screen needs from the API (mockup RL3h, board "Prüfwerk, Zulieferer: Freigaben eines Prüfobjekts"). The screen itself follows in a stacked PR.
Draft
GET /api/v1/targets/{id}/versions/draftdescribes the next version without storing anything. It returns:components: how many components the version would list.scanned_at: when the scan it comes from finished.changes: what it adds, updates and removes compared with the latest published version, with up to 3 names each. This reusescomponent_changes::diffover both released documents, andadded + updated + unchangedalways equalscomponents.blocked: why the version cannot be published (empty,too_many_components). This comes back as a 200 so the screen can show it, not as an error.When there is no earlier version, or its document can't be read,
changesis null.Customers per version
deliver()records each release a version reached ($addToSet). This also counts acceptances that happen after publishing. The list shows the count ascustomers.Two fixes found while checking the screen
pkg:genericpurls carrydownload_url/vcs_urlqualifiers, which can name the supplier's own git server or feed. The released document (from #1049) passed them on inpurlandbom-ref. They are now removed, along withrepository_url; other qualifiers and the subpath stay. Abom-refthat becomes a duplicate gets " (2)" appended.Tests
connections.rs): customers 1, 1 and then 0 after the release ends; a draft against 1.6.0; a draft without components that comes back blocked.bom-refs; an integration test for the 404.🤖 Generated with Claude Code
https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
The supplier's release screen (mockup RL3h) shows what publishing now would change and how many customers each version reached; neither was in the API. - GET /api/v1/targets/{id}/versions/draft: the next version's component count, the scan it comes from, and its additions, updates and removals against the latest published version (component_changes::diff over both released documents), with a few names. A target that cannot be published answers 200 with `blocked` (empty, too_many_components). - Each version records the releases it was delivered over ($addToSet in deliver(), so acceptances after publishing count too); the list shows the count as `customers`. - released_entries split out of released_document; the refusal codes are an enum. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9