This document defines common lifecycle rules for versioned AI Registry resources. Type-specific specs may refine these rules.
Metadata status:
| Status | Meaning |
|---|---|
enable |
Resource is available when visible and at least one queryable version exists. |
disable |
Resource is disabled at metadata level; type specs define query behavior. |
Version status:
| Status | Meaning |
|---|---|
draft |
Editable version under construction. |
reviewing |
Submitted for publish pipeline review. |
reviewed |
Pipeline approved and waiting for explicit publish. |
online |
Published and queryable. |
offline |
Existing version removed from normal runtime routing. |
The standard lifecycle is:
create/upload draft
-> update draft
-> submit
-> reviewing
-> reviewed
-> publish
-> online
-> offline/online toggle or delete
If no publish pipeline is enabled or no pipeline node matches the resource
type, submit may publish directly according to the type implementation.
force-publish bypasses pipeline validation and must remain an administrative
operation. It accepts only draft, reviewing, and reviewed versions;
online and offline versions must be rejected.
- A resource should have at most one working draft unless a type spec defines overwrite or multi-draft behavior.
- Draft creation may create a new metadata row or fork from an online version.
- Draft update must only modify the current draft version.
- Deleting a draft clears the metadata
editingVersionpointer and deletes the draft version row and storage content. - Upload operations may be type-specific but should still produce a draft version unless the operation is explicitly bootstrap/import.
- Submit resolves an explicit version or the current
editingVersion. - Submit must fail when no draft target exists.
- Submit only accepts a target version in
draftstatus; calling submit on a version in any other status (reviewing/reviewed/online/offline) must returnINVALID_PARAMand must not mutate version status or metadata pointers, to prevent corrupting formal versions. - A reviewing version must be recorded in metadata as
reviewingVersion. - Pipeline execution state may be written to
publishPipelineInfoandpipeline_execution. - Approved and rejected pipeline results move the version to
reviewed; users must explicitly redraft the version when further editing is required after a rejected result. - Publish moves the version to
online, clears working pointers, incrementsonlineCntwhen needed, and the server manages thelatestlabel. - Publish and force-publish requests may keep the historical
updateLatestLabelparameter for compatibility. This parameter is deprecated; new clients must not send it. When it is absent ortrue, the published version becomes the server-managed latest version. Label update APIs must ignore any client-providedlatestlabel key and merge the current server-managedlatestvalue back into the effective label map. - Force publish applies the same successful state transition as publish while skipping pipeline approval checks.
- After any online/offline status change, the server must recalculate
latestfrom the current online versions and point it to the greatest online version. If no online version remains, the server must removelatest.
Pipeline extension behavior is defined by the AI Publish Pipeline Plugin Spec. This domain spec defines only how AI resource lifecycle reacts to pipeline results.
latestis the reserved default label for the latest published version.latestis managed by the server. Manual label update requests may containlatestfor compatibility, but the server must ignore the client-providedlatestvalue and merge the current server-managedlatestvalue into the effective labels.- Labels map to version strings and must not point to
draftorreviewingversions. - Changing labels does not by itself mutate version content or version status.
- Runtime query by label must resolve the label at request time.
- Deleting a version should remove the version row and type-owned storage for that version.
- Deleting a resource should remove metadata, all version rows, and all type-owned storage.
- Delete operations should be idempotent only when the public API contract says missing resources are success.
- Deleting an online version should update
onlineCntor labels when the type implementation supports it.
AI resource operations should emit trace/audit events for create draft, update draft, submit, review approved/rejected, publish, force publish, online/offline, delete, label update, description update, scope update, and download.
Trace plugin behavior is defined by the Trace Plugin Spec. Counters are diagnostic and must not define authorization or lifecycle state.
AI resource trace emission uses AiResourceTraceEvent. The default AI resource
trace plugin preserves the JSON line audit log in ai-resource-trace.log while
allowing external trace subscribers to consume the same events.
Lifecycle states may be expanded as AI publishing workflows mature, for example
to support approval chains, staged rollout, policy evaluation, signing, or
artifact scanning. New states must define compatibility with existing
draft, reviewing, reviewed, online, and offline behavior.