feat(registry): add workspace-scoped artifact metadata

This commit is contained in:
2026-08-27 02:18:09 +03:00
parent 497e1b740f
commit 2eb185b14a
29 changed files with 2264 additions and 181 deletions
+30
View File
@@ -588,6 +588,36 @@ impl From<RegistryError> for ApiError {
format!("import job {job_id} was already applied with different parameters"),
json!({ "job_id": job_id }),
),
RegistryError::SourceNotFound { source_id } => Self::not_found_with_context(
"artifact source was not found",
json!({
"source_id": source_id,
"error_code": "artifact_source_not_found"
}),
),
RegistryError::SourceConflict { source_id } => Self::conflict_with_context(
"artifact source metadata or lifecycle conflicts with the request",
json!({
"source_id": source_id,
"error_code": "artifact_source_conflict",
"recovery": "reload"
}),
),
RegistryError::SourceUnavailable => Self::unprocessable_with_context(
"artifact source is unavailable",
json!({ "error_code": "artifact_source_unavailable" }),
),
RegistryError::SourceIntegrity => Self::unprocessable_with_context(
"artifact source failed integrity verification",
json!({ "error_code": "artifact_source_integrity" }),
),
RegistryError::InvalidArtifactSource { field } => Self::validation_with_context(
"artifact source metadata is invalid",
json!({
"field": field,
"error_code": "artifact_source_invalid"
}),
),
RegistryError::Storage(_) => Self::internal("registry operation failed"),
RegistryError::Migration(_)
| RegistryError::Serialization(_)