diff --git a/tools/aiorders_to_tcb.py b/tools/aiorders_to_tcb.py index 83677fb..65aebc5 100644 --- a/tools/aiorders_to_tcb.py +++ b/tools/aiorders_to_tcb.py @@ -163,9 +163,10 @@ def element_fields(listno, words): return out -def emit(batch, seq, source, names, seeds): +def emit(batch, seq, source, names, seeds, input_name): lines = ["tcb 1", "meta source %s" % source, + "meta input %s" % input_name, "meta batch seq=%d n=%d" % (seq, batch["n"]), "meta note the load-time batch is excluded; this is the End-Turn submission"] for netid, value in seeds: @@ -206,6 +207,10 @@ def main(argv=None): ap.add_argument("log") ap.add_argument("-o", "--out") ap.add_argument("--batch", type=int, help="which seq to convert (default: the last)") + ap.add_argument("--input", default="", metavar="SAVE", + help="the save this turn was run FROM. A capture belongs to one board and " + "replaying it against another charges the counter happily and is wrong; " + "recording it here lets the replayer say so.") ap.add_argument("--name", action="append", default=[], metavar="PID=TECHNAME", help="the tech name a research-target gate was observed to resolve to") ap.add_argument("--seed", action="append", default=[], metavar="NETID=VALUE", @@ -236,7 +241,7 @@ def main(argv=None): return 2 seeds.append((netid, value)) - text = emit(batches[seq], seq, a.log.split("/")[-1], names, seeds) + text = emit(batches[seq], seq, a.log.split("/")[-1], names, seeds, a.input) if a.out: with open(a.out, "w") as f: f.write(text) diff --git a/verify/results/turncommands/cb-turn2to3.json b/verify/results/turncommands/cb-turn2to3.json new file mode 100644 index 0000000..40e61e7 --- /dev/null +++ b/verify/results/turncommands/cb-turn2to3.json @@ -0,0 +1,1361 @@ +{ + "capture_version": 1, + "lane": "CB", + "guest": "VM146", + "build": "cb2-20260908T2251Z", + "captured_utc": "2026-09-08T23:02:07+00:00", + "instrument": { + "words": "32", + "deep": "1", + "research": "0", + "seed": "log", + "pins": "0", + "detours": "2" + }, + "workload": "ref-turn2.sav (= turn2-state.sav) + one End Turn -> turn3-state.sav", + "note": "THE CANONICAL PAIR, deterministic and oracle-hashed. This run reproduced BOTH oracle hashes with the instrument installed, so the stream and the autosave come from the same run and the instrument did not change the turn it recorded. (Autosave).sav is byte-identical to turn3-state.sav.", + "binding": { + "input": { + "file": "turn2-state.sav", + "bytes": 66739, + "sha256": "ab4ac2d7e2977260a4de916f65c7ecc6dd5b0094dac4bb51241317232ea17ab4" + }, + "outputs": [ + { + "file": "(Autosave EndTurn).sav", + "bytes": 66732, + "sha256": "bb4fd9ac89f41e3bc0db2af08b18ce83417521ac4bcee695fc9fa6ce16e30948", + "path": "../saves/cb-turn2to3-endturn.sav", + "oracle_sha256": "bb4fd9ac89f41e3bc0db2af08b18ce83417521ac4bcee695fc9fa6ce16e30948", + "matches_oracle": true + }, + { + "file": "(Autosave).sav", + "bytes": 67219, + "sha256": "978041acd168b56ed8eb3f5e42e78d5e70eae6e6517d75e659a5eb7ca3d60921", + "path": "../saves/cb-turn2to3-autosave.sav", + "oracle_sha256": "978041acd168b56ed8eb3f5e42e78d5e70eae6e6517d75e659a5eb7ca3d60921", + "matches_oracle": true + } + ], + "control_run": "c0-hooksoff-turn2 (hooks=off, same guest, same click path; byte-identical to this run)" + }, + "ai_seeds": [ + { + "call": 1, + "netId": 32, + "observed": "0x9dfad635", + "used": "0x9dfad635", + "pinned": false + }, + { + "call": 2, + "netId": 496, + "observed": "0xb482b2d8", + "used": "0xb482b2d8", + "pinned": false + }, + { + "call": 3, + "netId": 512, + "observed": "0xfb81e993", + "used": "0xfb81e993", + "pinned": false + } + ], + "list_size_self_check": { + "mismatches": [], + "note": "every list is measured twice, by walking its node chain and by reading _Mysize; an empty list here means the container layout agreed on every list of every block, which is the evidence that a zero size is a real zero rather than a wrong offset" + }, + "batches": [ + { + "seq": 1, + "blocks_va": "0x0113f2e0", + "n": 1, + "stride": 436, + "blocks": [ + { + "index": 0, + "n": 1, + "block_va": "0x0113f2e0", + "playerId": 16, + "gates": { + "researchRate": { + "set": true, + "payload": "0.25" + }, + "researchTarget": { + "set": false, + "payload": "18084612" + }, + "researchBoost": { + "set": false, + "payload": "0,0" + }, + "group4": { + "set": false, + "payload": "0,0" + }, + "group5": { + "set": false, + "payload": "1,1,1" + }, + "civilianRatios": { + "set": false + } + }, + "lists": [], + "list_sizes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + } + ] + }, + { + "seq": 2, + "blocks_va": "0x1e07e090", + "n": 8, + "stride": 436, + "blocks": [ + { + "index": 0, + "n": 8, + "block_va": "0x1e07e090", + "playerId": 16, + "gates": { + "researchRate": { + "set": true, + "payload": "0.25" + }, + "researchTarget": { + "set": false, + "payload": "12677740" + }, + "researchBoost": { + "set": false, + "payload": "0,0" + }, + "group4": { + "set": false, + "payload": "0,0" + }, + "group5": { + "set": false, + "payload": "1,1,1" + }, + "civilianRatios": { + "set": false + } + }, + "lists": [], + "list_sizes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + }, + { + "index": 1, + "n": 8, + "block_va": "0x1e07e244", + "playerId": 32, + "gates": { + "researchRate": { + "set": true, + "payload": "0.8" + }, + "researchTarget": { + "set": false, + "payload": "863629896" + }, + "researchBoost": { + "set": false, + "payload": "0,0" + }, + "group4": { + "set": false, + "payload": "0,0" + }, + "group5": { + "set": false, + "payload": "1,1,1" + }, + "civilianRatios": { + "set": false + } + }, + "lists": [ + { + "list": 3, + "member_offset": "0x088", + "size": 1, + "elements": [ + { + "index": 0, + "node_va": "0x3389a730", + "raw_words": [ + 0, + 288, + 18, + 2, + 1607561319, + 2281877760, + 60959416, + 60959428, + 60959440, + 60959452, + 60959464, + 60959476, + 1607823459, + 2281878016, + 60962080, + 60962092, + 60962104, + 60962116, + 60962128, + 60962140, + 1607037055, + 2147660544, + 864659344, + 864659344, + 60962248, + 60962260, + 60962272, + 60962284, + 1607299195, + 2281878528, + 61020688, + 61020700 + ], + "vectors": [ + { + "at_word": 6, + "first_va": "0x03a22ab8", + "capacity": 6, + "count": 3, + "words": [ + 1080347716, + 1065353216, + 0 + ], + "truncated": false + }, + { + "at_word": 9, + "first_va": "0x03a22adc", + "capacity": 6, + "count": 3, + "words": [ + 1054682907, + 1065353216, + 13 + ], + "truncated": false + }, + { + "at_word": 14, + "first_va": "0x03a23520", + "capacity": 6, + "count": 3, + "words": [ + 1077960980, + 1065353216, + 0 + ], + "truncated": false + }, + { + "at_word": 17, + "first_va": "0x03a23544", + "capacity": 6, + "count": 3, + "words": [ + 1054682907, + 1065353216, + 13 + ], + "truncated": false + }, + { + "at_word": 24, + "first_va": "0x03a235c8", + "capacity": 6, + "count": 3, + "words": [ + 0, + 1065353216, + 3 + ], + "truncated": false + } + ], + "strings": [], + "decoded": { + "record": "BuildOrder", + "ordinal": 2, + "designId": 18, + "systemId": 288, + "trailing": 0, + "wire": [ + 2, + 18, + 288, + 0 + ], + "record_words": 4 + } + } + ] + }, + { + "list": 5, + "member_offset": "0x0a0", + "size": 1, + "elements": [ + { + "index": 0, + "node_va": "0x332c0bf8", + "raw_words": [ + 288, + 0, + 1065353216, + 0, + 0, + 0, + 0, + 0, + 1420739850, + 2348826368, + 828994168, + 828998200, + 828997816, + 828996472, + 828996664, + 828998392, + 828995128, + 828994360, + 0, + 0, + 1420084484, + 2348826624, + 858907224, + 858907228, + 858907228, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "vectors": [ + { + "at_word": 13, + "first_va": "0x31697b78", + "capacity": 480, + "count": 48, + "words": [ + 12688796, + 860427400, + 1953066309, + 544367988, + 2699816, + 15, + 31, + 0, + 836953936, + 0, + 0, + 12724708, + 861254736, + 1, + 0, + 12724708, + 861255336, + 1, + 0, + 12724708, + 861254784, + 1, + 0, + 12724708, + 861255384, + 1, + 0, + 12724708, + 861255072, + 1, + 0, + 860866040 + ], + "truncated": true + }, + { + "at_word": 22, + "first_va": "0x3331e258", + "capacity": 1, + "count": 1, + "words": [ + 835963424 + ], + "truncated": false + } + ], + "strings": [], + "decoded": { + "record": "SystemRates", + "systemId": 288, + "ship": 0.0, + "terraform": 1.0, + "sciences": 0.0, + "trade": 0.0, + "infrastructure": 0.0, + "overharvest": 0.0, + "noRate": 0, + "wire": [ + 288, + 0.0, + 1.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0 + ], + "record_words": 8 + } + } + ] + }, + { + "list": 8, + "member_offset": "0x0c4", + "size": 1, + "elements": [ + { + "index": 0, + "node_va": "0x0d701aa0", + "raw_words": [ + 34, + 863636088, + 863636092, + 863636092, + 16776961, + 1, + 1097156566, + 2281955584, + 862814000, + 862814000, + 288, + 34, + 863636104, + 863636108, + 863636108, + 0, + 1097746387, + 2281955840, + 862814760, + 862814760, + 288, + 12423408, + 864659216, + 864659240, + 864659240, + 3503711, + 1097549804, + 2147738368, + 225413376, + 225413376, + 34, + 0 + ], + "vectors": [ + { + "at_word": 1, + "first_va": "0x337a0a78", + "capacity": 1, + "count": 1, + "words": [ + 272 + ], + "truncated": false + }, + { + "at_word": 12, + "first_va": "0x337a0a88", + "capacity": 1, + "count": 1, + "words": [ + 1728 + ], + "truncated": false + }, + { + "at_word": 22, + "first_va": "0x3389a710", + "capacity": 6, + "count": 6, + "words": [ + 12422480, + 1, + 2, + 862581960, + 1000000000, + 0 + ], + "truncated": false + } + ], + "strings": [], + "decoded": { + "record": "FleetMove", + "fleetId": 34, + "route": [ + 272 + ], + "wire": [ + 34, + 1, + 272 + ], + "record_words": 4 + } + } + ] + }, + { + "list": 10, + "member_offset": "0x0dc", + "size": 1, + "elements": [ + { + "index": 0, + "node_va": "0x0d701ac8", + "raw_words": [ + 288, + 34, + 863636104, + 863636108, + 863636108, + 0, + 1097746387, + 2281955840, + 862814760, + 862814760, + 288, + 12423408, + 864659216, + 864659240, + 864659240, + 3503711, + 1097549804, + 2147738368, + 225413376, + 225413376, + 34, + 0, + 0, + 0, + 16776961, + 1, + 1098139625, + 2147738624, + 225413336, + 225413336, + 288, + 34 + ], + "vectors": [ + { + "at_word": 2, + "first_va": "0x337a0a88", + "capacity": 1, + "count": 1, + "words": [ + 1728 + ], + "truncated": false + }, + { + "at_word": 12, + "first_va": "0x3389a710", + "capacity": 6, + "count": 6, + "words": [ + 12422480, + 1, + 2, + 862581960, + 1000000000, + 0 + ], + "truncated": false + } + ], + "strings": [], + "decoded": { + "record": "List10", + "systemId": 288, + "fleetId": 34, + "counted": [ + 1728 + ], + "wire": [ + 288, + 34, + 1, + 1728 + ], + "record_words": 5 + } + } + ] + }, + { + "list": 14, + "member_offset": "0x10c", + "size": 2, + "elements": [ + { + "index": 0, + "node_va": "0x3389a630", + "raw_words": [ + 34, + 0, + 18070017, + 862581640, + 1609658439, + 2281875958, + 60966604, + 60966592, + 60966580, + 60966568, + 60966556, + 60966544, + 1609920579, + 2348984832, + 863188904, + 864658992, + 34, + 1, + 18070017, + 257, + 1609134175, + 2281876224, + 60963160, + 60963172, + 60963184, + 60963196, + 60963208, + 60963220, + 1609396315, + 2281876480, + 60972448, + 60972460 + ], + "vectors": [ + { + "at_word": 22, + "first_va": "0x03a23958", + "capacity": 6, + "count": 3, + "words": [ + 1070646664, + 1065353216, + 0 + ], + "truncated": false + }, + { + "at_word": 25, + "first_va": "0x03a2397c", + "capacity": 6, + "count": 3, + "words": [ + 1054682907, + 1065353216, + 13 + ], + "truncated": false + } + ], + "strings": [], + "decoded": { + "record": "FleetTask", + "fleetId": 34, + "mode": 0, + "flag": true, + "wire": [ + 34, + 0, + true + ], + "record_words": 3 + } + }, + { + "index": 1, + "node_va": "0x3389a670", + "raw_words": [ + 34, + 1, + 18070017, + 257, + 1609134175, + 2281876224, + 60963160, + 60963172, + 60963184, + 60963196, + 60963208, + 60963220, + 1609396315, + 2281876480, + 60972448, + 60972460, + 60972472, + 60972484, + 60972496, + 60972508, + 1608609879, + 2281876736, + 60962008, + 60962020, + 60962032, + 60962044, + 60962056, + 60962068, + 1608872019, + 2281876992, + 60961936, + 60961948 + ], + "vectors": [ + { + "at_word": 6, + "first_va": "0x03a23958", + "capacity": 6, + "count": 3, + "words": [ + 1070646664, + 1065353216, + 0 + ], + "truncated": false + }, + { + "at_word": 9, + "first_va": "0x03a2397c", + "capacity": 6, + "count": 3, + "words": [ + 1054682907, + 1065353216, + 13 + ], + "truncated": false + }, + { + "at_word": 14, + "first_va": "0x03a25da0", + "capacity": 6, + "count": 3, + "words": [ + 1082130432, + 1065353216, + 0 + ], + "truncated": false + }, + { + "at_word": 17, + "first_va": "0x03a25dc4", + "capacity": 6, + "count": 3, + "words": [ + 0, + 1065353216, + 3 + ], + "truncated": false + }, + { + "at_word": 22, + "first_va": "0x03a234d8", + "capacity": 6, + "count": 3, + "words": [ + 1082130432, + 1065353216, + 0 + ], + "truncated": false + }, + { + "at_word": 25, + "first_va": "0x03a234fc", + "capacity": 6, + "count": 3, + "words": [ + 0, + 1065353216, + 3 + ], + "truncated": false + } + ], + "strings": [], + "decoded": { + "record": "FleetTask", + "fleetId": 34, + "mode": 1, + "flag": true, + "wire": [ + 34, + 1, + true + ], + "record_words": 3 + } + } + ] + }, + { + "list": 23, + "member_offset": "0x178", + "size": 1, + "elements": [ + { + "index": 0, + "node_va": "0x0d701af0", + "raw_words": [ + 288, + 12423408, + 864659216, + 864659240, + 864659240, + 3503711, + 1097549804, + 2147738368, + 225413376, + 225413376, + 34, + 0, + 0, + 0, + 16776961, + 1, + 1098139625, + 2147738624, + 225413336, + 225413336, + 288, + 34, + 0, + 0, + 0, + 1, + 1097943010, + 2147738880, + 225412616, + 225412616, + 288, + 12329660 + ], + "vectors": [ + { + "at_word": 2, + "first_va": "0x3389a710", + "capacity": 6, + "count": 6, + "words": [ + 12422480, + 1, + 2, + 862581960, + 1000000000, + 0 + ], + "truncated": false + } + ], + "strings": [], + "decoded": { + "record": "Population", + "systemId": 288, + "vptr": "0x00bd90f0", + "body": [ + 12422480, + 1, + 2, + 862581960, + 1000000000, + 0 + ], + "wire": [ + 288, + 6, + 12422480, + 1, + 2, + 862581960, + 1000000000, + 0 + ], + "record_words": 5 + } + } + ] + } + ], + "list_sizes": [ + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0 + ] + }, + { + "index": 2, + "n": 8, + "block_va": "0x1e07e3f8", + "playerId": 496, + "gates": { + "researchRate": { + "set": true, + "payload": "0.8" + }, + "researchTarget": { + "set": false, + "payload": "-2147480387" + }, + "researchBoost": { + "set": false, + "payload": "0,0" + }, + "group4": { + "set": false, + "payload": "0,0" + }, + "group5": { + "set": false, + "payload": "1,1,1" + }, + "civilianRatios": { + "set": false + } + }, + "lists": [], + "list_sizes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + }, + { + "index": 3, + "n": 8, + "block_va": "0x1e07e5ac", + "playerId": 512, + "gates": { + "researchRate": { + "set": true, + "payload": "0.8" + }, + "researchTarget": { + "set": false, + "payload": "0" + }, + "researchBoost": { + "set": false, + "payload": "0,0" + }, + "group4": { + "set": false, + "payload": "0,0" + }, + "group5": { + "set": false, + "payload": "1,1,1" + }, + "civilianRatios": { + "set": false + } + }, + "lists": [], + "list_sizes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + }, + { + "index": 4, + "n": 8, + "block_va": "0x1e07e760", + "playerId": 0, + "gates": { + "researchRate": { + "set": false, + "payload": "3.98302e+33" + }, + "researchTarget": { + "set": false, + "payload": "2000969918" + }, + "researchBoost": { + "set": false, + "payload": "0,0" + }, + "group4": { + "set": false, + "payload": "0,0" + }, + "group5": { + "set": false, + "payload": "1,1,1" + }, + "civilianRatios": { + "set": false + } + }, + "lists": [], + "list_sizes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + }, + { + "index": 5, + "n": 8, + "block_va": "0x1e07e914", + "playerId": 0, + "gates": { + "researchRate": { + "set": false, + "payload": "3.98302e+33" + }, + "researchTarget": { + "set": false, + "payload": "2000969918" + }, + "researchBoost": { + "set": false, + "payload": "0,0" + }, + "group4": { + "set": false, + "payload": "0,0" + }, + "group5": { + "set": false, + "payload": "1,1,1" + }, + "civilianRatios": { + "set": false + } + }, + "lists": [], + "list_sizes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + }, + { + "index": 6, + "n": 8, + "block_va": "0x1e07eac8", + "playerId": 0, + "gates": { + "researchRate": { + "set": false, + "payload": "3.98302e+33" + }, + "researchTarget": { + "set": false, + "payload": "2000969918" + }, + "researchBoost": { + "set": false, + "payload": "0,0" + }, + "group4": { + "set": false, + "payload": "0,0" + }, + "group5": { + "set": false, + "payload": "1,1,1" + }, + "civilianRatios": { + "set": false + } + }, + "lists": [], + "list_sizes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + }, + { + "index": 7, + "n": 8, + "block_va": "0x1e07ec7c", + "playerId": 0, + "gates": { + "researchRate": { + "set": false, + "payload": "3.98302e+33" + }, + "researchTarget": { + "set": false, + "payload": "2000969918" + }, + "researchBoost": { + "set": false, + "payload": "0,0" + }, + "group4": { + "set": false, + "payload": "0,0" + }, + "group5": { + "set": false, + "payload": "1,1,1" + }, + "civilianRatios": { + "set": false + } + }, + "lists": [], + "list_sizes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + } + ] + } + ] +} diff --git a/verify/results/turncommands/l4-turn1to2.tcb b/verify/results/turncommands/l4-turn1to2.tcb index e28f278..4d2c6c0 100644 --- a/verify/results/turncommands/l4-turn1to2.tcb +++ b/verify/results/turncommands/l4-turn1to2.tcb @@ -1,5 +1,6 @@ tcb 1 meta source l4-turn1to2-aiorders.txt +meta input turn1-state.sav meta batch seq=2 n=8 meta note the load-time batch is excluded; this is the End-Turn submission block 0 16 diff --git a/verify/results/turncommands/l4-turn2to3.tcb b/verify/results/turncommands/l4-turn2to3.tcb index f909c5c..53b1846 100644 --- a/verify/results/turncommands/l4-turn2to3.tcb +++ b/verify/results/turncommands/l4-turn2to3.tcb @@ -1,5 +1,6 @@ tcb 1 meta source l4-turn2to3-aiorders.txt +meta input turn2-state.sav meta batch seq=2 n=8 meta note the load-time batch is excluded; this is the End-Turn submission block 0 16