Skip to content

fix(register): carry source_url into artifact metadata for AI-BOM downloadLocation - #239

Merged
christophergeyer merged 1 commit into
rc/0.4.1from
cg/aibom-download-location
Jul 21, 2026
Merged

fix(register): carry source_url into artifact metadata for AI-BOM downloadLocation#239
christophergeyer merged 1 commit into
rc/0.4.1from
cg/aibom-download-location

Conversation

@christophergeyer

Copy link
Copy Markdown
Member

Problem

roar register's batch artifact payload (prepare_batch_registration_artifacts) only sent hashes, size, source_type, and session_hash — it dropped the artifact's source_url. A source-tracked input (e.g. an s3:// dataset pulled through the roar proxy) therefore reached GLaaS with a sourceType but no distribution URL, so the CycloneDX AI-BOM could not emit the downloadLocation external reference. This capped AI-BOM completeness at 97.5 instead of 100 for otherwise-complete pipelines.

Fix

Fold source_url into the artifact entry's metadata JSON when it carries a valid remote source_type. GLaaS stores input.metadata verbatim, and the BOM builder reads metadata.source_url to emit the distribution external reference.

  • One function changed: roar/application/publish/registration.pyprepare_batch_registration_artifacts.
  • Guarded on a normalized remote source type (s3/gs/https/hf); merges into any existing metadata without clobbering.

Verification

  • Unit-level: the prepared payload for an s3 input now includes metadata: {"source_url": "s3://…"} alongside source_type: "s3".
  • End-to-end (dev-instrumented): confirmed prepare_batch_registration_artifacts emits the metadata for the s3 input during a real roar register.

Cross-repo dependency (for a live 100)

This roar change is necessary but not sufficient on its own. The GLaaS-api staged/bearer registration path (registration-sessions/:id/artifacts/batch) must persist sourceType + metadata. That handling is present on glaas-api main (artifact.service.ts registerBatchUnderRegistrationSession) but not yet on the deployed prod image — prod stores sourceType: null and metadata without source_url. A glaas-api prod deploy of main is required alongside this fix.

Release

Targets rc/0.4.1 (fast-follow). Not published to PyPI yet — used to generate the treqs.ai AI-BOM example on the 0.4.1 rc.

…nloadLocation

roar register's batch artifact payload (prepare_batch_registration_artifacts)
only sent hashes/size/source_type/session_hash, dropping the artifact's
source_url. Source-tracked inputs (e.g. an s3:// dataset pulled through the
roar proxy) therefore reached GLaaS with a sourceType but no distribution URL,
so the CycloneDX AI-BOM could not emit the downloadLocation external reference
(capping completeness at 97.5 instead of 100).

Fold source_url into the entry's metadata JSON when the artifact carries a
valid remote source_type. GLaaS stores input.metadata verbatim and the BOM
builder reads metadata.source_url to emit the distribution reference.

Note: a live 100 also requires the GLaaS-api staged (registration-session)
ingestion that persists sourceType+metadata to be deployed to prod — that
handling is on glaas-api main but not yet on the deployed prod image.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

2 participants