Part of #1028 (phase 4), step 5, second half: delivering published versions. Based on main (#1064 is merged).
What it does
When versions are delivered:
On publish:POST /api/v1/targets/{id}/versions delivers the new version to every active release of the target that the customer accepted.
On accept:POST /api/v1/sbom-offers/{id}/accept delivers the supplier's latest published version straight away, if there is one.
Connection check: before each write into the customer's workspace, the registry is asked again whether the connection joins exactly these two workspaces (ConnectionState::peer_of). Nothing arrives after the connection or the release has ended.
Same path as an upload: a delivery goes through onboarding::attach_upload like an invite upload. It replaces the component's supplier SBOM (one at a time, #1025), sets the component's supplier version to the label, and starts a scan (ScanTrigger::NewContent).
No duplicates: the offer records the content hash, label and time of its last delivery. If an acceptance and a publication race, the same content is still delivered only once.
Who sees what: the customer sees delivered_label and delivered_at on the offer; the supplier sees the same two fields on the release.
Failures: a delivery that fails is logged and doesn't fail the publication. The next version tries again.
Docs:guide/sbom.
Tests (tests/connections.rs, fake registry)
accepted_releases_receive_each_published_version:
a version published before acceptance arrives on accepting: the offer shows 1.4.0, the component has one supplier SBOM, and its supplier version is 1.4.0;
a version published afterwards arrives at once: there is still exactly one supplier SBOM, now 1.5.0, and both the customer's offer and the supplier's release show it;
after the release ends, a new version (1.6.0) doesn't arrive.
The other 8 connection, release and offer tests pass. The OpenAPI, route and role gates pass, and the e2e releases, onboarding, cascade and supplier tests pass. cargo +1.94 clippy (the CI toolchain) is clean.
Part of #1028 (phase 4), step 5, second half: delivering published versions. Based on `main` (#1064 is merged).
## What it does
- **When versions are delivered:**
- **On publish:** `POST /api/v1/targets/{id}/versions` delivers the new version to every active release of the target that the customer accepted.
- **On accept:** `POST /api/v1/sbom-offers/{id}/accept` delivers the supplier's latest published version straight away, if there is one.
- **Connection check:** before each write into the customer's workspace, the registry is asked again whether the connection joins exactly these two workspaces (`ConnectionState::peer_of`). Nothing arrives after the connection or the release has ended.
- **Same path as an upload:** a delivery goes through `onboarding::attach_upload` like an invite upload. It replaces the component's supplier SBOM (one at a time, #1025), sets the component's supplier version to the label, and starts a scan (`ScanTrigger::NewContent`).
- **No duplicates:** the offer records the content hash, label and time of its last delivery. If an acceptance and a publication race, the same content is still delivered only once.
- **Who sees what:** the customer sees `delivered_label` and `delivered_at` on the offer; the supplier sees the same two fields on the release.
- **Failures:** a delivery that fails is logged and doesn't fail the publication. The next version tries again.
- **Docs:** `guide/sbom`.
## Tests (`tests/connections.rs`, fake registry)
`accepted_releases_receive_each_published_version`:
- a version published before acceptance arrives on accepting: the offer shows `1.4.0`, the component has one supplier SBOM, and its supplier version is `1.4.0`;
- a version published afterwards arrives at once: there is still exactly one supplier SBOM, now `1.5.0`, and both the customer's offer and the supplier's release show it;
- after the release ends, a new version (`1.6.0`) doesn't arrive.
The other 8 connection, release and offer tests pass. The OpenAPI, route and role gates pass, and the e2e releases, onboarding, cascade and supplier tests pass. `cargo +1.94 clippy` (the CI toolchain) is clean.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang
changed target branch from feat/sbom-offers to main2026-11-19 13:10:20 +00:00
The second half of phase 4's customer side (step 5 of the plan on #1028):
- publishing a version delivers it to every accepted, active release of the
target; accepting an offer delivers the latest version at once;
- the connection is asked again right before each write into the customer's
workspace (`ConnectionState::peer_of`), so nothing arrives after it or
the release ended;
- a delivery is attached the way a supplier's upload is (`attach_upload`):
it replaces the component's supplier SBOM, sets the supplier version to
the label, and starts a scan;
- the offer keeps the content hash, label and time last delivered, so the
same content is never delivered twice (an acceptance and a publication
that race); the supplier's release shows the label and time.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
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 (phase 4), step 5, second half: delivering published versions. Based on
main(#1064 is merged).What it does
POST /api/v1/targets/{id}/versionsdelivers the new version to every active release of the target that the customer accepted.POST /api/v1/sbom-offers/{id}/acceptdelivers the supplier's latest published version straight away, if there is one.ConnectionState::peer_of). Nothing arrives after the connection or the release has ended.onboarding::attach_uploadlike an invite upload. It replaces the component's supplier SBOM (one at a time, #1025), sets the component's supplier version to the label, and starts a scan (ScanTrigger::NewContent).delivered_labelanddelivered_aton the offer; the supplier sees the same two fields on the release.guide/sbom.Tests (
tests/connections.rs, fake registry)accepted_releases_receive_each_published_version:1.4.0, the component has one supplier SBOM, and its supplier version is1.4.0;1.5.0, and both the customer's offer and the supplier's release show it;1.6.0) doesn't arrive.The other 8 connection, release and offer tests pass. The OpenAPI, route and role gates pass, and the e2e releases, onboarding, cascade and supplier tests pass.
cargo +1.94 clippy(the CI toolchain) is clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
79826847bftoae6b56f104