{
  "slug": "dropped-rows",
  "status": "recorded",
  "recordedAt": "2026-12-04T13:05:55.306Z",
  "synthetic": true,
  "machine": {
    "model": "MacBookPro18,2",
    "cpuCount": 10,
    "cpu": "Apple M1 Max",
    "loadAverage": {
      "one": 19.52,
      "five": 29.53,
      "fifteen": 74.63
    },
    "loadNote": "load average 19.52 on 10 cores when the capture started: more work was waiting than there were cores, so times are slower than on an idle machine"
  },
  "engine": {
    "repository": "hopperlabs-ai-engines/hopper-engines-graph-computer",
    "commit": "bc269bb88e0298b3d7085f05a205013f34ba8a23",
    "workingTreeNote": "working tree clean at capture time",
    "imports": [
      "src/computer.mjs",
      "src/program-surface.mjs",
      "src/program-modules.mjs",
      "src/dependencies.mjs"
    ]
  },
  "via": "engine directly (ProgramSurface from src/program-surface.mjs)",
  "kernels": [
    {
      "path": "scripts/case-evidence/kernels/rows.mjs",
      "moduleId": "case-rows",
      "digest": "sha256:e4cee011e908be461566dad9a75319759ee99a68e3fc5b38a13cf303b97dd0f5",
      "operations": [
        "module.case-rows.ingest",
        "module.case-rows.tally",
        "module.case-rows.check"
      ]
    }
  ],
  "programs": [
    {
      "name": "rows.ingest",
      "version": "1.0.0",
      "componentRef": "component:bf4b73cc04230ec421b60697f4a91f0f424af147c3182d030af2b1502fe61772",
      "visibility": "registered in a local engine scope; not published"
    },
    {
      "name": "rows.count-and-sum",
      "version": "1.0.0",
      "componentRef": "component:2ea0d43e21a7dc6b1e017f8884b354990f2c6683fdc028ef2680f75221520a7e",
      "visibility": "registered in a local engine scope; not published"
    }
  ],
  "input": {
    "rows": 1000000,
    "truncatedRows": 65536,
    "declaredRows": 1000000,
    "synthetic": true,
    "seed": 65536,
    "generator": "mulberry32 (scripts/case-evidence/lib.mjs seeded()), Box-Muller for normal draws",
    "description": "1,000,000 made-up rows, one integer amount in cents each (uniform 100 to 250,000). The source declares 1,000,000 rows. The truncated input is the first 65,536 rows of the same source, with the same declared count.",
    "howSupplied": "The engine takes at most 4 MiB of JSON per run input, so the rows go in as parts of 250,000 through rows.ingest@1.0.0 runs that keep each part in the engine's content store; rows.count-and-sum@1.0.0 then reads the parts by reference."
  },
  "runs": [
    {
      "label": "All 1,000,000 rows",
      "program": "rows.count-and-sum@1.0.0",
      "status": "succeeded",
      "ms": 560.5,
      "totalMsIncludingIngest": 6079.2,
      "headDigest": "sha256:0866a9c26add2b101913b7b14ff14777156fcc092e42b7b848142085cf96f256",
      "headDigestShort": "0866a9c26add",
      "outputDigest": "sha256:65029a23b94d578f5862b9ae671c9f0046f205c742129c9d5a9d697ac50e5f24",
      "outputDigestShort": "65029a23b94d",
      "verificationOk": true,
      "engineReported": {
        "thrown": null,
        "status": "succeeded",
        "runtimeStatus": "succeeded",
        "failedNodes": [],
        "outputs": {
          "passed": true,
          "rowsIn": 1000000,
          "rowsOut": 1000000,
          "sumCents": 124958293323
        }
      },
      "tallyStep": {
        "status": "succeeded",
        "outputDigest": "sha256:9befb8cd06cdb8fe25a4dbe4222ef1b4cc2101548c6162e1a9891642eb3f30fc",
        "outputDigestShort": "9befb8cd06cd",
        "output": {
          "rowsIn": 1000000,
          "rowsOut": 1000000,
          "sumCents": 124958293323
        }
      },
      "ingestRuns": [
        {
          "part": "full-0",
          "rows": 250000,
          "ms": 1397.3,
          "headDigestShort": "d6bc032907ce"
        },
        {
          "part": "full-1",
          "rows": 250000,
          "ms": 1382.4,
          "headDigestShort": "e3e68012e3b5"
        },
        {
          "part": "full-2",
          "rows": 250000,
          "ms": 1365.4,
          "headDigestShort": "9d00405e2093"
        },
        {
          "part": "full-3",
          "rows": 250000,
          "ms": 1373.6,
          "headDigestShort": "6146424d2e07"
        }
      ],
      "summary": {
        "passed": true,
        "rowsIn": 1000000,
        "rowsOut": 1000000,
        "sumCents": 124958293323
      }
    },
    {
      "label": "Truncated at 65,536 rows",
      "program": "rows.count-and-sum@1.0.0",
      "status": "failed",
      "ms": 38.8,
      "totalMsIncludingIngest": 403.1,
      "headDigest": "sha256:e3fdca56226439ca5e8987e716f608c5b0a928a86d11499ba1a9bf8f399f62d3",
      "headDigestShort": "e3fdca562264",
      "outputDigest": null,
      "outputDigestShort": null,
      "verificationOk": true,
      "engineReported": {
        "thrown": "Program run agent-program:f00a901b6d3b6860dbdf3f5ff6a9243653ac395f6c542a40019186329a3ed7fc stopped: ROW_COUNT_MISMATCH",
        "status": "failed",
        "runtimeStatus": "running",
        "failedNodes": [
          {
            "nodeId": "check::compute",
            "errorCode": "ROW_COUNT_MISMATCH"
          }
        ],
        "outputs": null
      },
      "tallyStep": {
        "status": "succeeded",
        "outputDigest": "sha256:7f255e94067499b9d80fe2c6dee7635ccad8c90399711bcc99a0acefd4f3339b",
        "outputDigestShort": "7f255e940674",
        "output": {
          "rowsIn": 65536,
          "rowsOut": 65536,
          "sumCents": 8189908892
        }
      },
      "ingestRuns": [
        {
          "part": "truncated-0",
          "rows": 65536,
          "ms": 364.3,
          "headDigestShort": "97523fc55d9a"
        }
      ],
      "summary": {
        "failedNode": "check::compute",
        "errorCode": "ROW_COUNT_MISMATCH"
      }
    }
  ],
  "replay": {
    "reexecuted": true,
    "by": "engine",
    "digestMatched": true,
    "verifiedRetainedHistory": true,
    "originalOutputDigest": "sha256:65029a23b94d578f5862b9ae671c9f0046f205c742129c9d5a9d697ac50e5f24",
    "reexecutedOutputDigest": "sha256:65029a23b94d578f5862b9ae671c9f0046f205c742129c9d5a9d697ac50e5f24",
    "modules": [
      {
        "moduleId": "case-rows",
        "digest": "sha256:e4cee011e908be461566dad9a75319759ee99a68e3fc5b38a13cf303b97dd0f5",
        "verified": true
      }
    ],
    "carriedContent": 4,
    "ms": 1431.2,
    "program": "rows.count-and-sum@1.0.0",
    "taskId": "full-total",
    "truncated": {
      "taskId": "truncated-total",
      "verifiedRetainedHistory": true,
      "reexecuted": false,
      "refusedWith": "REPLAY_REQUIRES_SUCCEEDED"
    }
  },
  "checks": [
    {
      "name": "full run succeeded and verified",
      "passed": true,
      "detail": "succeeded"
    },
    {
      "name": "full run: rows in = rows out = declared rows",
      "passed": true,
      "detail": "1000000 in, 1000000 out, 1000000 declared"
    },
    {
      "name": "truncated run stopped at the count check",
      "passed": true,
      "detail": "[{\"nodeId\":\"check::compute\",\"errorCode\":\"ROW_COUNT_MISMATCH\"}]"
    },
    {
      "name": "truncated run history still verifies",
      "passed": true,
      "detail": "true"
    },
    {
      "name": "tally step fingerprints differ between the two runs",
      "passed": true,
      "detail": "9befb8cd06cd vs 7f255e940674"
    },
    {
      "name": "engine replay re-executed the full run to the same output digest",
      "passed": true,
      "detail": "65029a23b94d vs 65029a23b94d"
    }
  ],
  "notes": [
    "Counting, summing and the row-count check are a small JavaScript kernel that the engine loads only at the fingerprint of its exact bytes; the engine runs and records it but does not prove it correct.",
    "The capture script made the short input itself, by keeping only the first 65,536 of the 1,000,000 rows while the source still declared 1,000,000.",
    "The engine takes at most 4 MiB in one input, so the rows were handed over in four parts and stored in the engine before the count.",
    "The engine replayed the full run from scratch on its own and got the same result fingerprint; it replays only runs that finished, so the stopped run was checked but not run again.",
    "Times are wall-clock on a shared Mac (load average 19.52 on 10 cores at the start)."
  ],
  "detail": [
    "The kernel is scripts/case-evidence/kernels/rows.mjs, loaded with the engine's loadProgramModule at the SHA-256 recorded in kernels[]; its steps run as pure steps of registered programs. Parts are kept in the engine's content store by rows.ingest@1.0.0 runs; rows.count-and-sum@1.0.0 reads them by reference.",
    "On the truncated run the engine threw from program.run and retained a failed run; status, failedNodes and the verification were read back with program.result. The engine records the error code only; the counts behind it (65,536 in, 1,000,000 declared) are in the tally step output, read from the run snapshot.",
    "A failed run has no program outputs (outputs is null), so there is no output digest to compare; the fingerprint that differs is the tally step's output digest. engineReported.runtimeStatus is the node engine's own run status, which stays \"running\" after the scheduler stops at the first failed step; status \"failed\" is the program surface's reading of the failed node.",
    "replay is the engine's program.replay with reexecute:true on the full run: it verifies the retained history, re-reads the kernel module and checks it against its recorded digest, copies the four stored parts the run read into a fresh in-memory engine by their content address (carriedContent), runs the program again and compares output digests. For the truncated run the engine verified the history and refused re-execution (replay.truncated.refusedWith).",
    "ms for each run is the count-and-sum run alone; totalMsIncludingIngest adds the ingest runs. headDigest fingerprints one run's retained history (it includes when it ran); outputDigest fingerprints the outputs."
  ]
}
