{
  "schema": "turkos-public-development-evidence/v1",
  "originalReport": {
    "path": "reports/os-implementation/K2145-shutdown-io-quiesce-local-Xggx0T/report.json",
    "sha256": "496739f5a96d48c5c7f8d3a492e556727afbf7ee94b8b4a3c16b54d4dc5387a6",
    "bytes": 17004
  },
  "status": "K2141_K2144_LOCAL_VALIDATED",
  "scope": "# Shutdown Write-Admission Quiesce Contract (`K2141–K2145`)\n\n1. **Admission Boundary (`Open` vs `Quiescing` / `Quiesced`)**:\n   - New client writes are admitted only while `Phase::Open` holds and `client_id`, `bytes`, and `digest` are non-zero within the bounded `MAX_WRITES` table.\n   - Once `begin_quiesce` is invoked, the gate transitions to `Phase::Quiescing` (or `Phase::Quiesced` when `inflight == 0`). Every subsequent `admit_write` attempt is refused with `Error::Shutdown` (`ESHUTDOWN = 108`) and increments `rejected_eshutdown`.\n\n2. **Preservation of Existing Work During Drain**:\n   - Already-admitted writes continue to complete via `complete_write`, recording `drained`, `drained_bytes`, `drained_digest`, and per-write `CompletedWrite` receipts.\n   - Racing `admit_write` calls that fail with `Error::Shutdown` (`ESHUTDOWN`) never alter or discard in-flight or completed write records.\n   - `require_quiesced` succeeds only when `Phase::Quiesced` is reached and `inflight == 0`.\n",
  "productAccepted": false,
  "tests": {
    "greenCount": 4,
    "positiveName": "os_shutdown_io_quiesce_positive",
    "negativeName": "os_shutdown_io_quiesce_negative",
    "mutationsRejected": 20
  },
  "caseCount": 0,
  "caseSerialsSelected": 0,
  "imageSha256": null,
  "files": [
    {
      "name": "Cargo.toml",
      "source": "reports/os-implementation/K2145-shutdown-io-quiesce-staging-local-YzQTkR/source/os-shutdown-io/Cargo.toml",
      "originalSha256": "b792cd43b228daf4ed8b96a52e9ad3d20c3703255d30ccfed4d2d3daf80c9209",
      "href": "/os-evidence/b792cd43b228daf4ed8b96a52e9ad3d20c3703255d30ccfed4d2d3daf80c9209.txt",
      "sha256": "b792cd43b228daf4ed8b96a52e9ad3d20c3703255d30ccfed4d2d3daf80c9209",
      "bytes": 103,
      "redacted": false
    },
    {
      "name": "SHUTDOWN_IO_QUIESCE_CONTRACT.md",
      "source": "reports/os-implementation/K2145-shutdown-io-quiesce-staging-local-YzQTkR/source/kernel/SHUTDOWN_IO_QUIESCE_CONTRACT.md",
      "originalSha256": "a63433788ba6a0481f02948796da30a1cefcf95745fc61ee0cfbdcd5b97fa38e",
      "href": "/os-evidence/a63433788ba6a0481f02948796da30a1cefcf95745fc61ee0cfbdcd5b97fa38e.txt",
      "sha256": "a63433788ba6a0481f02948796da30a1cefcf95745fc61ee0cfbdcd5b97fa38e",
      "bytes": 995,
      "redacted": false
    },
    {
      "name": "lib.rs",
      "source": "reports/os-implementation/K2145-shutdown-io-quiesce-staging-local-YzQTkR/source/os-shutdown-io/src/lib.rs",
      "originalSha256": "02d3c014e66aac2ae2837e13d1314d8cb156a1271d2dc97c2060c0569df4ee62",
      "href": "/os-evidence/02d3c014e66aac2ae2837e13d1314d8cb156a1271d2dc97c2060c0569df4ee62.txt",
      "sha256": "02d3c014e66aac2ae2837e13d1314d8cb156a1271d2dc97c2060c0569df4ee62",
      "bytes": 28,
      "redacted": false
    },
    {
      "name": "quiesce.rs",
      "source": "reports/os-implementation/K2145-shutdown-io-quiesce-staging-local-YzQTkR/source/os-shutdown-io/src/quiesce.rs",
      "originalSha256": "b90bed989d6d50b34d29deeb81d1b6986c139acc262a7ccdc27553f673d30527",
      "href": "/os-evidence/b90bed989d6d50b34d29deeb81d1b6986c139acc262a7ccdc27553f673d30527.txt",
      "sha256": "b90bed989d6d50b34d29deeb81d1b6986c139acc262a7ccdc27553f673d30527",
      "bytes": 5413,
      "redacted": false
    },
    {
      "name": "quiesce.rs",
      "source": "reports/os-implementation/K2145-shutdown-io-quiesce-staging-local-YzQTkR/source/os-shutdown-io/tests/quiesce.rs",
      "originalSha256": "8fc069bb2dc48cdd3348e22123b7cc4b496cfc7dec3135fbc0de702207b05ee1",
      "href": "/os-evidence/8fc069bb2dc48cdd3348e22123b7cc4b496cfc7dec3135fbc0de702207b05ee1.txt",
      "sha256": "8fc069bb2dc48cdd3348e22123b7cc4b496cfc7dec3135fbc0de702207b05ee1",
      "bytes": 3345,
      "redacted": false
    },
    {
      "name": "host-tests.log",
      "source": "reports/os-implementation/K2145-shutdown-io-quiesce-staging-local-YzQTkR/host-tests.log",
      "originalSha256": "94741b31415fe41935c95a0fff036cfade26d0aa7a74d2230565c5a401197687",
      "href": "/os-evidence/14bf63e9c97e33d53743f6e7e6c29e4dfd0b41573aea9e85ec54b8e4a5e3b821.txt",
      "sha256": "14bf63e9c97e33d53743f6e7e6c29e4dfd0b41573aea9e85ec54b8e4a5e3b821",
      "bytes": 752,
      "redacted": true
    },
    {
      "name": "positive.log",
      "source": "reports/os-implementation/K2145-shutdown-io-quiesce-staging-local-YzQTkR/positive.log",
      "originalSha256": "ae3bf7088b08f7fe0c2e3723501f9f61d74ae91928c470992aa93d13d8897683",
      "href": "/os-evidence/ae3bf7088b08f7fe0c2e3723501f9f61d74ae91928c470992aa93d13d8897683.txt",
      "sha256": "ae3bf7088b08f7fe0c2e3723501f9f61d74ae91928c470992aa93d13d8897683",
      "bytes": 421,
      "redacted": false
    },
    {
      "name": "negative.log",
      "source": "reports/os-implementation/K2145-shutdown-io-quiesce-staging-local-YzQTkR/negative.log",
      "originalSha256": "61e65f72e830fdfc2d8253b5dbc07432be5241175d3e749ea1b910ee354df57c",
      "href": "/os-evidence/61e65f72e830fdfc2d8253b5dbc07432be5241175d3e749ea1b910ee354df57c.txt",
      "sha256": "61e65f72e830fdfc2d8253b5dbc07432be5241175d3e749ea1b910ee354df57c",
      "bytes": 421,
      "redacted": false
    },
    {
      "name": "target.log",
      "source": "reports/os-implementation/K2145-shutdown-io-quiesce-staging-local-YzQTkR/target.log",
      "originalSha256": "a0bd78709c2fe237efefb69e1c45fa55aef02f31f26e5582d5e89b63883d66cb",
      "href": "/os-evidence/1eb74022ee8e1db803fc7f3a3b41d3b975254c687246149912d70c6f95319ca6.txt",
      "sha256": "1eb74022ee8e1db803fc7f3a3b41d3b975254c687246149912d70c6f95319ca6",
      "bytes": 221,
      "redacted": true
    },
    {
      "name": "harness.mjs.txt",
      "source": "reports/os-implementation/K2145-shutdown-io-quiesce-local-Xggx0T/harness.mjs.txt",
      "originalSha256": "afc913f79c414c44a72e26a3a004d9f03d04045996a9bd2887ce7c9410385284",
      "href": "/os-evidence/afc913f79c414c44a72e26a3a004d9f03d04045996a9bd2887ce7c9410385284.txt",
      "sha256": "afc913f79c414c44a72e26a3a004d9f03d04045996a9bd2887ce7c9410385284",
      "bytes": 4604,
      "redacted": false
    },
    {
      "name": "k2145-shutdown-io-quiesce.rs",
      "source": "reports/os-implementation/K2145-shutdown-io-quiesce-candidate-tbnr49/sources/kernel/src/k2145-shutdown-io-quiesce.rs",
      "originalSha256": "799d542cde891eb849c8a2d409dcccbaa0c838a2ad3e9c360622ba6d3cc838f8",
      "href": "/os-evidence/799d542cde891eb849c8a2d409dcccbaa0c838a2ad3e9c360622ba6d3cc838f8.txt",
      "sha256": "799d542cde891eb849c8a2d409dcccbaa0c838a2ad3e9c360622ba6d3cc838f8",
      "bytes": 7358,
      "redacted": false
    },
    {
      "name": "shutdown_io_quiesce.rs",
      "source": "reports/os-implementation/K2145-shutdown-io-quiesce-candidate-tbnr49/sources/kernel/src/runtime/shutdown_io_quiesce.rs",
      "originalSha256": "b90bed989d6d50b34d29deeb81d1b6986c139acc262a7ccdc27553f673d30527",
      "href": "/os-evidence/b90bed989d6d50b34d29deeb81d1b6986c139acc262a7ccdc27553f673d30527.txt",
      "sha256": "b90bed989d6d50b34d29deeb81d1b6986c139acc262a7ccdc27553f673d30527",
      "bytes": 5413,
      "redacted": false
    },
    {
      "name": "main.rs",
      "source": "reports/os-implementation/K2145-shutdown-io-quiesce-candidate-tbnr49/sources/kernel/src/main.rs",
      "originalSha256": "e4bcf16f4e6a06befcecbafcca5d85846ab20b53cb4de0e8b57feac559077ad8",
      "href": "/os-evidence/fcd2557cb0e957ff1172f627ba57ac36c0fd78e845162fe37fbce02f610cd8b8.txt",
      "sha256": "fcd2557cb0e957ff1172f627ba57ac36c0fd78e845162fe37fbce02f610cd8b8",
      "bytes": 2307407,
      "redacted": true
    },
    {
      "name": "mod.rs",
      "source": "reports/os-implementation/K2145-shutdown-io-quiesce-candidate-tbnr49/sources/kernel/src/runtime/mod.rs",
      "originalSha256": "40e4087f64b2ff896d6b5706c65758309c224178298cd1b5b4247a8bed3b0bed",
      "href": "/os-evidence/40e4087f64b2ff896d6b5706c65758309c224178298cd1b5b4247a8bed3b0bed.txt",
      "sha256": "40e4087f64b2ff896d6b5706c65758309c224178298cd1b5b4247a8bed3b0bed",
      "bytes": 4173,
      "redacted": false
    },
    {
      "name": "kernel-product.log",
      "source": "reports/os-implementation/K2145-shutdown-io-quiesce-candidate-tbnr49/kernel-product.log",
      "originalSha256": "ddf125ccc9fdeedf6bc55ea502e55f8d5b58bff989e19f1b7215e81e9d54e2e3",
      "href": "/os-evidence/a0a6ffbf3ad6abdf82d3c3410a3658aa85349247fe05a03b1a96fff9092049a7.txt",
      "sha256": "a0a6ffbf3ad6abdf82d3c3410a3658aa85349247fe05a03b1a96fff9092049a7",
      "bytes": 2307,
      "redacted": true
    }
  ],
  "moves": [
    "K2141",
    "K2142",
    "K2143",
    "K2144"
  ]
}
