forked from mtusi2026/mtusi2026lab4
407 lines
11 KiB
JSON
407 lines
11 KiB
JSON
{
|
|
"track": "Track 2: consistency of two stores",
|
|
"hypothesis": "A grace-protected, re-checked reconciler removes only stale orphan objects and stale upload intents, and never deletes ready/used/fresh attachments or invents missing bytes.",
|
|
"generated_at": "2026-12-04T11:34:50.994535Z",
|
|
"git_revision": "02fc97b78aff9a1890bd2bade40f6cd8654e2000",
|
|
"api_image_id": "sha256:9f46ec2a6cf007f77202d3ae97afc0f710ee3cd191b8c620405f397b193932ce",
|
|
"database_rows_base": 300,
|
|
"object_store_objects_base": 300,
|
|
"message_attachment_links_base": 160,
|
|
"base_profile": {
|
|
"attachments": 300,
|
|
"linked_attachments": 150,
|
|
"unlinked_ready_attachments": 150,
|
|
"bytes_per_attachment": 111817,
|
|
"total_attachment_bytes": 33545100,
|
|
"image_profile": "tests/fixtures/sample.png 320x200, identical synthetic bytes"
|
|
},
|
|
"grace_seconds": 20,
|
|
"cost_runs": [
|
|
{
|
|
"run": 1,
|
|
"generated_at": "2026-12-04T11:34:05.681178412Z",
|
|
"db_scan_ms": 4,
|
|
"s3_list_ms": 6,
|
|
"total_ms": 11,
|
|
"db_rows": 321,
|
|
"s3_objects": 321
|
|
},
|
|
{
|
|
"run": 2,
|
|
"generated_at": "2026-12-04T11:34:05.901179461Z",
|
|
"db_scan_ms": 4,
|
|
"s3_list_ms": 6,
|
|
"total_ms": 11,
|
|
"db_rows": 321,
|
|
"s3_objects": 321
|
|
},
|
|
{
|
|
"run": 3,
|
|
"generated_at": "2026-12-04T11:34:06.113391388Z",
|
|
"db_scan_ms": 4,
|
|
"s3_list_ms": 6,
|
|
"total_ms": 10,
|
|
"db_rows": 321,
|
|
"s3_objects": 321
|
|
}
|
|
],
|
|
"cost_summary": {
|
|
"runs": 3,
|
|
"db_scan_ms_median": 4,
|
|
"s3_list_ms_median": 6,
|
|
"total_ms_median": 11,
|
|
"note": "traversal cost is O(rows + objects); timings are wall-clock milliseconds reported by the reconciler process on this local stand"
|
|
},
|
|
"injected": {
|
|
"stale_orphan_object": "attachments/orphan-stale-579892ade5e640889f0fa061f08ed330",
|
|
"stale_pending_with_object": {
|
|
"id": "a8f2fcc3-f2c4-4d95-9bd4-a2f55398016a",
|
|
"object_key": "attachments/a8f2fcc3-f2c4-4d95-9bd4-a2f55398016a"
|
|
},
|
|
"stale_pending_without_object": {
|
|
"id": "beb1acd6-4fe9-4306-a157-061dcab78deb",
|
|
"object_key": "attachments/beb1acd6-4fe9-4306-a157-061dcab78deb"
|
|
},
|
|
"missing_used_attachment": {
|
|
"id": "fd7a4709-63a6-45ed-b464-a9ceef082efc",
|
|
"object_key": "attachments/fd7a4709-63a6-45ed-b464-a9ceef082efc"
|
|
},
|
|
"missing_unused_attachment": {
|
|
"id": "a98d0387-d643-48fd-89a9-c7bc232229a5",
|
|
"object_key": "attachments/a98d0387-d643-48fd-89a9-c7bc232229a5"
|
|
},
|
|
"fresh_orphan_object": "attachments/orphan-fresh-ad3995ebaf9b4b3dbbfb2830a082347e",
|
|
"active_upload_intent": {
|
|
"id": "5cec0cdd-80f2-415c-9a0e-01e28703878a",
|
|
"object_key": "attachments/5cec0cdd-80f2-415c-9a0e-01e28703878a"
|
|
}
|
|
},
|
|
"dry_run": {
|
|
"orphan_objects": [
|
|
"attachments/orphan-stale-579892ade5e640889f0fa061f08ed330"
|
|
],
|
|
"protected_recent_objects": [
|
|
"attachments/orphan-fresh-ad3995ebaf9b4b3dbbfb2830a082347e"
|
|
],
|
|
"stale_pending": [
|
|
"a8f2fcc3-f2c4-4d95-9bd4-a2f55398016a",
|
|
"beb1acd6-4fe9-4306-a157-061dcab78deb"
|
|
],
|
|
"protected_pending": [
|
|
"5cec0cdd-80f2-415c-9a0e-01e28703878a"
|
|
],
|
|
"missing_objects": [
|
|
"a98d0387-d643-48fd-89a9-c7bc232229a5",
|
|
"fd7a4709-63a6-45ed-b464-a9ceef082efc"
|
|
],
|
|
"deleted_objects": [],
|
|
"deleted_pending_rows": []
|
|
},
|
|
"apply": {
|
|
"deleted_objects": [
|
|
"attachments/a8f2fcc3-f2c4-4d95-9bd4-a2f55398016a",
|
|
"attachments/orphan-stale-579892ade5e640889f0fa061f08ed330"
|
|
],
|
|
"deleted_pending_rows": [
|
|
"a8f2fcc3-f2c4-4d95-9bd4-a2f55398016a",
|
|
"beb1acd6-4fe9-4306-a157-061dcab78deb"
|
|
],
|
|
"unresolved_missing": [
|
|
"a98d0387-d643-48fd-89a9-c7bc232229a5",
|
|
"fd7a4709-63a6-45ed-b464-a9ceef082efc"
|
|
]
|
|
},
|
|
"rerun": {
|
|
"deleted_objects": [],
|
|
"deleted_pending_rows": []
|
|
},
|
|
"after_grace": {
|
|
"deleted_objects": [
|
|
"attachments/orphan-fresh-ad3995ebaf9b4b3dbbfb2830a082347e"
|
|
],
|
|
"deleted_pending_rows": []
|
|
},
|
|
"assertions": [
|
|
{
|
|
"check": "base attachment set is incomplete",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "message attachments were reordered",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "base rows/objects were not exactly the 300 uploads",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "cost run did not scan the full base set",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "missing objects were not removed from S3",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "stale orphan object not detected",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "fresh orphan object not protected",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "stale upload intents not detected",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "fresh upload intent not protected",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "missing objects not detected",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "dry run deleted objects",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "dry run deleted rows",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "dry run mutated either store",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "dry run removed an object",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "dry run removed an active upload object",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "concurrent upload during reconcile did not finish ready",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "stale orphan object was not removed",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "stale pending rows were not removed",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "stale pending object was not removed",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "stale S3 objects survived apply",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "stale pending rows survived apply",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "fresh orphan object was deleted inside grace",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "active upload, concurrent upload or active row was deleted",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "missing objects were not left for manual recovery",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "apply changed message attachment links",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "active upload intent changed state unexpectedly",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "protected upload cannot be attached after completion",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "protected upload bytes changed",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "rerun deleted objects",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "rerun deleted rows",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "fresh orphan lost protection on rerun",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "fresh orphan removed on rerun",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "aged orphan was not removed after grace",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "aged orphan object still exists",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "grace expiry deleted a metadata row",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "completed protected attachment lost after grace expiry",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message disappeared from history",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message lost or reordered its attachment links",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message disappeared from history",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message lost or reordered its attachment links",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message disappeared from history",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message lost or reordered its attachment links",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message disappeared from history",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message lost or reordered its attachment links",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message disappeared from history",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message lost or reordered its attachment links",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message disappeared from history",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message lost or reordered its attachment links",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message disappeared from history",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message lost or reordered its attachment links",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message disappeared from history",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message lost or reordered its attachment links",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message disappeared from history",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message lost or reordered its attachment links",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message disappeared from history",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message lost or reordered its attachment links",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message disappeared from history",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message lost or reordered its attachment links",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message disappeared from history",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message lost or reordered its attachment links",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message disappeared from history",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message lost or reordered its attachment links",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message disappeared from history",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message lost or reordered its attachment links",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message disappeared from history",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used message lost or reordered its attachment links",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "used attachment bytes changed or disappeared",
|
|
"passed": true
|
|
},
|
|
{
|
|
"check": "new upload after reconciliation failed",
|
|
"passed": true
|
|
}
|
|
],
|
|
"assertions_failed": 0,
|
|
"result": "PASS",
|
|
"limitations": [
|
|
"The reconciler never deletes or fabricates a missing original: bytes cannot be restored automatically, so those rows are reported as unresolved for operator recovery.",
|
|
"A simulated in-flight upload row is used as the deterministic active state; real concurrent uploads are additionally exercised and must finish ready.",
|
|
"Cost is measured on this 2 vCPU / ~2 GiB Colima stand and does not extrapolate to production.",
|
|
"The S3 ListObjects scan is not a snapshot: concurrent uploads are protected by the grace period and by the immediate database re-check before each delete."
|
|
]
|
|
}
|