{
  "schemaVersion": 1,
  "caseId": "codex-optimize-2026-10-15",
  "status": "completed",
  "date": "2026-10-15",
  "canonicalUrl": "https://mintstorage.app/guides/codex-optimization-case-study/",
  "operator": {
    "name": "DZG Studio LLC / Mint team",
    "relationship": "Product maker; owner-operated test, not an independent customer review"
  },
  "environment": {
    "mintVersion": "1.0.99",
    "mintBuild": 114,
    "channel": "Direct",
    "installerSha256": "84de96883fa0486e74668bec8b67109740b47dffbd572c65fba1bbc9fae23ce2",
    "shippedExecutableSha256": "437dc8180b48a5c3197bec7d0fbdd4446646a2851a664ec171c621f974c82556",
    "execution": "Verified shipped executable copied into an isolated QA identity; original app not launched; production telemetry suppressed",
    "macModel": "MacBookPro18,4",
    "chip": "Apple M1 Max",
    "macOS": "27.0.1",
    "architecture": "arm64",
    "codexCLI": "0.155.1"
  },
  "sample": {
    "source": "Real archived conversations on the product owner’s working Mac; private content never published",
    "catalogFiles": 413,
    "structurallyEligibleFiles": 39,
    "examinedForImageEligibility": 39,
    "requestedMaximum": 10,
    "selected": 8,
    "samplingSeed": 7,
    "criteria": [
      "Archived, inactive for at least 24 hours, 2–320 MB logical size",
      "Top-level sessions; no dependency on or from other conversations",
      "More than 100 kB of eligible repeated base64 screenshot data in earlier compactions"
    ],
    "representativeOfAllMacs": false,
    "independentByteCopies": true,
    "liveOriginalHashesAndModificationTimesUnchanged": true,
    "selectionMethod": "All 39 structurally eligible files were screened in a seeded randomized order; all 8 image-eligible files were included before Optimize. No selection by achieved savings; not a random sample of all conversations or users.",
    "randomSampleOfAllConversations": false
  },
  "measurement": {
    "unit": "bytes; MB = 1,000,000 bytes",
    "allocationMethod": "Sum of st_blocks × 512 for regular files; fresh byte copies without clone/hard-link sharing",
    "scope": "Selected conversation copies plus all Mint-created recovery and isolated profile files; filesystem metadata, snapshots and independent research copies excluded",
    "before": {
      "conversations": {
        "files": 8,
        "logicalBytes": 666002452,
        "allocatedBytes": 666017792
      },
      "recovery": {
        "files": 0,
        "logicalBytes": 0,
        "allocatedBytes": 0
      },
      "profile": {
        "files": 0,
        "logicalBytes": 0,
        "allocatedBytes": 0
      },
      "totalAllocatedBytes": 666017792,
      "volumeAvailableBytes": 12129767424,
      "measuredAt": "2026-10-15T08:39:41Z"
    },
    "afterOptimize": {
      "conversations": {
        "files": 8,
        "logicalBytes": 428684595,
        "allocatedBytes": 432467968
      },
      "recovery": {
        "files": 8,
        "logicalBytes": 21788,
        "allocatedBytes": 45056
      },
      "profile": {
        "files": 9,
        "logicalBytes": 34947,
        "allocatedBytes": 53248
      },
      "totalAllocatedBytes": 432566272,
      "volumeAvailableBytes": 12110712832,
      "measuredAt": "2026-10-15T08:40:35Z"
    },
    "afterUndo": {
      "conversations": {
        "files": 8,
        "logicalBytes": 496612342,
        "allocatedBytes": 496627712
      },
      "recovery": {
        "files": 0,
        "logicalBytes": 0,
        "allocatedBytes": 0
      },
      "profile": {
        "files": 9,
        "logicalBytes": 37067,
        "allocatedBytes": 53248
      },
      "totalAllocatedBytes": 496680960,
      "volumeAvailableBytes": 11324416000,
      "measuredAt": "2026-10-15T08:41:29Z"
    },
    "netAllocatedReductionBytes": 233451520,
    "netAllocatedReductionPercent": 35.0518,
    "logicalConversationReductionBytes": 237317857,
    "volumeAvailableChangeBytes": -19054592,
    "volumeChangeAttributableToMint": false,
    "volumeNote": "Other activity continued on this Mac. Volume-free-space readings are reported, not used as the causal savings claim. Independent verification copies also consume space.",
    "averagePerConversation": {
      "denominatorConversations": 8,
      "beforeAllocatedBytes": 83252224,
      "afterOptimizeAllocatedBytes": 54070784,
      "netAllocatedReductionBytes": 29181440,
      "calculation": "Each measured-scope total divided by 8; includes recovery and profile overhead. The 35.0518% figure is the reduction of the pooled total, not a mean of individual percentage reductions."
    }
  },
  "execution": {
    "operation": "Optimize (reversible; makes the pictures inside conversations take less space), not Remove media or Delete",
    "selected": 8,
    "changed": 8,
    "failed": 0,
    "skipped": 0,
    "operationSeconds": 25.021,
    "engineAllocationMeasurementReliable": true
  },
  "validation": {
    "codexRead": {
      "optimized": {
        "threads": 8,
        "sameThreadSet": true,
        "sameTurns": 8,
        "turns": 135,
        "items": 257,
        "errors": 0,
        "originalContentKeptAfterResume": true
      },
      "restored": {
        "threads": 8,
        "sameThreadSet": true,
        "sameTurns": 8,
        "turns": 135,
        "items": 257,
        "errors": 0,
        "originalContentKeptAfterResume": true
      }
    },
    "continuationRequests": {
      "method": "codex exec resume builds the request against a loopback HTTP server which returns 400; no model inference",
      "comparison": "Exact JSON comparison after removing client metadata and normalizing volatile IDs/timestamps/home paths; images compared by dimensions, RGBA pixels and ICC profile",
      "control": {
        "identical": 8,
        "different": 0,
        "notCaptured": 0
      },
      "optimized": {
        "identical": 8,
        "different": 0,
        "notCaptured": 0
      },
      "restored": {
        "identical": 8,
        "different": 0,
        "notCaptured": 0
      },
      "modelCalled": false
    },
    "undo": {
      "successful": 8,
      "failed": 0,
      "decodedContentEquivalent": 8,
      "byteIdenticalFiles": 0,
      "definition": "Outside successfully decoded image data URLs, bytes match, including undecodable image-like values. Decoded images match in dimensions, RGBA pixels and ICC profile. The smaller lossless picture encoding is retained, so the original picture encoding is not reconstructed.",
      "independentPublicVerifier": {
        "originalFiles": 8,
        "restoredFiles": 8,
        "sameFileSet": true,
        "decodedContentMatches": 8,
        "decodedImageOccurrences": 722,
        "undecodableImageLikeValuesComparedByteExactly": 729,
        "passed": true
      },
      "verifierUrl": "https://mintstorage.app/research/verify-codex-case.py",
      "verifierSha256": "9abf072caa3b07790b7d43a16db6b2513c8f457f983dc9227a5dadf4cc2ab2ae"
    }
  },
  "perSample": [
    {
      "sample": "01",
      "beforeLogicalBytes": 120538519,
      "afterOptimizeAllocatedBytes": 94355456,
      "afterOptimizeLogicalBytes": 94354059,
      "undoContentEquivalent": true
    },
    {
      "sample": "02",
      "beforeLogicalBytes": 24235051,
      "afterOptimizeAllocatedBytes": 22966272,
      "afterOptimizeLogicalBytes": 22965813,
      "undoContentEquivalent": true
    },
    {
      "sample": "03",
      "beforeLogicalBytes": 28093625,
      "afterOptimizeAllocatedBytes": 18534400,
      "afterOptimizeLogicalBytes": 18534342,
      "undoContentEquivalent": true
    },
    {
      "sample": "04",
      "beforeLogicalBytes": 69619327,
      "afterOptimizeAllocatedBytes": 59064320,
      "afterOptimizeLogicalBytes": 59063568,
      "undoContentEquivalent": true
    },
    {
      "sample": "05",
      "beforeLogicalBytes": 43999454,
      "afterOptimizeAllocatedBytes": 32411648,
      "afterOptimizeLogicalBytes": 32409665,
      "undoContentEquivalent": true
    },
    {
      "sample": "06",
      "beforeLogicalBytes": 10739273,
      "afterOptimizeAllocatedBytes": 8511488,
      "afterOptimizeLogicalBytes": 8510918,
      "undoContentEquivalent": true
    },
    {
      "sample": "07",
      "beforeLogicalBytes": 66105568,
      "afterOptimizeAllocatedBytes": 64352256,
      "afterOptimizeLogicalBytes": 64348274,
      "undoContentEquivalent": true
    },
    {
      "sample": "08",
      "beforeLogicalBytes": 302671635,
      "afterOptimizeAllocatedBytes": 132272128,
      "afterOptimizeLogicalBytes": 128497956,
      "undoContentEquivalent": true
    }
  ],
  "limitations": [
    "Eight eligible archived conversations from one Mac, not a population benchmark or typical savings promise",
    "No active conversations, conversations linked to others, other tools or other Mint editions in this sample",
    "Headless product workflow and Codex reader/request checks; no GUI interaction or real model response tested",
    "Undo preserves decoded content, not the original image-file encoding",
    "24-hour regrowth and continued daily work not measured",
    "Private source data is not public; methods and aggregate results can be checked and repeated on another dataset"
  ],
  "priorUseContext": {
    "source": "Local Mint operation history inspected on 2026-10-15",
    "alreadyUsedForStorageOptimization": true,
    "exampleEarlierCompletedOperation": {
      "recordedAt": "2026-10-10T03:10:32Z",
      "reportedFreedBytes": 15453593600,
      "processedItems": 4801,
      "outcome": "completed",
      "lossless": true,
      "movedToTrash": false,
      "permanentlyDeleted": false
    },
    "interpretation": "This Mac had already undergone repeated storage optimization. This historical app-reported operation covers a different, broader file scope; it is not a controlled Codex-only result or an independently reverified savings figure. No claim that the eight case files were previously optimized.",
    "includedInCurrentCaseSavings": false
  }
}
