Skip to content

validate manifest rejects the manifest that package produces (requires ai.assets) #101

Description

@friedrichwilken

What happens

model-cli package --model test-model --model-path ./test-model --artifact test:v1 --registry oras --registry-url "" --accelerator cpu --non-interactive
model-cli validate manifest --manifest ./test-model/manifest.json --non-interactive
✗ Metadata contract validation FAILED
  - Error: no metadata contract found in annotations. Expected annotation: ai.assets
  - Missing required fields: ai.assets
Error: manifest validation failed: no metadata contract found in annotations. Expected annotation: ai.assets

The ai.assets metadata contract (internal/workflow/metadata_contract.go:92) is only ever written by map / enforce, so the output of the documented package → harden → sign flow never passes validate manifest.

The README lists validate manifest under "Validate – one command family" as "a manifest against the metadata contract (JSON Schema)" with no hint that package output is expected to fail.

Expected

Either

  • package writes an ai.assets contract from the information it already has (model name, type, runtime, …), so the packaged manifest is valid, or
  • validate manifest treats a missing ai.assets as a warning (fail only with --strict) and the README / --help state that map is the step that adds the contract.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions