feat(task-018): add observability retry cancel and audit trail

This commit is contained in:
2026-05-22 01:23:07 +03:00
parent 318ae790ef
commit 95fec3ba26
26 changed files with 1984 additions and 275 deletions
+344
View File
@@ -142,6 +142,11 @@
"title": "Attempt",
"type": "integer"
},
"cancel_eligible": {
"default": false,
"title": "Cancel Eligible",
"type": "boolean"
},
"duration_ms": {
"anyOf": [
{
@@ -248,6 +253,35 @@
"title": "Queued At",
"type": "string"
},
"retry_block_reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Retry Block Reason"
},
"retry_eligible": {
"default": false,
"title": "Retry Eligible",
"type": "boolean"
},
"safe_failure_summary": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Safe Failure Summary"
},
"started_at": {
"anyOf": [
{
@@ -509,6 +543,13 @@
],
"default": null
},
"timeline": {
"items": {
"$ref": "#/components/schemas/ObservabilityTimelineEventSummary"
},
"title": "Timeline",
"type": "array"
},
"workflow_events": {
"items": {
"$ref": "#/components/schemas/WorkflowEventSummary"
@@ -2441,6 +2482,148 @@
"title": "LanguageReviewRunResponse",
"type": "object"
},
"ObservabilityTimelineEventSummary": {
"additionalProperties": false,
"properties": {
"actor_user_id": {
"anyOf": [
{
"format": "uuid",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Actor User Id"
},
"article_id": {
"format": "uuid",
"title": "Article Id",
"type": "string"
},
"cancel_eligible": {
"default": false,
"title": "Cancel Eligible",
"type": "boolean"
},
"created_at": {
"format": "date-time",
"title": "Created At",
"type": "string"
},
"entry_type": {
"minLength": 1,
"title": "Entry Type",
"type": "string"
},
"event_type": {
"minLength": 1,
"title": "Event Type",
"type": "string"
},
"from_status": {
"anyOf": [
{
"$ref": "#/components/schemas/ArticleWorkflowStatus"
},
{
"type": "null"
}
],
"default": null
},
"id": {
"format": "uuid",
"title": "Id",
"type": "string"
},
"job_id": {
"anyOf": [
{
"format": "uuid",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Job Id"
},
"job_status": {
"anyOf": [
{
"$ref": "#/components/schemas/AgentJobStatus"
},
{
"type": "null"
}
],
"default": null
},
"job_type": {
"anyOf": [
{
"$ref": "#/components/schemas/AgentJobType"
},
{
"type": "null"
}
],
"default": null
},
"payload": {
"additionalProperties": true,
"title": "Payload",
"type": "object"
},
"retry_eligible": {
"default": false,
"title": "Retry Eligible",
"type": "boolean"
},
"safe_failure_summary": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Safe Failure Summary"
},
"source": {
"minLength": 1,
"title": "Source",
"type": "string"
},
"to_status": {
"anyOf": [
{
"$ref": "#/components/schemas/ArticleWorkflowStatus"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"id",
"article_id",
"entry_type",
"source",
"event_type",
"created_at"
],
"title": "ObservabilityTimelineEventSummary",
"type": "object"
},
"PlanListResponse": {
"additionalProperties": false,
"properties": {
@@ -3591,6 +3774,108 @@
"title": "RunnerFileRef",
"type": "object"
},
"ScriptConfigVersionAuditEventListResponse": {
"additionalProperties": false,
"properties": {
"events": {
"items": {
"$ref": "#/components/schemas/ScriptConfigVersionAuditEventSummary"
},
"title": "Events",
"type": "array"
}
},
"title": "ScriptConfigVersionAuditEventListResponse",
"type": "object"
},
"ScriptConfigVersionAuditEventSummary": {
"additionalProperties": false,
"properties": {
"actor_user_id": {
"anyOf": [
{
"format": "uuid",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Actor User Id"
},
"created_at": {
"format": "date-time",
"title": "Created At",
"type": "string"
},
"diff": {
"additionalProperties": true,
"title": "Diff",
"type": "object"
},
"event_type": {
"minLength": 1,
"title": "Event Type",
"type": "string"
},
"id": {
"format": "uuid",
"title": "Id",
"type": "string"
},
"payload": {
"additionalProperties": true,
"title": "Payload",
"type": "object"
},
"rollback_target_version_id": {
"anyOf": [
{
"format": "uuid",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Rollback Target Version Id"
},
"target_site_id": {
"format": "uuid",
"title": "Target Site Id",
"type": "string"
},
"version": {
"anyOf": [
{
"minimum": 1,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Version"
},
"version_id": {
"format": "uuid",
"title": "Version Id",
"type": "string"
}
},
"required": [
"id",
"target_site_id",
"version_id",
"event_type",
"created_at"
],
"title": "ScriptConfigVersionAuditEventSummary",
"type": "object"
},
"ScriptConfigVersionCreateRequest": {
"additionalProperties": false,
"properties": {
@@ -8012,6 +8297,65 @@
]
}
},
"/api/sites/{site_id}/publishing-config/audit": {
"get": {
"operationId": "get_script_config_audit_events_api_sites__site_id__publishing_config_audit_get",
"parameters": [
{
"in": "path",
"name": "site_id",
"required": true,
"schema": {
"format": "uuid",
"title": "Site Id",
"type": "string"
}
},
{
"in": "header",
"name": "X-Demo-User-Email",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "X-Demo-User-Email"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ScriptConfigVersionAuditEventListResponse"
}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
},
"summary": "Get Script Config Audit Events",
"tags": [
"sites"
]
}
},
"/api/sites/{site_id}/publishing-config/versions": {
"get": {
"operationId": "get_script_config_versions_api_sites__site_id__publishing_config_versions_get",