{
  "schema": "naguard.scheduling-protocol.v1",
  "version": "1.0.0",
  "author": "陈鹏旭",
  "createdAt": "2026-10-15T04:59:41.313Z",
  "phase": "frozen-before-comparison",
  "inputManifest": "work/scheduling/input-manifest.json",
  "inputManifestHash": "0b9fb1e37e7d188175a92f1a6e439373132c5feb3891a1ee10efc839108c3c06",
  "experiment": "Connect finite task selection to actual same-quality BMP backup/thumbnail/hash workers.",
  "repetitions": {
    "count": 3,
    "kind": "same fixed deterministic inputs; reproducibility repetitions, not statistically independent user samples"
  },
  "quality": {
    "id": "bmp-fixed-v1",
    "modes": 1,
    "utilityFactor": 1,
    "source": "160x96 uncompressed 24-bit BMP",
    "backup": "byte-identical source",
    "thumbnail": "40x24 nearest-neighbor BMP; independently verified per pixel"
  },
  "checkpointPolicy": "Same existing workpod engine for all methods: save verified progress after every image using temporary files, fsync and atomic replacement; valid committed images are retained on resume. Not a physical power-loss guarantee.",
  "energyModel": {
    "unit": "synthetic accounting unit, not Wh",
    "costPerImage": 1,
    "reserve": "Same reserve within each scenario, never charged repeatedly between batches.",
    "capacityOrPowerMeasured": false,
    "deadlineUnit": "synthetic tick, not observed wall time",
    "legacyCoordinateMapping": "core.capacityWh=initialUnits, shutdownWh=reserveUnits, baseW=0, fixed fractions=100%; core.durationMin=durationTicks, extraW=costUnits*60/durationTicks. Names are internal mathematical coordinates, not physical units."
  },
  "methods": [
    {
      "id": "original",
      "label": "原顺序规则",
      "rule": "Visit original input order; skip an entire batch if it would violate remaining synthetic budget/reserve or modeled deadline/window."
    },
    {
      "id": "importance",
      "label": "预定义重要性规则",
      "rule": "Descending illustrative value, ties original order; same admission checks. A deterministic rule, not observed human behavior."
    },
    {
      "id": "exact",
      "label": "精确优化",
      "rule": "Existing core with one fixed-quality mode; selected set executed in EDD order. Same admission constraints; no quality reduction."
    }
  ],
  "additionalModelBaselines": {
    "efficiency": "Descending value/cost with same whole-batch admission checks, model-only and not executed. Included to show that the favorable heterogeneous example does not outperform a sensible efficiency greedy."
  },
  "primaryMetrics": [
    "completed whole-batch illustrative value after all expected outputs verify",
    "actual completed images and batch IDs",
    "independent source/backup SHA256 and thumbnail pixel checks",
    "synthetic cost charged and final reserve",
    "agreement with independent all-order small-sample enumeration"
  ],
  "failureStandards": [
    "Any source-to-task mismatch, output hash/pixel mismatch, unsafe path, altered binding or code/protocol hash must fail closed.",
    "No partial batch earns value. No image may be called completed without persistent verified artifacts.",
    "A strategy must not spend below reserve; initial reserve infeasibility is reported, not disguised as a feasible guarantee.",
    "Core value must agree with independent all-order enumeration under this limited model.",
    "No claims of real battery, AI inference, physical power-loss, observed deadline performance, Wh savings, statistical significance or superiority over best available greedy."
  ],
  "verificationPlan": [
    "Independent hashes/pixels for all executed images and input mappings.",
    "Independent all-order subset enumeration for all six small task sets.",
    "Bound job pauses after one committed image, resumes after synthetic replenishment without repeating valid image.",
    "Altered source together with altered job.json hashes still rejected by external frozen task binding.",
    "Illegal scenario/binding/plan changes rejected before additional processing."
  ],
  "verificationCases": {
    "recovery": {
      "sourceTask": "reserve-infeasible/A",
      "images": 3,
      "initialUnits": 3,
      "reserveUnits": 2,
      "replenishUnits": 2,
      "expectedPausedImages": 1,
      "expectedFinalImages": 3
    },
    "sourceTampering": "Change one byte of the first own-job source, update mutable job.json hash, expect external frozen binding to reject before attempts.",
    "changedPlan": "Change orderedTaskIds in expected context, expect rejection before attempts.",
    "illegalParameters": [
      "negative initialUnits",
      "quality=0.8 instead of fixed quality1"
    ]
  },
  "scenarios": [
    {
      "id": "equal-cost-tie",
      "label": "同成本：重要性规则与精确优化打平",
      "initialUnits": 4,
      "reserveUnits": 2,
      "taskBudgetUnits": 2,
      "horizonTicks": 10,
      "tasks": [
        {
          "id": "A",
          "label": "批次A",
          "imageCount": 1,
          "value": 1,
          "costUnits": 1,
          "durationTicks": 1,
          "deadlineTicks": 10,
          "quality": 1,
          "sourceIndices": [
            1
          ],
          "sourceHashes": [
            "b8fbb7451b93b1041067a0ca1ec0880a7460f078af4781ef09dee848a2338f91"
          ],
          "dependencies": []
        },
        {
          "id": "B",
          "label": "批次B",
          "imageCount": 1,
          "value": 5,
          "costUnits": 1,
          "durationTicks": 1,
          "deadlineTicks": 10,
          "quality": 1,
          "sourceIndices": [
            2
          ],
          "sourceHashes": [
            "7c658d43cf855ef29e8b2afd20e9c29cdc9466622043a27882e2618db4dadd4c"
          ],
          "dependencies": []
        },
        {
          "id": "C",
          "label": "批次C",
          "imageCount": 1,
          "value": 4,
          "costUnits": 1,
          "durationTicks": 1,
          "deadlineTicks": 10,
          "quality": 1,
          "sourceIndices": [
            3
          ],
          "sourceHashes": [
            "45e422a4c3450245f65c5dafabd35a06c2a13ed27f6dbd1a3553b5b9283c160c"
          ],
          "dependencies": []
        },
        {
          "id": "D",
          "label": "批次D",
          "imageCount": 1,
          "value": 3,
          "costUnits": 1,
          "durationTicks": 1,
          "deadlineTicks": 10,
          "quality": 1,
          "sourceIndices": [
            4
          ],
          "sourceHashes": [
            "c2e91733110c2e70f24d65a50ddebc288078f1a8e5fd3694007b5e0575360790"
          ],
          "dependencies": []
        }
      ]
    },
    {
      "id": "heterogeneous-benefit",
      "label": "异质批次：精确优于所列两规则，效率贪心也能打平",
      "initialUnits": 12,
      "reserveUnits": 2,
      "taskBudgetUnits": 10,
      "horizonTicks": 30,
      "tasks": [
        {
          "id": "A",
          "label": "大批次A",
          "imageCount": 8,
          "value": 10,
          "costUnits": 8,
          "durationTicks": 8,
          "deadlineTicks": 30,
          "quality": 1,
          "sourceIndices": [
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8
          ],
          "sourceHashes": [
            "b8fbb7451b93b1041067a0ca1ec0880a7460f078af4781ef09dee848a2338f91",
            "7c658d43cf855ef29e8b2afd20e9c29cdc9466622043a27882e2618db4dadd4c",
            "45e422a4c3450245f65c5dafabd35a06c2a13ed27f6dbd1a3553b5b9283c160c",
            "c2e91733110c2e70f24d65a50ddebc288078f1a8e5fd3694007b5e0575360790",
            "4dbdab75de33f0dc6d77cd5059372b9cbdb6fcb359eda81c9b1d405b7546a6c9",
            "00d5f4f61c3393e5d7fe245ae79945b819a9650b808c68f7de0a3e999c513c3e",
            "e99e73fe27998da77656d385400f97d6cd595be1208da90d56423d165dbd2368",
            "1cccbaf03d5ec83fa4f7fe08329877142240b1e461548179f7061ffcd0107bcd"
          ],
          "dependencies": []
        },
        {
          "id": "B",
          "label": "中批次B",
          "imageCount": 5,
          "value": 7,
          "costUnits": 5,
          "durationTicks": 5,
          "deadlineTicks": 30,
          "quality": 1,
          "sourceIndices": [
            9,
            10,
            11,
            12,
            13
          ],
          "sourceHashes": [
            "88998c3b5d25b454d241116ca681efd472db1f82fc853089f5387231058a8768",
            "dff5ef926ed6e633acd6328e15ba819cc14d613264048d4acb0d27797fee2cf7",
            "2e2e1825ef69432633b62453b15d47527ae3ac0ebfb3eca3ba3ca7602cfe8d08",
            "634901c84f2dde1bc69c1dd5559a65378d6269a08c79db34eda468a1632df90c",
            "e9208f0b1c6cb2cf968af0d23724b0f5f7eb4d290d660c43cf6addca03119bd3"
          ],
          "dependencies": []
        },
        {
          "id": "C",
          "label": "中批次C",
          "imageCount": 5,
          "value": 7,
          "costUnits": 5,
          "durationTicks": 5,
          "deadlineTicks": 30,
          "quality": 1,
          "sourceIndices": [
            14,
            15,
            16,
            17,
            18
          ],
          "sourceHashes": [
            "c06eceb2c878ebd0498d1e9571d82f98c29145fdeae8744c3c89b3005444825b",
            "fd38718954c83000bd8af60819d8d92078c7a4a0ba6f3bbbf763a3df55eaae79",
            "6c1ccb7984e9db8d8dccd991801779aaa5b0b49fece610404882e9cd0ed71ba0",
            "0bad33f48c1c283ad175c8b0b095cacc9a06711c5045925a3241fe2169aad63a",
            "0b28c98d696ebcc4334ede17751f7e854be53ef45bd5cbae5de0f7750eb282a4"
          ],
          "dependencies": []
        }
      ]
    },
    {
      "id": "ample-tie",
      "label": "预算充足：三策略打平",
      "initialUnits": 22,
      "reserveUnits": 2,
      "taskBudgetUnits": 20,
      "horizonTicks": 30,
      "tasks": [
        {
          "id": "A",
          "label": "大批次A",
          "imageCount": 8,
          "value": 10,
          "costUnits": 8,
          "durationTicks": 8,
          "deadlineTicks": 30,
          "quality": 1,
          "sourceIndices": [
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8
          ],
          "sourceHashes": [
            "b8fbb7451b93b1041067a0ca1ec0880a7460f078af4781ef09dee848a2338f91",
            "7c658d43cf855ef29e8b2afd20e9c29cdc9466622043a27882e2618db4dadd4c",
            "45e422a4c3450245f65c5dafabd35a06c2a13ed27f6dbd1a3553b5b9283c160c",
            "c2e91733110c2e70f24d65a50ddebc288078f1a8e5fd3694007b5e0575360790",
            "4dbdab75de33f0dc6d77cd5059372b9cbdb6fcb359eda81c9b1d405b7546a6c9",
            "00d5f4f61c3393e5d7fe245ae79945b819a9650b808c68f7de0a3e999c513c3e",
            "e99e73fe27998da77656d385400f97d6cd595be1208da90d56423d165dbd2368",
            "1cccbaf03d5ec83fa4f7fe08329877142240b1e461548179f7061ffcd0107bcd"
          ],
          "dependencies": []
        },
        {
          "id": "B",
          "label": "中批次B",
          "imageCount": 5,
          "value": 7,
          "costUnits": 5,
          "durationTicks": 5,
          "deadlineTicks": 30,
          "quality": 1,
          "sourceIndices": [
            9,
            10,
            11,
            12,
            13
          ],
          "sourceHashes": [
            "88998c3b5d25b454d241116ca681efd472db1f82fc853089f5387231058a8768",
            "dff5ef926ed6e633acd6328e15ba819cc14d613264048d4acb0d27797fee2cf7",
            "2e2e1825ef69432633b62453b15d47527ae3ac0ebfb3eca3ba3ca7602cfe8d08",
            "634901c84f2dde1bc69c1dd5559a65378d6269a08c79db34eda468a1632df90c",
            "e9208f0b1c6cb2cf968af0d23724b0f5f7eb4d290d660c43cf6addca03119bd3"
          ],
          "dependencies": []
        },
        {
          "id": "C",
          "label": "中批次C",
          "imageCount": 5,
          "value": 7,
          "costUnits": 5,
          "durationTicks": 5,
          "deadlineTicks": 30,
          "quality": 1,
          "sourceIndices": [
            14,
            15,
            16,
            17,
            18
          ],
          "sourceHashes": [
            "c06eceb2c878ebd0498d1e9571d82f98c29145fdeae8744c3c89b3005444825b",
            "fd38718954c83000bd8af60819d8d92078c7a4a0ba6f3bbbf763a3df55eaae79",
            "6c1ccb7984e9db8d8dccd991801779aaa5b0b49fece610404882e9cd0ed71ba0",
            "0bad33f48c1c283ad175c8b0b095cacc9a06711c5045925a3241fe2169aad63a",
            "0b28c98d696ebcc4334ede17751f7e854be53ef45bd5cbae5de0f7750eb282a4"
          ],
          "dependencies": []
        }
      ]
    },
    {
      "id": "reserve-infeasible",
      "label": "总预算低于保护余量：拒绝开始",
      "initialUnits": 1,
      "reserveUnits": 2,
      "taskBudgetUnits": 0,
      "horizonTicks": 30,
      "tasks": [
        {
          "id": "A",
          "label": "待处理批次A",
          "imageCount": 3,
          "value": 5,
          "costUnits": 3,
          "durationTicks": 3,
          "deadlineTicks": 30,
          "quality": 1,
          "sourceIndices": [
            1,
            2,
            3
          ],
          "sourceHashes": [
            "b8fbb7451b93b1041067a0ca1ec0880a7460f078af4781ef09dee848a2338f91",
            "7c658d43cf855ef29e8b2afd20e9c29cdc9466622043a27882e2618db4dadd4c",
            "45e422a4c3450245f65c5dafabd35a06c2a13ed27f6dbd1a3553b5b9283c160c"
          ],
          "dependencies": []
        },
        {
          "id": "B",
          "label": "待处理批次B",
          "imageCount": 2,
          "value": 4,
          "costUnits": 2,
          "durationTicks": 2,
          "deadlineTicks": 30,
          "quality": 1,
          "sourceIndices": [
            4,
            5
          ],
          "sourceHashes": [
            "c2e91733110c2e70f24d65a50ddebc288078f1a8e5fd3694007b5e0575360790",
            "4dbdab75de33f0dc6d77cd5059372b9cbdb6fcb359eda81c9b1d405b7546a6c9"
          ],
          "dependencies": []
        }
      ]
    },
    {
      "id": "exact-budget-boundary",
      "label": "恰好预算：任务10单位＋保护2单位",
      "initialUnits": 12,
      "reserveUnits": 2,
      "taskBudgetUnits": 10,
      "horizonTicks": 30,
      "tasks": [
        {
          "id": "A",
          "label": "批次A",
          "imageCount": 10,
          "value": 9,
          "costUnits": 10,
          "durationTicks": 10,
          "deadlineTicks": 30,
          "quality": 1,
          "sourceIndices": [
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9,
            10
          ],
          "sourceHashes": [
            "b8fbb7451b93b1041067a0ca1ec0880a7460f078af4781ef09dee848a2338f91",
            "7c658d43cf855ef29e8b2afd20e9c29cdc9466622043a27882e2618db4dadd4c",
            "45e422a4c3450245f65c5dafabd35a06c2a13ed27f6dbd1a3553b5b9283c160c",
            "c2e91733110c2e70f24d65a50ddebc288078f1a8e5fd3694007b5e0575360790",
            "4dbdab75de33f0dc6d77cd5059372b9cbdb6fcb359eda81c9b1d405b7546a6c9",
            "00d5f4f61c3393e5d7fe245ae79945b819a9650b808c68f7de0a3e999c513c3e",
            "e99e73fe27998da77656d385400f97d6cd595be1208da90d56423d165dbd2368",
            "1cccbaf03d5ec83fa4f7fe08329877142240b1e461548179f7061ffcd0107bcd",
            "88998c3b5d25b454d241116ca681efd472db1f82fc853089f5387231058a8768",
            "dff5ef926ed6e633acd6328e15ba819cc14d613264048d4acb0d27797fee2cf7"
          ],
          "dependencies": []
        },
        {
          "id": "B",
          "label": "批次B",
          "imageCount": 6,
          "value": 6,
          "costUnits": 6,
          "durationTicks": 6,
          "deadlineTicks": 30,
          "quality": 1,
          "sourceIndices": [
            11,
            12,
            13,
            14,
            15,
            16
          ],
          "sourceHashes": [
            "2e2e1825ef69432633b62453b15d47527ae3ac0ebfb3eca3ba3ca7602cfe8d08",
            "634901c84f2dde1bc69c1dd5559a65378d6269a08c79db34eda468a1632df90c",
            "e9208f0b1c6cb2cf968af0d23724b0f5f7eb4d290d660c43cf6addca03119bd3",
            "c06eceb2c878ebd0498d1e9571d82f98c29145fdeae8744c3c89b3005444825b",
            "fd38718954c83000bd8af60819d8d92078c7a4a0ba6f3bbbf763a3df55eaae79",
            "6c1ccb7984e9db8d8dccd991801779aaa5b0b49fece610404882e9cd0ed71ba0"
          ],
          "dependencies": []
        },
        {
          "id": "C",
          "label": "批次C",
          "imageCount": 4,
          "value": 5,
          "costUnits": 4,
          "durationTicks": 4,
          "deadlineTicks": 30,
          "quality": 1,
          "sourceIndices": [
            17,
            18,
            19,
            20
          ],
          "sourceHashes": [
            "0bad33f48c1c283ad175c8b0b095cacc9a06711c5045925a3241fe2169aad63a",
            "0b28c98d696ebcc4334ede17751f7e854be53ef45bd5cbae5de0f7750eb282a4",
            "ebd397130b54d61596281ae1e1f51b904a3b094c2adc12da12945ff73d51d4a0",
            "f5f7e6a6323d788c3b43b78a3c34a0a3aeaf86924e94cf48bc743a5b3a38d12a"
          ],
          "dependencies": []
        }
      ]
    },
    {
      "id": "just-below-boundary",
      "label": "略低预算：9.999任务单位不当作10",
      "initialUnits": 11.999,
      "reserveUnits": 2,
      "taskBudgetUnits": 9.999,
      "horizonTicks": 30,
      "tasks": [
        {
          "id": "A",
          "label": "批次A",
          "imageCount": 10,
          "value": 9,
          "costUnits": 10,
          "durationTicks": 10,
          "deadlineTicks": 30,
          "quality": 1,
          "sourceIndices": [
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9,
            10
          ],
          "sourceHashes": [
            "b8fbb7451b93b1041067a0ca1ec0880a7460f078af4781ef09dee848a2338f91",
            "7c658d43cf855ef29e8b2afd20e9c29cdc9466622043a27882e2618db4dadd4c",
            "45e422a4c3450245f65c5dafabd35a06c2a13ed27f6dbd1a3553b5b9283c160c",
            "c2e91733110c2e70f24d65a50ddebc288078f1a8e5fd3694007b5e0575360790",
            "4dbdab75de33f0dc6d77cd5059372b9cbdb6fcb359eda81c9b1d405b7546a6c9",
            "00d5f4f61c3393e5d7fe245ae79945b819a9650b808c68f7de0a3e999c513c3e",
            "e99e73fe27998da77656d385400f97d6cd595be1208da90d56423d165dbd2368",
            "1cccbaf03d5ec83fa4f7fe08329877142240b1e461548179f7061ffcd0107bcd",
            "88998c3b5d25b454d241116ca681efd472db1f82fc853089f5387231058a8768",
            "dff5ef926ed6e633acd6328e15ba819cc14d613264048d4acb0d27797fee2cf7"
          ],
          "dependencies": []
        },
        {
          "id": "B",
          "label": "批次B",
          "imageCount": 6,
          "value": 6,
          "costUnits": 6,
          "durationTicks": 6,
          "deadlineTicks": 30,
          "quality": 1,
          "sourceIndices": [
            11,
            12,
            13,
            14,
            15,
            16
          ],
          "sourceHashes": [
            "2e2e1825ef69432633b62453b15d47527ae3ac0ebfb3eca3ba3ca7602cfe8d08",
            "634901c84f2dde1bc69c1dd5559a65378d6269a08c79db34eda468a1632df90c",
            "e9208f0b1c6cb2cf968af0d23724b0f5f7eb4d290d660c43cf6addca03119bd3",
            "c06eceb2c878ebd0498d1e9571d82f98c29145fdeae8744c3c89b3005444825b",
            "fd38718954c83000bd8af60819d8d92078c7a4a0ba6f3bbbf763a3df55eaae79",
            "6c1ccb7984e9db8d8dccd991801779aaa5b0b49fece610404882e9cd0ed71ba0"
          ],
          "dependencies": []
        },
        {
          "id": "C",
          "label": "批次C",
          "imageCount": 4,
          "value": 5,
          "costUnits": 4,
          "durationTicks": 4,
          "deadlineTicks": 30,
          "quality": 1,
          "sourceIndices": [
            17,
            18,
            19,
            20
          ],
          "sourceHashes": [
            "0bad33f48c1c283ad175c8b0b095cacc9a06711c5045925a3241fe2169aad63a",
            "0b28c98d696ebcc4334ede17751f7e854be53ef45bd5cbae5de0f7750eb282a4",
            "ebd397130b54d61596281ae1e1f51b904a3b094c2adc12da12945ff73d51d4a0",
            "f5f7e6a6323d788c3b43b78a3c34a0a3aeaf86924e94cf48bc743a5b3a38d12a"
          ],
          "dependencies": []
        }
      ]
    }
  ],
  "codeHashes": [
    {
      "file": "outputs/xuhang/core.js",
      "sha256": "ca7628926276996b7251a954fd4e931327144621c086c9479e197ad67fb48f10"
    },
    {
      "file": "work/workpod/engine.cjs",
      "sha256": "29e083509f877d35c19177a913d64e4211ec4c74c018a34c00333b4b472a59f0"
    },
    {
      "file": "work/scheduling/planner.cjs",
      "sha256": "4128ce8e37edf01279c524d05d61c94406721b40f9c09750cd4d729006ca674d"
    },
    {
      "file": "work/scheduling/adapter.cjs",
      "sha256": "2c76a63a811049c0f295c026e274e1c09977dec24311f413a1ae671071debdca"
    },
    {
      "file": "work/scheduling/run.cjs",
      "sha256": "5a97a01940e6360668bc1c16fdc98e5769b11d0e44f1db4ac1b56b1a10e630ec"
    },
    {
      "file": "work/scheduling/verify.cjs",
      "sha256": "b122828b3f62676641058e3939151f5dcef257886732f1ca84979ea19c3aca29"
    }
  ]
}
