Files
mtusi2026lab5/evidence/outbox-gap.json
T

371 lines
7.4 KiB
JSON

{
"scenario": "outbox: COMMIT/publish gap and API crash windows",
"date_utc": "2026-11-13T13:58:45+00:00",
"steps": [
{
"t": 5.47,
"utc": "13:57:20.717",
"step": "A: relay stopped, upload 202",
"attachment_id": "8695d9c8-cdc5-4f28-a17e-b2222d6ee5f4",
"outbox": [
{
"id": 98,
"attempt": "1",
"available_at": "2026-11-13T13:57:16.395116Z",
"created_at": "2026-11-13T13:57:16.395116Z",
"published_at": null,
"publish_count": 0
}
],
"queue": {
"messages": 0,
"messages_ready": 0,
"messages_unacknowledged": 0,
"consumers": 4
}
},
{
"t": 12.08,
"utc": "13:57:27.326",
"step": "A: relay started -> ready, same single job",
"attachment_id": "8695d9c8-cdc5-4f28-a17e-b2222d6ee5f4",
"events": [
"enqueued",
"claimed",
"ready",
"staging_deleted"
],
"outbox": [
{
"id": 98,
"attempt": "1",
"available_at": "2026-11-13T13:57:16.395116Z",
"created_at": "2026-11-13T13:57:16.395116Z",
"published_at": "2026-11-13T13:57:22.711861Z",
"publish_count": 1
}
],
"jobs": 1,
"invariants": {
"variants": [
"crop",
"optimized",
"thumbnail"
],
"variants_ok": true,
"final_objects": 4,
"final_objects_ok": true,
"staging_left": false,
"job_status": "ready",
"attempt": 1
}
},
{
"t": 21.46,
"utc": "13:57:36.707",
"step": "B: relay crashed between COMMIT and publish -> restarted -> ready",
"attachment_id": "73a95268-17ba-4a02-b38b-b4b28ceda56f",
"relay_restart_count": [
[
0
],
[
1
]
],
"events": [
"enqueued",
"claimed",
"ready",
"staging_deleted"
],
"outbox": [
{
"id": 99,
"attempt": "1",
"available_at": "2026-11-13T13:57:33.691351Z",
"created_at": "2026-11-13T13:57:33.691351Z",
"published_at": "2026-11-13T13:57:35.220697Z",
"publish_count": 1
}
],
"invariants": {
"variants": [
"crop",
"optimized",
"thumbnail"
],
"variants_ok": true,
"final_objects": 4,
"final_objects_ok": true,
"staging_left": false,
"job_status": "ready",
"attempt": 1
}
},
{
"t": 31.05,
"utc": "13:57:46.295",
"step": "C: published twice (crash before marking) -> duplicate is a no-op",
"attachment_id": "b418c3c7-74cf-492a-ab07-8e94202f47e5",
"relay_restart_count": [
1
],
"events": [
"enqueued",
"claimed",
"ready",
"staging_deleted",
"duplicate_ignored"
],
"outbox": [
{
"id": 100,
"attempt": "1",
"available_at": "2026-11-13T13:57:43.223035Z",
"created_at": "2026-11-13T13:57:43.223035Z",
"published_at": "2026-11-13T13:57:44.693510Z",
"publish_count": 1
}
],
"invariants": {
"variants": [
"crop",
"optimized",
"thumbnail"
],
"variants_ok": true,
"final_objects": 4,
"final_objects_ok": true,
"staging_left": false,
"job_status": "ready",
"attempt": 1
}
},
{
"t": 56.68,
"utc": "13:58:11.927",
"step": "D: API died after COMMIT before 202 -> work still completed",
"attachment_id": "76c1ed67-220e-4fdd-bb63-7930dbad69be",
"client_saw": {
"http": 502,
"x_instance_id": null,
"error_code": "unavailable"
},
"events": [
"enqueued",
"claimed",
"ready",
"staging_deleted"
],
"invariants": {
"variants": [
"crop",
"optimized",
"thumbnail"
],
"variants_ok": true,
"final_objects": 4,
"final_objects_ok": true,
"staging_left": false,
"job_status": "ready",
"attempt": 1
}
},
{
"t": 65.79,
"utc": "13:58:21.034",
"step": "E: API died after staging before COMMIT",
"attachment_id": "e42703f7-bf99-461f-910c-e03b66ba2b73",
"client_saw": {
"http": 502,
"x_instance_id": null,
"error_code": "unavailable"
},
"status": "pending",
"jobs": 0,
"api_get": 404
},
{
"t": 74.22,
"utc": "13:58:29.474",
"step": "E: janitor removed pending row and staging object",
"attachment_id": "e42703f7-bf99-461f-910c-e03b66ba2b73",
"janitor_dry_run": {
"abandoned_pending": 1,
"orphan_objects": 0,
"deleted_objects": 0,
"deleted_rows": 0
},
"janitor": {
"abandoned_pending": 1,
"orphan_objects": 0,
"deleted_objects": 1,
"deleted_rows": 1,
"missing_objects": 0
},
"row_gone": true
},
{
"t": 90.61,
"utc": "13:58:45.855",
"step": "relay and api restored to .env configuration"
}
],
"results": {
"A": {
"attachment_id": "8695d9c8-cdc5-4f28-a17e-b2222d6ee5f4",
"events": [
"enqueued",
"claimed",
"ready",
"staging_deleted"
],
"outbox": [
{
"id": 98,
"attempt": "1",
"available_at": "2026-11-13T13:57:16.395116Z",
"created_at": "2026-11-13T13:57:16.395116Z",
"published_at": "2026-11-13T13:57:22.711861Z",
"publish_count": 1
}
],
"jobs": 1,
"invariants": {
"variants": [
"crop",
"optimized",
"thumbnail"
],
"variants_ok": true,
"final_objects": 4,
"final_objects_ok": true,
"staging_left": false,
"job_status": "ready",
"attempt": 1
}
},
"B": {
"attachment_id": "73a95268-17ba-4a02-b38b-b4b28ceda56f",
"relay_restart_count": [
[
0
],
[
1
]
],
"events": [
"enqueued",
"claimed",
"ready",
"staging_deleted"
],
"outbox": [
{
"id": 99,
"attempt": "1",
"available_at": "2026-11-13T13:57:33.691351Z",
"created_at": "2026-11-13T13:57:33.691351Z",
"published_at": "2026-11-13T13:57:35.220697Z",
"publish_count": 1
}
],
"invariants": {
"variants": [
"crop",
"optimized",
"thumbnail"
],
"variants_ok": true,
"final_objects": 4,
"final_objects_ok": true,
"staging_left": false,
"job_status": "ready",
"attempt": 1
}
},
"C": {
"attachment_id": "b418c3c7-74cf-492a-ab07-8e94202f47e5",
"relay_restart_count": [
1
],
"events": [
"enqueued",
"claimed",
"ready",
"staging_deleted",
"duplicate_ignored"
],
"outbox": [
{
"id": 100,
"attempt": "1",
"available_at": "2026-11-13T13:57:43.223035Z",
"created_at": "2026-11-13T13:57:43.223035Z",
"published_at": "2026-11-13T13:57:44.693510Z",
"publish_count": 1
}
],
"invariants": {
"variants": [
"crop",
"optimized",
"thumbnail"
],
"variants_ok": true,
"final_objects": 4,
"final_objects_ok": true,
"staging_left": false,
"job_status": "ready",
"attempt": 1
}
},
"D": {
"attachment_id": "76c1ed67-220e-4fdd-bb63-7930dbad69be",
"client_saw": {
"http": 502,
"x_instance_id": null,
"error_code": "unavailable"
},
"events": [
"enqueued",
"claimed",
"ready",
"staging_deleted"
],
"invariants": {
"variants": [
"crop",
"optimized",
"thumbnail"
],
"variants_ok": true,
"final_objects": 4,
"final_objects_ok": true,
"staging_left": false,
"job_status": "ready",
"attempt": 1
}
},
"E": {
"attachment_id": "e42703f7-bf99-461f-910c-e03b66ba2b73",
"janitor_dry_run": {
"abandoned_pending": 1,
"orphan_objects": 0,
"deleted_objects": 0,
"deleted_rows": 0
},
"janitor": {
"abandoned_pending": 1,
"orphan_objects": 0,
"deleted_objects": 1,
"deleted_rows": 1,
"missing_objects": 0
},
"row_gone": true
}
}
}