Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/seed/omc/x86_corpus_drivers.py # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / seed / omc / x86_corpus_drivers.py` 1523 lines ยท 142060 bytes Raw Blame History 1 #!/usr/bin/env python3 2 """Read-only, content-pinned FR-9 callers and scratch drivers. 3 4 This is a verification oracle, never a compiler/backend dependency. Bare images 5 are embedded verbatim and CALLed through the compiler's documented private ABI; 6 no appended main substitutes for the image being qualified. Return observations 7 include all 64 bits and every caller-declared observable array (including edits). 8 Kernel exit codes 100+trap retain their meaning. A corrupt-result wrapper is the negative control. 9 No candidate is executed here. The only subprocess is read-only git object lookup 10 for explicitly pinned historical resources; no device or service is accessed. 11 """ 12 from __future__ import annotations 13 14 import hashlib 15 from pathlib import Path 16 import re 17 import shutil 18 import struct 19 20 REVIEW_REVISION = "`becf5c817`" 21 # Exact raw/composed/frozen source bytes reviewed against the original conductors. 22 # A changed source does not inherit execution authority from its filename. 23 REVIEWED_SOURCES = dict(row.split(" ", 1) for row in """ 24 `5e8a16d6c4fa8bf8581986ad4c3e35091a5a5574a6cada882b078f6c00f12159` seed/omc/contracts/bridge.om 25 `0fbd9c605528135bf7edd6cc6642655c2b99fc2847049a1860acaf9da25df28c` seed/omc/contracts/parity.om 26 `88671904983dda8dc483dda9f98683e86d4448494d79c9cf1020e3d12f8aa7bf` seed/omc/contracts/parity.omegese 27 `e1109db40b1ab3f8b7c5b847bb9032810fc3dcf836ec58a0caf5459033636764` seed/omc/om2/s3/a-kept.om 28 `e6e04d5f60f921be058b89ab369735e6b8aa9d398d836f713bbc8c688c95c513` seed/omc/om2/s3/a-ok.om 29 `92c7813513f2bb511bbacc53e1a351a417cabc10139134e477bfb61483005c92` seed/omc/om2/s3/a-om1.om 30 `1de96237beb1b2d7d76fb226cd930036d8cc1d8c82faf4114f3309a1396365a5` seed/omc/om2/s4/o-out.om 31 `400babb171c1703b3abf1676529b483d8ba2f89fb76d6fbc0acc16b181cc5565` seed/omc/om2/s4/o-slots6.om 32 `e2661535df50624a00f801322c397bf9f4699096fa90f2c556127c0f4fd13c0f` seed/omc/om2/s4/v-fm-entry.om 33 `3490824f6e8cb82e661c7a408e8e4264790875e9e0147914ad4b0571dde0fc79` seed/omc/om2/s4/v-slots6.om 34 `f49369293ec1b01421084328e0629077f819d541422b59330b8c2d8e9fd16e13` seed/omc/om2/s4/x-two.om 35 `e240ea92917b12b114204020a1e247c1cec43be423745f4c2a48e0bd7ca6fc95` seed/omc/om2/s4/x-one.om 36 `24f7a41a210eb140669e957cd7f4f7c895e2637907a6e139888b384edc4fc0de` seed/omc/om2/s4/x-noexport.om 37 `1ca53826b7c4c2e544ea0954847c48f45fd171247b96cf80919c3391712e5010` seed/omc/om2/s4/x-32.om 38 `3975d71de54566c04bf0331b230f598b9f3cf794cb37bae1a2d874bfea49adb7` seed/omc/om2/s4/x-abs-private.om 39 `2fe76d4c44b3e3faf6bfd250ebec794ba5b3d11b6b9199366549b664d219cc38` seed/qualification/om2/baseline/slice-witness.om 40 `1552ce25751cc7bcff786cc85022c31eeafc62451701248b56e32fb6b4cff46c` seed/qualification/om2/leak/fixtures/s1-rot.om 41 `22320be74b7ee939c78374cb4fe0b8e4f91d7ca266cc3b1e2dcb3477295991bd` seed/qualification/om2/leak/fixtures/call-data.om 42 `dc183284c582312a57530b2ae42090195a3e5c209e7d34c1f414887c65e7fa47` seed/qualification/om2/leak/fixtures/call-public.om 43 `cfa1fad50465318fd6277cd87f78291914f02d3ef2eb6af16fa02c200cc05356` seed/qualification/om2/leak/fixtures/data-branch.om 44 `bd318c0eecc7c01e29fa7e90113829937e509640cd4812a3fa509a960a572282` seed/qualification/om2/leak/fixtures/data-index.om 45 `42d7e3ddc4be8d482cb625152b210f8c2cb002dfe8f02e23bc984d0c4d547e67` seed/qualification/om2/leak/fixtures/flags.om 46 `24f1d2131c2d36cc810623d68c8ea2f8cdcccef29c111a71231b63a08eca1f2b` seed/qualification/om2/leak/fixtures/len-loop.om 47 `a73a75ff3bb10b96af698293190a96c804ca332461f37a067cb3c77fd43b5cfe` seed/qualification/om2/leak/fixtures/local.om 48 `c48dffbf50d65691e3d1d624c3e6944c225b2335c6b1fbb595c1b05e8e4452dc` seed/qualification/om2/leak/fixtures/pub-unknown.om 49 `f3b813530dec10b0d99f17ae29c981620c28e9d3f3dea4b16d97010a2247d830` seed/qualification/om2/leak/fixtures/public-in.om 50 `18e969dffb1c8fcf826c1bb6078df00bd81e49d8403f1bf664a2a964be72ef51` seed/qualification/om2/leak/fixtures/public-out.om 51 `21e366be6ad718395e5018186a3915d57ea02147a54b247ef1f69f001960f642` seed/qualification/om2/leak/fixtures/reachable-trap.om 52 `d65dd8eefd07ecb2e6fa2498fbedb1ad4919681632e2bf99b5b0fffe6f3c56b5` seed/qualification/om2/leak/fixtures/svc.om 53 `27423284f3ce99b7f00a5497456a697d83445427c4f5c5ba639db8d06165bfe5` seed/qualification/om2/leak/fixtures/trap-check.om 54 `7bce001ac35fee18b0205df59aeeaea62b1d2eea68e336c0262ad3741f40028e` pack:seed/qualification/om2/c2/corpus.pack:57323:784 55 `124c19e6343133d45146e565eeb9307bbe7350a07fca01a736d6da8c3e5d4863` pack:seed/qualification/om2/c2/corpus.pack:96:6318 56 `79857ee82002d11d3df4c0c2a99523aa3419d18c5fc188a41efc778887b4baa3` pack:seed/qualification/om2/c2/corpus.pack:6510:5933 57 `7f034814303a8a40b4bc56383ddd55ab2ae8460291f80793340bc3b0ac024e21` pack:seed/qualification/om2/c2/corpus.pack:12540:35333 58 `459a60da8e660ee1f433a9679bb41467074fda45997e5168e23e92ebad0d570b` pack:seed/qualification/om2/c2/corpus.pack:195375:291 59 `07bc11a69f0d629e0c262056061789114d8710505a308e3e2a5ac42ae73dee94` pack:seed/qualification/om2/c2/corpus.pack:195762:7593 60 `5ff3b6cddb9f66971ecb7b58da2d2f07e3df9e7176dd1ba50a2c3a36f2447e81` pack:seed/qualification/om2/c2/corpus.pack:206091:80 61 `02b9d845454e7379d4d55f3c78af7e9ddd9f87f15d196765b338ee5ae6416965` pack:seed/qualification/om2/c2/corpus.pack:206265:66 62 `3323f23ff905d4915ced5c83d97d772c5b4e4e1347ba738ae3752ef74d99cc0e` pack:seed/qualification/om2/c2/corpus.pack:206425:44 63 `06149063fb825604227f54d226fbce04afe48b755f6ccbe2690ef35afe1c5a65` pack:seed/qualification/om2/c2/corpus.pack:206563:68 64 `3b0acd8ea8b0a46d3131378ae447ffd337e15e0b92da1c45ba2c1a2383dc4b54` pack:seed/qualification/om2/c2/corpus.pack:206726:120 65 `cf0a8200ec4341d1c4634bceb6bab5e7cca15bae510ca4d6f41982fe1ad70a9c` pack:seed/qualification/om2/c2/corpus.pack:206940:72 66 `e9548779048e3d97b48f7d9904fa832aa47c8a6158c9355d2b88eefa50c87589` pack:seed/qualification/om2/c2/corpus.pack:207565:82 67 `6c703b6f9362707125bf2304ef2aa2688dc82fce304d36ad7ee8876528c233a6` pack:seed/qualification/om2/c2/corpus.pack:208183:80 68 `f744e3ec012deac392e62d6a8d4133efb7681887d31675d6ff516d4aead07e64` pack:seed/qualification/om2/c2/corpus.pack:212407:116 69 `fe772bcf3433b1ea0daa0fda78b877790bbf2eacf251ce05f64f0f77dede0e51` pack:seed/qualification/om2/c2/corpus.pack:212617:99 70 `e0382bdae6aabd733c7eb4ba314c9feca55242a8fa25360a6442cde40820a8f0` pack:seed/qualification/om2/c2/corpus.pack:212811:119 71 `0481442ea45287b9a1a2c5b9116aea6b36dafd0a2d7d89019aa923b3a7d4a356` pack:seed/qualification/om2/c2/corpus.pack:213024:90 72 `9b6e72361efce2dbdf209e05a74b89d3a0bf2491818db684d6aa110f3159243c` pack:seed/qualification/om2/c2/corpus.pack:213208:56 73 `5b09682d993bbb9afb96fdbc0f7a75c8e2cf14fc094b5b6c6e1ecf7fcd6ee374` pack:seed/qualification/om2/c2/corpus.pack:213358:50 74 `93d8728c52bfad927150d0e08d74a1eca29256489dd3f3acc48c1ad4034f6823` pack:seed/qualification/om2/c2/corpus.pack:213503:158 75 `3c78cf83258748b829d8248670f7b46d69351f8e389b9ddecb3ccbfb6548e1da` pack:seed/qualification/om2/c2/corpus.pack:213756:188 76 `93fa5e1cce0ea59252fbb8203d1a7fe15b40ebcb82cf7d4090d62fa1abe4d477` pack:seed/qualification/om2/c2/corpus.pack:214039:114 77 `2efe0c6e3663a40562589b98f4229f0ac2a43ab264c53b4fbca40d11c76edbfd` pack:seed/qualification/om2/c2/corpus.pack:214247:38 78 `b078ae26e824ad0cb671108a896862ee033c90c6f4394637684b15bd90e95322` pack:seed/qualification/om2/c2/corpus.pack:214379:87 79 `52a9a88352cc3e9c60832187586fafe0d05748693ce55141844a9d5030229a6e` pack:seed/qualification/om2/c2/corpus.pack:214561:105 80 `ac0eb5306b4233a8c49dc9db8d503ec343b76c0bac0b3681c22b3d0d866a99f3` pack:seed/qualification/om2/c2/corpus.pack:214761:120 81 `aca09a84add052ccf4416bc8f7b0d01a71d9fe0b6de8957322b90a88a3597f88` pack:seed/qualification/om2/c2/corpus.pack:214976:132 82 `4260833a70ad7a0a858a0b7910b0364a426580e9aba1c622565fc140a42b58ae` pack:seed/qualification/om2/c2/corpus.pack:215203:176 83 `38d8b37e5878695b29d5308a8b43ac2dc9877908106528515104423027cff52b` pack:seed/qualification/om2/c2/corpus.pack:215473:97 84 `55b567b2c43c115ec5cfafd9ec7d0085feef7ca688da5a63c34203224b27e35e` pack:seed/qualification/om2/c2/corpus.pack:215665:113 85 `6a56da67212db3956af91e36a2b680b9c78f98bb8d9f0e76a49eaac7ee8cffd1` pack:seed/qualification/om2/c2/corpus.pack:215873:136 86 `184e9efad7fccc9b147f4813b2434ae1a5cb9122a0ce423b3b7356be18849874` pack:seed/qualification/om2/c2/corpus.pack:216104:129 87 `4098c21c8e3ef82a9d6bc61012537a3b30ef89568cb1bbe3b2cf3f33cad6595a` pack:seed/qualification/om2/c2/corpus.pack:216523:184 88 `895c35cbfdfc9d94103790214e47f5409af1b0d87788b4925b25fccb59d4e02c` pack:seed/qualification/om2/c2/corpus.pack:216802:109 89 `b5624972ed3b4394027eca96d94b670f7a8846af51d3083940e63c079c8649e4` pack:seed/qualification/om2/c2/corpus.pack:217005:71 90 `14439646d9db8ec1c40b7646b3ec177d21ce8178a1e7c6c001134339cd8fab76` pack:seed/qualification/om2/c2/corpus.pack:217520:107 91 `95a41a420eb97cac77023a066936cc4c9673e3224489d118834edd076232ab59` pack:seed/qualification/om2/c2/corpus.pack:218423:145 92 `bd88c1daeb2c9f2bde005d46172b7b7e0b4ed2c95081ea106dd62f8caafb16a0` pack:seed/qualification/om2/c2/corpus.pack:218663:157 93 `fe9f95b097d0137a3ddb4a62246c5e6875fbc19aded228c2f23c4679b84c2ccf` pack:seed/qualification/om2/c2/corpus.pack:218914:64 94 `4335f62c4d839f7a7d0addd992208b6107249d7620d840080a81076b3800bc26` pack:seed/qualification/om2/c2/corpus.pack:219072:59 95 `23026d2191616675acd10e798835bcb290ecd259c1e17935019bb2f97021d9fd` pack:seed/qualification/om2/c2/corpus.pack:219226:124 96 `a55747b9894b8a8c07f33e6678b8f5482eee35096c97ff686be7ec7b7784d9c1` pack:seed/qualification/om2/c2/corpus.pack:219445:258 97 `d8196e4bdfe690afeed43f7a52aefbb76f13ca42a6caa51fc61e70a585165213` pack:seed/qualification/om2/c2/corpus.pack:219797:99 98 `9acda5f3fd9ddc1dc01923fa76a30a4667f2d0e8d460ba2a60c5d6d5fc27807c` pack:seed/qualification/om2/c2/corpus.pack:219991:123 99 `17b76ece94d8d691b3339b4d3f58443814c81d897a6e3f746981263674d32257` pack:seed/qualification/om2/c2/corpus.pack:220208:89 100 `8ecfa30de1ec78883a3c4c40fc5a11aeb2646a38df403a8bf61da47d99017e1d` pack:seed/qualification/om2/c2/corpus.pack:220392:230 101 `a50c02817f492a2390f613aa5f7554ef6ef08b9a41d6ce73fa1eb1fa53191af1` pack:seed/qualification/om2/c2/corpus.pack:220717:341 102 `efe5b555293ac23f0f3a6ece186f26a1cf1e85e0e007051dc7bff6d4ff9efa25` pack:seed/qualification/om2/c2/corpus.pack:304924:132 103 `ab8ac8a7cd6129c802a46e93d9d74ff3998b5673e61929b2be23f945ec80cb87` pack:seed/qualification/om2/c2/corpus.pack:305151:194 104 `38a27f10bed8c3efcbb1b5cf7f5b8aadcef92d3bc4b472655cffe513f5254886` pack:seed/qualification/om2/c2/corpus.pack:305440:402 105 `bdf0f55318ab9b9e85a93c1a4d0722912542233b40fdb930cbd2848d5be92a51` pack:seed/qualification/om2/c2/corpus.pack:305937:136 106 `f0f644177343e1a62312ce5c1fdb4ad5cfb2f76cd97650306661ffc7a68f6702` pack:seed/qualification/om2/c2/corpus.pack:306168:158 107 `eb0aad938117ea324c5a90362261d08b5d325822ff71ad2274ff9ee9bb523038` pack:seed/qualification/om2/c2/corpus.pack:306421:123 108 `472eddef7d2520b8b12f67468ca98e0ab01f0dc9468a8f9d767b54980da12f27` pack:seed/qualification/om2/c2/corpus.pack:306639:159 109 `facc6323098519224f4f6b86fa26e86a4859097dd23e111d56d084fc81b4e083` pack:seed/qualification/om2/c2/corpus.pack:535426:187 110 `67eaf5747e821c7c86c4d1bdaa4eeebaf3b41d70d8a998bc6a19509bc7d4b91e` pack:seed/qualification/om2/c2/corpus.pack:535707:69 111 `c6a5d45a10812d40dc81227e9afe52d25547f7fca8d4b7193e6f2016214251f5` pack:seed/qualification/om2/c2/corpus.pack:831934:490 112 `5879c65c06c7099c95dc3d05ab0c3fc87b9506c5b868b577a23355d1fea58216` pack:seed/qualification/om2/c2/corpus.pack:844746:489 113 `ffbe6e67cb3288050ebb8bc7bdff12cb08748b30f32adc27aee9a838f6c14fc4` pack:seed/qualification/om2/c2/corpus.pack:854503:211 114 `71d7b9655470cddd00e2ea1d6607a3693ac8add4291d1b31274bad80953414d4` pack:seed/qualification/om2/c2/corpus.pack:861552:284 115 `b706f5af251818d95bdaccfd29f754a85bd426c607cf654cd9438cdde5848b34` pack:seed/qualification/om2/c2/corpus.pack:874651:488 116 `f49cd869b69efaff7eba8f483ad6e80b5cac2b964944cad5ae4300b6dd345d1b` pack:seed/qualification/om2/c2/corpus.pack:881684:488 117 `f175a5f86d183fa1fbc1d0952fc206f2caaec554cdec7c6047158b1baefdb831` pack:seed/qualification/om2/c2/corpus.pack:882851:492 118 `114342a696e777f694ec56aa34f6bef277972b955e16257e7b3ca77b52706e01` pack:seed/qualification/om2/c2/corpus.pack:883438:491 119 `f953762234d6f6d0755da130cb67202bb4c77515b58a4f9b02876a7fe24068af` pack:seed/qualification/om2/c2/corpus.pack:891049:490 120 `01ab9d2d4bd4b40ecbb184451713ba4b362491cb6ac1cefd6e46cd607a0d3103` pack:seed/qualification/om2/c2/corpus.pack:900992:492 121 `3c3fece47ba700829719ca925f78c403ceecdadbf1205828f37b377f83e26243` pack:seed/qualification/om2/c2/corpus.pack:901579:491 122 `4e0734c842150045b235814e0092da2359b4915ffbffc38fe7b905bc7db224f3` pack:seed/qualification/om2/c2/corpus.pack:909779:492 123 `67a72da083033c035e9aafcfb4ce990a35e23491708d3c3f32962fb345314ccd` pack:seed/qualification/om2/c2/corpus.pack:910366:492 124 `0d3dfc65d5cdc76b7bdc3f8b1959ce7b7a6eccacab087e52a51040c75c7e5c41` pack:seed/qualification/om2/c2/corpus.pack:913293:490 125 `e4847e6a337e7e28e95c871f2c5dfe60676a042b5ff62305ad76f457bb899d2a` pack:seed/qualification/om2/c2/corpus.pack:932052:491 126 `681fde125c39a896a431f9f4811c8e068d96b68bb4175dd6cfc73ebc6126d2a8` pack:seed/qualification/om2/c2/corpus.pack:944331:489 127 `ce66b95e83083633c167acfa5221033ce3b864ba08ec8c56870611bcd4b28d41` pack:seed/qualification/om2/c2/corpus.pack:`1543668`:245 128 `ecf2b472725535c92c07ebe753015bc37babd7f400c08ff32542f826b37ab296` pack:seed/qualification/om2/c2/corpus.pack:`1546871`:98 129 `9985b767f544272064a1f9a4eb5c15a0748f523778211cace20924150801755d` pack:seed/qualification/om2/c2/corpus.pack:`1557428`:244 130 `82884e201f63f38bee3f590cbca258ef14bb1179664f288d1073b39a0e3c1497` pack:seed/qualification/om2/c2/corpus.pack:`1558811`:245 131 `2e73fba9a6ef545a77c1f59d38e9df8ae5abf7713045fae9b363f2421c26c5c4` pack:seed/qualification/om2/c2/corpus.pack:`1563255`:244 132 `e8988da4e074161ec2b337679da602be58562ff944649c52356f7d26a57874c7` pack:seed/qualification/om2/c2/corpus.pack:`1564272`:247 133 `d1083e1cde3fc7424125a610da7262677cf66c0a1a3e4a75263defa378aae783` pack:seed/qualification/om2/c2/corpus.pack:`1564614`:247 134 `7542ab65bc9c66f1d67ef7994bc0df545030918e9c530d2fc90406dc3dc3fa36` pack:seed/qualification/om2/c2/corpus.pack:`1573817`:243 135 `defcde4c8039988786db6a0f9fce9d8fed93ae630cbe35418bae961dc6e70972` pack:seed/qualification/om2/c2/corpus.pack:`1574833`:263 136 `21f1e8809792a8fc935cebed2ef42614df8bfaa142e175384ff6f285a84fb8aa` pack:seed/qualification/om2/c2/corpus.pack:`1575191`:247 137 `933054ca6f67bcfb407bd9771ed90820aac96ef7d8e4b31b738a72c67ad885ab` pack:seed/qualification/om2/c2/corpus.pack:`1575873`:246 138 `1379a69ab169b6fe9740e19771483ea2255ec3184b37dc26c6fc87607242592c` pack:seed/qualification/om2/c2/corpus.pack:`1576214`:247 139 `4b0d702b91a70d8c0b2f3939034083bae6a1fd8bd215331f345a09e803741252` pack:seed/qualification/om2/c2/corpus.pack:`2282626`:583 140 `1cc53eca436923c42a5c1b5d9653cf955ed110e65c52015db5b7ee820588b419` pack:seed/qualification/om2/c2/corpus.pack:`2312908`:582 141 `99f14641d129ff058e073ebb5860b1878e40b52c6d686b2f5509c65c830ef183` pack:seed/qualification/om2/c2/corpus.pack:`2337699`:361 142 `a47b08518f60139ad7c6227a1f4b8a2121317e4d62f948048ae51f06f07d510b` pack:seed/qualification/om2/c2/corpus.pack:`2341160`:585 143 `f332321ea24ce957337cba446bdf451ef110e8cd9dd3bf83db0075f40bf2f626` pack:seed/qualification/om2/c2/corpus.pack:`2348629`:584 144 `59972aab2ad6d3c7f924410e1f126ba9a5b7f312064cfa15a9ac1b696039f501` pack:seed/qualification/om2/c2/corpus.pack:`2352021`:586 145 `46e33117fe665460bfa0b3988d069c982796a93a2b792824f43c24e03ad00b4c` pack:seed/qualification/om2/c2/corpus.pack:`2357446`:582 146 `d1fcf5dfb660d17797084f0fd4c3f085622cc75f60598b23648cb73f0418df3d` pack:seed/qualification/om2/c2/corpus.pack:`2403570`:579 147 `ae6c5d488d187b032ec176451502a54a815596ea50e90bf63fe1b034464b2bb1` pack:seed/qualification/om2/c2/corpus.pack:`2407627`:585 148 `6c60cd43bd3d78530e0b769804155804ab46c0a5da50bf1fca6ecac4d104ac3d` pack:seed/qualification/om2/c2/corpus.pack:`2408307`:586 149 `3db75feb105dcea58d4280d31af836fb321ffc186b3cf938c4a5a8fb1c114708` pack:seed/qualification/om2/c2/corpus.pack:`2417122`:586 150 `7b1110417f21b3f750322a85f3a40ece1f6ce1a891858b8ac527649ca223b42e` pack:seed/qualification/om2/c2/corpus.pack:`2417803`:585 151 `99690402fb3c371085b0a8a5ea8e77a0b534ddc9d9ab692c0e811fba3bc03c93` pack:seed/qualification/om2/c2/corpus.pack:`2421872`:584 152 `63fc2697e34dea011d57320a5771f70185e47dfe6f19c0ec3dcdd133e2400034` pack:seed/qualification/om2/c2/corpus.pack:`2422551`:584 153 `df520f8724c914e39b8f418e3100963dc1738c9a68a73047a1c16a4ae94e3124` pack:seed/qualification/om2/c2/corpus.pack:`2440904`:584 154 `3c446741e2cbd9febeb3506588f4eb54d70de218c67f9b8496191f8f58d75c0a` pack:seed/qualification/om2/c2/corpus.pack:`2442261`:568 155 `959b6da3977b08db23cc1dc6a0494a8f620d763754194aeb7ecd96bdec1ed4e7` pack:seed/qualification/om2/c2/corpus.pack:`2457530`:499 156 `49fc5ac7807eb14571db4017268d976de25aae1d26e0e3531a11d9095ec9f5ee` pack:seed/qualification/om2/c2/corpus.pack:`2468439`:567 157 `9475ad4fbee4ec2d66015d166240d549fc32c933c6566c4973e6795e635770cc` pack:seed/qualification/om2/c2/corpus.pack:`2483728`:280 158 `b89e46e462d7c21fd5d1323e279d3c08aa25fafcac0f744e95349905c01e4bf7` pack:seed/qualification/om2/c2/corpus.pack:`2519558`:568 159 `ddf75f3347af715f8c67a7ed6c6fa6e2bf1b11c149d80a884969709023d054f2` pack:seed/qualification/om2/c2/corpus.pack:`2521545`:571 160 `d6e4761d4135360016a816f33d7957227c60eecbdf2117b017bc55a5b8f1a9e5` pack:seed/qualification/om2/c2/corpus.pack:`2522211`:570 161 `72c537b7bfea6a6d6c0c74537592e391d88358507faecd5d16c5aac7e90bff97` pack:seed/qualification/om2/c2/corpus.pack:`2528857`:586 162 `b04e99e05e863709d15a802270eed60544476379c822dd7b48dc4455413a12f7` pack:seed/qualification/om2/c2/corpus.pack:`2534217`:568 163 `65db3df333e9c9653977e2f958ee2a92356f9bd1c175bfa1a05ed5483de8017a` pack:seed/qualification/om2/c2/corpus.pack:`2542193`:569 164 `64b9b4c9a5a931084813bb3a00e4ddee88f3669c00fb50ad7865aa72b307e7aa` pack:seed/qualification/om2/c2/corpus.pack:`2542857`:567 165 `8d61ecf860da3472aba1fc1718354799463f0b9af5fdffd488370c68e3a92e35` pack:seed/qualification/om2/c2/corpus.pack:`2733481`:208 166 `7e3b46c25031f0304f8fa769df461e191264185ac8f4a8242d302b67d74127ec` pack:seed/qualification/om2/c2/corpus.pack:`2735987`:94 167 `a2a7bc6c11af6728dd4220b8787ea49625e486dd435435f8cb95840a931a81e4` pack:seed/qualification/om2/c2/corpus.pack:`2743364`:207 168 `9e660c3db31e9199730624b17cab807cbc71b078cd7cebac92cc91c063f584ca` pack:seed/qualification/om2/c2/corpus.pack:`2746275`:210 169 `d0304b0da3c4768d710b88e640e5b325ced4d6d909e5b24d2df9b00115dce928` pack:seed/qualification/om2/c2/corpus.pack:`2746580`:213 170 `944339d8548b4cec73ed0da6b9a731e70aa9fcbdd955cb46fc8e14d7750a2d4d` pack:seed/qualification/om2/c2/corpus.pack:`2753538`:213 171 `b0bcc6c32c0a0aa3d7be755583f7ef4032289d9ec420632aefab95a87781e856` pack:seed/qualification/om2/c2/corpus.pack:`2767127`:152 172 `981347dac653a9cab7c66fd8f1c6a283184658e2e78b563421ddec7d50db6dca` pack:seed/qualification/om2/c2/corpus.pack:`3120057`:30 173 `250361be99ced1246405b2e4a2e2de71373a90d0a0569fb43821ed8b106e045f` pack:seed/qualification/om2/c2/corpus.pack:`3386857`:36494 174 `4e8d5d5c536c2703abb0b85fd086fedca6841d53d4592a8c2c7c5491dd1697c1` pack:seed/qualification/om2/c2/corpus.pack:`3490048`:339 175 `982fd12d6376e8d60ad1e8d2b2c2abc51a47a598543b058ecced8522a756a0d9` pack:seed/qualification/om2/c2/corpus.pack:`3490482`:356 176 `3da4a848e9d1c1665c2f8a5047a731a60b48533253253b5cfc56cb562381dc06` pack:seed/qualification/om2/c2/corpus.pack:`3492055`:390 177 `5867b20666409f323c83d9017cea126bc9ddaa0a4f4d5411e7553e90d40e710c` pack:seed/qualification/om2/c2/corpus.pack:`3492540`:574 178 `28932d16844b094298e10b2ddbd3e21499668ec5877d67dca19339100a04363f` pack:seed/qualification/om2/c2/corpus.pack:`3493732`:311 179 `cfccbeb34d3bfb051e01977b9acb2b6166c41bbfaba85a26c85c123643e8012a` pack:seed/qualification/om2/c2/corpus.pack:`3495087`:1831 180 `e7ea21711b45c957a6264e373e66f597c091b67809bd0c785113d2ea601e71d7` pack:seed/qualification/om2/c2/corpus.pack:`3497014`:1462 181 `313b425a4e6b779633e06c0ed3dd6906730f39d230834b2921e4abffe9428a41` pack:seed/qualification/om2/c2/corpus.pack:`3515537`:428 182 `2e011318d020bd5e0283bde413b74335b4e4b3c5b417e34b03caa832f5efcf66` pack:seed/qualification/om2/c2/corpus.pack:`3516061`:1403 183 `63eab87101f8c71645b26023d422fb910c8d6ce603504608bfb395fc5a7a0cb0` pack:seed/qualification/om2/c2/corpus.pack:`3517560`:1034 184 `4a6798fec8b13ca31dc5a7f6223956297e7285b94cd0d4757c269a120efe0bcb` pack:seed/qualification/om2/c2/corpus.pack:`3558924`:366 185 `28883f52212233aa4bc76182dec3733ad550f209a109a7bd57f5c4227a373e10` pack:seed/qualification/om2/c2/corpus.pack:`3573443`:533 186 `767fc04dd38d62a2f1f700366a641a2a7ea7b5429e0341dcffb97bcc8558029b` pack:seed/qualification/om2/c2/corpus.pack:`3596649`:1500 187 `af68bd088bc58ce973cf53fcc96743dba41a489fe56a4a9dd4f3ecc3c0e3aea0` pack:seed/qualification/om2/c2/corpus.pack:`3605118`:230 188 `4ae68017b93e47a9ddc638ef9d0f3e950c9639346102c510c36909e728f28dec` pack:seed/qualification/om2/c2/corpus.pack:`3609196`:824 189 `01fb867723854f43838a814a8571107e6fea2afba12444f57f35c9012741111d` pack:seed/qualification/om2/c2/corpus.pack:`3616121`:145 190 `716c1dc3004d55178e09e7c40fa0995f993eea8611e09a70a1f74b9c7a0cf644` pack:seed/qualification/om2/c2/corpus.pack:`3616361`:146 191 `31ead9b2a44ca4b10fd637b0fd9ee339005d33b48a731795e71f57d8189628a5` seed/qualification/om2/sec/s3s4/slots-3v.om 192 `175ca1647cb649ddb91bcb47fae4bd6823a86d43d3d22c5235d642de8457c423` seed/qualification/om2/sec/s3s4/slots-2v2s.om 193 `b0bf509e7383e3532db4a548406f37bc6c8000e4ba0023c3f239eca724eea032` seed/qualification/om2/sec/s3s4/slots-1v4x.om 194 `729054dd66a64449b34d9db594b7e2babc2c396d982a0da8a9cc6af03dc96668` seed/qualification/om2/sec/s3s4/slots-6s.om 195 `278556501859427e66202c6a685f4af8d737aa395932463f633eb564193d83b3` seed/qualification/om2/sec/s3s4/slots-out6.om 196 `f578c1f645e8a7e6112b2f45028fa8a018f73fad2149d0de16141607b0969ccc` seed/qualification/om2/sec/s3s4/diag-site-plain.om 197 `1ab250b1d4e7d2f437ee680cce5a8918752cf0ef8efe1d89b490270005ceb294` seed/qualification/om2/sec/s3s4/diag-site.om 198 `06c137ece7a94b3e6f5e19043bd6045fbe5208019b4366a43de9cb7558cee587` seed/qualification/om2/sec/s3s4/diag-site-rolled.om 199 `035d21b803806853451dc2f408cc29c3490714b7b73081dd8cfe4b283abb2f85` seed/qualification/om2/sec/s3s4/diag-site-unroll.om 200 `f4c545da9cfed4a6884b39634a371c09353139992f0be377dcea2f4e65e9187d` seed/qualification/om2/sec/s3s4/diag-site-nest.om 201 `781ba1bf2768974166c10a3724acbf766080db732bee8d195fa3d872a5ab05c9` seed/qualification/om2/sec/s3s4/diag-site-rolled-plain.om 202 `050c286588e3066c396697c397c999a6ac8aa98334cc9c3bb3fcb43a6d8c084f` seed/qualification/om2/sec/s3s4/diag-site-unroll-plain.om 203 `432b642f9b3f5a0502705ef06d61502f4312e82c85adb58b64e5791a5d553e49` seed/qualification/om2/sec/s3s4/diag-site-nest-plain.om 204 `3bd0be5b72fc92825742422dc7157196d85d57891b81c8ce89a6df8969584a82` seed/qualification/om2/sec/s5s7/a5-allops.om 205 `9cb0393b2c6c8f99ad93e5af2db0ae4bbf17de884767de162f9737c20717f369` seed/qualification/om2/sec/s5s7/a5-exact.om 206 `0ec2b5eb427d759eb7563f9dbf8cd1a921a23b9e80c9d7f779315490b23f274c` seed/qualification/om2/sec/s5s7/a5-kept.om 207 `1e0a5f4c22cee6170a7f6787fb6c1cc215e1ff9aa0e997bc8f7450c06b3a072b` seed/qualification/om2/sec/s5s7/a5-rot64.om 208 `373509e26a12a1c579bf4021d1c275929da7c534812ecdf62c9d0486f11d3eff` seed/qualification/om2/sec/s5s7/a5-swap.om 209 `ef1b3dc9f12deef3e2536b6689e79f529f216bff87c8c7b8dd5d5f259b7f3703` seed/qualification/om2/sec/s5s7/abi/abiv.om 210 `743fb07c03061177ce5133926dc442d21d3ba1b74d133f661a2de9ccec1ace92` seed/qualification/om2/sec/s5s7/abi/abiw.om 211 `b21d8c82a5a3648011325261bac9481e9e3147dd29e17b491e04008bda289295` seed/qualification/om2/sec/s5s7/a5-exact.om+seed/qualification/om2/sec/s5s7/pr.om 212 `56fbd35bc5e262553585cdd18a54524622c638fff89d9bf0f84d9c42884c8366` seed/qualification/om2/sec/s5s7/a5-allops.om+seed/qualification/om2/sec/s5s7/pr.om 213 `d7df44a4f803645594ec1e758201d8e1c672c4ebe94c553ed9b4cdca98bb4607` seed/qualification/om2/sec/s5s7/a5-rot64.om+seed/qualification/om2/sec/s5s7/pr.om 214 `c0c8cd2d3c8c9fe4e1cb8f9cfebb5af8d5c625368db1d9af713b0acb33504b24` seed/qualification/om2/sec/s5s7/a5-kept.om+seed/qualification/om2/sec/s5s7/pr.om 215 `c7ceccff2f370d5c82df978399a82372f6d354703d9ff263de8d560df13d3481` seed/qualification/om2/sec/s5s7/a5-swap.om+seed/qualification/om2/sec/s5s7/pr.om 216 `db0101e23ea90154be1f42688a82a5fa96c0f994436a7abf76df7ee8b6586b5e` seed/qualification/om2/sec/s5s7/v6-slots6.om 217 `610f69b9b45830f926ebb9c4df2d358a366920eaacd3c5ce8f5ec03da6ea8014` seed/qualification/om2/sec/s5s7/v6-fm-e2.om 218 `e1b60bc4c240e03be0c0fbdb630066f295ff7a53b73a380dab52fa8509f498d6` seed/qualification/om2/sec/s5s7/v6-out.om 219 `4034913df2f245dda9527510129e3d442c61a2b431b40a0650d0348f40270339` seed/qualification/om2/sec/s5s7/m6-export2.om 220 `dd88a128445533d88444c7a6a38687413b2dc3462cf361adb1685ccb162f6c0e` seed/qualification/om2/sec/s5s7/m6-noexport.om 221 `c579c57cd55d5ae2e9206bac7a278f3ee56bdbff594d0fb46d2c9f2f03603a69` seed/qualification/om2/sec/s5s7/m6-export-layout.om 222 `932ba37772b3f50046908ed558c84bd3752dec4f619dbb8469ab68dc43a4c097` seed/qualification/om2/sec/s5s7/m6-export32.om 223 `e90ac20ccef2c24e7e0c912a7c768610fb2791c393c9ef239b0108d2cee470c0` seed/spirv/demo.unit.om 224 `0419a9380955e1199e9927412cdbde107b081243da2345f0cc77900ce641554e` seed/spirv/traps.unit.om 225 `94c38bc25d64c36a7e0cebc1e7fe0cfef51517507322a3f526cb31e1e0553444` seed/wasm/control.unit.om 226 `ebfa2f5c672805ab1cf48f30a94b1bae14767a78a76e637d31e69241ae95748b` seed/wasm/integers.unit.om 227 `eb16f331ad57fcae0eba99ddfedc9874120733eaa0ae487e57f26d3beda619d5` seed/wasm/mutant.unit.om 228 """.strip().splitlines()) 229 230 # Entryless diagnostic and leak fixtures retain their actual last-function ABI. 231 REVIEWED_SOURCES.update({ 232 "`8e1b8605e8d77c792a2aaf6adeb2167a38a538d0857792b006eeafd408d78e94`": 233 "seed/omc/om2/s3/a-kept-diag.om", 234 "`79d2da33312969e14d9cdefe34b19306cce03471d91add08aa1e0285af22cf9c`": 235 "seed/qualification/om2/sec/s5s7/a5-kept-diag.om", 236 "`20773907e95cbc9b1e157be91b099dc1ad13ab6ca79d2966e4259a93a8625eff`": 237 "seed/qualification/om2/sec/s5s7/a5-swap-diag.om", 238 "`af6c2faa6087359c0c51bcd5d61d973143f45d4719eb98278370bfb03284a79e`": 239 "seed/omc/om2/s3/a-exact-diag.om", 240 "`2702ef2f9bcf2fbadd6c9ced8382a13f1939378c024a5c5706d167d98798be13`": 241 "seed/qualification/om2/sec/s5s7/a5-exact-diag.om", 242 "`a7682122ef8f6707e48f8d6cf76459aca4ebab53ab3245dd51b88d8067fad948`": 243 "seed/qualification/om2/leak/fixtures/pub-outside-store.om", 244 "`03fba96f85d365cec80d11c1f10400d6f1874c924e3e824458fb812c023f267c`": 245 "seed/qualification/om2/leak/fixtures/pub-secret.om", 246 }) 247 248 # Entryless units added by #971, #972 and #979 (main `474197e4`). Reviewed bodies: no main, no host 249 # words, no exports, so the last function is called with the canonical 1 and 0 scalar vectors; no 250 # division, view access or trap is reachable from those vectors (fnmode's `trap 13` needs k = 0 after 251 # a loop that sets k = 3). These are native differentials, not independent result oracles. 252 REVIEWED_SOURCES.update({ 253 "`32cc3776e0c02d167b50c080f2e447bf14840547d47726f0e76488ed07c0a996`": "seed/equiv/bitrev.unit.om", 254 "`290be2abfa37c0c53c6c66a8b8328dd94f50cdefb4c1d37bda8208fdb1096758`": "seed/equiv/clamp.unit.om", 255 "`f97b8af25a257a856f2c9fb5dfd309e301932881f84dfb06c9c3ee5c509360f1`": "seed/equiv/hexv.unit.om", 256 "`a8691945d7e38430f142e93ba9f0c48effa371a8df474ab814b3121b76b4065b`": "seed/equiv/pop16.unit.om", 257 "`bd257fa4aeedfcea129304ab592ce13346b93a5caf318a9475a1689f1b045019`": "seed/equiv/rot.unit.om", 258 "`3862a9f972a1afd201957b7700cf9dd44b2e289c9c42be140f1af45b2317a401`": "seed/equiv/wide.unit.om", 259 "`00712f9f6ca778f37584675897606accc408be659fe515adfc711007ac73b281`": "seed/nki/ops.unit.om", 260 "`4324ec425080d5641a102ebba3916a6ee40e3185be540593c0d5b1bf71d86f8a`": "seed/nki/vecadd.unit.om", 261 "`c7d149b29f511cea0cdb0bdd6e97861bbd5d08ba5cf8fb2110046dfb38977f65`": "seed/omc/om2/hex/fnmode-dec.om", 262 "`e1bd7495111e1b28fba8f06ddd66bac23e175229f392b88ad1b825b748c72439`": "seed/omc/om2/hex/fnmode-hex.om", 263 }) 264 265 REVIEWED_SOURCES['`dbf002dd6aa36585632b9d01d98ac3f0bd2fa0f0475082940de53638847994bb`'] = 'om/sha256/sha256-om2.om' 266 # Deliberate CPU exhaustion (#970): run only under the cpu-limit driver in plan_case. 267 REVIEWED_SOURCES['`d4801acf04a44467bac5e1bedfc502b20afe009d8065079ae5880e987b0899a7`'] = 'seed/qualification/security673/pure-busy.om' 268 269 RECORDED_INPUTS = {'`5ff3b6cddb9f66971ecb7b58da2d2f07e3df9e7176dd1ba50a2c3a36f2447e81`': {'path': 'seed/rung4/tests/fm1.inputs', 'sha256': '`3b521473ebf69009db11ed5af2e393c452f65a479796c3e872de4c876301abb6`', 'values': [(7, 2), (-7, 2), (7, -2), (-7, -2), (5, 0), (-`9223372036854775808`, -1), (-`9223372036854775808`, 1), (`9223372036854775807`, -1), (0, 5), (-`9223372036854775807`, -1), (`123456789`, -1000)]}, '`02b9d845454e7379d4d55f3c78af7e9ddd9f87f15d196765b338ee5ae6416965`': {'path': 'seed/rung4/tests/fm2.inputs', 'sha256': '`18342c0716c373eb7d01da95e11a4bb0f88148bf601817d24c79e5118394ae89`', 'values': [(7, 2), (-7, 2), (-`2147483648`, -1), (-`2147483648`, 1), (`2147483647`, -1), (9, 0), (-9, 4), (100, -7)]}, '`3323f23ff905d4915ced5c83d97d772c5b4e4e1347ba738ae3752ef74d99cc0e`': {'path': 'seed/rung4/tests/fm3.inputs', 'sha256': '`1f2c517d98c0c1a2f6cc18965d758dfa52a1099e8209dc0ad0c2692d2536c99f`', 'values': [(1, 62), (1, 63), (-1, 63), (3, 62), (-5, 2), (5, 64), (0, 63), (-`4611686018427387904`, 1), (-`4611686018427387905`, 1), (7, 0)]}, '`06149063fb825604227f54d226fbce04afe48b755f6ccbe2690ef35afe1c5a65`': {'path': 'seed/rung4/tests/fm4.inputs', 'sha256': '`f44900dbe6897acaecff1fc0f585902f404197069338a90cef18ecfe317a3bce`', 'values': [(1, 30), (1, 31), (-1, 31), (3, 29), (-5, 2), (5, 32), (`536870911`, 2), (`536870912`, 2), (-`536870912`, 2), (-`536870913`, 2)]}, '`3b0acd8ea8b0a46d3131378ae447ffd337e15e0b92da1c45ba2c1a2383dc4b54`': {'path': 'seed/rung4/tests/fm5.inputs', 'sha256': '`c79c7bf9df3333862da681fefcc2b6fdab887a25740cdb76594a9bdd1ae9c0e8`', 'values': [(3, 4), (0, 0), (1, 1), (`4294967296`, 1), (`18446744073709551615`, 2), (1000, 2000)]}, '`cf0a8200ec4341d1c4634bceb6bab5e7cca15bae510ca4d6f41982fe1ad70a9c`': {'path': 'seed/rung4/tests/fm6.inputs', 'sha256': '`60983787c391a667e6b4198c75c09aa5f75681e882d112334562987fdf280a55`', 'values': [(0,), (1,), (5,), (100,), (1000,), (`1000000`,), (`1000001`,)]}, '`ccbdc5fd0b1005df6bbd17dee7d8679f7d5fbc0355ca1cca9a5c4e32cc1c352a`': {'path': 'seed/rung4/tests/fm7.inputs', 'sha256': '`df36cfb0562e591237602b1fe12f5c5403c3af941ca6aece8faaa77c2c7c2aa5`', 'values': [(1, 2), (0, 0), (`4294967295`, 1), (100, 200)]}, '`1cb48989143498ec44e1cbc9ed9bfd11082b9426d937c1ebae5ac02a2c171f93`': {'path': 'seed/rung4/tests/fm8.inputs', 'sha256': '`cecbd6b5657af7a9f8bf119aa34bfc11e0ac300fca584435d63f86f60e2d88fb`', 'values': [(0,), (1,), (2,), (3,), (4,), (5,), (`4294967295`,)]}, '`e9548779048e3d97b48f7d9904fa832aa47c8a6158c9355d2b88eefa50c87589`': {'path': 'seed/rung4/tests/fm9.inputs', 'sha256': '`dcb7b50d378bbd78226e3c4423cb9b353f292d65dbb66124546be0c92ea0c102`', 'values': [(100, 7), (-100, 7), (-32768, -1), (-32768, 2), (32767, 0), (-7, -7)]}, '`b5624972ed3b4394027eca96d94b670f7a8846af51d3083940e63c079c8649e4`': {'path': 'tools/exp445/arms/examples/clamp_sub/inputs', 'sha256': '`fdd78820e3fe41bb5c427b72044ae709eabc4b4c1ed9d99493052135f3358da8`', 'values': [(5, 3), (3, 5), (0, 0), (7, 7), (`4294967295`, 0), (`4294967295`, 1), (1, `4294967295`), (100, 99)], 'expected': ['2', '0', '0', '0', '`4294967295`', '`4294967294`', '0', '1'], 'expected_path': 'tools/exp445/arms/examples/clamp_sub/expected', 'expected_sha256': '`2d8f2492e08fb5a4408d11dfb94011723dcec64fb9e20d406044b6c0203b954d`'}, '`0bfe80ea229071421efd1418bbf09db219acf1c303d4c8a80025d1033744759d`': {'path': 'tools/exp445/arms/examples/count_above/inputs', 'sha256': '`188675879873c3484e770bd793be8e5395d1b96575e0031f710edfc610918b3a`', 'values': [(1, 2, 3, 4, 2), (0, 0, 0, 0, 0), (5, 5, 5, 5, 4), (-1, -2, -3, -4, -5), (`2147483647`, -`2147483648`, 0, 1, 0), (10, 20, 30, 40, 25), (7, 8, 9, 10, 10), (1, 1, 1, 1, -`2147483648`)], 'expected': ['2', '0', '4', '4', '2', '2', '0', '4'], 'expected_path': 'tools/exp445/arms/examples/count_above/expected', 'expected_sha256': '`ff0be81ecc695f3046237b3157c420f58c65e6439720489e0aa948583452e892`'}, '`14439646d9db8ec1c40b7646b3ec177d21ce8178a1e7c6c001134339cd8fab76`': {'path': 'tools/exp445/arms/examples/count_digits/inputs', 'sha256': '`6383af745b837f467812b692ddad3de333f6f6799dfaee7c210628ef2cd4f534`', 'values': [(0,), (9,), (10,), (99,), (100,), (12345,), (`18446744073709551615`,), (`10000000000000000000`,), (`9999999999999999999`,)], 'expected': ['1', '1', '2', '2', '3', '5', '20', '20', '19'], 'expected_path': 'tools/exp445/arms/examples/count_digits/expected', 'expected_sha256': '`66e82cbe8e78af1ef919a48a526efb2b48ce024c5e8322e89b828854f30a90a7`'}, '`83b4aad4f657f489ac7a7b9eee847118bc8d37c452a83efd3d5135af4f2e69dd`': {'path': 'tools/exp445/arms/examples/cube_xor_pair/inputs', 'sha256': '`fe1cac4cf9dd56c91bc70907af7a0a21e9cee1990617bed1c5dc3b03a1a4aae6`', 'values': [(0,), (1,), (2,), (7,), (13,), (14,), (15,), (16,), (200,), (255,)], 'expected': ['1', '9', '19', '855', '557', '1943', 'TRAP 3', 'TRAP 3', 'TRAP 3', 'TRAP 3'], 'expected_path': 'tools/exp445/arms/examples/cube_xor_pair/expected', 'expected_sha256': '`06a16d3f2fdc6dc5bc5b7d3bcc4af1f18c2e18c177c3d2df1a6f6ce0b4a9b9ef`'}, '`1974598d956017c608019ebd9a8b5af42dc34c5eae20809b47940337c14f2349`': {'path': 'tools/exp445/arms/examples/dot3/inputs', 'sha256': '`bca0c3df5f4ba03ffd6fd50d74654b51a34120e13266ab3100f7ebd8ffb95b70`', 'values': [(1, 2, 3, 4, 5, 6), (0, 0, 0, 0, 0, 0), (-32768, -32768, -32768, -32768, -32768, -32768), (32767, 32767, 32767, 32767, 32767, 32767), (-32768, 32767, 1, 32767, -32768, -1), (1, -1, 1, 1, 1, -1), (100, 200, 300, -3, -2, -1), (5, 0, 0, 7, 9, 11)], 'expected': ['32', '0', '`3221225472`', '`3221028867`', '-`2147418113`', '-1', '-1000', '35'], 'expected_path': 'tools/exp445/arms/examples/dot3/expected', 'expected_sha256': '`bb0f1153516a1e224305057797fa99a392bd137ba2ad1936fd775c9061054cbc`'}, '`95a41a420eb97cac77023a066936cc4c9673e3224489d118834edd076232ab59`': {'path': 'tools/exp445/arms/examples/halve_or_dec_steps/inputs', 'sha256': '`81203c47f140c7767b6d831e0cd4c68d0995d674fc5b19b22a0e27b0c3f2b27f`', 'values': [(0,), (1,), (2,), (3,), (7,), (8,), (15,), (1000,), (`4294967295`,), (`2147483648`,)], 'expected': ['0', '0', '1', '2', '4', '3', '6', '14', '62', '31'], 'expected_path': 'tools/exp445/arms/examples/halve_or_dec_steps/expected', 'expected_sha256': '`03cadfc2b73c4cb64ec9878acdb24f73ce82c863934c4de7b74ad3da1296157a`'}, '`bd88c1daeb2c9f2bde005d46172b7b7e0b4ed2c95081ea106dd62f8caafb16a0`': {'path': 'tools/exp445/arms/examples/has_digit/inputs', 'sha256': '`5e3f2fc4b3b9b962f883861183906f399596eee331b65d71195dba4d2a4b2088`', 'values': [(0, 0), (0, 1), (12345, 3), (12345, 6), (`4294967295`, 9), (`4294967295`, 8), (1000, 0), (7, 7), (5, 10), (5, 255)], 'expected': ['1', '0', '1', '0', '1', '0', '1', '1', '0', '0'], 'expected_path': 'tools/exp445/arms/examples/has_digit/expected', 'expected_sha256': '`a848801f579c98ca8fc9e6a90ed5bfe8659cc9b7a85e2afc471e1c44343eb21f`'}, '`fe9f95b097d0137a3ddb4a62246c5e6875fbc19aded228c2f23c4679b84c2ccf`': {'path': 'tools/exp445/arms/examples/hash_step/inputs', 'sha256': '`129fd09a51d0ecd85174e69c98f0fd700340be2335d35241dee90ec1de459e95`', 'values': [(0, 0), (1, 1), (0, 255), (`4294967295`, 255), (`138547332`, 1), (`123456789`, 65), (`4294967295`, 0), (2, 0)], 'expected': ['0', '32', '255', '224', '`4294967293`', '`3827160524`', '`4294967265`', '62'], 'expected_path': 'tools/exp445/arms/examples/hash_step/expected', 'expected_sha256': '`867df00b00610ee5374b95425f9c199cc078fa9e98c5d32478ee9bad993ca41f`'}, '`4335f62c4d839f7a7d0addd992208b6107249d7620d840080a81076b3800bc26`': {'path': 'tools/exp445/arms/examples/narrow_sum/inputs', 'sha256': '`3257617c170c938ee5bbd4741016a4f6eb77de48a280944475ba3ab695bc83ca`', 'values': [(1, 2), (100, 27), (100, 28), (-100, -28), (-100, -29), (32767, 1), (-32768, -1), (-128, 0), (200, -100), (0, 0)], 'expected': ['3', '127', 'TRAP 5', '-128', 'TRAP 5', 'TRAP 1', 'TRAP 1', '-128', '100', '0'], 'expected_path': 'tools/exp445/arms/examples/narrow_sum/expected', 'expected_sha256': '`3aa8e311d290b7f34575a0f23d4657abecadcfe73d106853cf4abfe4cf5140ef`'}, '`23026d2191616675acd10e798835bcb290ecd259c1e17935019bb2f97021d9fd`': {'path': 'tools/exp445/arms/examples/nibble_mirror/inputs', 'sha256': '`dee5944c3255af19088c8b7938aef0a47fa8a65df83786afbeefe265d28c982b`', 'values': [(0,), (4660,), (4385,), (43690,), (65535,), (1,), (4096,), (37129,), (23205,), (17185,)], 'expected': ['1', '0', '0', '1', '1', '0', '0', '0', '1', '0'], 'expected_path': 'tools/exp445/arms/examples/nibble_mirror/expected', 'expected_sha256': '`36a8593ee441c6ac3381a58d2dc09a26373d3c07187d08df138c4e22f1e1d583`'}, '`a55747b9894b8a8c07f33e6678b8f5482eee35096c97ff686be7ec7b7784d9c1`': {'path': 'tools/exp445/arms/examples/power_mod/inputs', 'sha256': '`5c16767626808d1bbfce04c745237d43d694b31cd2acdc49c3b5c9491805df34`', 'values': [(2, 10, 1000), (3, 0, 7), (0, 0, 5), (5, 3, 1), (`4294967295`, `4294967295`, `4294967291`), (7, 13, 0), (0, 0, 0), (`123456789`, `987654321`, `1000000007`), (2, 31, `4294967295`), (10, 2, 0)], 'expected': ['24', '1', '1', '0', '1024', 'TRAP 2', 'TRAP 2', '`652541198`', '`2147483648`', 'TRAP 2'], 'expected_path': 'tools/exp445/arms/examples/power_mod/expected', 'expected_sha256': '`47b9c5eb1d9d6b0729ed484e8bea8b32aae12c83658870e69ea2d14fe0da2825`'}, '`d8196e4bdfe690afeed43f7a52aefbb76f13ca42a6caa51fc61e70a585165213`': {'path': 'tools/exp445/arms/examples/rotl8/inputs', 'sha256': '`ec5b74aca087a19be46cb8530bc4cf3a03914e87890ceabcb7250368b1c51ea2`', 'values': [(1, 1), (128, 1), (1, 0), (1, 8), (165, 4), (15, 3), (255, 7), (6, 9), (129, 255), (0, 5)], 'expected': ['2', '1', '1', '1', '90', '120', '255', '12', '192', '0'], 'expected_path': 'tools/exp445/arms/examples/rotl8/expected', 'expected_sha256': '`cb04e913e46bcbc9ea2c9831080733e166396faf8edf6a510e2b4f53eb210534`'}, '`9acda5f3fd9ddc1dc01923fa76a30a4667f2d0e8d460ba2a60c5d6d5fc27807c`': {'path': 'tools/exp445/arms/examples/sum_range/inputs', 'sha256': '`40ea4e80ec323db346cdaa019887c692792b29802ede84ff3a4cc79199fb067c`', 'values': [(1, 10), (5, 5), (6, 5), (-3, 3), (-100000, 100000), (0, 100000), (-10, -1), (100000, -100000)], 'expected': ['55', '5', '0', '0', '0', '`5000050000`', '-55', '0'], 'expected_path': 'tools/exp445/arms/examples/sum_range/expected', 'expected_sha256': '`07eed9ef40f75e42d50f6cdf9b3ba780cb6b0998c47439e0b53f36c33145fb4d`'}, '`17b76ece94d8d691b3339b4d3f58443814c81d897a6e3f746981263674d32257`': {'path': 'tools/exp445/arms/examples/sum_squares3/inputs', 'sha256': '`37b9505a9528cda2f2598c72c60528812adecba24d9f859875f1482e4ee7efac`', 'values': [(1, 2, 3), (0, 0, 0), (-3, 4, 0), (181, 0, 0), (182, 0, 0), (100, 100, 100), (-100, -100, -50), (-32768, 0, 0), (128, 128, 0), (128, 127, 0)], 'expected': ['14', '0', '25', '32761', 'TRAP 1', '30000', '22500', 'TRAP 1', 'TRAP 1', '32513'], 'expected_path': 'tools/exp445/arms/examples/sum_squares3/expected', 'expected_sha256': '`04d8dc4400f7096d6c95956a54712a07073aabef624c97296a15f9ca493316bc`'}, '`8ecfa30de1ec78883a3c4c40fc5a11aeb2646a38df403a8bf61da47d99017e1d`': {'path': 'tools/exp445/arms/examples/tri_kind/inputs', 'sha256': '`12deb164b789ad554af56d30c59339772ab16022f405a9be1d026074c442acbb`', 'values': [(3, 3, 3), (3, 4, 5), (2, 2, 3), (1, 2, 3), (0, 5, 5), (65535, 65535, 65535), (65535, 65535, 1), (1, 65535, 65535), (5, 1, 1), (10, 6, 5)], 'expected': ['1', '3', '2', '0', '0', '1', '2', '2', '0', '3'], 'expected_path': 'tools/exp445/arms/examples/tri_kind/expected', 'expected_sha256': '`afec9abbb1c91597ce7a1c73a7e254dd10e83cd16d435a4f2475037bc969a81d`'}} 270 271 # Generalization corpus (#979): 49 entryless reference solutions, each with hidden inputs and 272 # expected values computed independently from the prompt (tests/one_layer/generalization/corpus/ 273 # oracle.c). Reviewed bodies: u32 arithmetic, local loops and arrays only; no main, no host words, no 274 # exports, and the last function is the requirement's entry. Every recorded input is called and must 275 # give its expected value (or its TRAP code). The aggregate pin covers the bytes of every solution, 276 # inputs and expected file: any change leaves the whole corpus unreviewed (NOT_RUN), never PASS. 277 CORPUS_TASKS = "tests/one_layer/generalization/corpus/tasks" 278 CORPUS_TASKS_SHA256 = "`bec24e01a74a691e2f3bcc4533adfb8dd1045b1328d03d38102ed357e730dc8b`" 279 280 281 def _review_corpus(root): 282 base = root / CORPUS_TASKS 283 if not base.is_dir(): 284 return 285 blob, entries = hashlib.sha256(), {} 286 for name in sorted(p.name for p in base.iterdir() if p.is_dir()): 287 files = {kind: (base / name / kind).read_bytes() for kind in ("solution.omegese", "inputs", "expected")} 288 for kind, data in files.items(): 289 blob.update(f"{name}/{kind} {hashlib.sha256(data).hexdigest()}\n".encode()) 290 entries[hashlib.sha256(files["solution.omegese"]).hexdigest()] = (f"{CORPUS_TASKS}/{name}", files) 291 if blob.hexdigest() != CORPUS_TASKS_SHA256: 292 return 293 for sha, (rel, files) in entries.items(): 294 REVIEWED_SOURCES[sha] = rel + "/solution.omegese" 295 RECORDED_INPUTS[sha] = { 296 "path": rel + "/inputs", "sha256": hashlib.sha256(files["inputs"]).hexdigest(), 297 "values": [tuple(int(word) for word in line.split()) for line in files["inputs"].decode().splitlines() if line.strip()], 298 "expected_path": rel + "/expected", "expected_sha256": hashlib.sha256(files["expected"]).hexdigest(), 299 "expected": [line for line in files["expected"].decode().splitlines() if line]} 300 301 302 _review_corpus(Path(__file__).resolve().parents[2]) 303 304 # Entryless pure units reviewed 2026-10-31 (#1001): arithmetic, comparisons, views and private calls 305 # only; no main, no host words. The bare callers run the same private-ABI vectors natively on AArch64 306 # and under qemu-x86_64 and require identical results. 307 REVIEWED_SOURCES.update({ 308 '`385a94645ecfa33d95b34a06ee84b645c81e90f30cf54737b09255ef68a96bfd`': 'seed/qualification/security673/relational/address.om', 309 '`edcd256af38d73e0f3b694970a15ebdcca60bc3bc4eafe8cfced8efcca537dd6`': 'seed/qualification/security673/relational/branch.om', 310 '`77894dc009c17aaf5f252679fe888bf658d4cdba29a41a976f186f6b04221590`': 'seed/qualification/security673/relational/compare32.om', 311 '`7d1893482efd5cc9ebd2831a46b2d0277b54da4f5e75133842640e1b6cc13f75`': 'seed/qualification/security673/relational/dividend.om', 312 '`518317ae9b8a5ce2709ab6c3d241cb09b885a1f3eb809c2fc2a7df59f6d38af1`': 'seed/qualification/security673/relational/division.om', 313 '`0df468f548a0931718ad1219a24f1f9eec7ff96ad8b5eeb5db629c590e814075`': 'seed/qualification/security673/relational/early.om', 314 '`8fbd4b6c45395ab22e74af94acc18f9fde1806c83484880bda8a0acc9d11d29e`': 'seed/qualification/security673/relational/error.om', 315 '`81c82a28bd7e77419fb286e45b12901b3d5fc9e4a2d553c5fb628a7842a08684`': 'seed/qualification/security673/relational/helper.om', 316 '`db1a4df108de0b547ba6ede9cc581de0123494c8bd9bd8c8f342bf144b8369bd`': 'seed/qualification/security673/relational/public-address.om', 317 '`015995067ab75ee67d2c8010d5cc53894946933e22a3211d78afcfad879f1048`': 'seed/qualification/security673/relational/public-branch.om', 318 '`a3330aae7ea2dc45133bd61bd22d92b4b1d5f0f6278009f9e4da89c3168a81fd`': 'seed/stablehlo/refuse.unit.om', 319 '`8cf6c20c1e5787173414b9773b5e5d66bb78e79780f78d3bda8bfb17e67fc539`': 'seed/stablehlo/vecadd.unit.om', 320 '`f7a069436534baeb9e21fa8a2c70043ebb4f03d041ebac9707f90c142a9b11a8`': 'seed/tensix/mix.unit.om', 321 '`20d6df5fe5a5ae5628bf4f217e5125eed8387313271ca45274c4bfeb2f42fcc7`': 'seed/tensix/vecadd.unit.om', 322 }) 323 # division.om and error.om trap on one of the two default vectors; their results come from 324 # relational/qualification.cases rows division-one/-zero (7, exit 102) and error-zero/-one (7, exit 106). 325 RELATIONAL_CASES = "seed/qualification/security673/relational/qualification.cases" 326 RELATIONAL_CASES_SHA256 = "`e6b28875d4a148c389df3fb39f317e9207d00894430a39a814c586e79bf86b65`" 327 RECORDED_INPUTS['`518317ae9b8a5ce2709ab6c3d241cb09b885a1f3eb809c2fc2a7df59f6d38af1`'] = { 328 'path': RELATIONAL_CASES, 'sha256': RELATIONAL_CASES_SHA256, 'values': [(1,), (0,)], 329 'expected_path': RELATIONAL_CASES, 'expected_sha256': RELATIONAL_CASES_SHA256, 'expected': ['7', 'TRAP 2']} 330 RECORDED_INPUTS['`8fbd4b6c45395ab22e74af94acc18f9fde1806c83484880bda8a0acc9d11d29e`'] = { 331 'path': RELATIONAL_CASES, 'sha256': RELATIONAL_CASES_SHA256, 'values': [(1,), (0,)], 332 'expected_path': RELATIONAL_CASES, 'expected_sha256': RELATIONAL_CASES_SHA256, 'expected': ['TRAP 6', '7']} 333 334 DIRECTIVE_REVIEWS = {'seed/qualification/om2/leak/candidate.cases:63:sha256-om2-scan': {'reason': 'OM-2 SHA artifact pending independent qualification', 'requirement': 'Runtime code for the OM-2 SHA unit remains unavailable to this independent lane.', 'manifest_sha256': '`2574b8854ea5fb3a7ce617a93c44ef15a6fb5c2c078dc74114b4908ffb759e92`'}, 'seed/qualification/om2/leak/leak.cases:83:sha256-om2-scan': {'reason': 'OM-2 SHA artifact pending independent qualification', 'requirement': 'Runtime code for the OM-2 SHA unit remains unavailable to this independent lane.', 'manifest_sha256': '`5185e00235d602da896e29eef03e71edf39c1fbcb138a616373bb41436d67883`'}, 'seed/qualification/om2/sec/s0s2/candidate.cases:103:s1-d-mid-short-line': {'reason': "E6 Q2 makes the LF the span, but whether the record's line= (and expect=) is the LF's line or the human line N (one later in OM-1) is not fixed; the tok case checks the rest", 'requirement': 'E4 col/span, E6 Q2', 'manifest_sha256': '`507a23edd61db8c50f671ab8c2ba4a7550c71074957ce400e9a4d4885bc6507a`'}, 'seed/qualification/om2/sec/s0s2/candidate.cases:315:s2-fmt-bad-trailblank-line': {'reason': 'E6 (a) makes trailing blank lines error 6 but does not say which line the human line names (first or last blank line)', 'requirement': 'E6 a, Q3', 'manifest_sha256': '`507a23edd61db8c50f671ab8c2ba4a7550c71074957ce400e9a4d4885bc6507a`'}, 'seed/qualification/om2/sec/s3s4/candidate.cases:158:inline-calls-stay-calls': {'reason': 'line 98 (calls to non-inline functions stay calls) is not observable through run/emit; needs a disassembly oracle', 'requirement': 'inline-rec-mutual-om1 run seed/qualification/om2/sec/s3s4/inline-rec-mutual-om1.om+seed/qualification/om2/sec/s3s4/lib-pu.om - file:seed/qualification/om2/oracle/s3s4/exp/inline-rec.out - 0', 'manifest_sha256': '`3be3558e2cc1acb19b73ed0760cfd1f17dc773717aa96df895f6b53431e572ec`'}, 'seed/qualification/om2/sec/s3s4/candidate.cases:240:slots-order': {'reason': 'line 100-101 slot order (pointer then length) is observable only through the bridge (L837), not through omc output', 'requirement': 'slots-7p-om1 emit seed/qualification/om2/sec/s3s4/slots-7p-om1.om - err:5:9 9', 'manifest_sha256': '`3be3558e2cc1acb19b73ed0760cfd1f17dc773717aa96df895f6b53431e572ec`'}, 'seed/qualification/om2/sec/s3s4/candidate.cases:260:program-site-table': {'reason': 'exact site tables of program-mode units depend on which OM-1 trap stubs and checks exist (stack, write slices); not fixed by the contract or E7', 'requirement': 'fold-trap-diag-same same seed/qualification/om2/sec/s3s4/fold-trap-diag.om+seed/qualification/om2/sec/s3s4/lib-pu.om seed/qualification/om2/sec/s3s4/fold-trap.om+seed/qualification/om2/sec/s3s4/lib-pu.om', 'manifest_sha256': '`3be3558e2cc1acb19b73ed0760cfd1f17dc773717aa96df895f6b53431e572ec`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:142:v6-part-golden-literal': {'reason': 'unreachable without a 2^64-1-element view; bridge side is abi-golden-wrap (status 32)', 'requirement': 'coordinator decision: the literal #748 golden (len 2^64-1, o 2^64-2, k 4) in a unit', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:186:abi-vsum-ok': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'contract 185: unsized ulong view (ptr, len) baseline: status 0, sum 6', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:188:abi-bcnt-ok': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'contract 185: uchar view len 64: status 0, result 64', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:190:abi-null-len1': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'contract 188: len > 0 with NULL -> status 32, result untouched', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:192:abi-misaligned': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'contract 189: ulong view not aligned to 8 -> 32', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:194:abi-size-overflow': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'contract 190: len * 8 overflows 64 bits (len 2^61) -> 32', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:196:abi-golden-wrap': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'contract 191 + coordinator golden: uchar len 2^64-1 -> ptr + len wraps -> 32', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:198:abi-wrap-high': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'contract 191: ptr 2^64-8, len 16 wraps -> 32', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:200:abi-null-len0': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'contract 194: len 0 with NULL is an empty view -> status 0, result 0', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:202:abi-null-len0-ulong': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'contract 194: ulong view len 0 NULL -> sum 0', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:204:abi-bogus-len0': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'contract 194: len 0 with any pointer (1) -> empty view', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:206:abi-edit-overlap': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'contract 192: edit [0,8) overlaps view [4,12) -> 32, nothing written', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:208:abi-edit-adjacent': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'contract 192-193: half-open adjacent ranges do not overlap -> status 0', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:210:abi-edit-empty': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'contract 193: an empty edit range overlaps nothing -> status 0', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:212:abi-edit-result': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'contract 192: edit range overlapping the result buffer -> 32', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:214:abi-out-overlap': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'contract 196-198: out overlapping its input gets memmove semantics (4,3,2,1)', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:216:abi-out-trap': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'contract 197-198: nothing written to out (or result) on a trap; status 9', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:218:abi-out-bounds': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'contract 170, 198: trap 3 inside -> status 3, out untouched', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:220:abi-layout': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'contract 156-158: layout = one pointer; lo little-endian, hi big-endian bytes', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:222:abi-layout-null': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'contract 181 (v1 checks kept): NULL layout pointer -> 32 (README A12)', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:224:abi-null-result': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'contract 181 (v1 checks kept): NULL result pointer -> 32', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:226:abi-reentry': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'contract 195: call from a signal handler during a call -> 33', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:228:abi-two-units': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'contract 207-210: two OM-2 units and one OM-1 unit linked into one binary, called interleaved', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:230:abi-ident-abiv': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'erratum E1: omega2_ident_abiv() holds sha256(abiv.om), the omc pin, OM-2 (README A11)', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:232:abi-ident-abiw': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'erratum E1: omega2_ident_abiw() holds sha256(abiw.om), the omc pin, OM-2', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:234:abi-ident-distinct': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'erratum E1: identities are per unit', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:236:abi-v1-absent': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'contract 182-184 + E1: no omega_vsum symbol (nm -D), v1link.c fails to link', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:238:abi-v1-kept': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'erratum E1: the OM-1 unit abi1 exports omega_madd1 and no omega2_ident_abi1', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:240:abi-units-stale-source': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'contract 209 + E1: units.sh --check after a one-byte change to a unit source refuses (exit 1)', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:242:abi-units-stale-omc': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'contract 209: units.sh --check with a different omc pin refuses', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:244:abi-units-stale-profile': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'contract 209 + E1: units.sh --check with the profile recorded OM-1 for an OM-2 unit refuses', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:246:abi-misaligned-len0': {'reason': 'needs the ABI v2 generator (omega-bridge, AbiLane L837) to bind sec/s5s7/abi/*.om; oracle/s5s7/abi/driver.c case', 'requirement': 'contract 189 vs 194 conflict: ulong view, len 0, ptr 1 (README Q5); expectation not asserted', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:250:sha-empty': {'reason': 'needs the OM-2 SHA unit and its bridge-generated header (ShaLane L838); oracle/s5s7/sha/sha_driver.c case', 'requirement': 'contract 214: init, final = python sha256("")', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:252:sha-abc': {'reason': 'needs the OM-2 SHA unit and its bridge-generated header (ShaLane L838); oracle/s5s7/sha/sha_driver.c case', 'requirement': 'contract 214: abc', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:254:sha-split2': {'reason': 'needs the OM-2 SHA unit and its bridge-generated header (ShaLane L838); oracle/s5s7/sha/sha_driver.c case', 'requirement': 'contract 214-215: every two-way split of seq:1000', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:256:sha-split3-zero': {'reason': 'needs the OM-2 SHA unit and its bridge-generated header (ShaLane L838); oracle/s5s7/sha/sha_driver.c case', 'requirement': 'contract 214: length-0 updates between three-way splits', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:258:sha-bytewise': {'reason': 'needs the OM-2 SHA unit and its bridge-generated header (ShaLane L838); oracle/s5s7/sha/sha_driver.c case', 'requirement': 'contract 214-215: one-byte updates', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:260:sha-update-null0': {'reason': 'needs the OM-2 SHA unit and its bridge-generated header (ShaLane L838); oracle/s5s7/sha/sha_driver.c case', 'requirement': 'contract 214, 194: update(NULL, 0)', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:262:sha-hash-overlap0': {'reason': 'needs the OM-2 SHA unit and its bridge-generated header (ShaLane L838); oracle/s5s7/sha/sha_driver.c case', 'requirement': 'contract 215 + E3: sha256_hash(buf, 64, buf)', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:264:sha-hash-overlap16': {'reason': 'needs the OM-2 SHA unit and its bridge-generated header (ShaLane L838); oracle/s5s7/sha/sha_driver.c case', 'requirement': 'contract 215 + E3: digest at buf+16 overlapping data', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:266:sha-hash-overlap-before': {'reason': 'needs the OM-2 SHA unit and its bridge-generated header (ShaLane L838); oracle/s5s7/sha/sha_driver.c case', 'requirement': 'contract 215 + E3: digest before and overlapping data', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:268:sha-post-final': {'reason': 'needs the OM-2 SHA unit and its bridge-generated header (ShaLane L838); oracle/s5s7/sha/sha_driver.c case', 'requirement': 'contract 219-222: init, update, final after a final == fresh', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:270:sha-no-init-safe': {'reason': 'needs the OM-2 SHA unit and its bridge-generated header (ShaLane L838); oracle/s5s7/sha/sha_driver.c case', 'requirement': 'contract 219-220: update/final without init returns (memory safety only)', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:272:sha-hash-eq-stream': {'reason': 'needs the OM-2 SHA unit and its bridge-generated header (ShaLane L838); oracle/s5s7/sha/sha_driver.c case', 'requirement': 'contract 223: hash(n) == init, update(n), final == python', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:274:sha-ctx-copy': {'reason': 'needs the OM-2 SHA unit and its bridge-generated header (ShaLane L838); oracle/s5s7/sha/sha_driver.c case', 'requirement': 'erratum E3: byte copy of a context after k updates is equivalent', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:276:sha-big-1': {'reason': 'needs the OM-2 SHA unit and its bridge-generated header (ShaLane L838); oracle/s5s7/sha/sha_driver.c case', 'requirement': 'contract 214: one update of 2^32+3 bytes', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:278:sha-big-split': {'reason': 'needs the OM-2 SHA unit and its bridge-generated header (ShaLane L838); oracle/s5s7/sha/sha_driver.c case', 'requirement': 'contract 214: updates of 2^32-1 and 4 bytes', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/candidate.cases:280:sha-big-hash': {'reason': 'needs the OM-2 SHA unit and its bridge-generated header (ShaLane L838); oracle/s5s7/sha/sha_driver.c case', 'requirement': 'contract 214, 223: hash of 2^32+3 bytes', 'manifest_sha256': '`d7e3c1655c1b20c86581725cd52c133867367896ceb17a519995c8733cb72ce4`'}, 'seed/qualification/om2/sec/s5s7/mutant-side.cases:41:mut-e-ident': {'reason': 'needs the ABI v2 generator; kill described in README section Mutant kill specs (e)', 'requirement': '(e) stale generation/profile identity accepted (contract 207-209, erratum E1): ABI level.', 'manifest_sha256': '`20c198884ccb1ecc6393a1b435339a702893c9aebf13cd3968b78cbd4e98f8d5`'}, 'seed/qualification/om2/sec/s5s7/mutant-side.cases:43:mut-f-abi-len': {'reason': 'needs the ABI v2 generator; kill described in README section Mutant kill specs (f)', 'requirement': '(f) bad ABI length accepted (contract 187-193): ABI level, driver abi-null-len1 / abi-golden-wrap.', 'manifest_sha256': '`20c198884ccb1ecc6393a1b435339a702893c9aebf13cd3968b78cbd4e98f8d5`'}} 335 336 WIDTH = {"bool":1,"uchar":1,"byte":1,"ushort":2,"short":2, 337 "uint":4,"int":4,"ulong":8,"long":8, 338 "u8":1,"i8":1,"u16":2,"i16":2,"u32":4,"i32":4,"u64":8,"i64":8} 339 MAIN = re.compile(rb"(?m)^[ \t]*(?:export[ \t]+)?fn[ \t]+main(?:[ \t]|$)") 340 FUNCTION = re.compile(rb"(?m)^((?:export )?fn [^\n]+)") 341 342 343 def digest(data): 344 return hashlib.sha256(data).hexdigest() 345 346 347 def _pinned(root, rel, sha): 348 path = Path(root) / rel 349 if path.is_symlink() or not path.is_file(): 350 raise ValueError("required regular oracle input is absent: " + rel) 351 data = path.read_bytes() 352 if digest(data) != sha: 353 raise ValueError("reviewed oracle input changed: " + rel) 354 return data 355 356 357 def _signature(line, source): 358 words = line.decode().split() 359 exported = words[0] == "export" 360 if exported: 361 words = words[1:] 362 name = words[1] 363 to = words.index("to") 364 parameters = [] 365 p = 2 366 layouts = {n.decode():int(z) for n,z in re.findall(rb"(?m)^layout (\w+) ([0-9]+)$",source)} 367 while p < to: 368 if words[p] == "fresh": 369 p += 1 370 param = words[p] 371 p += 1 372 kind = words[p] 373 p += 1 374 if kind in ("view", "edit", "out"): 375 typ = words[p] 376 p += 1 377 if typ in layouts: 378 parameters.append((param,kind,"uchar",layouts[typ],False)) 379 else: 380 count = words[p] 381 p += 1 382 parameters.append((param,kind,typ,4 if count == "*" else int(count),count == "*")) 383 else: 384 if kind not in WIDTH: 385 raise ValueError("unreviewed scalar parameter type: " + kind) 386 parameters.append((param,"scalar",kind,1,False)) 387 return name,parameters,words[to+1],exported 388 389 390 def bare_calls(root, rel, source): 391 """Concrete caller specs for an exact reviewed source, never arbitrary code. 392 393 Existing fm*.inputs / example inputs are retained in full (including traps). 394 Remaining fixture calls use two explicitly described shapes: nonzero small 395 canonical scalars and distinct arrays, then zero scalar boundaries. These are 396 differential inputs, NOT independent semantic predictions. Exports are all 397 called, in source order. The non-export last-function rule is preserved. 398 """ 399 sha = digest(source) 400 if sha == CURRENT_SHA256: 401 return sha256_calls(root,source) 402 if sha == digest(GOLDEN_PART_SOURCE): 403 authority = "seed/qualification/om2/sec/s5s7/v6-part-wrap.om" 404 _pinned(root,authority,"`d0326c08e6ea38e6b2f2f5bb982316ad18c6480c148ca47d670848b9ad6a6d67`") 405 arrays=[{"name":"real-one-byte-storage","size":1,"data":b"\0","observe":False}] 406 evidence={"scope":"invalid-view injection, not a constructible full-span array or public bridge call", 407 "authority":authority,"pointer":"real one-byte array; no unit branch reads any element", 408 "provenance":"original 2^64-1-element view is physically impossible; public bridge refusal remains abi-golden-wrap"} 409 return [ 410 {"name":"golden-forged-length-part-trap","entry":0, 411 "slots":[{"array":0},`18446744073709551615`],"arrays":arrays,"result":"ulong", 412 "expected_exit":103,"expected_stdout":b"","evidence":dict(evidence)}, 413 {"name":"golden-valid-empty-part-control","entry":1, 414 "slots":[{"array":0},1],"arrays":arrays,"result":"ulong", 415 "expected_exit":0,"expected_stdout":bytes(8),"evidence":dict(evidence)}, 416 ] 417 if sha not in REVIEWED_SOURCES or MAIN.search(source): 418 return [] 419 functions = FUNCTION.findall(source) 420 exported = [f for f in functions if f.startswith(b"export ")] 421 functions = exported or functions[-1:] 422 recorded = RECORDED_INPUTS.get(sha) 423 if recorded: 424 _pinned(root, recorded["path"], recorded["sha256"]) 425 if "expected_path" in recorded: 426 _pinned(root, recorded["expected_path"], recorded["expected_sha256"]) 427 result = [] 428 for entry,line in enumerate(functions): 429 name,params,returns,_ = _signature(line,source) 430 values = recorded["values"] if recorded else ([None,None,None] if b"c = lt n 9\n" in source else [None,None]) 431 for index,vector in enumerate(values): 432 slots,arrays = [],[] 433 scalar_index = 0 434 for position,(param,kind,typ,count,unsized) in enumerate(params): 435 if kind == "scalar": 436 value = vector[scalar_index] if vector is not None else (1 if index == 0 else 0) 437 scalar_index += 1 438 # Function-mode stateful hash APIs: real finalized one-shot calls. 439 if name == "omb3" and param == "fin": value = 1 440 if name == "omsha" and param == "op": value = 3 441 if name in ("omb3","omsha") and param == "n": value = 3 if index == 0 else 0 442 if recorded is None and index in (0,2) and param=="n" and b"c = lt n 9\n" in source: 443 value = 9 # original flags fixture: reach the branch on loaded-data flags 444 slots.append(value & 0xffffffffffffffff) 445 else: 446 width = WIDTH[typ] 447 if unsized: 448 count = 4 + position if index == 0 else 0 449 # rev reads four bytes, so the zero-length arm is the bounds negative control. 450 size = width * count 451 if size > 8*1024*1024: 452 raise ValueError("large external buffer needs an explicit reviewed custom caller") 453 data = b"".join((0 if kind == "out" or name in ("omb3","omsha") and param in ("st","c","w","o") else ((i+position+1)&127)).to_bytes(width,"little") for i in range(count)) 454 if recorded is None and name not in ("omb3","omsha"): 455 if index==1: 456 data = bytes(size) 457 elif kind!="out": 458 value = bytearray(data) 459 if param=="a" and b"if eq get a 0 7\n" in source: 460 value[0] = 7 # original data-branch: true versus zero false 461 if param=="a" and b"if gt h a 9\n" in source: 462 value[3] = 10 # original call-data: callee's loaded byte exceeds 9 463 if param=="a" and b"ret ulong get t get a 0\n" in source: 464 value[0] = 255 # original data-index: final valid table element 465 if param=="a" and index==2 and b"c = lt n 9\n" in source: 466 value[0] = 5 # original flags: neither the public nor loaded-data predicate holds 467 if param=="a" and typ=="ulong" and (b"ret uint get a 0\n" in source or 468 b"ret uint and get a 0 `4294967295`\n" in source): 469 value[:8] = struct.pack(" 6: 476 raise ValueError("reviewed call exceeds six private-ABI slots") 477 spec = {"name":f"{name}-{index}","entry":entry,"slots":slots,"arrays":arrays, 478 "result":"void" if returns == "void" else "scalar", 479 "evidence":{"source_sha256":sha,"source_spec":REVIEWED_SOURCES[sha], 480 "signature":line.decode(),"input_authority":recorded or 481 "explicit original loaded-data predicates/conversion boundary and zero vectors; native differential only", 482 "abi":"docs/osc/OSC-1-DESIGN.md section 7; omc param/xpro/s_eof export emission"}} 483 # A recorded input list is not an independent result oracle. The 484 # original rung4 conductor compares the OSC/C referee, including 485 # traps; absent a result table retain native differential evidence. 486 if recorded and "expected" not in recorded: 487 spec["expected_exit"] = None 488 spec["evidence"]["result_authority"] = "seed/rung4/gate4.sh cmpc; native differential, not independent semantics" 489 trap = None 490 if sha in ( 491 "`8e1b8605e8d77c792a2aaf6adeb2167a38a538d0857792b006eeafd408d78e94`", 492 "`79d2da33312969e14d9cdefe34b19306cce03471d91add08aa1e0285af22cf9c`", 493 ): 494 trap = 110 # dup32 halves differ; original s3/sec5 kept controls. 495 if index == 1 and sha in ( 496 "`1de96237beb1b2d7d76fb226cd930036d8cc1d8c82faf4114f3309a1396365a5`", 497 "`3490824f6e8cb82e661c7a408e8e4264790875e9e0147914ad4b0571dde0fc79`", 498 "`e1b60bc4c240e03be0c0fbdb630066f295ff7a53b73a380dab52fa8509f498d6`", 499 ): 500 trap = 103 # zero-length input, unconditional element access 501 if sha == "`ef1b3dc9f12deef3e2536b6689e79f529f216bff87c8c7b8dd5d5f259b7f3703`": 502 if name == "revtrap": 503 trap = 109 # explicit trap after filling the output 504 if index == 1 and name in ("rev", "revtrap"): 505 trap = 103 # only these exports unconditionally read the empty view 506 if index == 0 and sha == "`21e366be6ad718395e5018186a3915d57ea02147a54b247ef1f69f001960f642`": 507 trap = 105 # original reachable-trap conversion counterexample 508 if index == 1 and sha in ( 509 "`432b642f9b3f5a0502705ef06d61502f4312e82c85adb58b64e5791a5d553e49`", 510 "`1ab250b1d4e7d2f437ee680cce5a8918752cf0ef8efe1d89b490270005ceb294`", 511 "`06c137ece7a94b3e6f5e19043bd6045fbe5208019b4366a43de9cb7558cee587`", 512 "`035d21b803806853451dc2f408cc29c3490714b7b73081dd8cfe4b283abb2f85`", 513 "`f4c545da9cfed4a6884b39634a371c09353139992f0be377dcea2f4e65e9187d`", 514 "`f578c1f645e8a7e6112b2f45028fa8a018f73fad2149d0de16141607b0969ccc`", 515 "`781ba1bf2768974166c10a3724acbf766080db732bee8d195fa3d872a5ab05c9`", 516 "`050c286588e3066c396697c397c999a6ac8aa98334cc9c3bb3fcb43a6d8c084f`", 517 "`5b09682d993bbb9afb96fdbc0f7a75c8e2cf14fc094b5b6c6e1ecf7fcd6ee374`", 518 ): 519 trap = 102 # original div-by-zero arm 520 if index == 1 and name == "collatz_steps": 521 trap = 104 # cases.tsv dev08, zero input exhausts loop bound 522 if sha == "`94c38bc25d64c36a7e0cebc1e7fe0cfef51517507322a3f526cb31e1e0553444`": 523 trap = 109 # cases.tsv control explicit, last-function entry 524 if index == 1 and sha == "`0419a9380955e1199e9927412cdbde107b081243da2345f0cc77900ce641554e`": 525 trap = 106 # regression.tsv nestedvoid, callee traps first 526 if trap is not None: 527 spec.update(expected_exit=trap, expected_stdout=b"") 528 spec["evidence"]["trap_authority"] = "reviewed source body and original conductor table; caller vector retained" 529 if sha in ( 530 "`af6c2faa6087359c0c51bcd5d61d973143f45d4719eb98278370bfb03284a79e`", 531 "`2702ef2f9bcf2fbadd6c9ced8382a13f1939378c024a5c5706d167d98798be13`", 532 "`20773907e95cbc9b1e157be91b099dc1ad13ab6ca79d2966e4259a93a8625eff`", 533 ): 534 # Exact dup32 constructor: zero and all-one representation 535 # boundaries, observing the entire returned representation. 536 slots[0] = `4294967295` if index == 0 else 0 537 spec.update(expected_exit=0, expected_stdout=bytes([255])*8 if index == 0 else bytes(8)) 538 spec["evidence"]["result_authority"] = "reviewed exact dup32 constructor and open; full-width representation" 539 if sha in ( 540 "`a7682122ef8f6707e48f8d6cf76459aca4ebab53ab3245dd51b88d8067fad948`", 541 "`03fba96f85d365cec80d11c1f10400d6f1874c924e3e824458fb812c023f267c`", 542 ): 543 secret = 1 if index == 0 else 0 544 context = bytearray(104) 545 context[40 if sha.startswith("a768") else 32] = secret 546 arrays[0]["data"] = bytes(104) 547 arrays[1]["data"] = bytes([secret]) 548 value = 0 if sha.startswith("a768") else secret 549 spec.update(expected_exit=0, expected_stdout=struct.pack("len(image): 584 raise ValueError("entry selection requires a complete AArch64 bare unit") 585 word = struct.unpack_from(">26 != 5: 587 raise ValueError("selected export is not an unconditional B dispatch") 588 immediate = word&0x3ffffff 589 if immediate&(1<<25): immediate -= 1<<26 590 target = 4*index+4*immediate 591 if target<0 or target>=len(image): 592 raise ValueError("selected branch target is outside original unit") 593 return struct.pack("size or size<0: 643 raise ValueError("invalid oracle array storage") 644 if payload: 645 data.extend(bytes(logical-len(data))) 646 data.extend(payload) 647 logical += max(size,8) # empty views still have a real non-NULL pointer 648 frame = 16 649 runtime = 528 650 total = (logical+15)&~15 651 base = 0x401000 652 address = lambda offset:base+dataoff+offset 653 if address(total) > STACK_FLOOR: 654 raise ValueError("external arrays overlap the fixed owned stack") 655 def slotvalue(slot): 656 return address(positions[slot["array"]])+slot.get("offset",0) if isinstance(slot,dict) else slot 657 observations = [(0,8,8)] 658 for array,pos in zip(spec["arrays"],positions): 659 if array.get("observe",True): 660 observed = array.get("observe_size",array["size"]) 661 if observed<0 or observed>array["size"]: 662 raise ValueError("observation exceeds declared array storage") 663 observations.append((pos,"result" if array.get("return_bytes") else observed,array["size"])) 664 target = unit+spec.get("entry",0)*stride 665 if target>=unit+len(image): 666 raise ValueError("export target is outside original image") 667 code = bytearray() 668 fail_jumps = [] 669 if machine == 62: 670 def mov(reg,value): 671 code.extend(bytes((0x49 if reg>=8 else 0x48,0xb8+(reg&7)))) 672 code.extend(struct.pack("= unit+len(image): 684 raise ValueError("call target is outside original image") 685 code.extend(b"\xe8"+struct.pack(">shift)&65535)<<5) | reg) 713 mov(16,STACK_TOP) 714 emit(0x9100021f) # ADD SP,X16,#0; same fixed mapped owned stack as x86 715 for call in spec.get("calls", [spec]): 716 for i,slot in enumerate(call["slots"]):mov(i,slotvalue(slot)) 717 mov(7,address(runtime)) 718 branch = len(code) 719 calltarget = unit+call.get("entry",0)*stride 720 if calltarget >= unit+len(image): 721 raise ValueError("call target is outside original image") 722 emit(0x94000000 | (((calltarget-branch)//4)&0x3ffffff)) 723 if spec["result"]=="void":mov(0,0) 724 if corrupt_result: 725 mov(9,1); emit(0xca090000) # EOR X0,X0,X9 726 mov(9,address(0)); emit(0xf9000120) 727 for pos,size,capacity in observations: 728 mov(0,1); mov(1,address(pos)) 729 if size=="result": 730 mov(9,address(0)); emit(0xf9400122) 731 mov(10,capacity); emit(0xeb0a005f) # CMP X2,X10, unsigned capacity 732 fail_jumps.append(len(code)); emit(0x54000008) # B.HI failure 733 else:mov(2,size) 734 mov(8,64); emit(0xd4000001) 735 mov(0,0); mov(8,93); emit(0xd4000001) 736 trap = len(code) 737 emit(0x91019020) # ADD X0,X1,#100 (OscRt.trap callback) 738 mov(8,93); emit(0xd4000001) 739 struct.pack_into("unit: 745 raise ValueError("oracle stub exceeds its fixed reservation") 746 payload = bytes(code).ljust(unit,b"\0")+image 747 payload = payload.ljust(dataoff,b"\0")+data 748 return _elf(machine,payload,0,4096+dataoff+total) 749 750 751 CURRENT_SHA256 = '`dbf002dd6aa36585632b9d01d98ac3f0bd2fa0f0475082940de53638847994bb`' 752 RESOURCE_PINS = {'seed/qualification/om2/fixtures/sha256-k.dec': '`66e0d9b40b2605fb5984b25fb10e1ea162dcb7ad9bb593ec8aaf1056a85c5b4e`', 'seed/qualification/om2/fixtures/sha256-iv.dec': '`b831ee5e6e1ed07aeb8654d0dbd962f76a3078a89b091453f059ac26f3fea103`', 'seed/qualification/om2/selftest/pass.cases': '`b3158f424965f8e8c6f590e736e8bd52622befb45978e7fbffc9e1063fd83dd1`', 'seed/qualification/om2/selftest/fail.cases': '`2bff4f5a29fa9f17e3416e769538ed845154317cb7d82baa39980c88ba055c44`', 'seed/qualification/om2/selftest/cat.om': '`2ad4147ae3e2a3b836b862b4653bf2fe83c86a98b4b0c50896ebff84338537a1`', 'seed/qualification/om2/selftest/cat-bad.om': '`46066af11f0ee008a60d719d3033ff6d9ddef3c854e318271f3cf577ed8a753d`', 'seed/qualification/om2/fixtures/gen/seq-300.bin': '`43f9b5d59eb108817176c6f65c2c6203a22f2ae8bc28b7a1dde45947678c5042`', 'seed/qualification/om2/fixtures/gen/rnd-7-64.bin': '`47a8c8a33e5576b929664df2e1bec6aae0158d3dee0210185a975de8a9a04c39`', 'seed/qualification/om2/fixtures/gen/rep-0-5.bin': '`8855508aade16ec573d21e6a485dfd0a7624085c1a14b5ecdd6485de0c6839a4`', 'seed/qualification/security673/branch-corpus.om': '`a2672e4d018ca2ded61044af19bcde0ad7f8a3990429067aa2d5086ee681a413`', 'seed/qualification/security673/branch-mutate.om': '`4596d9acc712d7475ed964b1a4d8adfd466e08a64f1448cd7159ff1da447848d`', 'seed/qualification/security673/branch-check.om': '`3165c09cb7ed7523355ccaa1acbdc89be55c2882fbb61fc7f25594bd68deeca3`', 'seed/qualification/security673/array-fill.om': '`bcfb200a48291c27d4a700ea074e02616a881767c8838a52ad2dfd7b83b52d33`', 'seed/qualification/security673/oracle-corpus.om': '`41118388d232dd6897bebf9b239f4174a2e5054cdd07a4753c4ce60bf7c022fa`', 'seed/qualification/security673/gate-child.om': '`459a60da8e660ee1f433a9679bb41467074fda45997e5168e23e92ebad0d570b`'} 753 PURE_NAME_CONTROLS = {'`e1109db40b1ab3f8b7c5b847bb9032810fc3dcf836ec58a0caf5459033636764`': 'seed/omc/om2/s3/a-kept.om', '`e6e04d5f60f921be058b89ab369735e6b8aa9d398d836f713bbc8c688c95c513`': 'seed/omc/om2/s3/a-ok.om', '`92c7813513f2bb511bbacc53e1a351a417cabc10139134e477bfb61483005c92`': 'seed/omc/om2/s3/a-om1.om', '`cfccbeb34d3bfb051e01977b9acb2b6166c41bbfaba85a26c85c123643e8012a`': 'pack:seed/qualification/om2/c2/corpus.pack:`3495087`:1831', '`e7ea21711b45c957a6264e373e66f597c091b67809bd0c785113d2ea601e71d7`': 'pack:seed/qualification/om2/c2/corpus.pack:`3497014`:1462', '`2e011318d020bd5e0283bde413b74335b4e4b3c5b417e34b03caa832f5efcf66`': 'pack:seed/qualification/om2/c2/corpus.pack:`3516061`:1403', '`63eab87101f8c71645b26023d422fb910c8d6ce603504608bfb395fc5a7a0cb0`': 'pack:seed/qualification/om2/c2/corpus.pack:`3517560`:1034', '`767fc04dd38d62a2f1f700366a641a2a7ea7b5429e0341dcffb97bcc8558029b`': 'pack:seed/qualification/om2/c2/corpus.pack:`3596649`:1500', '`4ae68017b93e47a9ddc638ef9d0f3e950c9639346102c510c36909e728f28dec`': 'pack:seed/qualification/om2/c2/corpus.pack:`3609196`:824', '`3bd0be5b72fc92825742422dc7157196d85d57891b81c8ce89a6df8969584a82`': 'seed/qualification/om2/sec/s5s7/a5-allops.om', '`9cb0393b2c6c8f99ad93e5af2db0ae4bbf17de884767de162f9737c20717f369`': 'seed/qualification/om2/sec/s5s7/a5-exact.om', '`0ec2b5eb427d759eb7563f9dbf8cd1a921a23b9e80c9d7f779315490b23f274c`': 'seed/qualification/om2/sec/s5s7/a5-kept.om', '`1e0a5f4c22cee6170a7f6787fb6c1cc215e1ff9aa0e997bc8f7450c06b3a072b`': 'seed/qualification/om2/sec/s5s7/a5-rot64.om', '`373509e26a12a1c579bf4021d1c275929da7c534812ecdf62c9d0486f11d3eff`': 'seed/qualification/om2/sec/s5s7/a5-swap.om', '`b21d8c82a5a3648011325261bac9481e9e3147dd29e17b491e04008bda289295`': 'seed/qualification/om2/sec/s5s7/a5-exact.om+seed/qualification/om2/sec/s5s7/pr.om', '`56fbd35bc5e262553585cdd18a54524622c638fff89d9bf0f84d9c42884c8366`': 'seed/qualification/om2/sec/s5s7/a5-allops.om+seed/qualification/om2/sec/s5s7/pr.om', '`d7df44a4f803645594ec1e758201d8e1c672c4ebe94c553ed9b4cdca98bb4607`': 'seed/qualification/om2/sec/s5s7/a5-rot64.om+seed/qualification/om2/sec/s5s7/pr.om', '`c0c8cd2d3c8c9fe4e1cb8f9cfebb5af8d5c625368db1d9af713b0acb33504b24`': 'seed/qualification/om2/sec/s5s7/a5-kept.om+seed/qualification/om2/sec/s5s7/pr.om', '`c7ceccff2f370d5c82df978399a82372f6d354703d9ff263de8d560df13d3481`': 'seed/qualification/om2/sec/s5s7/a5-swap.om+seed/qualification/om2/sec/s5s7/pr.om'} 754 ABI_DRIVER = ("seed/qualification/om2/oracle/s5s7/abi/driver.c", 755 "`a9d134a149ae1bbc89ca799ffa6036cb0612947e36e267e1535a544d34c52d3b`") 756 SHA_DRIVER = ("seed/qualification/om2/oracle/s5s7/sha/sha_driver.c", 757 "`50ac882ad0e4ec19f3076ad29d52ffa864ac5960490116f9f6c72fc9ef0f7b48`") 758 HELPERS = {"putu": ("seed/qualification/om2/sec/s0s2/lib/putu.om", 759 "`313b425a4e6b779633e06c0ed3dd6906730f39d230834b2921e4abffe9428a41`"), 760 "pr": ("seed/qualification/om2/sec/s5s7/pr.om", 761 "`e6d0e0a3e9398c62651fb2838a4dcf35c7836955b2c21327f28b2687d937baf0`")} 762 INLINE_SOURCE = b"om2\nfn plain x ulong to ulong\nret add x 1\nend\nexport fn entry x ulong to ulong\nret plain x\nend\n" 763 REVIEWED_SOURCES[digest(INLINE_SOURCE)] = "oracle:non-inline-calls-stay-calls" 764 GOLDEN_PART_SOURCE = b"""om2 765 fn plen v view uchar * to ulong 766 ret len v 767 end 768 export fn golden v view uchar * to ulong 769 ret plen part v `18446744073709551614` 4 770 end 771 export fn empty v view uchar * to ulong 772 ret plen part v len v 0 773 end 774 """ 775 REVIEWED_SOURCES[digest(GOLDEN_PART_SOURCE)] = "oracle:forged-golden-part-before-any-access" 776 777 778 def sha256_calls(root, source): 779 """Current four-entry SHA API, against hashlib, independently from C2 history. 780 781 Exercises one-shot and init/update/final, empty inputs, both padding lengths, 782 block boundaries and split/zero updates. Only the digest is observed; context 783 bytes not promised by the API are not turned into a new qualification gate. 784 These private calls do NOT claim C-boundary null/alignment/overlap validation. 785 """ 786 if digest(source) != CURRENT_SHA256: 787 raise ValueError("current SHA API source changed after review") 788 specs = [] 789 for n in (0,3,55,56,63,64,65,1000): 790 message = b"abc" if n==3 else bytes(i%251 for i in range(n)) 791 for streaming in (False,True): 792 arrays=[{"name":"ctx","size":104,"data":bytes(104),"observe":False}, 793 {"name":"message","size":n,"data":message,"observe":False}, 794 {"name":"digest","size":32,"data":bytes(32),"observe":True}] 795 ptr=lambda a,o=0:{"array":a,"offset":o} 796 if streaming: 797 cut = n//2 798 calls=[{"entry":0,"slots":[ptr(0)]}, 799 {"entry":1,"slots":[ptr(0),ptr(1),cut]}, 800 {"entry":1,"slots":[ptr(0),ptr(1,cut),0]}, 801 {"entry":1,"slots":[ptr(0),ptr(1,cut),n-cut]}, 802 {"entry":2,"slots":[ptr(0),ptr(2)]}] 803 else: 804 calls=[{"entry":3,"slots":[ptr(1),n,ptr(2)]}] 805 specs.append({"name":f"current-sha-{'stream' if streaming else 'hash'}-{n}", 806 "entry":calls[0]["entry"],"slots":calls[0]["slots"],"calls":calls, 807 "arrays":arrays,"result":"void","expected_exit":0, 808 "expected_stdout":bytes(8)+hashlib.sha256(message).digest(), 809 "evidence":{"source_sha256":CURRENT_SHA256, 810 "source_spec":"om/sha256/sha256-om2.om", 811 "oracle":"Python hashlib SHA-256; original API comments lines234-344", 812 "input_hex":message.hex(),"streaming":streaming}}) 813 return specs 814 815 816 def directive_plan(root, name): 817 review = DIRECTIVE_REVIEWS.get(name) 818 if review is None: 819 return {} 820 evidence = dict(review) 821 evidence["review_revision"] = REVIEW_REVISION 822 manifest = name.split(":",1)[0] 823 _pinned(root,manifest,review["manifest_sha256"]) 824 label = name.rsplit(":",1)[-1] 825 if label == "slots-order": 826 rel = "seed/qualification/om2/sec/s3s4/slots-3v.om" 827 sha = "`31ead9b2a44ca4b10fd637b0fd9ee339005d33b48a731795e71f57d8189628a5`" 828 return {"source":_pinned(root,rel,sha),"driver":"bare-private-abi","evidence":evidence} 829 if label == "inline-calls-stay-calls": 830 evidence["structural"] = {"minimum_calls":1} 831 evidence["structural_scope"] = "two-function bare unit; plain has no callees, entry must CALL plain" 832 return {"source":INLINE_SOURCE,"driver":"bare-private-abi","operation":"structural","evidence":evidence} 833 if label == "sha256-om2-scan": 834 evidence.update(stdin_compiled_source="om/sha256/sha256-om2.om", 835 stdin_source_sha256=CURRENT_SHA256,stdin_export_index=3, 836 stdin_export="sha256_hash",required_verdict="TRACE-EQUIV-STATIC PASS", 837 scope="original scanner on the actual current hash entry; digest API is a separate synthetic case") 838 return {"source":_pinned(root,"seed/qualification/om2/leak/leakscan.om", 839 "`6b14fd9bb6f174de4a87e14b5ae38c9984de48c91a0b18c468bb1197adb2c82c`"), 840 "driver":"sha-leak-scan","args":(),"expected_exit":0,"evidence":evidence} 841 if label == "v6-part-golden-literal": 842 evidence.update(original_impossibility=review["reason"], 843 scope="private-ABI invalid-view negative control; not public bridge conformance", 844 no_access="only length is observed; even an accepting mutant never dereferences the forged view") 845 return {"source":GOLDEN_PART_SOURCE,"driver":"bare-private-abi","evidence":evidence} 846 if label in ("s1-d-mid-short-line","s2-fmt-bad-trailblank-line","program-site-table"): 847 return observation_plan(root,name) 848 if label.startswith("abi-") or label in ("mut-e-ident","mut-f-abi-len"): 849 _pinned(root,*ABI_DRIVER) 850 evidence.update(original_driver=ABI_DRIVER[0],original_driver_sha256=ABI_DRIVER[1], 851 boundary="SysV generated bridge; raw private-ABI body execution is separate") 852 return {"blocker":"BLOCKED_ON BridgeX86: "+review["requirement"],"evidence":evidence} 853 if label.startswith("sha-"): 854 _pinned(root,*SHA_DRIVER) 855 evidence.update(original_driver=SHA_DRIVER[0],original_driver_sha256=SHA_DRIVER[1], 856 boundary="original generated C SHA driver, not current raw-unit body") 857 return {"blocker":"BLOCKED_ON BridgeX86: "+review["requirement"],"evidence":evidence} 858 # Preserve the particular unresolved contract, not a guessed hardware gate. 859 return {"blocker":review["reason"],"evidence":evidence} 860 861 862 # Reviewed host-effect drivers for rows whose conductors launch programs or touch files. 863 # Every effect stays in the runner's private per-architecture cwd under TMPDIR, under the 864 # runner's wall deadline and EFFECT_CPU_SECONDS of CPU. qemu-user is not a registered 865 # binfmt, so any program either arm launches is the same native AArch64 file in both 866 # runs; only the program under test changes architecture. None of these sources has a 867 # network word except pure-child.om, whose socknew arm is unreachable (see its review). 868 EFFECT_CPU_SECONDS = 10 869 # The frozen security673 packets name /bin/true, /bin/echo and /bin/tr by absolute path. 870 # The qualification host has no unprivileged user namespace (unshare -r: uid_map EPERM), 871 # so they cannot be substituted; the exact host builds (Ubuntu coreutils 9.4-3ubuntu6.3 872 # arm64) are pinned and any other build refuses the row as BLOCKED, never PASS. 873 HOST_CHILD_PINS = { 874 "/bin/true": "`a82c1b5fd392d72148d53992a860224ff3753cb2dc8909e9bdd1620e54ee1b88`", 875 "/bin/echo": "`a54dbac70bf94d2d3163aee0a43aadeb96c15b29713c1443a0514326660dd205`", 876 "/bin/tr": "`8921ec5afe3898e9f1dbe2e0f568d36de759332547aa28874ddd03ff3954e92e`", 877 } 878 _S673 = "seed/qualification/security673/" 879 _RUNS = _S673 + "relational/evidence/" 880 _IMAGES = { # Pinned evidence images; *-native-mut.bin are AArch64 executables. 881 "branch-native-mut": (_RUNS + "run2/public-branch-native-mut.bin", 882 "`3c534a9224fd8ec81f1af1caa48507adb3b01cfc7ab6fdea709a6ee08c6ba5c1`", 0o700), 883 "address-native-mut": (_RUNS + "run2/public-address-native-mut.bin", 884 "`d823b830e66b82b52cf0bc5ee480adacff1957f9a9411413f972ac30f2183417`", 0o700), 885 "branch-mut": (_RUNS + "run2/public-branch-mut.bin", 886 "`cb906d54cb4a1d7940202d567367c6e30eeaa099a981fbabc20574e13721de1a`", 0o600), 887 "compare32": (_RUNS + "run3/compare32.bin", 888 "`df0d1193b9555f3d6a4a1c5bc0e5d04605397000a22d8175e9b9f28965bdb162`", 0o600), 889 "embed": (_RUNS + "run3/embed.bin", 890 "`0f65c747d83fbd34f9058142c2dc68a8147365733c56e18abdd24104e944fe50`", 0o600), 891 "paired": (_RUNS + "run4/paired.bin", 892 "`686096547cda0cbbdf789c67bdc9f7aa7066ee36023af9c2353a262d2e313711`", 0o600), 893 } 894 # renames-corpus.om (sha `9c44348b9cb258195be17e59318d90def4745327baed621b0fc46442f50ad883`) 895 # output for mode byte m, exactly as gate669.om renamescc feeds renames-consumer.om. 896 _REN_SRC = "`0020006275696c642f73656375726974793637332d6e61746976652f72656e2d737263`" 897 _REN_DST = "`20006275696c642f73656375726974793637332d6e61746976652f72656e2d647374`" 898 RENAMES_PACKETS = { 899 0: "02" + _REN_SRC + _REN_DST, 900 1: "01" + _REN_SRC, 901 2: "03" + _REN_SRC + _REN_DST + _REN_DST, 902 3: "020000" + _REN_DST, 903 4: "02" + _REN_SRC + "0000", 904 5: "02" + _REN_SRC + _REN_DST + "00", 905 6: "`020020006275696c640073656375726974793637332d6e61746976652f72656e2d737263`" + _REN_DST, 906 } 907 908 909 # gate669.om (sha `1f0e7222`) execs two absolute host children: /bin/true through pkt-consumer.om and 910 # dispatch-gate.om, and /usr/bin/objdump (Ubuntu binutils-aarch64-linux-gnu 2.42-4ubuntu2.10), the 911 # independent decoder. objdump's shared objects and the loader are pinned with it because they hold the 912 # decoder and its runtime (libc6 2.39-0ubuntu8.9); any other build refuses the row as BLOCKED. 913 GATE669_HOST_PINS = { 914 "/bin/true": HOST_CHILD_PINS["/bin/true"], 915 "/usr/bin/objdump": "`f2e917a5d118ebf5679b24740e20d30338308e7f3f0630527c469de452d5a250`", 916 "/lib/aarch64-linux-gnu/libopcodes-2.42-system.so": "`50dd8b3da6956c691363f04fcd3b3774083749cef2108f152747839f13adcef8`", 917 "/lib/aarch64-linux-gnu/libbfd-2.42-system.so": "`d9d9cc536c3a752ce0fd09e554ce2e31f98a5d42201984a608ed1e577e4ad0de`", 918 "/lib/aarch64-linux-gnu/libctf.so.0": "`be124ffe36abc3d3068092e5a05300aee0c7b9fa6f59acbb289aedae788ddbae`", 919 "/lib/aarch64-linux-gnu/libsframe.so.1": "`c56f579c7f266b5bfcbdc9d448d2a8f1a8223483b390d98e311526598bf29a5d`", 920 "/lib/aarch64-linux-gnu/libz.so.1": "`e3bc90ee8cce46778c2f46c2a3e580d3b930f7b455910f25ea400a0b797fb9dc`", 921 "/lib/aarch64-linux-gnu/libzstd.so.1": "`fe726238b170b83aa83bf1f8a79109b8b61b9eb45234304511d093bbe5f5fb20`", 922 "/lib/aarch64-linux-gnu/libc.so.6": "`0f1905dc27dbc6715875c70527bc8da846a10084c9c483e9d8ff76dce8d69d0e`", 923 "/lib/ld-linux-aarch64.so.1": "`390027e5f45f236bd1838bc54bf464c5ff01d260ab9f8b415ea8276641bce505`", 924 } 925 REVIEWED_HOST_PIN_SETS = (HOST_CHILD_PINS, GATE669_HOST_PINS) 926 # Every repository file gate669.om compiles, executes or reads, by its id in the gate's names table. 927 # Each is copied into private scratch; effect-ok is the committed AArch64 image dispatch-gate execpures. 928 GATE669_INPUTS = { 929 _S673 + "branch-corpus.om": "`7d5ffd00736dbbb14407e4dbb86d34dc8395d93e371a72ee1981f4971ef60760`", 930 _S673 + "branch-mutate.om": "`b7637f58dd565166c246abf7a29c5986fb79f2832ae46bb86a6828cb2890b692`", 931 _S673 + "branch-check.om": "`9f1603358c9f558123f4b17f46f77824676edf3455e9f108a1fa119929c2fe59`", 932 _S673 + "array-fill.om": "`bcfb200a48291c27d4a700ea074e02616a881767c8838a52ad2dfd7b83b52d33`", 933 _S673 + "oracle-corpus.om": "`41118388d232dd6897bebf9b239f4174a2e5054cdd07a4753c4ce60bf7c022fa`", 934 _S673 + "gate-child.om": "`459a60da8e660ee1f433a9679bb41467074fda45997e5168e23e92ebad0d570b`", 935 _S673 + "hostile-corpus.om": "`c11698a1dd4c2373dbed7381fa62417bce9d370cc0c6471a3d7a14f6df0c4b05`", 936 _S673 + "branch-forms.om": "`afcffb8088b8d64388a2754fa290b44d7cc443561097a91e7e25b5b2682b6f11`", 937 _S673 + "packet-corpus.om": "`d53ad5e6e8ca86117b9d3f63faea19c65b11c4e609a767f4439112d61992b633`", 938 _S673 + "pkt-consumer.om": "`62cf8b2980973b551f8a9593be0c1d583be544bc2c5890ad0945be566c984524`", 939 _S673 + "renames-corpus.om": "`9c44348b9cb258195be17e59318d90def4745327baed621b0fc46442f50ad883`", 940 _S673 + "renames-consumer.om": "`4fed8e605272e03994b565fd799136a96ab14239ccc8bc7526c819f3148e6c69`", 941 _S673 + "path-consumer.om": "`9bb5cd0e59d12af8b13de79db7a949b5278263b638309dfc6a86ab77c0382232`", 942 "seed/authority/action-gate.om": "`0ab62ba91d3599d6db89dc429afc1f3821f1dea3b2d8f225cbaa7c2eb01d7e81`", 943 "seed/authority/delegate-gate.om": "`e2e5661459ff55e62ed25eaa32936feba67c847245a779db171e0aebee80086f`", 944 "seed/authority/reuse-gate.om": "`37de7562021caf6439daea12f8039f882dfdb1caf18d74043a3f7d443ade40dd`", 945 "seed/authority/store-gate.om": "`cbbf1025c8e509e2b4b4d60751799d3a4fb63be629e5fecad4b092428b6a2189`", 946 "seed/authority/dispatch-gate.om": "`2c66da93749707e846f68c4d4d401718a2a7432ecc8b5b86deb66b162711a4ea`", 947 "seed/authority/lock-gate.om": "`d79579aa7693b5ae2f567a38129ff5d80ce5fe66da2ae13b82a6889f4b1db837`", 948 "seed/authority/effect-ok": "`4caebbb143d76413098649f9569eadc495aad8ca744a91ba7b29fe1bad4c7471`", 949 "seed/trace/sha256-gate.om": "`71abf0150e94163d139871ec9dc89579e6063f297341a33026d71464835aada5`", 950 } 951 952 953 def host_child_mismatch(pins=HOST_CHILD_PINS): 954 for path, sha in pins.items(): 955 try: 956 observed = digest(Path(path).read_bytes()) 957 except OSError as error: 958 return f"{path} unreadable: {error}" 959 if observed != sha: 960 return f"{path} sha256 {observed} is not the pinned {sha}" 961 return None 962 963 964 def _inputs(*names): 965 return [{"path": _IMAGES[n][0], "sha256": _IMAGES[n][1], "mode": _IMAGES[n][2]} for n in names] 966 967 968 def effect_plan(root, rel, sha): 969 """Plan for a reviewed effect-scratch source; {} when the source is not reviewed here.""" 970 evidence = {"reviewed_source_sha256": sha} 971 plan = {"driver": "effect-scratch", "evidence": evidence} 972 if sha == "`7f0ea5e3a0064457d3f4d12e9e74e664b7f59a4ca90083b8132b779604ff5310`": 973 evidence.update( 974 effect_review="reads at most 8191 stdin bytes; execprog only of the packet's absolute path; every frozen " 975 "packet names /bin/true, /bin/echo or /bin/tr, each pinned in HOST_CHILD_PINS; no file or " 976 "network words", 977 host_children=dict(HOST_CHILD_PINS), 978 exit_authority=_S673 + "packets.cases p12-echo-argv: exit0, stdout packets/p12.out") 979 mismatch = host_child_mismatch() 980 if mismatch: 981 return {"blocker": "BLOCKED_ON pinned host child: " + mismatch, "evidence": evidence} 982 plan.update(stdin=_pinned(root, _S673 + "packets/p12.bin", 983 "`10840966be3580d3ca7ce939bc9ce2be664af39fc679f711aa76b7763da10a2f`"), 984 expected_exit=0) 985 return plan 986 if sha == "`39ff79d87e1e502cb13caaea6e9791a58e02bc7ecb7c27a754360195786c5138`": 987 evidence.update( 988 effect_review="packs argv[1..] and execprogs argv[1]; the only images named are the pinned AArch64 " 989 "evidence images copied into private scratch (sources public-*-main.om have no host words)", 990 effect_inputs=_inputs("branch-native-mut", "address-native-mut"), 991 exit_authority=_S673 + "relational/qualification.cases execute-public-branch-mut-zero: exit7") 992 plan.update(args=(_IMAGES["branch-native-mut"][0],), expected_exit=7) 993 return plan 994 if sha == "`be37db5983ef8b5bda100d1f063be503449fb271c45a87f68084337c1bfe1d86`": 995 evidence.update( 996 effect_review="read-only fopen/read/fclose of argv[1] and argv[2]; the manifest names only pinned " 997 "evidence images, copied into private scratch; stdout write only", 998 effect_inputs=_inputs("compare32", "paired", "embed", "branch-mut", "branch-native-mut"), 999 exit_authority=_S673 + "relational/bindings.cases embed-primitive: exit0, stdout embed.expected") 1000 plan.update(args=(_IMAGES["compare32"][0], _IMAGES["paired"][0]), expected_exit=0) 1001 return plan 1002 if sha in ("`e184cdbc0fbe4d4cb2f2d36d4c159ef7f9fe87bd162d3082209fa32f5dc79252`", 1003 "`e125e57d03dbd2dbb23f592e015396b57a1b1277b6b160a91cbb916c38fc7bfa`"): 1004 control = sha.startswith("e184") 1005 evidence.update( 1006 effect_review="read-only fopen of /proc/self/mem; pread of this process's own stack pool " 1007 "0x10000000..0x10800000 into a private buffer; fclose; no writes", 1008 exit_authority="seed/omc/om2/s5/s5.cases " + ("s5-scrub-ctl: exit10" if control else "s5-scrub-mem: exit0")) 1009 plan.update(expected_exit=10 if control else 0) 1010 return plan 1011 if sha == "`9bb5cd0e59d12af8b13de79db7a949b5278263b638309dfc6a86ab77c0382232`": 1012 evidence.update( 1013 effect_review="mode0 creates build/security673-native/path-ok in private scratch; modes1-3 are refused " 1014 "or failing fopens; modes4-6 argread only", 1015 effect_dirs=["build/security673-native"], 1016 exit_authority=_S673 + "gate669.om pathcc/pathwant: modes1,2,5 exit103, others exit0; argument id1") 1017 args = (_S673 + "branch-corpus.om",) 1018 plan.update(stdin=b"\0", args=args, expected_exit=0, 1019 variants=[{"name": f"gate669-mode{m}", "stdin": bytes([m]), "args": args, 1020 "expected_exit": 103 if m in (1, 2, 5) else 0} for m in range(1, 7)]) 1021 return plan 1022 if sha == "`4fed8e605272e03994b565fd799136a96ab14239ccc8bc7526c819f3148e6c69`": 1023 evidence.update( 1024 effect_review="creates build/security673-native/ren-src in private scratch; renames only names from the " 1025 "pinned renames-corpus packets, all under build/security673-native", 1026 effect_dirs=["build/security673-native"], 1027 exit_authority=_S673 + "gate669.om renamescc/renameswant: mode0 exit0, modes1-6 exit103") 1028 plan.update(stdin=bytes.fromhex(RENAMES_PACKETS[0]), expected_exit=0, 1029 variants=[{"name": f"gate669-mode{m}", "stdin": bytes.fromhex(RENAMES_PACKETS[m]), "args": (), 1030 "expected_exit": 103} for m in range(1, 7)]) 1031 return plan 1032 if sha == "`b784dde3b862bfc7784015377447b3fffd4c6f1a37d04680e03960fbabc5a0de`": 1033 evidence.update( 1034 effect_review="creates synthetic-secret.data in private scratch; pipes; forks one child that execprogs " 1035 "./exec-child (exec-child.om built natively from pinned source) or a missing name; waits " 1036 "for that child only; dupfd to 65537 needs RLIMIT_NOFILE above 65537", 1037 native_child={"source": _S673 + "exec-child.om", 1038 "source_sha256": "`f2519f6be7068cf8af826101febd0f490327916322ac92a648dba9f3380324ec`"}, 1039 nofile=65600, 1040 exit_authority=_S673 + "exec-parent.om notes: modes0 success, 1 missing executable, " 1041 "2 isolate high-descriptor leak; each returns 0 when every assertion holds") 1042 plan.update(stdin=b"\0", expected_exit=0, 1043 variants=[{"name": f"mode{m}", "stdin": bytes([m]), "args": (), "expected_exit": 0} 1044 for m in (1, 2)]) 1045 return plan 1046 if sha == "`95c63d2aa7d69e6e04752279885496060a4152b5c1604ff75d65b201d48c713b`": 1047 evidence.update( 1048 effect_review="run outside execpure: the runner passes only fds 0-2, so read 3 returns -EBADF, not the " 1049 "-1 the strict profile yields, and the program exits 43 before any write, fopen, socknew, " 1050 "fork or execprog arm; those arms run only under the AArch64 execpure evidence", 1051 exit_authority=_S673 + "pure-child.om: read 3 must equal -1 or ret 43") 1052 plan.update(stdin=b"public-input", expected_exit=43) 1053 return plan 1054 if sha == "`1f0e7222556bcc5082be924aedb739427d18dd0f52327766181949a0c82697b0`": 1055 evidence.update( 1056 effect_review="makedir build and build/security673-native in private scratch (refuses an existing one " 1057 "with 91); fopen/fchmod/fclose only of names in its fixed table or numbered files under " 1058 "build/security673-native; fork/execprog of seed/rung4/om4.bin (a copy of the operator " 1059 "compiler), its own numbered AArch64 builds, and the pinned absolute /usr/bin/objdump; " 1060 "grandchildren are pkt-consumer.om and dispatch-gate.om execs of pinned /bin/true, " 1061 "dispatch-gate.om execpure of the pinned effect-ok image, and lock-gate.om/dispatch-gate.om " 1062 "forks writing only build/authority-store; killpid only of an observed fork PID after its " 1063 "30-second deadline; waitpid/sleepns/monons for that deadline. No network or device words", 1064 host_children=dict(GATE669_HOST_PINS), 1065 effect_inputs=[{"path": p, "sha256": s, "mode": 0o700 if p.endswith("effect-ok") else 0o600} 1066 for p, s in GATE669_INPUTS.items()], 1067 compiler_copy="seed/rung4/om4.bin", 1068 subject_source="seed/omc/omc.om", 1069 volatile_stdout_line="elapsed_ns=", 1070 exit_authority=_S673 + "README.md and gate669.om main: full run exit0 after the GATE669 PASS line; " 1071 "argument 3 (#671 hostile ingress) exit0; arguments 0, 1, 2 (child exit7, " 1072 "self-SIGKILL, 45-second sleep past the 30-second deadline) must fail with 99") 1073 mismatch = host_child_mismatch(GATE669_HOST_PINS) 1074 if mismatch: 1075 return {"blocker": "BLOCKED_ON pinned host child: " + mismatch, "evidence": evidence} 1076 for path, pin in GATE669_INPUTS.items(): 1077 item = Path(root) / path 1078 observed = digest(item.read_bytes()) if item.is_file() and not item.is_symlink() else "absent" 1079 if observed != pin: 1080 return {"blocker": f"BLOCKED_ON pinned gate669 input: {path} sha256 {observed} is not the pinned {pin}", 1081 "evidence": evidence} 1082 plan.update(stdin=b"", args=(), expected_exit=0, deadline=300, 1083 variants=[{"name": "hostile671", "stdin": b"", "args": ("3",), "expected_exit": 0}] + 1084 [{"name": f"control{m}", "stdin": b"", "args": (str(m),), "expected_exit": 99} 1085 for m in range(3)]) 1086 return plan 1087 return {} 1088 1089 1090 def plan_case(root, rel, source): 1091 if digest(source) == "`e08ec033bd7d2e71ae272488029354eb447d8f7eed49d0f89d9d4eaf55518cfb`": 1092 return {"driver":"pwrite-text", "expected_exit":0, 1093 "evidence":{"effect_review":"pwrite only to fd1, the runner's private seekable output file; no paths or device access", 1094 "source_authority":"seed/omc/om2/s4/v-pwrite-text.om", 1095 "result_authority":"s4.cases s4-v-pwrite-text: exact ABC newline output and exit0"}} 1096 effect = effect_plan(root, rel, digest(source)) 1097 if effect: 1098 return effect 1099 sha = digest(source) 1100 if sha not in REVIEWED_SOURCES: 1101 return {} 1102 evidence = {"review_revision":REVIEW_REVISION,"reviewed_source_sha256":sha, 1103 "source_spec":REVIEWED_SOURCES[sha]} 1104 if not MAIN.search(source): 1105 evidence["effect_review"] = "arithmetic/array/private-memory only, except pinned stdout write helpers" 1106 return {"driver":"bare-private-abi","evidence":evidence} 1107 if sha in PURE_NAME_CONTROLS: 1108 evidence["effect_review"] = "open is abstract-value opening or an OM-1 identifier; not a host file operation; only stdout writes" 1109 override = source 1110 if b"puth " in source and not re.search(rb"(?m)^fn puth ",source): 1111 override += _pinned(root,*HELPERS["pr"]) 1112 evidence["appended_helper"] = HELPERS["pr"] 1113 elif b"putu " in source and not re.search(rb"(?m)^fn putu ",source): 1114 override += _pinned(root,*HELPERS["putu"]) 1115 evidence["appended_helper"] = HELPERS["putu"] 1116 elif b"putd " in source and not re.search(rb"(?m)^fn putd ",source): 1117 override += _pinned(root,*HELPERS["pr"]) 1118 evidence["appended_helper"] = HELPERS["pr"] 1119 plan = {"source":override,"driver":"pure-name-control","evidence":evidence} 1120 if sha == "`e1109db40b1ab3f8b7c5b847bb9032810fc3dcf836ec58a0caf5459033636764`": 1121 plan["expected_exit"] = 110 1122 evidence["exit_authority"] = "seed/omc/om2/s3/s3.cases s3-a-kept" 1123 elif sha == "`92c7813513f2bb511bbacc53e1a351a417cabc10139134e477bfb61483005c92`": 1124 plan["expected_exit"] = 5 1125 evidence["exit_authority"] = "seed/omc/om2/s3/s3.cases s3-a-om1" 1126 elif sha in ("`0ec2b5eb427d759eb7563f9dbf8cd1a921a23b9e80c9d7f779315490b23f274c`", "`c0c8cd2d3c8c9fe4e1cb8f9cfebb5af8d5c625368db1d9af713b0acb33504b24`"): 1127 plan["expected_exit"] = 110 1128 evidence["exit_authority"] = "seed/qualification/om2/candidates/s4/export/sec5.cases a5-kept" 1129 elif sha in ("`1e0a5f4c22cee6170a7f6787fb6c1cc215e1ff9aa0e997bc8f7450c06b3a072b`", "`d7df44a4f803645594ec1e758201d8e1c672c4ebe94c553ed9b4cdca98bb4607`"): 1130 plan["expected_exit"] = 107 1131 evidence["exit_authority"] = "seed/qualification/om2/candidates/s4/export/sec5.cases a5-rot64" 1132 return plan 1133 if sha == "`2fe76d4c44b3e3faf6bfd250ebec794ba5b3d11b6b9199366549b664d219cc38`": 1134 evidence["effect_review"] = "opens /dev/null write-only; overflowing slice must trap before write; original guard.cases requires exit103" 1135 return {"driver":"slice-wrap-control","expected_exit":103,"evidence":evidence} 1136 if sha == "`7bce001ac35fee18b0205df59aeeaea62b1d2eea68e336c0262ad3741f40028e`": 1137 evidence["effect_review"] = "private cwd only: subdir/inside/mode2.tmp, child-local umask, local stat/fchdir, unlink cleanup" 1138 return {"driver":"fchdir","expected_exit":0,"evidence":evidence} 1139 if sha == "`79857ee82002d11d3df4c0c2a99523aa3419d18c5fc188a41efc778887b4baa3`": 1140 evidence["effect_review"] = "argc1 stdin-only BLAKE3 path; filename fopen arm not entered" 1141 return {"driver":"hash-stdin","stdin":b"abc","expected_exit":0,"evidence":evidence} 1142 if sha == "`459a60da8e660ee1f433a9679bb41467074fda45997e5168e23e92ebad0d570b`": 1143 evidence["effect_review"] = "mode0 consumes one zero byte and exits7, no signal or sleep; mode1 selfSIGKILL/mode2 deadline are conductor controls" 1144 return {"driver":"supervisor-child","stdin":b"\0","expected_exit":7,"evidence":evidence} 1145 if sha == "`01fb867723854f43838a814a8571107e6fea2afba12444f57f35c9012741111d`": 1146 evidence["effect_review"] = "SIGKILL targets getpid() of this isolated child only; original conductor must classify INVALID, not PASS" 1147 evidence["required_conductor_verdict"] = "INVALID signal" 1148 return {"driver":"supervisor-self-signal","expected_exit":-9,"evidence":evidence} 1149 if sha == "`716c1dc3004d55178e09e7c40fa0995f993eea8611e09a70a1f74b9c7a0cf644`": 1150 evidence["effect_review"] = "child-local five-second nanosleep; original deadline1 conductor must classify INVALID" 1151 evidence["required_conductor_verdict"] = "INVALID timeout" 1152 return {"driver":"supervisor-self-sleep","expected_exit":0,"evidence":evidence} 1153 if sha == "`07bc11a69f0d629e0c262056061789114d8710505a308e3e2a5ac42ae73dee94`": 1154 evidence["effect_review"] = "nested compiler/decoder gate; copied allowlist only, private children killed only by observed fork PID; all build writes private" 1155 return {"driver":"security673-gate","expected_exit":0,"evidence":evidence} 1156 if sha == "`d4801acf04a44467bac5e1bedfc502b20afe009d8065079ae5880e987b0899a7`": 1157 evidence["effect_review"] = "pure arithmetic loop, no host words; deliberately non-terminating CPU exhaustion" 1158 evidence["exit_authority"] = "seed/qualification/security673/README.md: CPU exhaustion dies with SIGXCPU (152) under the one-second limit" 1159 return {"driver":"cpu-limit","expected_exit":-24,"evidence":evidence} 1160 if sha == "`250361be99ced1246405b2e4a2e2de71373a90d0a0569fb43821ed8b106e045f`": 1161 evidence["effect_review"] = "nested compiler gate; exact hash argument checked before cases; default original pass.cases copied with pinned inputs" 1162 return {"driver":"corpus-gate","expected_exit":0,"evidence":evidence} 1163 return {} 1164 1165 1166 def prepare_case(root, work, driver, compiler, *, case=None): 1167 """Prepare only copied content-pinned dependencies in architecture-local cwd. 1168 1169 Returns argv (excluding executable). Does not execute any binary. Original 1170 conductors see a repository-shaped PRIVATE scratch, never the live checkout. 1171 Caller-supplied manifests require a complete pinned transitive resource list; 1172 the caller remains responsible for reviewing every source's host effects. 1173 """ 1174 root,work,compiler = Path(root),Path(work),Path(compiler) 1175 if driver not in ("security673-gate","corpus-gate","effect-scratch"): 1176 return () 1177 if root.resolve()==work.resolve() or root.resolve() in work.resolve().parents: 1178 raise ValueError("conductor scratch must be outside the source checkout") 1179 if driver == "effect-scratch": 1180 case = case or {} 1181 if "host_children" in case: 1182 pins = case["host_children"] 1183 if pins not in REVIEWED_HOST_PIN_SETS: 1184 raise ValueError("BLOCKED_ON pinned host child: reviewed pin set changed") 1185 mismatch = host_child_mismatch(pins) 1186 if mismatch: 1187 raise ValueError("BLOCKED_ON pinned host child: " + mismatch) 1188 for rel in case.get("effect_dirs", []): 1189 if Path(rel).is_absolute() or ".." in Path(rel).parts: 1190 raise ValueError("unsafe effect scratch directory") 1191 (work/rel).mkdir(parents=True, exist_ok=True) 1192 for item in case.get("effect_inputs", []): 1193 rel = item["path"] 1194 if Path(rel).is_absolute() or ".." in Path(rel).parts: 1195 raise ValueError("unsafe effect input path") 1196 dest = work/rel 1197 dest.parent.mkdir(parents=True, exist_ok=True) 1198 dest.write_bytes(_pinned(root, rel, item["sha256"])) 1199 dest.chmod(item["mode"]) 1200 if "compiler_copy" in case: 1201 # The operator-selected compiler, trusted as the qualification's oracle input, as the gate's om4.bin. 1202 dest = work/case["compiler_copy"] 1203 if Path(case["compiler_copy"]).is_absolute() or ".." in Path(case["compiler_copy"]).parts: 1204 raise ValueError("unsafe compiler copy path") 1205 dest.parent.mkdir(parents=True, exist_ok=True) 1206 shutil.copyfile(compiler, dest) 1207 dest.chmod(0o700) 1208 case["compiler_copy_sha256"] = digest(dest.read_bytes()) 1209 if "subject_source" in case: 1210 # The source the gate qualifies (it rebuilds itself twice and compares); not an effect input. 1211 rel = case["subject_source"] 1212 if Path(rel).is_absolute() or ".." in Path(rel).parts: 1213 raise ValueError("unsafe subject source path") 1214 data = (root/rel).read_bytes() 1215 (work/rel).parent.mkdir(parents=True, exist_ok=True) 1216 (work/rel).write_bytes(data) 1217 case["subject_source_sha256"] = digest(data) 1218 return () 1219 resources = dict(RESOURCE_PINS) 1220 if driver == "security673-gate": 1221 resources = {p:s for p,s in resources.items() if p.startswith("seed/qualification/security673/")} 1222 else: 1223 resources = {p:s for p,s in resources.items() if not p.startswith("seed/qualification/security673/")} 1224 resource_specs = {} 1225 if case: 1226 for item in case.get("resources",[]): 1227 rel = item["path"] 1228 if Path(rel).is_absolute() or ".." in Path(rel).parts: 1229 raise ValueError("unsafe oracle resource path") 1230 resources[rel] = item["sha256"] 1231 resource_specs[rel] = item 1232 for rel,sha in resources.items(): 1233 item = resource_specs.get(rel,{}) 1234 if "git_revision" in item: 1235 import subprocess 1236 revision = item["git_revision"] 1237 gitpath = item.get("git_path",rel) 1238 if not re.fullmatch(r"[0-9a-f]{40}",revision): 1239 raise ValueError("historical oracle needs a full exact Git revision") 1240 if Path(gitpath).is_absolute() or ".." in Path(gitpath).parts: 1241 raise ValueError("unsafe historical Git path") 1242 blob = subprocess.check_output( 1243 ["git","show",revision+":"+gitpath],cwd=root) 1244 elif "pack_path" in item: 1245 packpath = item["pack_path"] 1246 if Path(packpath).is_absolute() or ".." in Path(packpath).parts: 1247 raise ValueError("unsafe frozen-pack path") 1248 offset,length = item["offset"],item["length"] 1249 if not isinstance(offset,int) or not isinstance(length,int) or offset<0 or length<0: 1250 raise ValueError("invalid frozen source byte range") 1251 with (root/packpath).open("rb") as packed: 1252 packed.seek(offset) 1253 blob = packed.read(length) 1254 if len(blob)!=length: 1255 raise ValueError("frozen source byte range is incomplete") 1256 else: 1257 blob = _pinned(root,rel,sha) 1258 if digest(blob)!=sha: 1259 raise ValueError("historical oracle resource digest mismatch: "+rel) 1260 dest = work/rel 1261 dest.parent.mkdir(parents=True,exist_ok=True) 1262 dest.write_bytes(blob) 1263 native = work/"seed/rung4/om4.bin" 1264 native.parent.mkdir(parents=True,exist_ok=True) 1265 shutil.copyfile(compiler,native) 1266 native.chmod(0o700) 1267 if driver=="security673-gate": 1268 # The operator-selected compiler is trusted only as this oracle input. 1269 # It compiles the current compiler source; parent owns that source review. 1270 dest=work/"seed/omc/omc.om" 1271 dest.parent.mkdir(parents=True,exist_ok=True) 1272 dest.write_bytes((root/"seed/omc/omc.om").read_bytes()) 1273 (work/"build").mkdir(exist_ok=True) 1274 return () 1275 manifest = (case or {}).get("manifest","seed/qualification/om2/selftest/pass.cases") 1276 if manifest not in resources: 1277 raise ValueError("manifest absent from reviewed pinned resource list") 1278 return ("./"+native.relative_to(work).as_posix(),digest(native.read_bytes()),manifest,"conductor-evidence") 1279 1280 1281 def cubin_calls(source, *, expected_image=None): 1282 """Full-sized actual cubin unit ABI; no substituted small-array declaration. 1283 1284 The positive metadata and EXIT bytes are the original host-only 1285 tests/ampere_cubin_test.c vector. The independent expected_image, if supplied, 1286 must be that conductor's C-oracle output, never a candidate-generated image. 1287 The negative vector is the original unit's explicit unsupported-target arm: 1288 its private return is 1 (not the public C wrapper's OMEGA_CUBIN_E_TARGET=8). 1289 """ 1290 pin = "`3611fd7bf1a560b6cf1075cfeb15b4b17496a388d837d886280c8cb80f301646`" 1291 if digest(source)!=pin: 1292 raise ValueError("unreviewed cubin unit source") 1293 metadata = [11,16,1,1024,8,0,86,0,352,8,1]+[0]*93 1294 text = bytes.fromhex("`4d790000000000000000800300ea0f00`") 1295 evidence = {"source_sha256":pin,"source":"om/cubin/cubin_elf.om", 1296 "conductor":"tests/ampere_cubin_test.c", 1297 "conductor_sha256":"`51db6a2e78a6c597b4a46808083d85674312a99df3198449f45d814b891885e8`", 1298 "effects":"pure array reads/writes; no CUDA, GPU, driver, service or process call", 1299 "storage":"original 16-MiB text and `16777216`-ulong output in external ELF/BSS mapping; owned stack unchanged"} 1300 def make(name,values): 1301 arrays = [{"name":"metadata","size":832,"data":struct.pack("<104Q",*values),"observe":False}, 1302 {"name":"name","size":64,"data":b"ampere_exit","observe":False}, 1303 {"name":"text","size":`16777216`,"data":text,"observe":False}, 1304 {"name":"output","size":`134217728`,"data":b"","return_bytes":True}] 1305 return {"name":name,"entry":0,"slots":[{"array":i} for i in range(4)], 1306 "arrays":arrays,"result":"ulong","expected_exit":0,"evidence":dict(evidence)} 1307 positive = make("cubin-sm86-full-external-abi",metadata) 1308 if expected_image is not None: 1309 if not isinstance(expected_image,bytes) or len(expected_image)<=7 or len(expected_image)>`134217728`: 1310 raise ValueError("invalid independent C-oracle image") 1311 positive["expected_stdout"] = struct.pack(" 1341 #include 1342 #include 1343 uint32_t omega2_vcnt(uint64_t *, const void *, uint64_t); 1344 int main(void) { 1345 uint64_t r = UINT64_C(0x5555555555555555); 1346 uint32_t s = omega2_vcnt(&r, (const void *)(uintptr_t)1, 0); 1347 printf("status=%" PRIu32 " result=%016" PRIx64 "\n", s, r); 1348 return 0; 1349 } 1350 ''' 1351 1352 1353 def bridge_plan(root, name): 1354 """Exact original C-boundary obligations, not composed-main substitutes. 1355 1356 The runner executes the shared original driver once per architecture and 1357 records each named line separately. Mutants change generated scratch C only. 1358 Gate negatives run the unchanged original script with its exact old tools; 1359 fresh unmodified regeneration is a required positive control. 1360 """ 1361 review = DIRECTIVE_REVIEWS.get(name) 1362 if review is None: 1363 return {} 1364 label = name.rsplit(":",1)[-1] 1365 if not label.startswith(("abi-","sha-")) and label not in ("mut-e-ident","mut-f-abi-len"): 1366 return {} 1367 _pinned(root,name.split(":",1)[0],review["manifest_sha256"]) 1368 def resource(path,sha): 1369 _pinned(root,path,sha) 1370 return {"path":path,"sha256":sha} 1371 units = [resource(path,sha) for path,sha in BRIDGE_UNIT_PINS.items()] 1372 evidence = dict(review,review_revision=REVIEW_REVISION, 1373 boundary="actual generated SysV C bridge; private-body coverage remains separate") 1374 common = {"selector":label,"units":units,"args":(BRIDGE_UNIT_PINS[units[0]["path"]], 1375 BRIDGE_UNIT_PINS[units[1]["path"]],"$COMPILER_SHA256"), 1376 "cflags":("-std=gnu11","-O2","-Wall","-Wextra","-Werror"), 1377 "driver":ABI_DRIVER[0],"driver_sha256":ABI_DRIVER[1], 1378 "resources":[resource(*ABI_DRIVER)],"expected_exit":0, 1379 "required_line_prefix":"PASS "+label+" ","cache_key":"abi-v2-original-driver", 1380 "operation":"c-driver","evidence":evidence} 1381 if label.startswith("sha-"): 1382 common.update(units=[resource("om/sha256/sha256-om2.om",CURRENT_SHA256)], 1383 driver=SHA_DRIVER[0],driver_sha256=SHA_DRIVER[1], 1384 resources=[resource(*SHA_DRIVER),resource( 1385 "seed/qualification/om2/oracle/s5s7/sha/expected.h", 1386 "`26771c6e1033babb8736dad7751e3a7bd69161779462486e623d91166b4a6495`")], 1387 args=("big",) if label.startswith("sha-big-") else (), 1388 cflags=common["cflags"]+('-DGENHDR="omega_api.h"',), 1389 cache_key="sha-original-driver-big" if label.startswith("sha-big-") else "sha-original-driver") 1390 evidence["effects"] = ("caller-local arrays, stdout; big mode additionally read-only anonymous " 1391 "MAP_NORESERVE `4294967299`-byte zero mapping, released with munmap; no file/device/network") 1392 evidence["oracle"] = "original sha_driver.c and pinned expected.h; no rewritten digest expectations" 1393 return common 1394 if label == "abi-misaligned-len0": 1395 common.update(operation="c-driver",driver=None,driver_sha256=digest(Q5_DRIVER), 1396 driver_source=Q5_DRIVER,args=(),required_line_prefix=None, 1397 cache_key="abi-q5-native-behavior") 1398 evidence.update(contract_status="Q5_UNRESOLVED",oracle="exact pinned native bridge behavior", 1399 evidence_kind="differential_only",scope="differential_only", 1400 conformance_status="UNASSERTED",original_not_run_reason=review["reason"], 1401 observation="both uint32 status and full uint64 result sentinel, pointer1 length0") 1402 return common 1403 if label == "abi-v1-absent": 1404 common.update(operation="negative-link", 1405 driver="seed/qualification/om2/oracle/s5s7/abi/v1link.c", 1406 driver_sha256="`a50ceb8b1ec9bbe1dfd824e680d5af62bc1a29673ea797e5566c9d4b94549f54`", 1407 resources=common["resources"]+[resource( 1408 "seed/qualification/om2/oracle/s5s7/abi/v1link.c", 1409 "`a50ceb8b1ec9bbe1dfd824e680d5af62bc1a29673ea797e5566c9d4b94549f54`")], 1410 args=(),expected_exit=1,undefined_symbol="omega_vsum", 1411 forbidden_symbols=("omega_vsum",),positive_control="abi-v2-original-driver", 1412 required_line_prefix=None,cache_key=label) 1413 return common 1414 if label == "abi-v1-kept": 1415 common.update(operation="symbols",args=(),required_symbols=("omega_madd1",), 1416 forbidden_symbols=("omega2_ident_abi1",),required_line_prefix=None,cache_key=label) 1417 return common 1418 if label.startswith("abi-units-stale-"): 1419 identity = ("unit=sha256_om2 abi=2 profile=OM-2 src="+CURRENT_SHA256+ 1420 " omc="+STRICT_OMC_SHA256).encode() 1421 mutations = { 1422 "abi-units-stale-source":{"path":"om/sha256/sha256-om2.om","append":b"note strict stale-source negative control\n"}, 1423 "abi-units-stale-omc":{"path":"src/omega_om_units.ident","old":identity, 1424 "new":identity.replace(STRICT_OMC_SHA256.encode(),b"0"*64),"count":1}, 1425 "abi-units-stale-profile":{"path":"src/omega_om_units.ident","old":identity, 1426 "new":identity.replace(b"profile=OM-2",b"profile=OM-1"),"count":1}, 1427 } 1428 common.update(operation="units-check",units=[],args=("--check",),expected_exit=1, 1429 resources=[{"path":path, "sha256":sha, 1430 "git_revision":"`6999fa9e6dae4847c155ef4eacaece74f491d3ca`", 1431 "git_path":path} for path,sha in STRICT_UNIT_PINS.items()], 1432 script="om/units.sh",script_sha256=STRICT_UNIT_PINS["om/units.sh"], 1433 strict_compiler={"git_revision":"`6999fa9e6dae4847c155ef4eacaece74f491d3ca`", 1434 "git_path":"seed/out/omc","sha256":STRICT_OMC_SHA256}, 1435 strict_generator={"git_revision":"`431fff0a95f84c0a8bf9d3383f94d7e1f02d913e`", 1436 "git_path":"src/native.om","sha256":STRICT_NATIVE_SHA256}, 1437 mutation=mutations[label],positive_control_expected_exit=0, 1438 required_line_prefix=None,cache_key=label) 1439 evidence["scope"] = "unchanged original host regeneration gate, not execution of historical AArch64 bindings on x86" 1440 evidence["effects"] = "private copied tree, private temporary directory, pinned compiler/generator, cmp; no production source writes" 1441 return common 1442 if label in ("mut-e-ident","mut-f-abi-len"): 1443 if label=="mut-e-ident": 1444 mutation={"old":b"omega-ident 1 unit=abiv abi=2 profile=OM-2 ", 1445 "new":b"omega-ident 1 unit=abiv abi=2 profile=OM-1 ","count":1} 1446 failure="abi-ident-abiv" 1447 else: 1448 mutation={"old":b" || n * es > UINTPTR_MAX - lo)","new":b")","count":1} 1449 failure="abi-golden-wrap" 1450 common.update(operation="bridge-mutant",mutation=mutation,expected_exit=1, 1451 required_line_prefix="FAIL "+failure+" ",cache_key=label, 1452 positive_control="abi-v2-original-driver") 1453 evidence["mutation_scope"] = "generated scratch library only; original C driver unchanged and must reject named defect" 1454 return common 1455 evidence["effects"] = "private caller arrays, stdout, local SIGALRM handler/timer for original reentry control; no external target" 1456 return common 1457 1458 1459 OBSERVATION_PINS = { 1460 "seed/qualification/om2/sec/s0s2/s1/d-mid-short.om":"`b12cc48ac207fef5c86c8406a971b4ec2596d493be516c477a32ade42dd58200`", 1461 "seed/qualification/om2/sec/s0s2/s2fmt/hdr.txt":"`c5f1a15eb746bb6e0473518946c3193dce0b0dbf50ed56b5d9151fefa874d5e9`", 1462 "seed/qualification/om2/sec/s0s2/s2fmt/bad-trailblank.om":"`4f9083797899a877907e1bd6697c85723c25e85be2630d5c807261ce732569d7`", 1463 "seed/qualification/om2/sec/s3s4/fold-trap-diag.om":"`b74f2ab21a3c441563a39474d3c962946e18bdee53120f077378fb7f2bab28f5`", 1464 "seed/qualification/om2/sec/s3s4/lib-pu.om":"`28883f52212233aa4bc76182dec3733ad550f209a109a7bd57f5c4227a373e10`", 1465 "seed/qualification/om2/oracle/s3s4/exp/fold-trap-A.out":"`94d59b76e5b10f74d285313f8c69cc4799f538481dbc05edb8dc62f7a59f6eab`", 1466 } 1467 1468 1469 def observation_plan(root, name): 1470 """Execute reachable original probes without inventing unresolved wording. 1471 1472 These are exact native-compiler differential observations, not a resolution 1473 of Q2/Q3's human-line ambiguity or an architecture-independent stub count. 1474 The original public-contract limitation remains in every evidence record. 1475 """ 1476 review = DIRECTIVE_REVIEWS.get(name) 1477 if review is None: 1478 return {} 1479 _pinned(root,name.split(":",1)[0],review["manifest_sha256"]) 1480 label = name.rsplit(":",1)[-1] 1481 def read_source(paths): 1482 return b"".join(_pinned(root,path,OBSERVATION_PINS[path]) for path in paths) 1483 evidence = dict(review,review_revision=REVIEW_REVISION, 1484 contract_status="UNRESOLVED_ORIGINAL_WORDING",conformance_status="UNASSERTED", 1485 evidence_kind="differential_only",scope="differential_only", 1486 original_not_run_reason=review["reason"],oracle="exact pinned native compiler observation", 1487 effects="compiler diagnostics; program probe additionally stdin byte and stdout only") 1488 if label == "s1-d-mid-short-line": 1489 paths=["seed/qualification/om2/sec/s0s2/s1/d-mid-short.om"] 1490 evidence["source_pins"]={path:OBSERVATION_PINS[path] for path in paths} 1491 return {"source":read_source(paths),"operation":"emit","driver":"contract-observation", 1492 "expected_compile":"4","expected_exit":4,"evidence":evidence} 1493 if label == "s2-fmt-bad-trailblank-line": 1494 paths=["seed/qualification/om2/sec/s0s2/s2fmt/hdr.txt", 1495 "seed/qualification/om2/sec/s0s2/s2fmt/bad-trailblank.om"] 1496 evidence["source_pins"]={path:OBSERVATION_PINS[path] for path in paths} 1497 return {"source":read_source(paths),"operation":"emit","driver":"contract-observation", 1498 "expected_compile":"6","expected_exit":6,"evidence":evidence} 1499 if label == "program-site-table": 1500 paths=["seed/qualification/om2/sec/s3s4/fold-trap-diag.om", 1501 "seed/qualification/om2/sec/s3s4/lib-pu.om"] 1502 expected_path="seed/qualification/om2/oracle/s3s4/exp/fold-trap-A.out" 1503 expected=_pinned(root,expected_path,OBSERVATION_PINS[expected_path]) 1504 evidence.update(source_pins={path:OBSERVATION_PINS[path] for path in paths}, 1505 stdout_sha256=digest(expected),stdin_hex="41", 1506 compiler_stderr_comparison="source-site-records", 1507 compile_observation="original source-level site records; raw target-specific runtime-stub tables retained as observations", 1508 site_source_lines=[20,23,39,44,49,54,59,64,70], 1509 runtime_authority="candidate.cases fold-trap-A; constant divide-by-zero at first unrolled iteration") 1510 return {"source":read_source(paths),"operation":"run","driver":"program-site-observation", 1511 "stdin":b"A","expected_compile":"accept","expected_exit":102, 1512 "stdout_oracle":"file:"+expected_path,"evidence":evidence} 1513 return {} 1514 1515 1516 def bridge_positive_plan(root, plan): 1517 """Original, unmodified ABI driver for link/mutant positive controls.""" 1518 if plan.get("operation") not in ("negative-link","bridge-mutant") or plan.get("positive_control")!="abi-v2-original-driver": 1519 raise ValueError("no reviewed ABI positive control for this plan") 1520 positive = bridge_plan(root,"seed/qualification/om2/sec/s5s7/candidate.cases:186:abi-vsum-ok") 1521 if positive["units"]!=plan["units"]: 1522 raise ValueError("negative control and positive control unit identities differ") 1523 return positive