Skip to content

fix(registration): accept hf artifacts in the validator - #294

Merged
christophergeyer merged 2 commits into
rc/0.4.5from
fix/artifact-source-type-hf
Aug 24, 2026
Merged

fix(registration): accept hf artifacts in the validator#294
christophergeyer merged 2 commits into
rc/0.4.5from
fix/artifact-source-type-hf

Conversation

@christophergeyer

Copy link
Copy Markdown
Member

roar put … hf:// stamps the published artifact source_type="hf" (put_execution.py:656, since 0.4.2). The publish path's own allowlist _VALID_REMOTE_SOURCE_TYPES has accepted hf since #35, and glaas-api has accepted it since June. VALID_SOURCE_TYPES in core/validation.py — applied to every primitive artifact registration — never learned it, and has not changed since the initial commit.

Why nobody noticed

The failure is quiet. A staged artifact that fails validation is skipped, not rejected:

if not validation:
    self._logger.warning("Skipping invalid staged artifact: %s", error_msg)
    errors.append(error_msg)
    continue

So an HF publish uploaded the file, reported success, and dropped that artifact's source from the registration. Rows still looked green — the output is already registered as a local artifact (source_type=None) during the traced step, and the download location rides on a scoped label (a514e77) rather than on source_type. The only symptom is a Registration completed with errors line that reads as noise.

Changes

  • add "hf" to VALID_SOURCE_TYPES
  • derive the rejection message from the set — it hardcoded "must be 's3', 'gs', 'https', or None" and would have gone stale again on the next scheme
  • tests/core/test_validation_source_types.py pins the validator's set against the publish path's, so a scheme cannot be half-added a third time

Verification

Built a wheel from this branch and ran a real delegated publish to HF against prod glaas-api.

Before — Artifact 0 (672314521e56): source_type must be 's3', 'gs', 'https', or None, got 'hf', then Registration completed with errors.

After — clean publish, Reproducibility 7/7, lineage saved on glaas.ai · 1 files · published to hf://…, job exit 0, lineagePublicationStatus: published.

201 tests pass across tests/core and tests/application/publish; the new tests fail if the constant is reverted.

Worth a separate look

continue on a failed staged artifact means an artifact the operator explicitly asked to publish is dropped inside a run that reports success — the same shape as P0-39. Raising, or at least a non-zero exit, seems more honest. Not changed here.

chrisgeyertreqs and others added 2 commits August 23, 2026 23:51
`roar put … hf://` stamps the published artifact `source_type="hf"`
(put_execution.py, since 0.4.2), the publish path's own allowlist has accepted
`hf` since #35, and the receiver has accepted it since June. The validator applied
to every primitive artifact registration never learned it: VALID_SOURCE_TYPES has
not changed since the initial commit.

Nothing surfaced the gap because the failure is quiet. A staged artifact that fails
validation is skipped, not rejected -- its message is collected into a warnings list
and registration continues -- so an HF publish uploaded the file, reported success,
and silently dropped that artifact's source from the lineage. The row still looked
green: the output was already registered as a local artifact during the traced step,
and the download location rides on a scoped label rather than on source_type.

Also derives the rejection message from the set instead of hardcoding it. The old
text still read "must be 's3', 'gs', 'https', or None" and would have gone stale
again on the next scheme.

The test pins the validator's set against the publish path's, so a scheme cannot be
half-added a third time.

Verified against prod glaas-api on a real delegated publish: previously
"Artifact 0 (...): source_type must be ... got 'hf'" followed by "Registration
completed with errors"; now a clean publish, 7/7, lineage published.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@christophergeyer
christophergeyer merged commit 37fb589 into rc/0.4.5 Aug 24, 2026
15 checks passed
@christophergeyer
christophergeyer deleted the fix/artifact-source-type-hf branch August 24, 2026 00:15
@christophergeyer christophergeyer mentioned this pull request Aug 24, 2026
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