From 2934ac16c10eae371b449cbfc9b27ba07c538984 Mon Sep 17 00:00:00 2001 From: Frank14f <1515444314@qq.com> Date: Sun, 15 Nov 2026 19:31:07 +0800 Subject: [PATCH] Implement approved S3-B exact events and guarded fixed-ten measurement --- AGENTS.md | 2 + .../attempt-01/execution.lock | 0 .../attempt-01/ledger.json | 10 + .../attempt-01/synthetic.log | 18 + .../attempt-01/synthetic.receipt.json | 22 + .../attempt-01/synthetic.started.json | 15 + .../s3b-a-ten-part-2026-11-15/contract.json | 802 ++++++++++++++++++ docs/collaboration-stage-review-policy.md | 2 + docs/s3b-a-exact-implementation-2026-11-15.md | 15 + tools/prepare_s3b_ten.py | 53 ++ tools/run_s3b_part.py | 97 +++ tools/run_s3b_ten.py | 73 ++ tools/s3b_graph.py | 200 +++++ tools/s3b_runtime.py | 65 ++ tools/test_s3b_graph.py | 128 +++ 15 files changed, 1502 insertions(+) create mode 100644 artifacts/s3b-a-synthetic-2026-11-15/attempt-01/execution.lock create mode 100644 artifacts/s3b-a-synthetic-2026-11-15/attempt-01/ledger.json create mode 100644 artifacts/s3b-a-synthetic-2026-11-15/attempt-01/synthetic.log create mode 100644 artifacts/s3b-a-synthetic-2026-11-15/attempt-01/synthetic.receipt.json create mode 100644 artifacts/s3b-a-synthetic-2026-11-15/attempt-01/synthetic.started.json create mode 100644 artifacts/s3b-a-ten-part-2026-11-15/contract.json create mode 100644 docs/s3b-a-exact-implementation-2026-11-15.md create mode 100644 tools/prepare_s3b_ten.py create mode 100644 tools/run_s3b_part.py create mode 100644 tools/run_s3b_ten.py create mode 100644 tools/s3b_graph.py create mode 100644 tools/s3b_runtime.py create mode 100644 tools/test_s3b_graph.py diff --git a/AGENTS.md b/AGENTS.md index 3d50118c9..fafa92557 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -62,3 +62,5 @@ - Latest S3-A terminal: 390logical terminal,359HPOPASS+1configNA+30finalPASS; sole45375 exited0 and result1e49c1572227116e821d3cd414ebcecd7c430753 published with independent remote readback. No restart/retry/re-score. See leading handoff and docs/s3a-results-2026-11-15.md. Mold1794740467 actual10JSON review and Claude1794740503 acceptance recorded. S3-B(a) remains a proposed <=10workerCPUh CPU-only/no-learning contract subject to one review; no automatic launch, no S3-B(b)/O1 training authorization. - Latest contract-only S3-B(a) update: see docs/s3b-a-contract-2026-11-15.md. Claude1794740834 fixes both paired-CI gates, total-volume denominator and exact midpoint rule; Mold1794740985 clarifies zero wall edges/UNKNOWN failures. Fixed-ten cost checkpoint and possible20workerCPUh cap supersede early10h-only proposal, but contract awaits single main review and this task authorizes documents only. No implementation, tests or real workload launched. S3-A report delivered bd2473c with original results1e49c157 independently HTTP/hash verified. + +- S3-B(a) main review1794741236.468009 approved95ab07dc: implementation/synthetic/fixed-ten/cost-gated full queue/scoring authorized, no repeat user-go. CG/Jacobi/2000iterations/warm-start fixed; 13synthetic PASS, contract19e9ddf1ba246d19f6b3ff8899dbb64690e0e1dce7cfe547c2556d7ad9f50e36. Root artifacts/s3b-a-ten-part-2026-11-15; inspect started/progress/complete before action. Exact events only, per-part1800s, total20h including2h postfit, fixed-ten3h. Any batching requires cost-driven v0.4 and Claude review. No(b)/O1. Actual launch audit supersedes earlier document-only notes when present. diff --git a/artifacts/s3b-a-synthetic-2026-11-15/attempt-01/execution.lock b/artifacts/s3b-a-synthetic-2026-11-15/attempt-01/execution.lock new file mode 100644 index 000000000..e69de29bb diff --git a/artifacts/s3b-a-synthetic-2026-11-15/attempt-01/ledger.json b/artifacts/s3b-a-synthetic-2026-11-15/attempt-01/ledger.json new file mode 100644 index 000000000..a16fb7756 --- /dev/null +++ b/artifacts/s3b-a-synthetic-2026-11-15/attempt-01/ledger.json @@ -0,0 +1,10 @@ +{ + "cpu_seconds_charged": 0.46044399999999996, + "attempts": [ + { + "name": "synthetic", + "status": "PASS", + "cpu_seconds": 0.46044399999999996 + } + ] +} diff --git a/artifacts/s3b-a-synthetic-2026-11-15/attempt-01/synthetic.log b/artifacts/s3b-a-synthetic-2026-11-15/attempt-01/synthetic.log new file mode 100644 index 000000000..fc27a39ca --- /dev/null +++ b/artifacts/s3b-a-synthetic-2026-11-15/attempt-01/synthetic.log @@ -0,0 +1,18 @@ +test_Q_and_uniform_conductance_scaling (__main__.GraphTests) ... ok +test_asymmetric_fork_and_multiple_wet_inflows (__main__.GraphTests) ... ok +test_bad_pressure_is_numerical_not_blocked (__main__.GraphTests) ... ok +test_blocked_is_not_full_and_zero_mass_not_removed (__main__.GraphTests) ... ok +test_chain_analytical_times_and_conservation (__main__.GraphTests) ... ok +test_cross_cube_midpoint_positive_wall_edges_exact_zero (__main__.GraphTests) ... ok +test_full_job_reservation (__main__.GraphTests) ... ok +test_permutation_and_edge_order (__main__.GraphTests) ... ok +test_prediction_cannot_open_label_or_other_data (__main__.GraphTests) ... ok +test_single_all_wall_tet_stays_zero (__main__.GraphTests) ... ok +test_solver_tolerance_not_silently_repaired (__main__.GraphTests) ... ok +test_strict_median_layer_and_original_graph (__main__.GraphTests) ... ok +test_symmetric_fork_keeps_ties (__main__.GraphTests) ... ok + +---------------------------------------------------------------------- +Ran 13 tests in 0.117s + +OK diff --git a/artifacts/s3b-a-synthetic-2026-11-15/attempt-01/synthetic.receipt.json b/artifacts/s3b-a-synthetic-2026-11-15/attempt-01/synthetic.receipt.json new file mode 100644 index 000000000..8a3ec2627 --- /dev/null +++ b/artifacts/s3b-a-synthetic-2026-11-15/attempt-01/synthetic.receipt.json @@ -0,0 +1,22 @@ +{ + "status": "PASS", + "command": [ + "/home/frank14f/anaconda3/envs/pycuda_3_10/bin/python", + "tools/test_s3b_graph.py" + ], + "returncode": 0, + "stop_reason": null, + "cpu_seconds": 0.46044399999999996, + "wall_seconds": 0.653040784993209, + "peak_tree_rss_bytes": 62914560, + "peak_process_count": 2, + "output_disk_bytes_before_receipt": 8192, + "max_poll_gap_seconds": 0.24816650798311457, + "poll_target_seconds": 0.1, + "reaped_orphan_cpu_seconds": 0.0, + "supervision": "sampled process-tree monitoring; wait4 final CPU/HWM; overshoot retained as failure", + "gpu_visible": false, + "retry": false, + "monitor_errors": 0, + "last_monitor_error": null +} diff --git a/artifacts/s3b-a-synthetic-2026-11-15/attempt-01/synthetic.started.json b/artifacts/s3b-a-synthetic-2026-11-15/attempt-01/synthetic.started.json new file mode 100644 index 000000000..99e2e9575 --- /dev/null +++ b/artifacts/s3b-a-synthetic-2026-11-15/attempt-01/synthetic.started.json @@ -0,0 +1,15 @@ +{ + "command": [ + "/home/frank14f/anaconda3/envs/pycuda_3_10/bin/python", + "tools/test_s3b_graph.py" + ], + "limits": { + "total_cpu_seconds": 120, + "job_cpu_seconds": 120, + "job_wall_seconds": 120, + "tree_rss_bytes": 1073741824, + "disk_bytes": 67108864, + "max_processes": 2 + }, + "started_unix": 1794742178.0034938 +} diff --git a/artifacts/s3b-a-ten-part-2026-11-15/contract.json b/artifacts/s3b-a-ten-part-2026-11-15/contract.json new file mode 100644 index 000000000..4ec9d39b8 --- /dev/null +++ b/artifacts/s3b-a-ten-part-2026-11-15/contract.json @@ -0,0 +1,802 @@ +{ + "version": "S3B-a-exact-event-ten-v1", + "authorizing_ruling": "1794741236.468009", + "contract_review_commit": "95ab07dcd6104e8cbb7afdcdd7ea1e18cdcaf9d2", + "roster": "artifacts/s2-main-preparation-2026-11-15/final-roster.json", + "roster_sha256": "fb0c984f2e553343a598ce2e3c7012d3017053dc0fef58b5aaf46dd3c67a207e", + "ten_parts": [ + { + "case": "00001130_c2db313c2ce749d784c610d2_step_002", + "nodes": 8276, + "component_id": "component-44ac515ef5215d8a", + "preparation_root": "artifacts/s2-ten-part-measurement-2026-11-15/parts/00001130_c2db313c2ce749d784c610d2_step_002", + "inputs": { + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00001130_c2db313c2ce749d784c610d2_step_002/geometry.npz": "fee1c372bf9497930ddaad9c4511e2a3a5a744de25a506196d508529c88bbd12", + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00001130_c2db313c2ce749d784c610d2_step_002/boundary_distance_raw.npy": "5a820f5a54df9b7e7a0a252f07258ac5ab8ee2a6c08fc65fedbc945bc6a8fdbc", + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00001130_c2db313c2ce749d784c610d2_step_002/base.npy": "bbc69f100778366019f38b8f73a5a705ef4c2935480468cfa80521c741c81d58", + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00001130_c2db313c2ce749d784c610d2_step_002/result.json": "3b1b230c4b992e0316de9bcb21207d624f78b54941c751f3792ab087065da72d" + } + }, + { + "case": "00001324_5bf4a74af99f405392406e40_step_000", + "nodes": 10273, + "component_id": "component-bfd1b0c8be38a9c7", + "preparation_root": "artifacts/s2-ten-part-measurement-2026-11-15/parts/00001324_5bf4a74af99f405392406e40_step_000", + "inputs": { + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00001324_5bf4a74af99f405392406e40_step_000/geometry.npz": "eb0eb5a051196c755a312238e73666c61d7c106a85d7baefdff85bdaf37497b5", + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00001324_5bf4a74af99f405392406e40_step_000/boundary_distance_raw.npy": "733d0bd76fead05a32b4d56704092c99fe811da0bde2a1ee27d5dc1e41470adf", + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00001324_5bf4a74af99f405392406e40_step_000/base.npy": "c4cac0e4a6b49c00c3f23e0babbb283198a7dcfb2f815018006b2cbeecaebd8a", + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00001324_5bf4a74af99f405392406e40_step_000/result.json": "d1cb92fe8ff4845c7c5f6189748ee29d84bbd347ee2cfdc5c0d41997f9ce17fa" + } + }, + { + "case": "00000842_2c1efcc32d094e9fb9e1a88e_step_002", + "nodes": 11321, + "component_id": "component-17f281e0efac16a8", + "preparation_root": "artifacts/s2-main-preparation-2026-11-15/parts/00000842_2c1efcc32d094e9fb9e1a88e_step_002", + "inputs": { + "artifacts/s2-main-preparation-2026-11-15/parts/00000842_2c1efcc32d094e9fb9e1a88e_step_002/geometry.npz": "4f7a77dbcb0894fa8deb24cbb3710bbecbf677716e14564779bdf486ffc0003e", + "artifacts/s2-main-preparation-2026-11-15/parts/00000842_2c1efcc32d094e9fb9e1a88e_step_002/boundary_distance_raw.npy": "094f2d963b624721ef52d855da95b75c523e22a274367bdae062afb13f474bff", + "artifacts/s2-main-preparation-2026-11-15/parts/00000842_2c1efcc32d094e9fb9e1a88e_step_002/base.npy": "6554e15cea891e3082ea91c0cc51a8544ab7e882006c5e17ea63e7431e662757", + "artifacts/s2-main-preparation-2026-11-15/parts/00000842_2c1efcc32d094e9fb9e1a88e_step_002/result.json": "0c1950ec7b3991766f2a6bedc6319fadb0358859e11600cfb3009c4383825104" + } + }, + { + "case": "00000367_23c957e8e7b2428282a13ae2_step_000", + "nodes": 24732, + "component_id": "component-2897f9dea32cbfdc", + "preparation_root": "artifacts/s2-ten-part-measurement-2026-11-15/parts/00000367_23c957e8e7b2428282a13ae2_step_000", + "inputs": { + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00000367_23c957e8e7b2428282a13ae2_step_000/geometry.npz": "474c4c3cb2f49c320f02ae6d676a75a919884a5b78b6dce6ab27029f7cb49490", + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00000367_23c957e8e7b2428282a13ae2_step_000/boundary_distance_raw.npy": "ccadd17bfb4e49d7ba3b7bc4c66d832cdf6a2c6bd04fc84f6973697983c002cb", + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00000367_23c957e8e7b2428282a13ae2_step_000/base.npy": "56fb7ab5e12d982330c31a60b0b83c99881a64208175f4114ed778b633f79c25", + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00000367_23c957e8e7b2428282a13ae2_step_000/result.json": "e2ff912146d3a5338c5b9515c35a6befc06374bb830d331b501ee836cd018aea" + } + }, + { + "case": "00000746_6cb3ddbb49974d7db0e97135_step_001", + "nodes": 29264, + "component_id": "component-39a7f286baa3cdd5", + "preparation_root": "artifacts/s2-main-preparation-2026-11-15/parts/00000746_6cb3ddbb49974d7db0e97135_step_001", + "inputs": { + "artifacts/s2-main-preparation-2026-11-15/parts/00000746_6cb3ddbb49974d7db0e97135_step_001/geometry.npz": "2b7a080c1b3579b348b5f127f048ebdc759e95c045841463cb966b4a5b400945", + "artifacts/s2-main-preparation-2026-11-15/parts/00000746_6cb3ddbb49974d7db0e97135_step_001/boundary_distance_raw.npy": "5eda331f95c4d891cd7d92a193e7ec31e3f02193e92712794aaf56d25911ce31", + "artifacts/s2-main-preparation-2026-11-15/parts/00000746_6cb3ddbb49974d7db0e97135_step_001/base.npy": "d4b138231a2972838bd7603d5877f0b221a29e7e7038fa11b3f7bfc42e729299", + "artifacts/s2-main-preparation-2026-11-15/parts/00000746_6cb3ddbb49974d7db0e97135_step_001/result.json": "0cadc67a0db58cfcbb05b8ed55d4f41568a246d3d6f9e9588694997d2cdafef2" + } + }, + { + "case": "00000777_a25fb37392a44447b9684f16_step_002", + "nodes": 31810, + "component_id": "component-fe4ff4c933f57600", + "preparation_root": "artifacts/s2-ten-part-measurement-2026-11-15/parts/00000777_a25fb37392a44447b9684f16_step_002", + "inputs": { + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00000777_a25fb37392a44447b9684f16_step_002/geometry.npz": "3987917d42e4455373ac8dc4f74d0d94ae5eb7d413115f87c36bd4f928cf500b", + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00000777_a25fb37392a44447b9684f16_step_002/boundary_distance_raw.npy": "a8ea88accc1249bb367984587ed2b8ea7adebda07571913a7a3520ed1d4a1995", + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00000777_a25fb37392a44447b9684f16_step_002/base.npy": "a15da9f826ad7bcf3150cb783643f4e83d580e4c6342c97e62cd3677efd2630e", + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00000777_a25fb37392a44447b9684f16_step_002/result.json": "10042c3092afc0e90899d48f57ae3c67071971f9cd4f95520e0477f8e8af4026" + } + }, + { + "case": "00001552_b0a9c4d836294846891615fe_step_000", + "nodes": 34818, + "component_id": "component-a369220b23aedf25", + "preparation_root": "artifacts/s2-ten-part-measurement-2026-11-15/parts/00001552_b0a9c4d836294846891615fe_step_000", + "inputs": { + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00001552_b0a9c4d836294846891615fe_step_000/geometry.npz": "ecf301c5ab0ce31e5ab1c2be0397bbda800c483564d02b9c45f27ca0a29c69ba", + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00001552_b0a9c4d836294846891615fe_step_000/boundary_distance_raw.npy": "070bf1759a9e5085cbe5620e8ed6f627260d1cea08757b5eaab6beb90e91507c", + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00001552_b0a9c4d836294846891615fe_step_000/base.npy": "e5ac0f9137be09241a6ae7246d6e45bfd48b67362b0a873b9627f4be5c3b13da", + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00001552_b0a9c4d836294846891615fe_step_000/result.json": "59ea799d372a0577348de8205c078ffa341d800ff887a348a0eacdb3d262413c" + } + }, + { + "case": "00001379_5b1d6e2599ea47d498a04256_step_000", + "nodes": 38253, + "component_id": "component-35ddaa9dca10c48d", + "preparation_root": "artifacts/s2-ten-part-measurement-2026-11-15/parts/00001379_5b1d6e2599ea47d498a04256_step_000", + "inputs": { + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00001379_5b1d6e2599ea47d498a04256_step_000/geometry.npz": "4f89b15ddfda5dadb4ce379b8f10a5a761d8d258a62c5ff6ae9b1f2cbb880f0e", + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00001379_5b1d6e2599ea47d498a04256_step_000/boundary_distance_raw.npy": "fc1a7e3ef0ef7c07731c8439a43d21b53efb2ff1e0268db21e830ee3d4465218", + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00001379_5b1d6e2599ea47d498a04256_step_000/base.npy": "f2c66fa699f7f3e4178ea2ba3616a06e168b9ead281e311bed0ec29f519207a0", + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00001379_5b1d6e2599ea47d498a04256_step_000/result.json": "affb6f61e174bed53e75893043b1bad4ad0d2a0d777f63877759b726c30c9460" + } + }, + { + "case": "00000610_04e799936ae446b9a3d8d2b8_step_001", + "nodes": 55883, + "component_id": "component-4bd089778094e746", + "preparation_root": "artifacts/s2-ten-part-measurement-2026-11-15/parts/00000610_04e799936ae446b9a3d8d2b8_step_001", + "inputs": { + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00000610_04e799936ae446b9a3d8d2b8_step_001/geometry.npz": "587ce6deeda6aa2e3be857efeebc6591f6cd01f204dbbfd35cb7bfc66906b406", + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00000610_04e799936ae446b9a3d8d2b8_step_001/boundary_distance_raw.npy": "b7f0ede21c39d6ac016aeaf8134fc353bf0e71e105ed776dcb68fa52797566f4", + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00000610_04e799936ae446b9a3d8d2b8_step_001/base.npy": "ee4cef21dc61a8aea06091ea744287eef7dc1a087299d1b2f13729340a6b94d9", + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00000610_04e799936ae446b9a3d8d2b8_step_001/result.json": "45bdcd42de8db2b8087816ebe2a9f6d88b22ebbdbc8cb8bc08f78517f1f52bf0" + } + }, + { + "case": "00000666_6f67a59c16b949a4b66dcfe1_step_000", + "nodes": 187345, + "component_id": "component-4890d38c10ec20ba", + "preparation_root": "artifacts/s2-ten-part-measurement-2026-11-15/parts/00000666_6f67a59c16b949a4b66dcfe1_step_000", + "inputs": { + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00000666_6f67a59c16b949a4b66dcfe1_step_000/geometry.npz": "81363b89ae7ff7ee2128783644287712d0bcc5d0c94fdf6c0799508cc46cc169", + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00000666_6f67a59c16b949a4b66dcfe1_step_000/boundary_distance_raw.npy": "d779abaab78c928851f57489409eced35c188e0afa3fea5046110d593710fb28", + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00000666_6f67a59c16b949a4b66dcfe1_step_000/base.npy": "cbfbc15eaa9a32edd35a7003d53e3848705d776f2bb2f0b6d1bb920401e87237", + "artifacts/s2-ten-part-measurement-2026-11-15/parts/00000666_6f67a59c16b949a4b66dcfe1_step_000/result.json": "f231de3795f898c0240f7c260ee7400b44c2ba454bed53fc726c31ee295d659b" + } + } + ], + "all_cases": [ + "00000003_1ffb81a71e5b402e966b9341_step_002", + "00000004_1ffb81a71e5b402e966b9341_step_003", + "00000006_d4fe04f0f5f84b52bd4f10e4_step_001", + "00000008_9b3d6a97e8de4aa193b81000_step_000", + "00000009_9b3d6a97e8de4aa193b81000_step_001", + "00000011_e909f412cda24521865fac0f_step_000", + "00000021_ad34a3f60c4a4caa99646600_step_001", + "00000023_ad34a3f60c4a4caa99646600_step_003", + "00000024_ad34a3f60c4a4caa99646600_step_004", + "00000030_ad34a3f60c4a4caa99646600_step_010", + "00000031_ad34a3f60c4a4caa99646600_step_011", + "00000033_ad34a3f60c4a4caa99646600_step_013", + "00000049_aa208c45e8734584a147f595_step_000", + "00000057_666139e3bff64d4e8a6ce183_step_006", + "00000058_666139e3bff64d4e8a6ce183_step_007", + "00000060_767e4372b5f94a88a7a17d90_step_001", + "00000061_767e4372b5f94a88a7a17d90_step_002", + "00000065_767e4372b5f94a88a7a17d90_step_006", + "00000066_767e4372b5f94a88a7a17d90_step_007", + "00000067_767e4372b5f94a88a7a17d90_step_008", + "00000068_767e4372b5f94a88a7a17d90_step_009", + "00000070_767e4372b5f94a88a7a17d90_step_011", + "00000072_767e4372b5f94a88a7a17d90_step_013", + "00000077_767e4372b5f94a88a7a17d90_step_018", + "00000078_767e4372b5f94a88a7a17d90_step_019", + "00000079_767e4372b5f94a88a7a17d90_step_020", + "00000087_b4f9335a60a14cecaa599159_step_002", + "00000088_169bec34317b46e98eb1a403_step_000", + "00000093_169bec34317b46e98eb1a403_step_005", + "00000098_72cf0f9ca5324822a4d41a80_step_000", + "00000102_5ed74bccca6f4e89829bcb5e_step_002", + "00000103_52f7124261ae4c558f800775_step_000", + "00000104_52f7124261ae4c558f800775_step_001", + "00000105_52f7124261ae4c558f800775_step_002", + "00000106_52f7124261ae4c558f800775_step_003", + "00000111_ce24e0cbec8e45c89735d148_step_003", + "00000115_ce24e0cbec8e45c89735d148_step_007", + "00000116_ce24e0cbec8e45c89735d148_step_008", + "00000117_ce24e0cbec8e45c89735d148_step_009", + "00000119_ce24e0cbec8e45c89735d148_step_011", + "00000120_ce24e0cbec8e45c89735d148_step_012", + "00000125_e18c7feacfb54f3880659b43_step_000", + "00000128_e18c7feacfb54f3880659b43_step_003", + "00000129_e18c7feacfb54f3880659b43_step_004", + "00000130_e18c7feacfb54f3880659b43_step_005", + "00000131_945244874ed84e599987daa9_step_000", + "00000132_438507a38e404bfdbd51a16b_step_000", + "00000133_08b739e0511f4305b161cd05_step_000", + "00000140_2fc54fcd110d4f49969163c4_step_003", + "00000142_2fc54fcd110d4f49969163c4_step_005", + "00000144_2fc54fcd110d4f49969163c4_step_007", + "00000145_2fc54fcd110d4f49969163c4_step_008", + "00000152_a951550b8a1043a68423c541_step_002", + "00000153_a951550b8a1043a68423c541_step_003", + "00000154_a951550b8a1043a68423c541_step_004", + "00000157_8208fd8b44b64dce91322f84_step_000", + "00000161_a583c6c3cdc143bab3f6c856_step_000", + "00000162_4dcda9fab6dd46cf98fb194e_step_000", + "00000163_ff9b2ed255484db78bb0e6da_step_000", + "00000164_91adbf180e114b698160c9a4_step_000", + "00000165_4070a99d6ebe45f5bd5d71eb_step_000", + "00000166_2246cab58dbe4a2fb00fed50_step_000", + "00000170_b21aa794b6b64d87a57c245e_step_000", + "00000171_b21aa794b6b64d87a57c245e_step_001", + "00000173_b21aa794b6b64d87a57c245e_step_003", + "00000174_b21aa794b6b64d87a57c245e_step_004", + "00000175_b21aa794b6b64d87a57c245e_step_005", + "00000176_b21aa794b6b64d87a57c245e_step_006", + "00000181_b21aa794b6b64d87a57c245e_step_011", + "00000183_6c4172e8a17140f89d3b1c0a_step_000", + "00000190_185ecbc783f34408aef52119_step_000", + "00000196_c9b71ecdd0654716891b0db8_step_000", + "00000198_826494e894454504b0971fd1_step_001", + "00000206_27417003e762409185cb2b69_step_000", + "00000220_5324c79b172f41e8a49afc6f_step_007", + "00000221_5324c79b172f41e8a49afc6f_step_008", + "00000223_97b354a907114b7183faa9c4_step_001", + "00000224_97b354a907114b7183faa9c4_step_002", + "00000229_682d529d5e8c4387bc59b3a1_step_000", + "00000238_4829bc0645d6414d9b5cec31_step_001", + "00000241_4829bc0645d6414d9b5cec31_step_004", + "00000243_4829bc0645d6414d9b5cec31_step_006", + "00000248_e87554b09cdc48c3add39db9_step_000", + "00000249_07a2da801a60492fb1e5eeb3_step_000", + "00000250_641f03cbe6a145508c6ae055_step_000", + "00000257_845fb06d7f2f4802a806a600_step_002", + "00000258_845fb06d7f2f4802a806a600_step_003", + "00000259_845fb06d7f2f4802a806a600_step_004", + "00000261_845fb06d7f2f4802a806a600_step_006", + "00000262_845fb06d7f2f4802a806a600_step_007", + "00000264_845fb06d7f2f4802a806a600_step_009", + "00000265_845fb06d7f2f4802a806a600_step_010", + "00000266_845fb06d7f2f4802a806a600_step_011", + "00000267_845fb06d7f2f4802a806a600_step_012", + "00000269_845fb06d7f2f4802a806a600_step_014", + "00000272_648a7c23a21f4e88bf25ffeb_step_000", + "00000273_648a7c23a21f4e88bf25ffeb_step_001", + "00000274_648a7c23a21f4e88bf25ffeb_step_002", + "00000275_648a7c23a21f4e88bf25ffeb_step_003", + "00000276_648a7c23a21f4e88bf25ffeb_step_004", + "00000280_5a6ef3285b89452ea6b390e7_step_001", + "00000282_5a6ef3285b89452ea6b390e7_step_003", + "00000285_d215b7bc60ae468288e5f1ea_step_000", + "00000287_58f8ff46b7564e989f9695b7_step_000", + "00000290_58f8ff46b7564e989f9695b7_step_003", + "00000291_58f8ff46b7564e989f9695b7_step_004", + "00000293_58f8ff46b7564e989f9695b7_step_006", + "00000295_52a153d2417747b5926ff9df_step_000", + "00000296_52a153d2417747b5926ff9df_step_001", + "00000301_52a153d2417747b5926ff9df_step_006", + "00000302_39b08d62a677414f86fdae52_step_000", + "00000305_3062bccff48e47a2b9de05e3_step_000", + "00000306_3062bccff48e47a2b9de05e3_step_001", + "00000307_3062bccff48e47a2b9de05e3_step_002", + "00000308_3062bccff48e47a2b9de05e3_step_003", + "00000309_3062bccff48e47a2b9de05e3_step_004", + "00000310_3062bccff48e47a2b9de05e3_step_005", + "00000311_3062bccff48e47a2b9de05e3_step_006", + "00000312_3062bccff48e47a2b9de05e3_step_007", + "00000314_3062bccff48e47a2b9de05e3_step_009", + "00000315_3062bccff48e47a2b9de05e3_step_010", + "00000316_3062bccff48e47a2b9de05e3_step_011", + "00000317_3062bccff48e47a2b9de05e3_step_012", + "00000318_3062bccff48e47a2b9de05e3_step_013", + "00000319_3062bccff48e47a2b9de05e3_step_014", + "00000321_3062bccff48e47a2b9de05e3_step_016", + "00000322_3062bccff48e47a2b9de05e3_step_017", + "00000323_3062bccff48e47a2b9de05e3_step_018", + "00000324_3062bccff48e47a2b9de05e3_step_019", + "00000325_3062bccff48e47a2b9de05e3_step_020", + "00000329_12a935cd9b684f879c0505fe_step_000", + "00000330_12a935cd9b684f879c0505fe_step_001", + "00000331_12a935cd9b684f879c0505fe_step_002", + "00000336_1a821c3883f7459a9615fca4_step_000", + "00000337_153efbd85ca64c4fb6b7ed5f_step_000", + "00000346_4185972a944744d8a7a0f2b4_step_002", + "00000348_4185972a944744d8a7a0f2b4_step_004", + "00000352_4185972a944744d8a7a0f2b4_step_008", + "00000355_68d1a5c2319a4a419ff625c6_step_001", + "00000356_68d1a5c2319a4a419ff625c6_step_002", + "00000357_68d1a5c2319a4a419ff625c6_step_003", + "00000364_38d899e2706a4d09960705dd_step_001", + "00000367_23c957e8e7b2428282a13ae2_step_000", + "00000368_23c957e8e7b2428282a13ae2_step_001", + "00000369_23c957e8e7b2428282a13ae2_step_002", + "00000374_23c957e8e7b2428282a13ae2_step_007", + "00000375_23c957e8e7b2428282a13ae2_step_008", + "00000376_23c957e8e7b2428282a13ae2_step_009", + "00000377_23c957e8e7b2428282a13ae2_step_010", + "00000378_23c957e8e7b2428282a13ae2_step_011", + "00000379_239bbf0e92974a32bd214366_step_000", + "00000382_239bbf0e92974a32bd214366_step_003", + "00000383_239bbf0e92974a32bd214366_step_004", + "00000386_239bbf0e92974a32bd214366_step_007", + "00000387_239bbf0e92974a32bd214366_step_008", + "00000388_239bbf0e92974a32bd214366_step_009", + "00000391_fd490b564a44413884fab719_step_000", + "00000405_f3759bbb4682423caf207e8e_step_002", + "00000406_f3759bbb4682423caf207e8e_step_003", + "00000408_36bcb4030e36417b8dc74b87_step_000", + "00000410_30afd12eede44fa8a1def049_step_000", + "00000411_305e45c9479f43979b0d7b53_step_000", + "00000413_94f421b1b33d47c592c9fe1d_step_000", + "00000418_ce5b31679ee845a69ba89d6f_step_000", + "00000421_bd0972033f464f8f961a150a_step_002", + "00000422_8e8a96d437584c77b3cfd84f_step_000", + "00000423_8e8a96d437584c77b3cfd84f_step_001", + "00000424_8e8a96d437584c77b3cfd84f_step_002", + "00000444_4ed4c78d6d754aac90876fc2_step_003", + "00000445_4ed4c78d6d754aac90876fc2_step_004", + "00000459_516b1784884d4facbc4c0d74_step_007", + "00000462_516b1784884d4facbc4c0d74_step_010", + "00000466_11951e51b89249dba38ded3e_step_001", + "00000469_11951e51b89249dba38ded3e_step_004", + "00000470_11951e51b89249dba38ded3e_step_005", + "00000474_a5639f2b84c445aea5da18ad_step_000", + "00000477_0fc8cc17c6af48dabe36c8f2_step_002", + "00000478_0fc8cc17c6af48dabe36c8f2_step_003", + "00000479_0fc8cc17c6af48dabe36c8f2_step_004", + "00000485_a7d0c851b5f24a97a7cac950_step_002", + "00000488_a7d0c851b5f24a97a7cac950_step_005", + "00000489_a7d0c851b5f24a97a7cac950_step_006", + "00000492_a7d0c851b5f24a97a7cac950_step_009", + "00000501_5499914343bd4f549b38046d_step_002", + "00000502_5499914343bd4f549b38046d_step_003", + "00000508_d1c0a44331fd41faa91d4c2e_step_000", + "00000509_d1c0a44331fd41faa91d4c2e_step_001", + "00000510_d1c0a44331fd41faa91d4c2e_step_002", + "00000513_f78bf7cf156f4231988af062_step_001", + "00000519_5b8fa6b193d14279a77a0e50_step_000", + "00000522_a56dd4152b7e4ccf91212d7b_step_000", + "00000523_1f8d7f343e634c11a80d23ac_step_000", + "00000526_f9d6559308dc4c85aab9fa38_step_000", + "00000527_db75f3a38d9746a1bd66168d_step_000", + "00000530_bc0d6937206b43bc96521413_step_002", + "00000531_bc0d6937206b43bc96521413_step_003", + "00000542_4b1756f6e72b45c29a8e4eb4_step_000", + "00000543_8cf6554d440d40c4823dad6c_step_000", + "00000549_41a24c0b74a34217832f5af0_step_000", + "00000551_41a24c0b74a34217832f5af0_step_002", + "00000559_a1621e156ade4317ab6a5bc5_step_000", + "00000562_1724088724bf4e53a36e363e_step_000", + "00000565_5b5119548f7b421e8f597438_step_000", + "00000566_2f2b015ef4904c1caef56154_step_000", + "00000574_5a4cef68211d4706b1ec8586_step_003", + "00000578_5a4cef68211d4706b1ec8586_step_007", + "00000579_5a4cef68211d4706b1ec8586_step_008", + "00000580_5a4cef68211d4706b1ec8586_step_009", + "00000582_5a4cef68211d4706b1ec8586_step_011", + "00000583_5a4cef68211d4706b1ec8586_step_012", + "00000587_2417b410de78416ebe50d460_step_000", + "00000589_2417b410de78416ebe50d460_step_002", + "00000590_2417b410de78416ebe50d460_step_003", + "00000591_2417b410de78416ebe50d460_step_004", + "00000597_7fe894812c4244e18241aa08_step_003", + "00000601_7fe894812c4244e18241aa08_step_007", + "00000602_7fe894812c4244e18241aa08_step_008", + "00000603_7fe894812c4244e18241aa08_step_009", + "00000605_7fe894812c4244e18241aa08_step_011", + "00000606_7fe894812c4244e18241aa08_step_012", + "00000609_04e799936ae446b9a3d8d2b8_step_000", + "00000610_04e799936ae446b9a3d8d2b8_step_001", + "00000611_04e799936ae446b9a3d8d2b8_step_002", + "00000613_189d1310aa8c4a2a92a21020_step_001", + "00000615_c710d414bbbc4340b682c58a_step_001", + "00000616_c710d414bbbc4340b682c58a_step_002", + "00000617_c710d414bbbc4340b682c58a_step_003", + "00000618_c710d414bbbc4340b682c58a_step_004", + "00000619_c710d414bbbc4340b682c58a_step_005", + "00000620_c710d414bbbc4340b682c58a_step_006", + "00000621_c710d414bbbc4340b682c58a_step_007", + "00000622_c710d414bbbc4340b682c58a_step_008", + "00000624_1eacb269d52a47f5b265c1ab_step_000", + "00000626_f686126d229f47aeb125b5ba_step_000", + "00000627_53bfa7e2e04c4d9dbf4a3db2_step_000", + "00000632_4f322b34e87c43289916c298_step_001", + "00000637_5ae45a997c76423aba2fcc11_step_002", + "00000638_5ae45a997c76423aba2fcc11_step_003", + "00000643_bb55eaa4e9e24c2ea9d18ee0_step_000", + "00000644_761a451dfea94bfa93e23cfe_step_000", + "00000654_d87d11d9c3ca4ee5a88797ae_step_002", + "00000658_a40da330321b44f286a27361_step_000", + "00000659_6fae5591b3034f949b7e8eae_step_000", + "00000666_6f67a59c16b949a4b66dcfe1_step_000", + "00000683_8863c3497d6d4e05b0f41ddc_step_000", + "00000685_24615f5ff44d4cd5809e77a5_step_001", + "00000686_24615f5ff44d4cd5809e77a5_step_002", + "00000688_b9f3563b403143dbb86ab2b8_step_001", + "00000691_b9f3563b403143dbb86ab2b8_step_004", + "00000693_b9f3563b403143dbb86ab2b8_step_006", + "00000694_45f6100bfa3948e69405bb21_step_000", + "00000695_3f46763af0744ab2a90e6b48_step_000", + "00000696_32309198fce9481896bd0a99_step_000", + "00000698_6f0fc559e8f3422c908b6060_step_001", + "00000699_cae88f0aaaf34de597863810_step_000", + "00000708_c08c1c78b86f4ee3bcb7d9de_step_004", + "00000709_c08c1c78b86f4ee3bcb7d9de_step_005", + "00000710_c08c1c78b86f4ee3bcb7d9de_step_006", + "00000721_9a461e8ae7dc4d33a55883eb_step_000", + "00000723_8ed79b6bcb024d1a9f2aa5e7_step_000", + "00000737_989e0f807cde438face0cb00_step_002", + "00000738_989e0f807cde438face0cb00_step_003", + "00000746_6cb3ddbb49974d7db0e97135_step_001", + "00000751_6f0d90054d40400593050930_step_000", + "00000752_6f0d90054d40400593050930_step_001", + "00000758_8ab50540e9804365a8717ec0_step_005", + "00000759_8ab50540e9804365a8717ec0_step_006", + "00000760_8ab50540e9804365a8717ec0_step_007", + "00000763_8ab50540e9804365a8717ec0_step_010", + "00000764_9cab8335065e4d439bbff471_step_000", + "00000765_9cab8335065e4d439bbff471_step_001", + "00000766_9cab8335065e4d439bbff471_step_002", + "00000767_9cab8335065e4d439bbff471_step_003", + "00000775_a25fb37392a44447b9684f16_step_000", + "00000776_a25fb37392a44447b9684f16_step_001", + "00000777_a25fb37392a44447b9684f16_step_002", + "00000778_a25fb37392a44447b9684f16_step_003", + "00000779_a25fb37392a44447b9684f16_step_004", + "00000780_a25fb37392a44447b9684f16_step_005", + "00000781_a25fb37392a44447b9684f16_step_006", + "00000782_a25fb37392a44447b9684f16_step_007", + "00000783_a25fb37392a44447b9684f16_step_008", + "00000784_a25fb37392a44447b9684f16_step_009", + "00000785_a25fb37392a44447b9684f16_step_010", + "00000786_a25fb37392a44447b9684f16_step_011", + "00000787_a25fb37392a44447b9684f16_step_012", + "00000788_a25fb37392a44447b9684f16_step_013", + "00000789_a25fb37392a44447b9684f16_step_014", + "00000790_a25fb37392a44447b9684f16_step_015", + "00000791_a25fb37392a44447b9684f16_step_016", + "00000792_a25fb37392a44447b9684f16_step_017", + "00000793_a25fb37392a44447b9684f16_step_018", + "00000796_dec80701adc84239b485449d_step_002", + "00000797_e7533c87b9a347cdafd0c390_step_000", + "00000799_ad6107d9fc994ccca38cc4e4_step_001", + "00000800_ad6107d9fc994ccca38cc4e4_step_002", + "00000801_ad6107d9fc994ccca38cc4e4_step_003", + "00000802_ad6107d9fc994ccca38cc4e4_step_004", + "00000806_05cadeb104be4c8aa75ccc71_step_000", + "00000807_05cadeb104be4c8aa75ccc71_step_001", + "00000808_05cadeb104be4c8aa75ccc71_step_002", + "00000809_05cadeb104be4c8aa75ccc71_step_003", + "00000816_36e6258346004cabb4c091b2_step_004", + "00000817_36e6258346004cabb4c091b2_step_005", + "00000818_6bbad2756d7845bd8d731d60_step_000", + "00000819_6bbad2756d7845bd8d731d60_step_001", + "00000821_6bbad2756d7845bd8d731d60_step_003", + "00000822_c98978894f544f89aa10633f_step_000", + "00000823_c98978894f544f89aa10633f_step_001", + "00000827_b0d209f7a8ad4b02910c317f_step_003", + "00000829_889a065d51a24bb8ad704c69_step_000", + "00000830_889a065d51a24bb8ad704c69_step_001", + "00000832_889a065d51a24bb8ad704c69_step_003", + "00000834_889a065d51a24bb8ad704c69_step_005", + "00000837_b5409201f9a5495fa169af85_step_000", + "00000840_2c1efcc32d094e9fb9e1a88e_step_000", + "00000842_2c1efcc32d094e9fb9e1a88e_step_002", + "00000843_2c1efcc32d094e9fb9e1a88e_step_003", + "00000844_2c1efcc32d094e9fb9e1a88e_step_004", + "00000849_2c1efcc32d094e9fb9e1a88e_step_009", + "00000850_2c1efcc32d094e9fb9e1a88e_step_010", + "00000851_2c1efcc32d094e9fb9e1a88e_step_011", + "00000855_2c1efcc32d094e9fb9e1a88e_step_015", + "00000856_2c1efcc32d094e9fb9e1a88e_step_016", + "00000859_58ac6a347bbe4cf5ae07a565_step_000", + "00000863_029c2575dd474650ba1b8d21_step_003", + "00000864_029c2575dd474650ba1b8d21_step_004", + "00000866_029c2575dd474650ba1b8d21_step_006", + "00000867_029c2575dd474650ba1b8d21_step_007", + "00000868_029c2575dd474650ba1b8d21_step_008", + "00000870_029c2575dd474650ba1b8d21_step_010", + "00000871_029c2575dd474650ba1b8d21_step_011", + "00000872_029c2575dd474650ba1b8d21_step_012", + "00000873_029c2575dd474650ba1b8d21_step_013", + "00000874_029c2575dd474650ba1b8d21_step_014", + "00000877_029c2575dd474650ba1b8d21_step_017", + "00000879_029c2575dd474650ba1b8d21_step_019", + "00000880_029c2575dd474650ba1b8d21_step_020", + "00000882_029c2575dd474650ba1b8d21_step_022", + "00000883_029c2575dd474650ba1b8d21_step_023", + "00000884_029c2575dd474650ba1b8d21_step_024", + "00000885_029c2575dd474650ba1b8d21_step_025", + "00000886_029c2575dd474650ba1b8d21_step_026", + "00000887_029c2575dd474650ba1b8d21_step_027", + "00000889_e2d3a4dc5f7c438bb240e9d1_step_000", + "00000890_e2d3a4dc5f7c438bb240e9d1_step_001", + "00000892_be26dc83f78947738b2bfabd_step_001", + "00000894_be26dc83f78947738b2bfabd_step_003", + "00000897_be26dc83f78947738b2bfabd_step_006", + "00000900_4df6ab9924674556bb4a509d_step_000", + "00000904_4df6ab9924674556bb4a509d_step_004", + "00000905_4df6ab9924674556bb4a509d_step_005", + "00000906_4df6ab9924674556bb4a509d_step_006", + "00000919_cdcebf32644443b9812097ba_step_003", + "00000923_cdcebf32644443b9812097ba_step_007", + "00000927_cdcebf32644443b9812097ba_step_011", + "00000928_cdcebf32644443b9812097ba_step_012", + "00000938_4f351b53bfd84bb4a2f7809c_step_003", + "00000942_f297a24e1a4446cf9d74efd9_step_001", + "00000948_f297a24e1a4446cf9d74efd9_step_007", + "00000949_f297a24e1a4446cf9d74efd9_step_008", + "00000953_ccc14f0fcff54b5985cc9113_step_000", + "00000955_a741c7966d2c40a8a511263e_step_001", + "00000958_04906edf324a4bce8fc3f417_step_000", + "00000961_a98d481268ea4524a7769731_step_000", + "00000962_a98d481268ea4524a7769731_step_001", + "00000963_a98d481268ea4524a7769731_step_002", + "00000970_edacb215ec6949d8af6c8c68_step_000", + "00000973_209426c5054945fab8a4af1b_step_000", + "00000976_b85ec2ff588148c4abd8c8d7_step_000", + "00000984_0dd1386597104265ab67e6cf_step_007", + "00000986_0dd1386597104265ab67e6cf_step_009", + "00000987_0dd1386597104265ab67e6cf_step_010", + "00000988_0dd1386597104265ab67e6cf_step_011", + "00000993_ac4ba032d4b5431ca04f542c_step_000", + "00000994_ac4ba032d4b5431ca04f542c_step_001", + "00000996_6d71695ba3fd475c927a00a7_step_000", + "00000998_6962bc8aad2c4e27b046d5b4_step_000", + "00001000_6962bc8aad2c4e27b046d5b4_step_002", + "00001002_6962bc8aad2c4e27b046d5b4_step_004", + "00001003_6962bc8aad2c4e27b046d5b4_step_005", + "00001004_6962bc8aad2c4e27b046d5b4_step_006", + "00001005_6962bc8aad2c4e27b046d5b4_step_007", + "00001006_6962bc8aad2c4e27b046d5b4_step_008", + "00001009_6962bc8aad2c4e27b046d5b4_step_011", + "00001010_6962bc8aad2c4e27b046d5b4_step_012", + "00001011_6962bc8aad2c4e27b046d5b4_step_013", + "00001013_6962bc8aad2c4e27b046d5b4_step_015", + "00001014_6962bc8aad2c4e27b046d5b4_step_016", + "00001015_6962bc8aad2c4e27b046d5b4_step_017", + "00001019_ca4cf9693d6d4a98b515ba99_step_000", + "00001020_ca4cf9693d6d4a98b515ba99_step_001", + "00001021_ca4cf9693d6d4a98b515ba99_step_002", + "00001024_21adcacb9707488ea6655fd2_step_000", + "00001025_21adcacb9707488ea6655fd2_step_001", + "00001026_0f133d8e7fd448708a554e28_step_000", + "00001027_0f133d8e7fd448708a554e28_step_001", + "00001029_cde47df6e28543d1b434f206_step_001", + "00001030_cde47df6e28543d1b434f206_step_002", + "00001031_cde47df6e28543d1b434f206_step_003", + "00001033_18151464e6434759b7c2ece7_step_000", + "00001034_085828cd621d404a90ccd883_step_000", + "00001035_be3ed2c9696e4e6a91b34f79_step_000", + "00001036_be3ed2c9696e4e6a91b34f79_step_001", + "00001040_74c42207fa764831b03f7658_step_000", + "00001041_6baf25f5fe2947e8927797d8_step_000", + "00001048_2b2638f82b3946b1867f2d11_step_004", + "00001049_2b2638f82b3946b1867f2d11_step_005", + "00001050_2b2638f82b3946b1867f2d11_step_006", + "00001052_2fd6155fa34f418083d0bd0f_step_001", + "00001053_2fd6155fa34f418083d0bd0f_step_002", + "00001061_284effca5a19488fa8a228e2_step_002", + "00001062_c04956ddff6c4324b5cad67c_step_000", + "00001063_c6fda10dc58448d1951c5cc3_step_000", + "00001064_c6fda10dc58448d1951c5cc3_step_001", + "00001065_c6fda10dc58448d1951c5cc3_step_002", + "00001067_8a2edcf36bcd435092f4c8ae_step_001", + "00001069_8a2edcf36bcd435092f4c8ae_step_003", + "00001071_8a2edcf36bcd435092f4c8ae_step_005", + "00001097_256ee7ec3a4b4972a8b87c8d_step_001", + "00001099_256ee7ec3a4b4972a8b87c8d_step_003", + "00001102_256ee7ec3a4b4972a8b87c8d_step_006", + "00001106_ba88e7579ced4a0aa2de629c_step_000", + "00001107_78566795c3144719804f8d34_step_000", + "00001108_412675e2ea594e70bbd8cf6c_step_000", + "00001112_3bd4a008a3a0483d86ccab3f_step_000", + "00001114_5f5cf6feacbc41fb88b2d873_step_000", + "00001121_da4037e40839451dbbc2bd1f_step_000", + "00001130_c2db313c2ce749d784c610d2_step_002", + "00001139_0b0ed9b0ccbb455d82c60d69_step_000", + "00001140_0b0ed9b0ccbb455d82c60d69_step_001", + "00001141_0b0ed9b0ccbb455d82c60d69_step_002", + "00001146_274866da478e4a009bed8750_step_001", + "00001159_f112d6f3e0c644ae9de2a724_step_000", + "00001165_4b65bb9a02f6494aa897a53e_step_000", + "00001167_107f61d0402f4c9a9d9d1342_step_000", + "00001168_107f61d0402f4c9a9d9d1342_step_001", + "00001169_0889c458f3f74dc288d2d531_step_000", + "00001170_0889c458f3f74dc288d2d531_step_001", + "00001177_9f1ce06d5e334fe88e1581aa_step_001", + "00001178_515d7e1aeb364a2d88083cf3_step_000", + "00001182_bc0b5846e3d84904ad02e547_step_001", + "00001185_507b60b57791425bbb73273e_step_000", + "00001186_507b60b57791425bbb73273e_step_001", + "00001187_507b60b57791425bbb73273e_step_002", + "00001190_507b60b57791425bbb73273e_step_005", + "00001191_507b60b57791425bbb73273e_step_006", + "00001193_46b17dd88ed24f55bca2eb69_step_000", + "00001200_e44a0f9afbe84b918f789f0f_step_000", + "00001206_e44a0f9afbe84b918f789f0f_step_006", + "00001210_4be610c137ba42ae9933e69b_step_000", + "00001211_4be610c137ba42ae9933e69b_step_001", + "00001212_4be610c137ba42ae9933e69b_step_002", + "00001213_4be610c137ba42ae9933e69b_step_003", + "00001214_9edb90c9f417497fb70bddf6_step_000", + "00001217_e517c61f1c49433bb81cf980_step_000", + "00001228_2fd836ae38b44c41bfbd9584_step_002", + "00001232_73b40f9a4cd3419ab3b42b73_step_001", + "00001233_73b40f9a4cd3419ab3b42b73_step_002", + "00001235_17ea801126da4654b34f6c52_step_000", + "00001238_96503b6a26c64074ad598927_step_000", + "00001239_96503b6a26c64074ad598927_step_001", + "00001240_96503b6a26c64074ad598927_step_002", + "00001241_96503b6a26c64074ad598927_step_003", + "00001242_96503b6a26c64074ad598927_step_004", + "00001243_96503b6a26c64074ad598927_step_005", + "00001244_96503b6a26c64074ad598927_step_006", + "00001246_96503b6a26c64074ad598927_step_008", + "00001247_96503b6a26c64074ad598927_step_009", + "00001249_96503b6a26c64074ad598927_step_011", + "00001252_96503b6a26c64074ad598927_step_014", + "00001253_96503b6a26c64074ad598927_step_015", + "00001254_c2da273d137e475abb1ab1f4_step_000", + "00001255_3df9015915ff4fa7b57f0a71_step_000", + "00001257_a4715d363f88400c8f0238d1_step_000", + "00001260_a4715d363f88400c8f0238d1_step_003", + "00001262_157e5348bf6545e282472856_step_000", + "00001263_157e5348bf6545e282472856_step_001", + "00001266_b53ece83d8964b44bbf1f8ed_step_002", + "00001273_b53ece83d8964b44bbf1f8ed_step_009", + "00001274_b53ece83d8964b44bbf1f8ed_step_010", + "00001276_b53ece83d8964b44bbf1f8ed_step_012", + "00001285_b53ece83d8964b44bbf1f8ed_step_021", + "00001294_b53ece83d8964b44bbf1f8ed_step_030", + "00001298_b53ece83d8964b44bbf1f8ed_step_034", + "00001300_b9951da825954791b59b979d_step_000", + "00001301_a54ee779467b42ea8709e1ca_step_000", + "00001305_3f3a389e9d5a4370b952bdce_step_001", + "00001310_3f3a389e9d5a4370b952bdce_step_006", + "00001311_e95b8713cc0b4436909c78e9_step_000", + "00001314_a9ed5e56a6a8414f91b39bdb_step_000", + "00001319_6a5a7dbad03b4a57b33f2c0d_step_002", + "00001320_6a5a7dbad03b4a57b33f2c0d_step_003", + "00001321_7cef9b79a6b04db894fd74e5_step_000", + "00001324_5bf4a74af99f405392406e40_step_000", + "00001333_beab79941e884455a62af40c_step_001", + "00001334_beab79941e884455a62af40c_step_002", + "00001335_beab79941e884455a62af40c_step_003", + "00001336_beab79941e884455a62af40c_step_004", + "00001338_beab79941e884455a62af40c_step_006", + "00001339_beab79941e884455a62af40c_step_007", + "00001340_beab79941e884455a62af40c_step_008", + "00001344_d8d97699a52842539e08d117_step_002", + "00001345_d8d97699a52842539e08d117_step_003", + "00001346_d8d97699a52842539e08d117_step_004", + "00001348_318b81a8e412438183201be7_step_000", + "00001349_27327ddba7f64417ae1e69a3_step_000", + "00001352_4e1d56bc2cef49ea84626b11_step_000", + "00001353_4e1d56bc2cef49ea84626b11_step_001", + "00001354_4e1d56bc2cef49ea84626b11_step_002", + "00001356_aa0de7c5e9e84d73816bdbde_step_000", + "00001358_2e314c6e080b40fcb6a6db96_step_001", + "00001360_2e314c6e080b40fcb6a6db96_step_003", + "00001368_2e314c6e080b40fcb6a6db96_step_011", + "00001369_2e314c6e080b40fcb6a6db96_step_012", + "00001371_2e314c6e080b40fcb6a6db96_step_014", + "00001373_2e314c6e080b40fcb6a6db96_step_016", + "00001375_2e314c6e080b40fcb6a6db96_step_018", + "00001377_2e314c6e080b40fcb6a6db96_step_020", + "00001379_5b1d6e2599ea47d498a04256_step_000", + "00001380_c49484307f434da78fa06b1f_step_000", + "00001381_c49484307f434da78fa06b1f_step_001", + "00001387_60cf3ad636dd42e0bcec6946_step_000", + "00001389_21b525da345e4e62aebd906b_step_000", + "00001391_406eb61c554a429ebd8a4d4f_step_000", + "00001392_406eb61c554a429ebd8a4d4f_step_001", + "00001393_406eb61c554a429ebd8a4d4f_step_002", + "00001394_406eb61c554a429ebd8a4d4f_step_003", + "00001398_49414db2dd594dc6a3907cf3_step_001", + "00001399_49414db2dd594dc6a3907cf3_step_002", + "00001400_49414db2dd594dc6a3907cf3_step_003", + "00001401_49414db2dd594dc6a3907cf3_step_004", + "00001402_49414db2dd594dc6a3907cf3_step_005", + "00001403_49414db2dd594dc6a3907cf3_step_006", + "00001404_49414db2dd594dc6a3907cf3_step_007", + "00001405_49414db2dd594dc6a3907cf3_step_008", + "00001406_49414db2dd594dc6a3907cf3_step_009", + "00001407_49414db2dd594dc6a3907cf3_step_010", + "00001408_49414db2dd594dc6a3907cf3_step_011", + "00001409_49414db2dd594dc6a3907cf3_step_012", + "00001410_49414db2dd594dc6a3907cf3_step_013", + "00001411_49414db2dd594dc6a3907cf3_step_014", + "00001412_49414db2dd594dc6a3907cf3_step_015", + "00001413_4642a707b7894949ba816427_step_000", + "00001414_b38f661707674b8eb983d992_step_000", + "00001417_a45f6c99e2154f3b94955175_step_001", + "00001422_a45f6c99e2154f3b94955175_step_006", + "00001427_a45f6c99e2154f3b94955175_step_011", + "00001428_a45f6c99e2154f3b94955175_step_012", + "00001429_a45f6c99e2154f3b94955175_step_013", + "00001430_a45f6c99e2154f3b94955175_step_014", + "00001432_a45f6c99e2154f3b94955175_step_016", + "00001433_a45f6c99e2154f3b94955175_step_017", + "00001434_a45f6c99e2154f3b94955175_step_018", + "00001438_a45f6c99e2154f3b94955175_step_022", + "00001445_a45f6c99e2154f3b94955175_step_029", + "00001447_a45f6c99e2154f3b94955175_step_031", + "00001449_a45f6c99e2154f3b94955175_step_033", + "00001450_a45f6c99e2154f3b94955175_step_034", + "00001453_a45f6c99e2154f3b94955175_step_037", + "00001455_a45f6c99e2154f3b94955175_step_039", + "00001456_a45f6c99e2154f3b94955175_step_040", + "00001459_a45f6c99e2154f3b94955175_step_043", + "00001461_a45f6c99e2154f3b94955175_step_045", + "00001466_a45f6c99e2154f3b94955175_step_050", + "00001467_a45f6c99e2154f3b94955175_step_051", + "00001468_a45f6c99e2154f3b94955175_step_052", + "00001469_a45f6c99e2154f3b94955175_step_053", + "00001470_a45f6c99e2154f3b94955175_step_054", + "00001471_a45f6c99e2154f3b94955175_step_055", + "00001472_a45f6c99e2154f3b94955175_step_056", + "00001473_a45f6c99e2154f3b94955175_step_057", + "00001474_a45f6c99e2154f3b94955175_step_058", + "00001480_a45f6c99e2154f3b94955175_step_064", + "00001481_a45f6c99e2154f3b94955175_step_065", + "00001482_a45f6c99e2154f3b94955175_step_066", + "00001483_a45f6c99e2154f3b94955175_step_067", + "00001484_a45f6c99e2154f3b94955175_step_068", + "00001487_a45f6c99e2154f3b94955175_step_071", + "00001490_6c8ef6d2f5564d139a5077f8_step_001", + "00001491_6c8ef6d2f5564d139a5077f8_step_002", + "00001495_6c8ef6d2f5564d139a5077f8_step_006", + "00001496_eb4e2b01aaca4131bfc64adb_step_000", + "00001497_eb4e2b01aaca4131bfc64adb_step_001", + "00001500_eb4e2b01aaca4131bfc64adb_step_004", + "00001501_6a0f221e85e04411afe23f51_step_000", + "00001503_6a0f221e85e04411afe23f51_step_002", + "00001505_6d02705716e04d9081f4980b_step_000", + "00001511_5cbe58077e4b4885a5c213b3_step_004", + "00001512_5cbe58077e4b4885a5c213b3_step_005", + "00001522_7079a898746d41ba8ae13d69_step_003", + "00001525_e0d35a03b46745259cf8878f_step_000", + "00001527_9214869844f14e83a9dce3ec_step_000", + "00001532_9f0a4a641e8f4cc588eb4315_step_000", + "00001534_e1d62958d7ca4ad18fefd54d_step_001", + "00001535_e1d62958d7ca4ad18fefd54d_step_002", + "00001538_e1d62958d7ca4ad18fefd54d_step_005", + "00001543_e1d62958d7ca4ad18fefd54d_step_010", + "00001550_a94d978cf62948ce80b417a9_step_000", + "00001552_b0a9c4d836294846891615fe_step_000", + "00001553_adfa1c33ae4d4d0aa441ddc3_step_000", + "00001554_30de00089a3f4a339eddb68d_step_000", + "00001555_30de00089a3f4a339eddb68d_step_001", + "00001556_30de00089a3f4a339eddb68d_step_002", + "00001557_16c191aef5034779aaab6e3f_step_000", + "00001563_2e9dc7e9a1a54dd7ab901478_step_000", + "00001567_9280741c840d4aa1af32658e_step_002", + "00001569_6fc579f3224d4d53a1b60710_step_000", + "00001578_a3b89691665043a08931897f_step_001", + "00001579_a3b89691665043a08931897f_step_002", + "00001582_a3b89691665043a08931897f_step_005", + "00001586_763da6a559544098acbf4154_step_002", + "00001592_35f4abaacc9447e4ac0b964f_step_001", + "00001594_2128dbbd4bf34879913b3a99_step_000", + "00001596_2128dbbd4bf34879913b3a99_step_002", + "00001597_13bd23e0e4c740969b0c71ab_step_000", + "00001598_c118664e9f6f4943855293fa_step_000" + ], + "total_nodes": 17952579, + "solver": { + "name": "scipy.sparse.linalg.cg", + "preconditioner": "Jacobi", + "rtol": 1e-11, + "atol": 0.0, + "maxiter": 2000, + "warm_start": true, + "acceptance_residual": 1e-08, + "flux_tolerance": 1e-08, + "negative_flux_tolerance": 1e-10, + "mass_tolerance": 1e-08, + "tie_mass_tolerance": 1e-12, + "event_batching": false + }, + "worker_cpu": 16, + "coordinator_cpus": [ + 30, + 31 + ], + "prior_synthetic_worker_CPU_s": 0.46044399999999996, + "limits": { + "total_worker_CPU_s": 72000, + "postfit_reserve_CPU_s": 7200, + "ten_CPU_s": 10800, + "part_CPU_s": 1800, + "part_wall_s": 1800, + "part_RSS_bytes": 4294967296, + "ten_disk_bytes": 5368709120, + "total_disk_bytes": 21474836480, + "workers": 1, + "processes_per_worker": 1 + }, + "numpy_version": "1.26.4", + "scipy_version": "1.15.3", + "label_policy": "Exact geometry/base/distance/result file allowlist; audit-denied label/archive/cache reads", + "stage": "TEN_ONLY; after cost evidence continue already authorized preparation without restarting this queue", + "source_sha256": { + "artifacts/s2-main-preparation-2026-11-15/final-roster.json": "fb0c984f2e553343a598ce2e3c7012d3017053dc0fef58b5aaf46dd3c67a207e", + "artifacts/s2-e1-2026-11-14/preflight/ten_part_plan.csv": "89fe54bad7a17a9712b31ee7750f29581a2d1de43d4e6203daf807d783cec5fc", + "docs/s3b-a-contract-2026-11-15.md": "5da8677e0e6fc32cebd33ba541d51c65990f3bf7d3c77097b5b6007e7648339f", + "artifacts/s3b-a-synthetic-2026-11-15/attempt-01/synthetic.receipt.json": "bd73f10cb56a95d37db1ccbf3f605a4c101b509e58f8d04d0a7230ab141e81b8" + }, + "code_sha256": { + "tools/boundary_distance.py": "a45c1cbce92521a96eb814913b4f465b926c0b3883932ab0b7c37d11db113ed7", + "tools/prepare_s3b_ten.py": "3b715108712ab0b50f8cfdef5337d28668ef1e80288e07731c4e78b9e94685b5", + "tools/run_s3b_part.py": "39e304c5ea476517f9dfbe9a992e3074d815a2865a91cdde7fb5015ea423e10f", + "tools/run_s3b_ten.py": "64a9f7c3ca98ce821d2d27a2d0489ac16f8c338c14032b5c71cf1fd0a6196245", + "tools/s2_recovery_monitoring.py": "442c2a9c75e8c00b30a8f2e91cb52d87c466b19a80aea9128b10c021e61b922e", + "tools/s2_recovery_supervisor.py": "f563ca3c2665f5baf0c04f296616e4640423a59b815fbb00479af0f29e57a919", + "tools/s3b_graph.py": "1bdde607ab192deb3ede1833755675243d543d61e96c8cc7a33eb1f89e96c5bd", + "tools/s3b_runtime.py": "f41057db3cbe38850ab65178c6b44be6b8fc3e97bf559769fbc17592a297971d", + "tools/test_s3b_graph.py": "9a3128420ce001fda09a3293d95a5f61fc8e914cfde0dbbc0c241d011d7670e9" + } +} diff --git a/docs/collaboration-stage-review-policy.md b/docs/collaboration-stage-review-policy.md index 55f4fa439..53c8bacdc 100644 --- a/docs/collaboration-stage-review-policy.md +++ b/docs/collaboration-stage-review-policy.md @@ -67,3 +67,5 @@ Mold1794740467从固定Git对象实读10JSON并核表hash,确认617/209、517/ S3-B(a)合同准备更新(只写文档):Claude1794740834已指定L2与τ的同组件配对CI下界均>0,全617总剩余/总原体积的5%门;双壁端点边用同一壁面精确中点距离,真正壁面边仍零。Mold1794740985区分几何blocked、数值失败及预算未完成,无可信剩余量记UNKNOWN。先原固定十件成本检查,必要预算上限20workerCPUh,仍待唯一docs/s3b-a-contract-2026-11-15.md主审。本轮无实现、合成测试或真实件计算。 合同v0.3已逐条吸纳Mold1794741051和Claude1794741070:纯欧氏边长D、下加权中位数、严格D>d50、原tet诱导图保留g=0边、两最大区域各≥5%M、同全域支持三类先后交叉表,描述性且不是新增通过门。已知零边、UNKNOWN数值失败和预算未完成分开。该文档送一次主审;未实现或运行。 + +S3-B(a)一次主审通过:Claude1794741236.468009已核95ab07dc/SHA并接受五项边界,允许实现、合成验收、固定十件、预算内全队列及评分。新增精确事件成本条件:固定迭代求解器与迭代上限,666逐事件成本/湿节点数;1800秒或20h投影越界停止。事件批处理需先v0.4及另审。首实现/13项合成PASS见docs/s3b-a-exact-implementation-2026-11-15.md;实际启动证据另记。无重复用户go,(b)/O1不在范围。 diff --git a/docs/s3b-a-exact-implementation-2026-11-15.md b/docs/s3b-a-exact-implementation-2026-11-15.md new file mode 100644 index 000000000..1314c120d --- /dev/null +++ b/docs/s3b-a-exact-implementation-2026-11-15.md @@ -0,0 +1,15 @@ +# S3-B(a)精确事件实现与固定十件启动依据 + +Claude1794741236.468009已实际完成合同95ab07dc(SHA5da8677e…)的一次主审,批准实现→合成验收→固定十件成本→预算内全队列→评分。原合同文档保持审批版本不改;其中“待审/本稿不执行”是提交时状态,由本记录及主审原话更新,不再向用户请求go。S3-B(b)/O1未授权。 + +第一实现只承载固定十件精确事件成本阶段,不自动跳过十件去跑617件,也不重跑旧S2准备。队列终态若十件全部完成,先做全名单计数成本外推,再按已有授权接续;当前不声称全队列/映射/评分已经实现或执行。若单件超限、数值失败或全局限额触发,停止并保留原回执,不重试。需要事件批处理时必须先成本证据驱动的v0.4声明和Claude另审,不能改正在跑的精确事件源码。 + +压力算法固定SciPy CG,FP64,Jacobi预条件;内部rtol=1e-11、atol=0、最多2000迭代,每一精确容量事件重求压力。初值取上一事件在已有湿节点的压力,新湿节点从0开始。接受界仍是主审相对残差/通量不平衡1e-8,负通量1e-10Q,累计质量1e-8M,并列容量1e-12M。统一正导通率归一仅改变压力标度,仍记录原导通率与归一因子;不改Q或事件排序。 + +每事件保存solve CPU/wall、迭代数、矩阵非零元数、求解前已湿节点数、事件总CPU、残量/体积修正与分流读数;所有件均写events.jsonl,666若实际运行同样有187345节点对应逐事件轨迹。若此前成本/失败边界已停而666未开始,会明确记未运行,不伪造666实测。 + +几何进程只允许三个固定数组文件geometry.npz、boundary_distance_raw.npy、base.npy及同件result.json。未加权距离从原base的geodesic_over_Rg列与原Rg恢复,不读取Dw加权Df。Python审计钩子拒绝其他数据/标签/VTU缓存读取,拒绝子进程/网络,写操作仅限本次独立输出;这是针对固定已审代码的I/O屏障,不是对恶意原生代码的操作系统隔离。新预测进程不导入标签解码器,不加载完整标签。源码及精确输入哈希均核验。 + +13项合成验收全部PASS,记录artifacts/s3b-a-synthetic-2026-11-15/attempt-01;worker CPU0.460444秒计入本轮总账。覆盖链/Y解析事件、Q与导通率缩放、ID/边顺序置换、断连和全壁单tet、立方体跨厚度中点、严格远端层及原零g边分区、数值失败不修复、完整作业预留及真实子进程读取标签被拒绝。未用真实数据调参。 + +唯一十件执行根artifacts/s3b-a-ten-part-2026-11-15,原顺序1130/1324/842/367/746/777/1552/1379/610/666,单worker CPU16、协调器30/31、数学线程1。每件1800CPU秒/1800wall秒/4GiB,十件3workerCPUh(含合成)/5GiB;完整作业额度先预留。总20workerCPUh中保留2h后处理。守卫使用原sampled tree+wait4最终账,保留超调与监测错误。队列锁与started拒绝重启;上一批S3-A已完成不动。实际PID、契约/实现提交与首事件进度另写启动审计,不以本文件替代真实启动证据。 diff --git a/tools/prepare_s3b_ten.py b/tools/prepare_s3b_ten.py new file mode 100644 index 000000000..6028917e2 --- /dev/null +++ b/tools/prepare_s3b_ten.py @@ -0,0 +1,53 @@ +"""Metadata-only preparation of the already fixed ten, no label/data decode.""" +import csv +import json +from pathlib import Path +import numpy as np +import scipy +from s2_recovery_supervisor import save +from s3b_runtime import ROOT, RULE, sha, read +from s3b_graph import SOLVER + + +def main(): + if ROOT.exists(): raise FileExistsError('Never replace a S3-B batch') + roster_path=Path('artifacts/s2-main-preparation-2026-11-15/final-roster.json') + roster=read(roster_path) + rows={r['case']:r for r in roster['parts'] if r['included']} + if len(rows)!=617: raise ValueError('Roster changed') + plan_path=Path('artifacts/s2-e1-2026-11-14/preflight/ten_part_plan.csv') + plans=list(csv.DictReader(plan_path.open())) + if [int(v['numeric_prefix']) for v in plans]!=[1130,1324,842,367,746,777,1552,1379,610,666]: + raise ValueError('Fixed ten changed') + parts=[] + for plan in plans: + row=rows[plan['case']];p=row['preparation'];source=Path(p['preparation_root']) + inputs={str(source/name):p['output_sha256'][name] for name in ['geometry.npz','boundary_distance_raw.npy','base.npy']} + inputs[str(source/'result.json')]=p['result_sha256'] + parts.append(dict(case=row['case'],nodes=row['nodes'],component_id=row['component_id'], + preparation_root=str(source),inputs=inputs)) + accepted=Path('artifacts/s3b-a-synthetic-2026-11-15') + receipts=list(accepted.glob('attempt-*/synthetic.receipt.json')) + if not receipts or read(sorted(receipts)[-1])['status']!='PASS': raise ValueError('Synthetic acceptance missing') + tests_cpu=sum(read(p)['cpu_seconds'] for p in receipts) + source_paths=[roster_path,plan_path,Path('docs/s3b-a-contract-2026-11-15.md'),*receipts] + code=[*Path('tools').glob('*s3b*.py'),Path('tools/boundary_distance.py'), + Path('tools/s2_recovery_supervisor.py'),Path('tools/s2_recovery_monitoring.py')] + c=dict(version='S3B-a-exact-event-ten-v1',authorizing_ruling=RULE, + contract_review_commit='95ab07dcd6104e8cbb7afdcdd7ea1e18cdcaf9d2', + roster=str(roster_path),roster_sha256=sha(roster_path),ten_parts=parts, + all_cases=sorted(rows),total_nodes=sum(r['nodes'] for r in rows.values()), + solver=SOLVER,worker_cpu=16,coordinator_cpus=[30,31], + prior_synthetic_worker_CPU_s=tests_cpu, + limits=dict(total_worker_CPU_s=72000,postfit_reserve_CPU_s=7200,ten_CPU_s=10800, + part_CPU_s=1800,part_wall_s=1800,part_RSS_bytes=4*2**30, + ten_disk_bytes=5*2**30,total_disk_bytes=20*2**30,workers=1,processes_per_worker=1), + numpy_version=np.__version__,scipy_version=scipy.__version__, + label_policy='Exact geometry/base/distance/result file allowlist; audit-denied label/archive/cache reads', + stage='TEN_ONLY; after cost evidence continue already authorized preparation without restarting this queue', + source_sha256={str(p):sha(p) for p in source_paths},code_sha256={str(p):sha(p) for p in sorted(set(code))}) + ROOT.mkdir();save(ROOT/'contract.json',c) + print(json.dumps(dict(root=str(ROOT),contract_sha256=sha(ROOT/'contract.json'),synthetic_CPU_s=tests_cpu))) + + +if __name__=='__main__':main() diff --git a/tools/run_s3b_part.py b/tools/run_s3b_part.py new file mode 100644 index 000000000..135db8782 --- /dev/null +++ b/tools/run_s3b_part.py @@ -0,0 +1,97 @@ +"""One immutable geometry-only exact-event measurement. Never reads labels.""" +import argparse +import json +import os +from pathlib import Path +import time +import traceback +import numpy as np +from s2_recovery_supervisor import save +from s3b_runtime import contract, checked, read, sha, restrict_prediction_io +from s3b_graph import SOLVER, edge_geometry, distal_regions, fill_events + + +def run(root, index): + c = contract(root); spec = c['ten_parts'][index] + dest = root/'parts'/f'part-{index:02d}'/'output'; dest.mkdir(exist_ok=False) + save(dest/'started.json', dict(pid=os.getpid(), case=spec['case'], index=index, unix=time.time(), + solver=SOLVER, authorizing_ruling=c['authorizing_ruling'], labels_read=False)) + allowed = list(spec['inputs']) + restrict_prediction_io(allowed, dest) + start = time.monotonic(); cpu = time.process_time(); latest = None + cost = {}; geometry = None + def progress(stage, **kw): + save(dest/'progress.json', dict(stage=stage, case=spec['case'], pid=os.getpid(), unix=time.time(), + worker_CPU_s=time.process_time()-cpu, wall_s=time.monotonic()-start, **kw)) + try: + progress('VERIFY_GEOMETRY_ALLOWLIST') + for p, h in spec['inputs'].items(): checked(p, h) + source = Path(spec['preparation_root']) + metadata = read(source/'result.json') + if metadata['base_columns'][5] != 'geodesic_over_Rg': + raise ValueError('Not the original unrestricted geodesic column') + with np.load(source/'geometry.npz', allow_pickle=False) as z: + x=z['points_raw']; tetra=z['tetra']; faces=z['boundary_triangles'] + edges=z['edges']; mass=z['node_volume_raw']; raw=z['raw_node_ids']; gate=z['gate_location_raw'] + dw = np.load(source/'boundary_distance_raw.npy', allow_pickle=False) + base = np.load(source/'base.npy', allow_pickle=False) + distance = base[:, 5]*metadata['scales']['Rg']; del base + if np.any(np.diff(raw) <= 0): raise ValueError('Original IDs must be increasing') + seed = int(np.argmin(np.linalg.norm(x-gate, axis=1))) + if seed != metadata['base_gate_node']: raise ValueError('Gate source identity differs') + branch_start = time.process_time() + regions = distal_regions(distance, mass, edges, raw) + save(dest/'regions.json', dict(case=spec['case'], definition='strict-geodesic-distal-v0.3', + total_volume=float(mass.sum()), geometry_inputs=spec['inputs'], **regions)) + cost['regions_CPU_s'] = time.process_time()-branch_start + def midpoint_progress(done, total): + progress('EXACT_MIDPOINTS', completed=done, total=total) + progress('GEOMETRY_EDGE_CAPACITY') + geometry = edge_geometry(x, tetra, faces, dw, edges, mass, midpoint_progress) + cost.update({k:geometry[k] for k in ['geometry_CPU_s','midpoint_CPU_s']}) + np.savez_compressed(dest/'conductance.npz', edges=edges, edge_volume=geometry['edge_volume'], + midpoint_distance=geometry['midpoint'], g=geometry['conductance'], + exact_query_edge_ids=geometry['exact_query_edge_ids'], boundary_edges=geometry['boundary_edges']) + save(dest/'geometry-freeze.json', dict(case=spec['case'], nodes=len(x), total_volume=float(mass.sum()), + exact_midpoint_queries=len(geometry['exact_query_edge_ids']), seed=seed, raw_seed=int(raw[seed]), + boundary_edges=int(geometry['boundary_edges'].sum()), positive_edges=int((geometry['conductance']>0).sum()), + regions_sha256=sha(dest/'regions.json'), conductance_sha256=sha(dest/'conductance.npz'), costs=cost)) + progress('EXACT_EVENTS', nodes=len(x), events=0, wetted_nodes=1) + last_progress = -1. + event_start = time.process_time() + with (dest/'events.jsonl').open('x', buffering=1) as stream: + def event(row): + stream.write(json.dumps(row, allow_nan=False)+'\n') + def state(row, remaining, arrival): + nonlocal latest, last_progress + latest = (row, remaining, arrival) + now = time.monotonic() + if row['events'] <= 2 or now-last_progress >= 1: + progress('EXACT_EVENTS', event_state=row) + last_progress = now + arrival, remaining, result = fill_events(edges, geometry['conductance'], mass, seed, event, state) + cost['events_CPU_s'] = time.process_time()-event_start + np.savez_compressed(dest/'event-field.npz', raw_ids=raw, arrival=arrival, remaining=remaining, mass=mass) + save(dest/'result.json', dict(case=spec['case'], index=index, nodes=len(x), + exact_midpoint_queries=len(geometry['exact_query_edge_ids']), **result, costs=cost, + labels_read=False, GPU=False, new_fits=0, event_batching=False, solver=SOLVER, + worker_CPU_s=time.process_time()-cpu, wall_s=time.monotonic()-start, + output_sha256={p.name:sha(p) for p in dest.iterdir() if p.is_file() and p.name!='progress.json'})) + progress(result['status'], event_state=result) + return 0 + except Exception as exc: + if latest is not None: + state, remaining, arrival = latest + np.savez_compressed(dest/'last-trusted-state.npz', remaining=remaining, arrival=arrival) + else: state = None + save(dest/'failure.json', dict(status='NUMERICAL_OR_INPUT_FAILURE', case=spec['case'], + type=type(exc).__name__, message=str(exc), traceback=traceback.format_exc(), + last_trusted_state=state, remaining_volume=state['remaining_volume'] if state else None, + remaining_state='KNOWN_LAST_STATE' if state else 'UNKNOWN', costs=cost, + worker_CPU_s=time.process_time()-cpu, wall_s=time.monotonic()-start, retry=False)) + raise + + +if __name__ == '__main__': + parser=argparse.ArgumentParser();parser.add_argument('root', type=Path);parser.add_argument('index', type=int) + args=parser.parse_args();raise SystemExit(run(args.root,args.index)) diff --git a/tools/run_s3b_ten.py b/tools/run_s3b_ten.py new file mode 100644 index 000000000..189d0d9e8 --- /dev/null +++ b/tools/run_s3b_ten.py @@ -0,0 +1,73 @@ +"""Sole sequential fixed-ten cost measurement, never retries or batches events.""" +import argparse +import fcntl +import os +from pathlib import Path +import resource +import signal +import sys +import time +import psutil +from s2_recovery_supervisor import save, supervise, stop_group +from s2_recovery_monitoring import disk_usage +from s3b_runtime import contract, read, sha, reserve_ok + + +def run(root): + lock=(root/'batch.lock').open('a');fcntl.flock(lock,fcntl.LOCK_EX|fcntl.LOCK_NB) + c=contract(root);lim=c['limits'] + if (root/'started.json').exists(): raise FileExistsError('Never restart this ten-part attempt') + os.sched_setaffinity(0,c['coordinator_cpus']) + save(root/'started.json',dict(pid=os.getpid(),unix=time.time(),contract_sha256=sha(root/'contract.json'), + code_freeze=read(root/'code-freeze.json'),stage='FIXED_TEN',label_reads=0)) + interrupted=False + def stop(*_): + nonlocal interrupted + interrupted=True + for child in psutil.Process(os.getpid()).children(): stop_group(child.pid) + signal.signal(signal.SIGTERM,stop);signal.signal(signal.SIGINT,stop) + start=time.monotonic();done=[];reason=None;active=None + try: + for index,spec in enumerate(c['ten_parts']): + contract(root) + spent=c['prior_synthetic_worker_CPU_s']+sum(r['worker']['cpu_seconds'] for r in done) + if interrupted: reason='COORDINATOR_INTERRUPTED';break + if not reserve_ok(spent,lim['part_CPU_s'],lim['ten_CPU_s']):reason='TEN_FULL_JOB_RESERVATION';break + if disk_usage(root)>=lim['ten_disk_bytes']:reason='TEN_DISK_LIMIT';break + dest=root/'parts'/f'part-{index:02d}';dest.mkdir(parents=True,exist_ok=False) + active=index + save(root/'progress.json',dict(stage='FIXED_TEN_RUNNING',active_index=index,case=spec['case'], + completed=len(done),settled_worker_CPU_s=spent,elapsed_s=time.monotonic()-start)) + w=supervise(['taskset','-c',str(c['worker_cpu']),sys.executable,'tools/run_s3b_part.py',str(root),str(index)], + dest,'worker',dict(total_cpu_seconds=lim['part_CPU_s']+1,job_cpu_seconds=lim['part_CPU_s'], + job_wall_seconds=lim['part_wall_s'],tree_rss_bytes=lim['part_RSS_bytes'], + disk_bytes=lim['ten_disk_bytes']-disk_usage(root),max_processes=1),poll=.2) + result=dest/'output/result.json';failure=dest/'output/failure.json' + receipt=dict(index=index,case=spec['case'],worker=w, + result_path=str(result) if result.exists() else None,result_sha256=sha(result) if result.exists() else None, + failure_path=str(failure) if failure.exists() else None,failure_sha256=sha(failure) if failure.exists() else None) + save(dest/'guard-result.json',receipt);done.append(receipt);active=None + print(f'S3B_TEN_TERMINAL index={index} case={spec["case"]} status={w["status"]}',flush=True) + if w['monitor_errors']:reason='MONITOR_ERRORS';break + if w['status']!='PASS':reason=w['stop_reason'] or 'WORKER_NUMERICAL_OR_INPUT_FAILURE';break + if not result.exists() or read(result)['status'] not in ('COMPLETE','BLOCKED'): + reason='MISSING_TERMINAL_SCIENTIFIC_RESULT';break + if interrupted:reason='COORDINATOR_INTERRUPTED' + except Exception as exc: + reason='COORDINATOR_EXCEPTION' + save(root/'coordinator-failure.json',dict(type=type(exc).__name__,message=str(exc),active_index=active)) + raise + finally: + report=dict(status='TEN_TERMINAL_AWAITING_COST_CENSUS' if reason is None and len(done)==10 else 'TEN_STOPPED', + stop_reason=reason,receipts=done,attempted=len(done), + not_run_cases=[r['case'] for i,r in enumerate(c['ten_parts']) if i not in {v['index'] for v in done}], + worker_CPU_s=c['prior_synthetic_worker_CPU_s']+sum(r['worker']['cpu_seconds'] for r in done), + coordinator_CPU_s=sum(resource.getrusage(resource.RUSAGE_SELF)[:2]),wall_s=time.monotonic()-start, + account_complete=active is None,no_retries=True,labels_read=False,event_batching=False, + note='No full queue launched. A complete ten requires full-count cost census before continuation; no repeat user-go.') + save(root/'complete.json',report);save(root/'progress.json',report) + return 0 if reason is None else 1 + + +if __name__=='__main__': + p=argparse.ArgumentParser();p.add_argument('root',type=Path);a=p.parse_args();raise SystemExit(run(a.root)) diff --git a/tools/s3b_graph.py b/tools/s3b_graph.py new file mode 100644 index 000000000..03f87c810 --- /dev/null +++ b/tools/s3b_graph.py @@ -0,0 +1,200 @@ +"""Fixed S3-B(a) geometry and exact capacity events. No data or label I/O.""" +from itertools import combinations +import time +import numpy as np +from scipy.sparse import coo_matrix, diags +from scipy.sparse.csgraph import connected_components +from scipy.sparse.linalg import cg +from boundary_distance import SurfaceDistance + +SOLVER = dict(name='scipy.sparse.linalg.cg', preconditioner='Jacobi', + rtol=1e-11, atol=0., maxiter=2000, warm_start=True, + acceptance_residual=1e-8, flux_tolerance=1e-8, + negative_flux_tolerance=1e-10, mass_tolerance=1e-8, + tie_mass_tolerance=1e-12, event_batching=False) + + +class NumericalFailure(RuntimeError): + pass + + +def weighted_median(values, mass): + values, mass = np.asarray(values), np.asarray(mass) + if values.shape != mass.shape or not np.isfinite(values).all() or np.any(mass <= 0): + raise ValueError('Invalid weighted median domain') + order = np.argsort(values, kind='stable') + return float(values[order[np.searchsorted(np.cumsum(mass[order]), mass.sum()/2, side='left')]]) + + +def distal_regions(distance, mass, edges, raw_ids): + """Strict distal induced graph includes original zero-conductance edges.""" + n = len(mass) + if not np.isfinite(distance).all(): + return dict(status='INVALID_GEODESIC', threshold=None, regions=[]) + threshold = weighted_median(distance, mass) + ids = np.flatnonzero(distance > threshold) + local = np.full(n, -1, dtype=np.int64); local[ids] = np.arange(len(ids)) + e = edges[(local[edges] >= 0).all(axis=1)] + if not len(ids): + return dict(status='NO_USABLE_DISTAL_PAIR', threshold=threshold, regions=[]) + graph = coo_matrix((np.ones(2*len(e)), + (np.r_[local[e[:, 0]], local[e[:, 1]]], + np.r_[local[e[:, 1]], local[e[:, 0]]])), + shape=(len(ids), len(ids))).tocsr() + count, labels = connected_components(graph, directed=False) + groups = [ids[labels == j] for j in range(count)] + groups.sort(key=lambda a: (-float(mass[a].sum()), int(raw_ids[a].min()))) + selected = groups[:2] + valid = len(selected) == 2 and all(mass[a].sum() >= .05*mass.sum() for a in selected) + return dict(status='VALID' if valid else 'NO_USABLE_DISTAL_PAIR', threshold=threshold, + distal_volume=float(mass[ids].sum()), distal_components=count, + regions=[dict(local_ids=a.tolist(), raw_ids=raw_ids[a].tolist(), + volume=float(mass[a].sum())) for a in selected]) + + +def edge_geometry(x, tetra, faces, dw, cached_edges, cached_mass, query_progress=None): + if (not np.isfinite(x).all() or not np.isfinite(dw).all() or np.any(dw < 0) + or len(dw) != len(x)): + raise ValueError('Invalid geometry/distance') + start = time.process_time() + cells = x[tetra] + volumes = np.abs(np.linalg.det(cells[:, 1:] - cells[:, :1]))/6 + if not np.isfinite(volumes).all() or np.any(volumes <= 0): + raise ValueError('Nonpositive tetrahedron') + mass = np.bincount(tetra.ravel(), weights=np.repeat(volumes/4, 4), minlength=len(x)) + if np.any(mass <= 0) or not np.allclose(mass, cached_mass, rtol=1e-12, atol=0): + raise ValueError('Original node capacity differs') + all_edges = np.sort(np.concatenate([tetra[:, [i, j]] for i, j in combinations(range(4), 2)]), axis=1) + edges, inverse = np.unique(all_edges, axis=0, return_inverse=True) + if not np.array_equal(edges, cached_edges): + raise ValueError('Original edge identity differs') + edge_volume = np.bincount(inverse, weights=np.tile(volumes/6, 6), minlength=len(edges)) + length = np.linalg.norm(x[edges[:, 1]] - x[edges[:, 0]], axis=1) + if np.any(length <= 0) or not np.isfinite(length).all(): + raise ValueError('Invalid edge length') + n = len(x) + wall_edges = np.sort(np.concatenate([faces[:, [0, 1]], faces[:, [0, 2]], faces[:, [1, 2]]]), axis=1) + keys = edges[:, 0].astype(np.int64)*n + edges[:, 1] + wall_keys = np.unique(wall_edges[:, 0].astype(np.int64)*n + wall_edges[:, 1]) + is_wall = np.isin(keys, wall_keys) + both_wall = (dw[edges] == 0).all(axis=1) + if not both_wall[is_wall].all(): + raise ValueError('Surface edge endpoints not original zero-distance nodes') + midpoint = dw[edges].mean(axis=1) + midpoint[is_wall] = 0. + queries = np.flatnonzero(both_wall & ~is_wall) + geometry_cpu = time.process_time()-start + start = time.process_time() + if len(queries): + surface = SurfaceDistance(x[faces]) + for k in range(0, len(queries), 256): + ids = queries[k:k+256] + midpoint[ids] = surface.query(x[edges[ids]].mean(axis=1)) + if query_progress: + query_progress(min(k+256, len(queries)), len(queries)) + midpoint_cpu = time.process_time()-start + if not np.isfinite(midpoint).all() or np.any(midpoint < 0): + raise NumericalFailure('Invalid midpoint distance') + g = edge_volume/length**2*midpoint**2 + if not np.isfinite(g).all() or np.any((midpoint > 0) & (g <= 0)): + raise NumericalFailure('Positive conductance underflow/invalid value') + return dict(mass=mass, edges=edges, edge_volume=edge_volume, midpoint=midpoint, conductance=g, + exact_query_edge_ids=queries, boundary_edges=is_wall, + geometry_CPU_s=geometry_cpu, midpoint_CPU_s=midpoint_cpu) + + +def pressure_step(adjacency, laplacian, wet, seed, previous, Q=1., solver=cg): + ids = np.flatnonzero(wet) + a = laplacian[ids][:, ids].tocsr() + diagonal = a.diagonal() + if np.any(diagonal <= 0): + raise NumericalFailure('Positive-source pressure matrix is singular') + b = np.zeros(len(ids)); b[np.searchsorted(ids, seed)] = Q + iterations = 0 + def callback(_): + nonlocal iterations + iterations += 1 + start = time.process_time(); wall = time.monotonic() + p, info = solver(a, b, x0=previous[ids], M=diags(1/diagonal), + rtol=SOLVER['rtol'], atol=SOLVER['atol'], + maxiter=SOLVER['maxiter'], callback=callback) + cpu, elapsed = time.process_time()-start, time.monotonic()-wall + residual = float(np.linalg.norm(a@p-b)/Q) + if info != 0 or not np.isfinite(p).all() or not np.isfinite(residual) or residual > SOLVER['acceptance_residual']: + raise NumericalFailure(f'CG failed: info={info}, iterations={iterations}, residual={residual}') + pressure = np.zeros(len(wet)); pressure[ids] = p + rates = np.asarray(adjacency @ pressure); rates[wet] = 0. + if np.any(rates < -SOLVER['negative_flux_tolerance']*Q): + raise NumericalFailure('Negative front flux exceeds accepted tolerance') + negative_roundoff = float(-rates[rates < 0].sum()) + rates[rates < 0] = 0. + imbalance = float(abs(rates.sum()-Q)/Q) + if imbalance > SOLVER['flux_tolerance']: + raise NumericalFailure(f'Flux balance {imbalance} exceeds tolerance') + return pressure, rates, dict(iterations=iterations, pressure_residual=residual, + flux_imbalance=imbalance, negative_flux_roundoff=negative_roundoff, + solve_CPU_s=cpu, solve_wall_s=elapsed, wetted_nodes=len(ids), matrix_nnz=a.nnz) + + +def fill_events(edges, g, mass, seed, event_callback=None, state_callback=None, Q=1., solver=cg): + """One pressure solve per exact event; simultaneous capacity ties only.""" + n = len(mass); M = float(mass.sum()) + if not np.isfinite(mass).all() or np.any(mass <= 0) or not np.isfinite(g).all() or np.any(g < 0) or Q <= 0: + raise ValueError('Invalid event domain') + positive = g > 0 + scale = float(g.max()) if positive.any() else 1. + gn = g[positive]/scale + if np.any(gn <= 0): + raise NumericalFailure('Conductance normalization underflow') + e = edges[positive] + adj = coo_matrix((np.tile(gn, 2), (np.r_[e[:, 0], e[:, 1]], np.r_[e[:, 1], e[:, 0]])), shape=(n, n)).tocsr() + lap = diags(np.asarray(adj.sum(axis=1)).ravel()) - adj + remaining = np.asarray(mass, float).copy(); remaining[seed] = 0. + wet = np.zeros(n, bool); wet[seed] = True + arrival = np.full(n, np.nan); arrival[seed] = 0. + pressure = np.zeros(n); clock = 0.; rounding = 0.; events = 0 + initial = float(mass[seed]); total_solve = 0. + def state(status): + return dict(status=status, remaining_volume=float(remaining.sum()), total_volume=M, + initial_seed_volume=initial, filled_nodes=int(wet.sum()), events=events, + graph_time=clock, cumulative_rounding_volume=rounding, + conductance_normalization=scale, solve_CPU_s=total_solve) + if state_callback: state_callback(state('INITIALIZED'), remaining, arrival) + while not wet.all(): + front_counts = np.asarray(adj @ wet.astype(float)); front_counts[wet] = 0. + if not (front_counts > 0).any(): + return arrival, remaining, state('BLOCKED') + event_cpu = time.process_time() + pressure, rates, diagnostic = pressure_step(adj, lap, wet, seed, pressure, Q, solver) + active = rates > 0 + if not active.any(): + raise NumericalFailure('Positive graph frontier but no positive numerical flow') + dt = float(np.min(remaining[active]/rates[active])) + if not np.isfinite(dt) or dt <= 0 or clock+dt <= clock: + raise NumericalFailure('Nonpositive/unrepresentable exact event time') + before = float(remaining.sum()) + new = remaining - dt*rates + tolerance = SOLVER['tie_mass_tolerance']*M + if np.min(new) < -tolerance: + raise NumericalFailure('Capacity overshoot') + exhausted = (~wet) & active & (new <= tolerance) + if not exhausted.any(): + raise NumericalFailure('No capacity exhausted in exact event') + correction = float(np.abs(new[exhausted]).sum()) + new[exhausted] = 0. + if abs((before-new.sum())-Q*dt) > SOLVER['mass_tolerance']*M: + raise NumericalFailure('Per-event volume conservation failed') + next_clock = clock+dt + if rounding+correction > SOLVER['mass_tolerance']*M or abs((M-new.sum()-initial)-Q*next_clock) > SOLVER['mass_tolerance']*M: + raise NumericalFailure('Cumulative volume conservation failed') + remaining = new; clock = next_clock; rounding += correction + wet[exhausted] = True; arrival[exhausted] = clock; events += 1 + total_solve += diagnostic['solve_CPU_s'] + diagnostic.update(event=events, graph_time=clock, delta_time=dt, newly_wet=int(exhausted.sum()), + remaining_volume=float(remaining.sum()), rounding_volume=correction, + front_count=int(active.sum()), split_concentration=float(np.sum((rates/Q)**2)), + event_CPU_s=time.process_time()-event_cpu) + if event_callback: event_callback(diagnostic) + if state_callback: state_callback(state('RUNNING'), remaining, arrival) + if events > n: raise NumericalFailure('Event count exceeds node count') + return arrival, remaining, state('COMPLETE') diff --git a/tools/s3b_runtime.py b/tools/s3b_runtime.py new file mode 100644 index 000000000..cdcbd2170 --- /dev/null +++ b/tools/s3b_runtime.py @@ -0,0 +1,65 @@ +"""Pinned S3-B(a) geometry-only inputs and fail-closed I/O for prediction.""" +import hashlib +import json +import os +from pathlib import Path +import sys + +ROOT = Path('artifacts/s3b-a-ten-part-2026-11-15') +RULE = '1794741236.468009' + + +def sha(path): + h = hashlib.sha256() + with open(path, 'rb') as f: + for b in iter(lambda: f.read(1024*1024), b''): h.update(b) + return h.hexdigest() + + +def read(path): + return json.loads(Path(path).read_text()) + + +def checked(path, expected): + if sha(path) != expected: raise ValueError('Pinned file changed: '+str(path)) + return Path(path) + + +def contract(root): + c = read(Path(root)/'contract.json') + for p, h in {**c['code_sha256'], **c['source_sha256']}.items(): checked(p, h) + freeze = read(Path(root)/'code-freeze.json') + if freeze['contract_sha256'] != sha(Path(root)/'contract.json') or not freeze.get('git_commit'): + raise ValueError('Implementation/contract not Git-frozen') + if c['authorizing_ruling'] != RULE or c['limits']['total_worker_CPU_s'] != 72000: + raise ValueError('Wrong scope/budget') + return c + + +def restrict_prediction_io(allowed_files, output_root): + """Python audit guard: exact data-file allowlist, no truth/cache/VTU access. + + This is an audited-worker I/O barrier, not a hostile-code OS sandbox. The + pinned code neither invokes subprocesses nor accesses files via ctypes. + """ + allowed = {str(Path(p).resolve()) for p in allowed_files} + output = str(Path(output_root).resolve()) + runtimes = [str(Path(sys.prefix).resolve()), str(Path(__file__).resolve().parent)] + def inside(path, directory): return path == directory or path.startswith(directory+os.sep) + def audit(event, args): + if event == 'open': + name, mode, flags = args + if isinstance(name, int): return + path = str(Path(os.fsdecode(name)).resolve()) + writing = bool(flags & (os.O_WRONLY | os.O_RDWR | os.O_CREAT | os.O_TRUNC | os.O_APPEND)) + if writing: + if not inside(path, output): raise PermissionError('Prediction output outside own directory') + elif path not in allowed and not inside(path, output) and not any(inside(path, v) for v in runtimes): + raise PermissionError('Prediction input outside geometry allowlist: '+path) + elif event in ('subprocess.Popen', 'os.system', 'os.exec', 'socket.connect'): + raise PermissionError('Prediction subprocess/network forbidden') + sys.addaudithook(audit) + + +def reserve_ok(spent, part_cap, stage_cap): + return spent >= 0 and spent+part_cap <= stage_cap diff --git a/tools/test_s3b_graph.py b/tools/test_s3b_graph.py new file mode 100644 index 000000000..9b1ec855f --- /dev/null +++ b/tools/test_s3b_graph.py @@ -0,0 +1,128 @@ +"""Analytical conservation, symmetry, geometric boundaries and I/O tests.""" +from itertools import permutations +import os +from pathlib import Path +import subprocess +import sys +import tempfile +import unittest +import numpy as np +from scipy.sparse.linalg import cg +from s3b_graph import fill_events, edge_geometry, distal_regions, NumericalFailure +from s3b_runtime import reserve_ok + + +class GraphTests(unittest.TestCase): + def test_chain_analytical_times_and_conservation(self): + a,r,s=fill_events(np.array([[0,1],[1,2]]),np.array([2.,3.]),np.array([2.,3.,5.]),0) + np.testing.assert_allclose(a,[0,3,8],rtol=1e-10,atol=1e-12) + self.assertEqual(s['status'],'COMPLETE');self.assertEqual(r.sum(),0) + + def test_symmetric_fork_keeps_ties(self): + a,_,s=fill_events(np.array([[0,1],[0,2]]),np.ones(2),np.ones(3),0) + np.testing.assert_allclose(a,[0,2,2]);self.assertEqual(s['events'],1) + + def test_asymmetric_fork_and_multiple_wet_inflows(self): + # First branch (g=3) fills at4/3, then remaining1/3 fills underQ=1. + a,_,_=fill_events(np.array([[0,1],[0,2]]),np.array([3.,1.]),np.ones(3),0) + np.testing.assert_allclose(a,[0,4/3,2]) + # Diamond: two tied unit-capacity branches, then jointly feed last node. + a,_,_=fill_events(np.array([[0,1],[0,2],[1,3],[2,3]]),np.ones(4),np.ones(4),0) + np.testing.assert_allclose(a,[0,2,2,3]) + + def test_Q_and_uniform_conductance_scaling(self): + e=np.array([[0,1],[0,2],[1,3],[2,3]]);g=np.array([1.,2.,3.,4.]);m=np.ones(4) + a,_,_=fill_events(e,g,m,0) + b,_,_=fill_events(e,g*7,m,0) + c,_,_=fill_events(e,g,m,0,Q=5) + np.testing.assert_allclose(a,b,rtol=1e-10) + np.testing.assert_allclose(a,5*c,rtol=1e-10) + + def test_permutation_and_edge_order(self): + e=np.array([[0,1],[0,2],[1,3],[2,3]]);g=np.ones(4);m=np.ones(4) + a,_,_=fill_events(e,g,m,0) + old_to_new=np.array([2,3,1,0]);nm=np.empty_like(m);nm[old_to_new]=m + b,_,_=fill_events(old_to_new[e[::-1]],g[::-1],nm,int(old_to_new[0])) + np.testing.assert_allclose(a,b[old_to_new],atol=1e-12) + + def test_blocked_is_not_full_and_zero_mass_not_removed(self): + a,r,s=fill_events(np.array([[0,1],[1,2]]),np.array([1.,0.]),np.array([1.,2.,4.]),0) + self.assertEqual(s['status'],'BLOCKED');self.assertEqual(s['remaining_volume'],4) + self.assertTrue(np.isnan(a[2]));self.assertEqual(r[2],4) + _,r,s=fill_events(np.array([[0,1]]),np.array([0.]),np.ones(2),0) + self.assertEqual(s['events'],0);self.assertEqual(r.sum(),1) + + def test_bad_pressure_is_numerical_not_blocked(self): + def broken(a,b,**kw):return np.zeros_like(b),1 + with self.assertRaises(NumericalFailure): + fill_events(np.array([[0,1]]),np.ones(1),np.ones(2),0,solver=broken) + + def test_solver_tolerance_not_silently_repaired(self): + def biased(a,b,**kw): + p,info=cg(a,b,**kw);return p*1.01,info + with self.assertRaises(NumericalFailure): + fill_events(np.array([[0,1]]),np.ones(1),np.ones(2),0,solver=biased) + + def test_single_all_wall_tet_stays_zero(self): + x=np.array([[0.,0,0],[1,0,0],[0,1,0],[0,0,1]]) + t=np.array([[0,1,2,3]]);f=np.array([[0,1,2],[0,1,3],[0,2,3],[1,2,3]]) + e=np.array([[0,1],[0,2],[0,3],[1,2],[1,3],[2,3]]) + v=edge_geometry(x,t,f,np.zeros(4),e,np.ones(4)/24) + np.testing.assert_array_equal(v['conductance'],0) + self.assertAlmostEqual(v['edge_volume'].sum(),1/6) + _,_,s=fill_events(e,v['conductance'],v['mass'],0) + self.assertEqual(s['status'],'BLOCKED');self.assertAlmostEqual(s['remaining_volume'],1/8) + + def test_cross_cube_midpoint_positive_wall_edges_exact_zero(self): + x=np.array([[i&1,(i>>1)&1,(i>>2)&1] for i in range(8)],float) + t=[] + for p in permutations([1,2,4]): t.append([0,p[0],p[0]+p[1],7]) + t=np.array(t) + from s2_models.features import mesh_geometry + _,_,_,vol,m,e,_=mesh_geometry(x,t) + fs=np.sort(np.concatenate([t[:,[0,1,2]],t[:,[0,1,3]],t[:,[0,2,3]],t[:,[1,2,3]]]),axis=1) + unique,count=np.unique(fs,axis=0,return_counts=True);f=unique[count==1] + v=edge_geometry(x,t,f,np.zeros(8),e,m) + diagonal=np.flatnonzero((e==[0,7]).all(axis=1))[0] + self.assertAlmostEqual(v['midpoint'][diagonal],.5) + self.assertGreater(v['conductance'][diagonal],0) + np.testing.assert_array_equal(v['conductance'][v['boundary_edges']],0) + self.assertAlmostEqual(v['edge_volume'].sum(),1) + + def test_strict_median_layer_and_original_graph(self): + d=np.array([0.,1.,1.,2.,2.]);m=np.ones(5);ids=np.arange(5) + e=np.array([[0,1],[0,2],[1,2],[1,3],[2,4]]) + r=distal_regions(d,m,e,ids) + self.assertEqual(r['threshold'],1);self.assertEqual(r['status'],'VALID') + self.assertEqual([v['local_ids'] for v in r['regions']],[[3],[4]]) + # Original edge3-4 must connect even if a future solver gives itg=0. + r=distal_regions(d,m,np.vstack([e,[3,4]]),ids) + self.assertEqual(r['status'],'NO_USABLE_DISTAL_PAIR') + + def test_full_job_reservation(self): + self.assertTrue(reserve_ok(9000,1800,10800)) + self.assertFalse(reserve_ok(9000.01,1800,10800)) + + def test_prediction_cannot_open_label_or_other_data(self): + with tempfile.TemporaryDirectory() as tmp: + root=Path(tmp);(root/'geometry').write_text('ok');(root/'full-node-labels.npz').write_text('secret') + (root/'out').mkdir() + script="""from pathlib import Path +from s3b_runtime import restrict_prediction_io +import sys +r=Path(sys.argv[1]);restrict_prediction_io([r/'geometry'],r/'out') +assert (r/'geometry').read_text()=='ok' +try:(r/'full-node-labels.npz').read_bytes() +except PermissionError:pass +else:raise AssertionError('label read permitted') +try:(r/'geometry').write_text('changed') +except PermissionError:pass +else:raise AssertionError('source write permitted') +(r/'out'/'receipt').write_text('barrier passed') +""" + env=dict(os.environ,PYTHONPATH=str(Path(__file__).resolve().parent)) + subprocess.run([sys.executable,'-c',script,tmp],env=env,check=True) + self.assertEqual((root/'out'/'receipt').read_text(),'barrier passed') + + +if __name__=='__main__': unittest.main(verbosity=2)