diff --git a/research/h25-v03-bounded-prefix-caller/LICENSE b/research/h25-v03-bounded-prefix-caller/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/research/h25-v03-bounded-prefix-caller/MANIFEST.json b/research/h25-v03-bounded-prefix-caller/MANIFEST.json new file mode 100644 index 0000000000..0d43c6ad46 --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/MANIFEST.json @@ -0,0 +1,252 @@ +{ + "files": { + "LICENSE": { + "bytes": 11357, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + }, + "NOTICE.md": { + "bytes": 1232, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "0823fea36de63897030e51760a0ad892888e3c1fa34d8d9c5d3b4dfd55fd40e0" + }, + "NOTICE.upstream": { + "bytes": 24973, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "b49022cb4104d90b182e4c335f670faf45529025b15db77bf0291835083c28bd" + }, + "PATH-ADAPTER-v1.json": { + "bytes": 1747, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "e976a6cbf2eaea5e2862ac5d1da9f9f548b8bd4e4fac2955deb1930f54f81ad2" + }, + "README.md": { + "bytes": 6926, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "8df06f95f9c9aa55b9f183ce41a5dcca40cb625f56e6a41e6511ee9626d27b51" + }, + "SOURCE-ORIGINS-v1.json": { + "bytes": 21862, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "6bd4a45a93c9c8839e2db5cdfa0bd183c23ede2698c9bb07b307ae04c7b7c8e4" + }, + "SOURCE-PRESERVATION-v1.json": { + "bytes": 1341, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "bbfd736ba53b993855549642e8f922f58e9c5d5a4ec3ac55440e0988c6053ccb" + }, + "SOURCES.json": { + "bytes": 1736, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "4f7b681e0c3e930310880956d4a0ac4606316fb49480999a19c66939328044b7" + }, + "TASK.json": { + "bytes": 4252, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "4bdea07d79963a3acf3324632da2223a17574368d9aada02a3f438ce24aa9f43" + }, + "VERIFY.json": { + "bytes": 774, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "a0c47103e68a7ff8f3f31effa363476bebd68e3adf6da34b4eb46f15543c0bc3" + }, + "archive/unit06/SOURCE-CLOSE-v1.json": { + "bytes": 2599, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "7cac80142264ca41f80be6fa7ea4a0b268cd2ce6c44ff2755f0cb3294c59fd9b" + }, + "archive/unit06/fixtures/caller_T0_support.py.txt": { + "bytes": 9574, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "c20523438a6bb49ef43ea527cf6c96a07542cadea72a77eb822c54f8f64fb863" + }, + "archive/unit06/fixtures/caller_original_wrapper.py.txt": { + "bytes": 11023, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "ea4c07337ccc1865accfd1b1fe485d51057a04a49e4bfb5f10cc36dc92b5f9a8" + }, + "archive/unit06/fixtures/caller_preservation_v1.json": { + "bytes": 2024, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "7d9c3d9b1e3742adeda2f54ed249e1791a3bf0b7fad354feb94d2e7a8086f5f0" + }, + "archive/unit06/implementation/predecessor_entry.py": { + "bytes": 21857, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "b783c6812a6295069456cfb4187d4e09bb7acbcb20fffd76e0c10267f90c1201" + }, + "archive/unit06/implementation/run_queue4_prefix_v1.py": { + "bytes": 34412, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "90a7ed4a45b94e16fa313623e56f6f3efcd85f3ea40355a43b289d8c49a75825" + }, + "archive/unit06/prerequisites/h25_parent_supervisor.py.txt": { + "bytes": 23047, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "cfb09a18dd10b597cc6d5a8139ee769bef679bc44ae029329755e3d97b055075" + }, + "archive/unit06/review-caller-source-v2.json": { + "bytes": 4061, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "37c9f79c9f836fa14ea88d1ae5790b2ce350361699e848f35e2faebe6549c8b6" + }, + "archive/unit06/review-caller-source-v2.md": { + "bytes": 3650, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "6fd0b3f5c47ffe81ccd362a526f37c15d18d762b0c5f0464977f93fac18d89b2" + }, + "archive/unit07/AUTHOR-COLD-RUN-v2.md": { + "bytes": 5093, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "9b8063645adaf8699b38a72908432271e8ad45f544d01fedf28f994947aff1f5" + }, + "archive/unit07/AUTHOR-RECEIPT-v2.json": { + "bytes": 13968, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "62c0ab10cf8d97364aaee811642c6e405ef127b10ab0032205f1b51905aba333" + }, + "archive/unit07/INPUT-CALLER-v2.json": { + "bytes": 1434, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "1f33892a73c1a394620857029be8a40683ff811c5aa4d830430f2f86a6a66523" + }, + "archive/unit07/P3-ACCEPTANCE-OBSERVATION-v1.json": { + "bytes": 537, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "81b5735d7bed9edebb5564efa6d1f1bb1393d19f8174600efa351c0140ca0829" + }, + "archive/unit07/SOURCE-CLOSE-v1.json": { + "bytes": 2360, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "6a808f0a52ef6184cd738afdf3def5ac929f046b51fd8d996b1cfc5e00c39096" + }, + "archive/unit07/fixtures/caller_basis_unit06_90a.py.txt": { + "bytes": 34412, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "90a7ed4a45b94e16fa313623e56f6f3efcd85f3ea40355a43b289d8c49a75825" + }, + "archive/unit07/fixtures/caller_bounded_T0_prefix_48bc.py.txt": { + "bytes": 9878, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "48bc4009acb7569fb4a2ac529bec928a3aafdedc017a0ebaae97f72b7c97eabe" + }, + "archive/unit07/fixtures/caller_control_source_v1.json": { + "bytes": 931, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "5e41744615206c2fe9e57b92254294a61aeb6205c7bd08d9c5ad7746ec622494" + }, + "archive/unit07/fixtures/caller_delta_design_v1.json": { + "bytes": 8375, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "8d5107a1fa480a0865d319a6f84c09bb9311fc0a01c204429fce66b338926cb8" + }, + "archive/unit07/fixtures/caller_execution_linkage_v1.json": { + "bytes": 1722, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "f007c6951237a956b00b37ea546a29c19fe654e8febd204dbc0eb143f4e57214" + }, + "archive/unit07/fixtures/caller_initial_candidate_v2.py.txt": { + "bytes": 34716, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "25138c2c998762649c6a61cb8a6ae8aacd81bd533591b082ab6f58def712fca2" + }, + "archive/unit07/fixtures/caller_initial_controls_v1.py.txt": { + "bytes": 14236, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "310fe5a31db4c4ac2bab0794a1633ec2061e8f97de654f9701b019185b138765" + }, + "archive/unit07/fixtures/caller_initial_freeze_v1.json": { + "bytes": 1523, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "2c5cbf9d644a50c755d58cbb654ed3901302210a311df1bf8d3eee51606d178a" + }, + "archive/unit07/fixtures/caller_new_controls_v1.py": { + "bytes": 14236, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "310fe5a31db4c4ac2bab0794a1633ec2061e8f97de654f9701b019185b138765" + }, + "archive/unit07/fixtures/caller_resource_bill_v1.json": { + "bytes": 3600, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "b22dc7fa984657ced87fe37052f38a10dc1fa0d61b2509715603514fe52fbdff" + }, + "archive/unit07/fixtures/preparer_executed_caller_v1.normal.txt": { + "bytes": 1729, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "43916b1a8cc23a845e6045beb69585a9d0dc21e5f873b5e75a5c5cecbcf01354" + }, + "archive/unit07/fixtures/preparer_executed_caller_v1.optimized.txt": { + "bytes": 1729, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "fb6ecad1f8860334c46616a38f8d14bf8e37c9ba39016b41a8f40001c52ee374" + }, + "archive/unit07/implementation/run_queue4_prefix_v2.py": { + "bytes": 34716, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "25138c2c998762649c6a61cb8a6ae8aacd81bd533591b082ab6f58def712fca2" + }, + "archive/unit07/review-caller-P3-v1.json": { + "bytes": 5719, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "f61464ed7496af2ae47414bcdfad2f63e773563411c4e70a2fc8955442e7b089" + }, + "archive/unit07/review-caller-P3-v1.md": { + "bytes": 3588, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "1c74424601982d24f731e99e9b98c8331913d8cd7799e1df926ae367a543f184" + }, + "run.py": { + "bytes": 4739, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "03820665bd9e50c5539c43f1e2ac7050378e6d82876a12a3834bba3e7e0fc66d" + }, + "verify.py": { + "bytes": 7249, + "intended_git_mode": "100644", + "posix_mode": 420, + "sha256": "71f0e958d1287c732cb0f5d6892adf8d1678158b779f7eef7919294e261d3261" + } + }, + "schema": "bounded-caller-complete-package-manifest-v1", + "scope": "Every package file except this manifest. All source snapshots retain exact bytes; no runtime outputs." +} diff --git a/research/h25-v03-bounded-prefix-caller/NOTICE.md b/research/h25-v03-bounded-prefix-caller/NOTICE.md new file mode 100644 index 0000000000..40da30a0f1 --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/NOTICE.md @@ -0,0 +1,7 @@ +# Attribution and licenses + +Chris R / Clear1nsight, with substantial ChatGPT Pro / OpenAI Codex / GPT-6.1 Sol Max assistance in source consultation, implementation, independent agent review and publication preparation. Preserve original authors, PR6321 / PR6029 / PR5864 lineage, unpaidmoon with Cursor/Grok at PR6339, and Douglas Colkitt's native/circuit/verification and research-package lineage. + +New export glue is Apache-2.0 under LICENSE. NOTICE.upstream preserves the exact repository notice. All original/project source snapshots, author records and review evidence retain their raw bytes and embedded notices, including EOF blank lines and known whitespace. No source-specific notice is replaced or removed. The original supervisor is INERT DATA, never imported or compiled. The original source_packet and RootProxy source remain exact and unexecuted. + +Agent source acceptance is conditional review, with no human or proof-kernel credential. No original source, runtime or scientific admission follows. No compiler, native binary, runtime image or private Pro conversation is included. Historical metadata may refer to local files outside this bounded export; those are archival references, not hidden replay dependencies. diff --git a/research/h25-v03-bounded-prefix-caller/NOTICE.upstream b/research/h25-v03-bounded-prefix-caller/NOTICE.upstream new file mode 100644 index 0000000000..59d8e0cf31 --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/NOTICE.upstream @@ -0,0 +1,415 @@ +A sharper exponent for integer multiplication +Copyright 2026 Douglas Colkitt + +This project includes unmodified source files from OpenAI's manuscript +"Integer multiplication below n log n" and its accompanying repository: +https://github.com/openai/math +Commit: adc7f1241b42e322a6451854ab7e4b4c146bf78a + +The original manuscript identifies OpenAI as its author. Its Apache-2.0 +license is retained at upstream/LICENSE. The exact source URLs and hashes +are recorded in upstream/manifest.json. Proposed modifications are supplied +as separate files under patches/; upstream source files remain unchanged. + +The original local research note, scripts, certificates, patches, and +documentation were prepared by Douglas Colkitt with assistance from OpenAI +Codex. The community release incorporates work by the contributors identified +in the notices below; it is not solely Douglas Colkitt's work. +This project is not an official OpenAI release or an OpenAI endorsement. + +Related contributions (not imported in this checkpoint): +Zhihao Chen (jacklightChen), PR #7, supplied an earlier ternary five-subset +motif, finite-alphabet transfer and a different compressed producer: +https://github.com/CrocSwap/integer-mult-bounds/pull/7 +The present checkpoint claims no priority for that motif. Related compressed +complex-network work was submitted by eumemic in PR #3: +https://github.com/CrocSwap/integer-mult-bounds/pull/3 +The pending contributions and their stronger bounds require their own review; +this notice does not represent adoption or verification of their claims. + +Additional community work, including parallel and superseded submissions, is +acknowledged in CONTRIBUTORS.md, with pinned submission metadata in +docs/research/contribution-snapshot.json. These acknowledgements do not imply +joint authorship of the checkpoint, incorporation of pending code, or verification +of submitted mathematical claims. Original source-specific notices remain in force. + +Community release (accepted by conditional maintainer audit): +The following original contributor notices apply to the imported PR #39 chain. +The preceding non-import statements describe the preserved 2^-30 checkpoint. + +Ternary five-subset construction and common-four-point resynthesis +Copyright 2026 Zhihao Chen (jacklightChen) + +This is Zhihao Chen's first submission of this specific construction to this +repository. Research, proof development, code and verification were prepared +with substantial assistance from GPT-6 Astra (OpenAI Codex), as identified by +the contributor. This is not independent review or an OpenAI endorsement. +Future research building on this contribution should explicitly acknowledge +Zhihao Chen (jacklightChen), cite the accompanying note and pull request, and +retain the preceding contributors' attribution. This notice records research +provenance; the repository's Apache-2.0 license remains unchanged. + +Dependencies retained from eumemic's Claude-assisted PRs #3 and #5: +https://github.com/CrocSwap/integer-mult-bounds/pull/3 +https://github.com/CrocSwap/integer-mult-bounds/pull/5 +PR #5 commit: d3d370c34937503bd3fa63c83d505a05e8e50893 +These include complex_circuit.py, complex_network.py, fast_gaussian.py, +their generators, construction notes and certificates. The Gaussian input +scaling proof is corrected in this derivative; see the modification notice below. +Aligned pairing also appears in Bortlesboat's PR #2. Retained totals and bank +sharing appear in dleen's PR #4 and cheaper retained centers in eumemic's PR #6. +Their results and ideas are credited separately from this new construction. + +Bulk recursion and controlled tensor basis, 8 October 2026 +Copyright 2026 icekylinx + +The new projector batching, controlled simultaneous basis, mixed-width tape +recursions, whole-residual complex recursion, and dependency-path precision +guard in the batched-23 proof package are contributed by icekylinx, developed +with substantial OpenAI GPT-6 Astra assistance. Review corrections and +repository integration were prepared with OpenAI Codex assistance. They build on the retained +PR #7 finite producers and the preceding contributions credited above. +The new package retains the repository's Apache-2.0 license and the original +authors' attribution. It is not an official OpenAI release or endorsement. + +Modification notice, 8 October 2026 (icekylinx): the retained fast Gaussian +proof now bounds shifted approximation error by F=2^ceil(1.14 alpha^2). +The P=34p precision budget and asymptotic exponent are unchanged. New batching +checks are integrated into make verify. Existing attribution and licenses +are retained. + +Partial-swap extension, 8 October 2026 +Copyright 2026 icekylinx + +The partial-swap framing, binary retained-total triple construction, +dependency-preserving positive labels and carrier reuse, unequal (25,23,57) +common basis, improved complex batching, and exact assembly are contributed +by icekylinx with substantial OpenAI GPT-6 Astra and Codex assistance. +This extension directly inherits PR #10, commit +62691e395a0458ce089a1c7b5d89e74291e95e29. The portable producer adapters +modify the retained paired-exclusion and shared-point implementations credited +above. The original licenses, attribution, and Gaussian correction are retained. + +Endpoint-gauge extension, 8 October 2026 +Copyright 2026 icekylinx + +The complementary auxiliary endpoint gauges, (32,30,40) controlled basis, +general nondegenerate binary phase residuals, retained-center complex producer, +updated path guard and exact assembly are contributed by icekylinx with +substantial OpenAI GPT-6 Astra and Codex assistance. This extension inherits +f2ab41aebad47861caf6316282c1793e5513845e and its PR #10 ancestry. New portable +adapters retain the paired-exclusion and shared-point contributions credited +above. Original licenses, notices and the Gaussian correction are retained. + +Structured-basis and semantic-bulk extension, 8 October 2026 +Copyright 2026 icekylinx + +The selected (32,30,36) bit construction, A1/A5 block refinements, fixed +middle-axis I+J profiles with bounded-minor CRT certificates, mixed dyadic +complex centers, complete data-front batching and circuit-specific assembly +are contributed by icekylinx with substantial OpenAI GPT-6 Astra and Codex +assistance. The immediate parent is ed90fd940279c336ebc45968631bdebfb087b505. + +The semantic/bulk compatibility argument, literal scalar charge, product row +stock and parameterization adapt Zhihao Chen (jacklightChen)'s PR #23, +commit 661ebabc1076c9f525d7ce4967c876b203fa9827. Translated complex endpoints +are adopted from the same contributor's PR #21, +commit 5ba6cf0bfb68f2be8d15610e7972207c50254d6a, following eumemic's source-frame +work and the earlier nested-basis contributions. + +Completed-child semantic precision, arbitrary-coordinate routing, phase-cell +Gaussian inversion and bulk tape transfer are credited to the RaD project +(hipotures), commit 45d9b60355872041f9275f77c057514def0d45bc, exposed through +PR #20 at 4f8d6c8272b5ff307a0da51df545ec3cd96a8b6e. Their selected proof +sources retain their separate CC0 license and original NOTICE under +references/semantic-bulk/rad20. The PR #23 source retains its recorded OpenAI +Codex assistance; RaD retains its recorded Codex and GPT-6.1-Sol Ultra +assistance. These are source attributions, not claims about this session's +runtime model. Related contributions by Rohan Arun and Aurel Prosz remain +acknowledged in the imported notices. No exclusive priority or additional +license condition is asserted. + +Copied retained-center extension, 8 October 2026 +Copyright 2026 icekylinx + +The copied retained-center schedule in both orientations, its complex-phase +transfer, the Wm-N+L rank budget, and the selected (25,23)/(28,28) composition +are contributed by icekylinx with substantial OpenAI GPT-6 Astra and Codex +assistance. This extension inherits PR #32 at +0ef3aeb61f55cc0b321ce6a0ef00acee25cefe52 and the preceding PR #10/#18/#24 work. + +The two-stage topology and paid copied-stream endpoint correction are due +to Aurel Prosz (Paureel), c82d09eb4781b68435e3fa3eb6beea72fa900fab, +through Zhihao Chen (jacklightChen)'s PR #29 unequal-axis composition, +9d963275075fa98f1da821e27757b238dafd6b3c. That source also credits Swapnil +Jain's two-stage development at ae405eb474d1486b2d8aef90139869f927f4836a. + +The contiguous corner method, incidence factorization and exact partition +certificates are due to Rohan Arun (PR #31), method commit +02f68f95369c39955c5ffcfddbd75cd83e26b305. The selected (25,23) certificate +specializes Dominik Scholz's parameterization (PR #33), +a499a345c040aa15b68e984a0904eadc485c7a7e. Their source notices and proof +snapshots are preserved in references/copied-centers. Historical OpenAI +Codex, GPT-6 Astra and Anthropic Claude Opus 5.5 assistance is credited to +the respective imported sources. Existing PR #21/#23 and RaD attribution, +licenses and the Gaussian correction remain in force. + +Copied centers with reversed (23,25) data corners, 2026-10-08 +Rohan Arun with substantial OpenAI Codex assistance supplies the composition, +exact dimension23 controls and cost/assembly integration. James Chang's PR34 +supplies the reversed boundary family; icekylinx's PR36 supplies copied retained +centers and the selected complex graph. The balanced assembly remains attributed +to RaD/hipotures and its PR34 specialization. Retain Dominik Scholz PR33, Rohan +Arun PR31, Zhihao Chen PR29/21/23, Paureel/Aurel Prosz, Swapnil Jain, icekylinx, +eumemic, Douglas Colkitt, OpenAI and all earlier notices and hypotheses. +This is not a claim of formal verification, new foundational rank identities, +global optimality or measured runtime speedup. + +Fixed middle basis with copied reversed corners (2026-10-08): +Rohan Arun, with substantial OpenAI Codex assistance. Composition and +simultaneous-basis proof retain icekylinx PR32/36, James Chang PR34, +Dominik Scholz PR35/38, Zhihao Chen, Paureel, Swapnil Jain, RaD/hipotures, +eumemic and all preceding attribution and licenses. See research/copied-fixed-reversed. + +Changed-graph composition with copied centers and fixed bases, 8 October 2026 +Prepared with OpenAI Codex assistance. +The new composition uses icekylinx PR36 copied centers and PR32 fixed-I+J +projectors/profiler, Dominik Scholz PR35 two fixed factors and CRT argument, +Zhihao Chen (jacklightChen) PR29/23 interfaces, Aurel Prosz (Paureel) and +Swapnil Jain's two-stage development, Rohan Arun PR25/31 corner methods, +Dominik Scholz PR33/38 dimension/composition work; James Chang (jamesyc) +PR34 reversed geometry and balanced transfer; Rohan Arun PR37/39/40 +reversed integration, modular data tests and both-fixed baseline; +RaD (hipotures) PR41 changed scalar DAGs, alternating point order and +independent role compiler; RaD balanced routing/bulk interfaces, and all +retained predecessors. +Complete attribution and the conditional proof boundary are recorded in +research/copied-fixed/PROOF.md; imported originals and source pins are retained. +Original Apache-2.0 and CC0 notices remain applicable. + +Community follow-up integration (PRs #49, #45 and #26), 8 October 2026: +Rohan Arun contributes weighted carrier matching and climbed summand/leave-one-out +orders (PRs #44/#47/#49), with Anthropic Claude assistance. The final construction +composes Chafik Boukhalfa's changed-graph checks, exact rational data recovery and +reordered exclusion sums (PRs #43/#46/#48, OpenAI Codex assistance) with RaD / +hipotures's alternating pair order and independent physical role compiler (#41). +All predecessor attribution and conditional proof interfaces remain in force. + +Alejandro Zarzuelo Urdiales contributes Gaussian parity and canonical arithmetic +proofs, finite tensor execution, profile precision accounting and mixed-center +reference checks (#45), with substantial OpenAI Codex assistance. See +research/gaussian-parity-synthesis/PROVENANCE.md for his full attribution. +Ryan S / princezuda contributes historical Lean certificate arithmetic, algebraic +frame/movement/guard lemmas and independent paired-circuit checks (#26). Original +source notices and historical snapshots are preserved. Neither formal package +claims a full formal proof of the multiplication algorithm or a new kappa. + +Joint frame compilation of skip-prefix strips + +The local compiler and exact finite witnesses were prepared by eumemic with +substantial OpenAI Codex assistance. Avi Eisenberg / ikeboy with Anthropic +Claude assistance supplied the unmodified PR #53 skip-prefix producer. +The pinned PR #48 pipeline is Chafik Boukhalfa's contribution, incorporating +Rohan Arun, RaD / hipotures, icekylinx, Dominik Scholz, James Chang, +Zhihao Chen, Aurel Prosz / Paureel, Swapnil Jain, eumemic, Douglas Colkitt, +OpenAI, David Harvey, Joris van der Hoeven and the earlier contributors +credited in the retained sources. See references/frame-compiler/pr48/NOTICE +and references/frame-compiler/pr53/NOTICE for their original attribution. +No authorship or review by those predecessors is claimed for this compiler. + +Joint dual-skip/frame-compiler composition (2026-10-08) +--------------------------------------------------- +Rohan Gupta / gupt1156 with Anthropic Claude assistance: PR55 dual-skip +scalar graph; original LICENSE and NOTICE are retained under +references/frame-compiler/pr55. eumemic with substantial OpenAI Codex +assistance: PR57 joint reversible frame compiler, serialized physical-word +replay and profile reconstruction. Chafik Boukhalfa with OpenAI Codex +assistance: this composition, independent integration and exact certificate. +Avi Eisenberg / ikeboy, Rohan Arun, RaD / hipotures, icekylinx, and all +predecessor authors retain the notices above and in pinned source files. +No original copyright or Apache-2.0 notice is removed. + +Ranked reclamation after the PR58 joint-dual composition (2026-10-08) +---------------------------------------------------------------- +Chafik Boukhalfa with OpenAI Codex assistance: prioritize retired physical +slots by descending current frame rank, retaining slot ID as the tie-breaker; +complete replay, exact profiles, comparison and adversarial controls. +The dedicated joint_dual_reclaim_compiler.py is derived from eumemic's PR57 +compiler. Its original shared compiler remains byte-identical. The PR55 +producer and all preceding attribution remain unchanged. The complete PR58 +comparison certificate and its original source/proof provenance are retained +under references/frame-compiler/pr58. + +Skip-prefix strip producer, 8 October 2026 +By Avi Eisenberg (ikeboy), with Anthropic Claude (Claude Opus 5.5) +assistance. The skip-prefix leave-one-out strip layout in +research/skip-strips/skip_graph.py is new. Everything else reuses Chafik +Boukhalfa's PR #43/#46/#48 research/copied-fixed pipeline, its verification +code, exact data recovery and support-order sorting, together with: +- Rohan Arun's PR #44 weighted carrier matching optimizer; +- RaD (hipotures) PR #41 alternating point order; +- every predecessor credited above. +Complete attribution and the conditional proof boundary are recorded in +research/skip-strips/PROOF.md. Original Apache-2.0 and CC0 notices remain +applicable. + +Local split-pair skip-prefix research continuation (2026-10-08) +Prepared with substantial OpenAI Codex assistance at the user's request. +New contribution: singleton/pair recursive partition refinement, finite summand +order and moment search, and verified composition with inherited paid clones. +Avi Eisenberg/ikeboy with Anthropic Claude assistance: PR53 skip-prefix strips. +Chafik Boukhalfa with OpenAI Codex assistance: PR54 original-envelope clone +specialization and PR43/46/48 checking interfaces. RaD/hipotures: PR51 +whole-chain/source-partition cloning and earlier producer/interfaces. +Rohan Arun: PR44 weighted matching and earlier fixed/reversed work, with all +stated historical AI assistance. All predecessor notices remain applicable. + +Original-envelope whole-chain clones on skip-prefix strips (research/skip-clones): +Chafik Boukhalfa, prepared with OpenAI Codex assistance. The complete-chain +source-partition clone operation is adapted from RaD / hipotures, PR #51, +with original envelopes retained here. The scalar base is Avi Eisenberg's +PR #53 skip-prefix layout, prepared with Anthropic Claude assistance. +All credited PR #43/#46/#48, PR #44 and earlier code/proof notices remain +in force. This extension is provided under the repository's Apache-2.0 terms. + +Community review checkpoint #50–#61, 8 October 2026 +Maintainer integration and independent arithmetic: Douglas Colkitt, with OpenAI Codex. +Avi Eisenberg / ikeboy: skip-prefix strip framework (#53), with Anthropic Claude. +Rohan Gupta / gupt1156: parallel order search (#50, stated Antigravity assistance) +and dual-suffix strips (#55, Anthropic Claude assistance). +Eumemic: equal-frame joint compilation and paid signal reclamation (#57), with Codex. +Chafik Boukhalfa: original-envelope paid clones (#54), composition (#58) and ranked +reclamation (#60), with Codex. Rohan Arun: order search (#52) and positive-frame +composition (#56), with Anthropic Claude and stated Codex validation assistance. +RaD / hipotures: enlarged frames, source partitions and paid whole-chain clones +(#51), with Codex. Rohan Garg / rohangar1: singleton/pair recursion and paid-clone +composition (#59), with Codex. Alejandro Zarzuelo Urdiales: exact parameter +refinement, scoped Lean arithmetic, matrix/parity and search tools (#61), with +his disclosed multi-tool and Codex assistance. +Parallel #50/#52 records are reviewed and credited without replacing the earlier +climbed-48 implementation; their exact commit history is retained. The separate +#51 witness is retained as research; its source-graph/negative-basis data proof +has not received the same full replay as #56's consumed compiler machinery. +See docs/research/community-round2-review.md for precise validation boundaries. +All earlier licenses, contributions and notices remain applicable. + +Interval strips and core-aware pair assembly + +The interval leave-one-out strips and the core-aware group-pair assembly in +research/pair-assembly were prepared by Avi Eisenberg / ikeboy with Anthropic +Claude assistance. They build on PR #53's skip-prefix pipeline and its +inherited PR #48 sources. The stacked witness in research/pair-assembly/frame +uses eumemic's PR #57 joint frame compiler unchanged; its driver and verifier +are adaptations of PR #57's skip_frame_compiler.py, skip_frame_compose.py and +verify_skip_frame.py. Original notices are retained. + +Stopped product-ring extension, 9 October 2026 +Copyright 2026 icekylinx + +The opposite-bank generic projector factorization, componentwise atom-ring +adapters, stopped recurrence and outer ordinary-interchange conversion, +aligned pair-star producer with rational centers, exact denominator-21 +grid and selected (23,23)/(24,24) composition are contributed by icekylinx +with substantial OpenAI GPT-6 Astra and Codex assistance. This extension +builds on merged PR #36, 11817ccacb564bb7f98789c20dc11d3fece207e3, and is +integrated on upstream main 56b66d58297deca1d7dd130247d720e960f77a37. + +The retained ordinary leaf uses the preceding projector, corner and +copied-center proofs. The selected two-stage topology retains Aurel Prosz +(Paureel), Swapnil Jain and Zhihao Chen's credits; the semantic assembly +retains PR #21/#23 and RaD's attribution. Paired producers, carrier matching, +original source notices and each imported license remain unchanged. + +Partial-gauge extension, 9 October 2026 +Copyright 2026 icekylinx + +The pair-first cube assembly, compatible backward frame enlargement, +partial source-gauge schedule and stopped whole-projector composition are +contributed by icekylinx with substantial OpenAI GPT-6 Astra and Codex +assistance, extending PR #104 at 948ce1510df750f4c18b96bdaef436a86f8bf834. + +The physical deferred bit word, reflected event accounting, fan-order +clarification and signed two-stage endpoint are adopted from Zhihao Chen +(jacklightChen), PR #97, e15350b66e4bf796153a68c240a6cc1b788abe3e, with +Codex assistance. Its deferred readouts, V leaves, lifted frames and frozen +witness originate in Swapnil Jain's 741e7aa078392553815df7926ee17ac5e25a8c38, +with the original Claude disclosure retained. Cyclic interval and core-aware +pair primitives build on Avi Eisenberg (ikeboy), PR #62, +ad0f25ff7b23cff7f08ad237c2254e6ecf74257e, with Anthropic Claude assistance. +Prior two-stage, copied-center, ordinary-leaf, semantic/bulk, routing and +precision credits remain in force. Imported source notices and licenses +are preserved under references/partial-gauge/; see SOURCES.json. + +Three-stage cover extension, 9 October 2026 +Copyright 2026 icekylinx + +The arbitrary-subspace Clifford frame theorem, three-stage Cayley geometry, +weighted q-adic GL cover, unit-lower weighted compiler, charged local-ring +fallback, uniform batching, internal row borrowing and exact composition +are contributed by icekylinx with substantial OpenAI GPT-6 Astra assistance. This +repository integration uses Codex assistance and extends +PR #115, cf60442983c153a3a0f5272ea4713f99eba13c86. + +The selected local complex DAG and support/label replay are adopted from +Copyright 2026 eumemic, PR #117, cbb05ce504d571546d9b7794c186a613c659c3bf, +with its original Apache-2.0 terms and Claude assistance disclosure. +The unchanged bit physical word retains Zhihao Chen (jacklightChen), +PR #97, and Swapnil Jain's underlying witness and assistance notices. +The prior opposite-bank, stopped ordinary-leaf, copied-center, topology, +semantic/bulk, precision and analytic credits remain applicable. +Original source notices and license bytes are preserved in +references/three-stage-cover/pr117/ and references/partial-gauge/. + +Paired-cube and shared-core extension, 9 October 2026 +Copyright 2026 icekylinx + +The paired-coordinate triple-cube identity, signed overlap channels, +original-source involution, coordinate-star centers, concrete frame/carrier +compiler, chronological source gauges, PR97 gauge-subset selection, +orthogonal cross-stage routing and exact supplier/assembly integration +are contributed by icekylinx with substantial OpenAI GPT-6 Astra assistance. +Repository integration uses Codex assistance and extends PR #130 at +6a9970a530119174507904e23592fd59ede19a5d. + +The substantial completed-core workspace-sharing principle is credited to +an664, PR #128, 530588a019b4a74f09180680c9e3961bf649ec89, with its reported +OpenAI Codex assistance. No source code, partition or serialized witness +from that PR is imported. The new routing and paired-motif integration +are described separately and claim no exclusive priority for broad sharing, +paired-coordinate, Fourier or carrier-matching ideas. + +Selected coarse queries restrict the retained eumemic PR #117 positive DAG; +its original Apache-2.0 and Claude assistance notices remain unchanged. +The bit word and original frames retain Zhihao Chen's PR #97 and Swapnil +Jain's frozen witness, notices and historical assistance disclosures. +Earlier generalized Clifford, three-stage, uniform weighted recursion, +ordinary-leaf, semantic/bulk, precision and analytic credits remain in force. +Source-specific license bytes are preserved under references/. + +October 9 recycled-bit integration: +DaysSky (#150), William Porter/hpst3r (#147), Thomas Marchand/Th0rgal (#146), +Rohan Gupta/gupt1156 (#148), James Chang/jamesyc (#124), SovereignSteak (#122). +The original notices and assistance disclosures are retained under research/, +including research/recycled-bit-integration/NOTICE. Andrew Barnes/Bortlesboat +(#101) repairs shared verifiers using rfu08's #64 counterexample. rfu08's +scoped finite and formal-transfer packages are included separately; they do +not establish the full multiplication theorem. Earlier and parallel credits +remain applicable. Douglas Colkitt integrated these with OpenAI Codex assistance. + +SovereignSteak PR151 independently supplies the matching gauge/recycling +composition and the selected 473/10^6 atom refinement; its original package +and assistance disclosure are retained under research/gauge-recycling/. + +October 9 coordinated-frame and completed-entrance-bank integration: +Dugongue PR186, 166a34d75e853e933855f0f7e940fe77c4bb6b8d, builds on +Chafik Boukhalfa/chafreaky's PR181, 7fb2194801e3a10f54772c7f0d5505035a4fc0ad, +and eumemic's PR168 v4, 4a3c769e5c5430e7114c4d3e099ff34664677f17. +The frozen package and prerequisite archive preserve all author, source-license +and assistance notices, including PR175's compiler optimization. DaysSky's +carrier closure, James Chang's terminal substitution and balanced assembly, +geckods' stopping refinements and all preceding framework credits remain. +Rohan Arun's PR185 bootstrap and chafreaky's PR182 bit refinement are reviewed +parallel contributions; their gains are not added to the selected witness. +Douglas Colkitt integrated the package and supplied the bank scheduling +supplement with OpenAI Codex assistance, under Apache-2.0. The all-size +interfaces remain conditional; finite verification is not full formalization. diff --git a/research/h25-v03-bounded-prefix-caller/PATH-ADAPTER-v1.json b/research/h25-v03-bounded-prefix-caller/PATH-ADAPTER-v1.json new file mode 100644 index 0000000000..0efcb416c5 --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/PATH-ADAPTER-v1.json @@ -0,0 +1,16 @@ +{ + "exact_source_translations": { + "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit05/implementation/h25_parent_supervisor.py": "archive/unit06/prerequisites/h25_parent_supervisor.py.txt", + "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit06/implementation/predecessor_entry.py": "archive/unit06/implementation/predecessor_entry.py", + "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit06/implementation/run_queue4_prefix_v1.py": "archive/unit06/implementation/run_queue4_prefix_v1.py", + "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit06/prerequisites/h25_parent_supervisor.py.txt": "archive/unit06/prerequisites/h25_parent_supervisor.py.txt", + "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/caller_new_controls_v1.py": "archive/unit07/fixtures/caller_new_controls_v1.py", + "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/implementation/run_queue4_prefix_v2.py": "archive/unit07/implementation/run_queue4_prefix_v2.py" + }, + "extra_components_to_source_translation": "REFUSE", + "fixture_file_binding": "archive/unit07/fixtures/caller_new_controls_v1.py", + "schema": "bounded-caller-path-adapter-v1", + "scratch": "fresh owned TemporaryDirectory outside package", + "source_and_fixture_bytes_modified": false, + "unknown_host_paths": "REFUSE" +} diff --git a/research/h25-v03-bounded-prefix-caller/README.md b/research/h25-v03-bounded-prefix-caller/README.md new file mode 100644 index 0000000000..7313039d07 --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/README.md @@ -0,0 +1,38 @@ +# H25 V03 bounded prefix caller: preserved source and NEW-only replay + +This package preserves the accepted Unit07 conditional bounded caller: **34,716 bytes**, SHA256 `25138c2c998762649c6a61cb8a6ae8aacd81bd533591b082ab6f58def712fca2`. The exact **11-method** frozen fixture is 14,236 bytes, SHA256 `310fe5a31db4c4ac2bab0794a1633ec2061e8f97de654f9701b019185b138765`. This is an incremental source export with finite controls. Full caller execution and genuine original-instance admission remain separate obligations. + +The sole caller delta replaces the old 9,574-byte support prefix with the accepted 9,878-byte prefix, SHA256 `48bc4009acb7569fb4a2ac529bec928a3aafdedc017a0ebaae97f72b7c97eabe`, byte-identical to the accepted b783 entry prefix. Every following byte equals the old90a caller tail. Exact original `source_packet` and `RootProxy` source segments are preserved against the ea4 wrapper. The old90a caller is retained as comparison/rejected copied-prefix-gap evidence; its presence grants no runtime admission. See [source preservation](SOURCE-PRESERVATION-v1.json) and [exact origins](SOURCE-ORIGINS-v1.json). + +## Evidence and scope + +Unit07 is closed with P1-P4 conditional source-component PASS. The exact P3 source review is retained at `archive/unit07/review-caller-P3-v1.json`, SHA256 `f61464ed7496af2ae47414bcdfad2f63e773563411c4e70a2fc8955442e7b089`. The earlier P3 observation and author receipt preserve their historical pending-language; the later SOURCE-CLOSE record controls the final source status. Review and original author logs are historical evidence, not fresh export execution. The new preparer is a separate next export and is not included or executed here. Source-close/author documents mention it only as inert metadata. + +The symbolic resource bill defines `H_i=F_i+E_i+5` and the successful route's new retained-read API calls as `(C+2)*(7+P)+2*sum_i(H_i)+sum_cases(H_case_stage)`. The accepted support limits reads to 8,192 calls/file, record writes to 4,096 and larger-file writes to 8,192, with 64 MiB/file and 256 MiB logical retained-byte guards. This is a parameterized operation bill. Physical CPU/wall/memory, original wrapper/system calls/history, error/own-receipt/enclosing GNU-time tails, approval and publication costs remain **OPEN_NOT_ZERO**. The recorded guarded `94.550533479/2400` is not a complete physical total. + +Original full C05/full V03/runtime qualification/current T0/source/native/C07/funding/fit/enclosing-parent exit remain false or unestablished. Original completion stays **43.5%**, activities **22/49**, stage **2/10**, milestones **1/10**, components **24**, helpers **52**; added original activity credit is zero. The app goal is separately paused; this directly authorized source/export task resumes no original runtime or research budget. The inherited PermissionError-as-absence, error-formatting, no-hostile-fork/closed-domain and original cleanup/outer-tail premises remain explicit. + +## Replay and isolation + +From a checkout with Python 3.12: + +```sh +python3 -B scripts/research_package.py --package research/h25-v03-bounded-prefix-caller --check-only +python3 -B scripts/research_package.py --package research/h25-v03-bounded-prefix-caller +``` + +A package-only cold copy can run `python3 -I -B -S /absolute/package/run.py` and `python3 -I -O -B -S /absolute/package/run.py`. Standard library and an ordinary writable POSIX/Linux temporary filesystem supporting O_NOFOLLOW, chmod, fsync and owned file creation are required. All fixture outputs go to a private temporary root outside the package. The generic hook supplies fresh interpreter bytecode-cache isolation; direct replay imports no original file or package-local bytecode. + +The frozen fixture reads exactly three passive dependencies under the preserved F-relative layout: `archive/unit06/implementation/run_queue4_prefix_v1.py`, `archive/unit06/implementation/predecessor_entry.py`, and `archive/unit06/prerequisites/h25_parent_supervisor.py.txt`. The last is byte-compared to the actual original supervisor source and is **INERT DATA**. The fixture compiles only the exact accepted NEW support prefix, six whitelisted NEW caller helpers, and NEW `PriorAdmittedRootProxy` with a fake base/recheck. The original `source_packet`, `RootProxy`, full `main`, original module bodies, archived tests, compiler/native/subreaper/domain/namespace/Popen/Root/target operations are never invoked. No whole caller is imported. Frozen test algorithms, expected values and all 11 methods remain byte-identical. The wrapper supplies only the package-relative `__file__` binding, explicit source-origin translations and owned scratch paths, refusing unknown host paths and extra path components. + +Static archive checks authenticate every included file, mode and origin, the precise prefix/tail relation, preserved original segments and fixture AST/extraction policy. They parse original files as inert data; they do not execute them. `MANIFEST.json` covers every package file except itself. The package never writes its own evidence. Export/CI/mathematical/source-history availability are distinct checks. + +## Base, overlap and provenance + +Canonical metadata base is `7c49fe32c55de02c2c873655c804b16e4c3fef0a`; the exact base/card/rules pins are in SOURCES.json. This preparation used existing local Git objects without network. The shared-cache missing unrelated `artifacts/batched-23-note.pdf` blob `f0d42d430159f3f46dcf447ecb5df8aa9355e208` is an explicitly retained cache limitation. No complete original Git history is claimed. Local scientific sources lack an upstream Git pin; this committed, self-contained export authenticates their exact bytes instead. All executable/data replay inputs are package-local, so VERIFY inputs is empty; no predecessor checkout is required. + +Nearest overlap is [PR6371](https://github.com/CrocSwap/integer-mult-bounds/pull/6371), accepted-entry export at head `8e772eadcbdee11289eb2eac887ffc15b864587c`, and [PR6370](https://github.com/CrocSwap/integer-mult-bounds/pull/6370), source-input export at head `e144f3b0a440fd33efdcfa4e0bd1af059dfd4fb3`. PR6368/6369 pins remain in predecessor source records and are not invented here. The parent supplied current overlap facts; this offline export performs no live overlap or hosted check. Added value is the separately accepted corrected caller and its exact bounded NEW-only controls. No novelty or selected-frontier gain is claimed. Preserve the [credit and licenses](NOTICE.md). + +## Open next questions + +The structured question and blocker are in [TASK.json](TASK.json). First export the frozen new preparer separately, then independently inspect the exact complete source composition and genuine original-instance inputs. Complete C05/C07, current T0/native/source/stage/command/funding/execution, actual physical costs/fit and enclosing-parent exit remain required; source/finite controls cannot provide those admissions. diff --git a/research/h25-v03-bounded-prefix-caller/SOURCE-ORIGINS-v1.json b/research/h25-v03-bounded-prefix-caller/SOURCE-ORIGINS-v1.json new file mode 100644 index 0000000000..7914db8243 --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/SOURCE-ORIGINS-v1.json @@ -0,0 +1,387 @@ +{ + "all_copies_exact": true, + "schema": "bounded-caller-source-origins-v1", + "scientific_source_root": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z", + "source_history_contract": "Self-contained exact byte export. No assertion of complete original Git history or ancestry from the shared local object cache. Historical metadata paths are inert archival references; only the five frozen source/fixture files are replay inputs.", + "sources": [ + { + "byte_exact": true, + "bytes": 34716, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/implementation/run_queue4_prefix_v2.py", + "package_path": "archive/unit07/implementation/run_queue4_prefix_v2.py", + "role": "frozen accepted source; execution only through NEW-only fixture", + "sha256": "25138c2c998762649c6a61cb8a6ae8aacd81bd533591b082ab6f58def712fca2", + "source_posix_mode": 436, + "source_relative_to_f": "unit07/implementation/run_queue4_prefix_v2.py" + }, + { + "byte_exact": true, + "bytes": 14236, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/caller_new_controls_v1.py", + "package_path": "archive/unit07/fixtures/caller_new_controls_v1.py", + "role": "frozen 11-method NEW-only fixture; no algorithm/assertion edits", + "sha256": "310fe5a31db4c4ac2bab0794a1633ec2061e8f97de654f9701b019185b138765", + "source_posix_mode": 436, + "source_relative_to_f": "unit07/fixtures/caller_new_controls_v1.py" + }, + { + "byte_exact": true, + "bytes": 34412, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit06/implementation/run_queue4_prefix_v1.py", + "package_path": "archive/unit06/implementation/run_queue4_prefix_v1.py", + "role": "INERT_DATA; exact three passive fixture dependencies; never imported or executed", + "sha256": "90a7ed4a45b94e16fa313623e56f6f3efcd85f3ea40355a43b289d8c49a75825", + "source_posix_mode": 436, + "source_relative_to_f": "unit06/implementation/run_queue4_prefix_v1.py" + }, + { + "byte_exact": true, + "bytes": 21857, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit06/implementation/predecessor_entry.py", + "package_path": "archive/unit06/implementation/predecessor_entry.py", + "role": "INERT_DATA; exact three passive fixture dependencies; never imported or executed", + "sha256": "b783c6812a6295069456cfb4187d4e09bb7acbcb20fffd76e0c10267f90c1201", + "source_posix_mode": 436, + "source_relative_to_f": "unit06/implementation/predecessor_entry.py" + }, + { + "byte_exact": true, + "bytes": 23047, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit06/prerequisites/h25_parent_supervisor.py.txt", + "package_path": "archive/unit06/prerequisites/h25_parent_supervisor.py.txt", + "role": "INERT_DATA; exact three passive fixture dependencies; never imported or executed", + "sha256": "cfb09a18dd10b597cc6d5a8139ee769bef679bc44ae029329755e3d97b055075", + "source_posix_mode": 436, + "source_relative_to_f": "unit06/prerequisites/h25_parent_supervisor.py.txt" + }, + { + "byte_exact": true, + "bytes": 2360, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/SOURCE-CLOSE-v1.json", + "package_path": "archive/unit07/SOURCE-CLOSE-v1.json", + "role": "INERT_DATA; historical source/review/resource/execution evidence; not an executable dependency", + "sha256": "6a808f0a52ef6184cd738afdf3def5ac929f046b51fd8d996b1cfc5e00c39096", + "source_posix_mode": 436, + "source_relative_to_f": "unit07/SOURCE-CLOSE-v1.json" + }, + { + "byte_exact": true, + "bytes": 13968, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/AUTHOR-RECEIPT-v2.json", + "package_path": "archive/unit07/AUTHOR-RECEIPT-v2.json", + "role": "INERT_DATA; historical source/review/resource/execution evidence; not an executable dependency", + "sha256": "62c0ab10cf8d97364aaee811642c6e405ef127b10ab0032205f1b51905aba333", + "source_posix_mode": 436, + "source_relative_to_f": "unit07/AUTHOR-RECEIPT-v2.json" + }, + { + "byte_exact": true, + "bytes": 5093, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/AUTHOR-COLD-RUN-v2.md", + "package_path": "archive/unit07/AUTHOR-COLD-RUN-v2.md", + "role": "INERT_DATA; historical source/review/resource/execution evidence; not an executable dependency", + "sha256": "9b8063645adaf8699b38a72908432271e8ad45f544d01fedf28f994947aff1f5", + "source_posix_mode": 436, + "source_relative_to_f": "unit07/AUTHOR-COLD-RUN-v2.md" + }, + { + "byte_exact": true, + "bytes": 5719, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/review-caller-P3-v1.json", + "package_path": "archive/unit07/review-caller-P3-v1.json", + "role": "INERT_DATA; historical source/review/resource/execution evidence; not an executable dependency", + "sha256": "f61464ed7496af2ae47414bcdfad2f63e773563411c4e70a2fc8955442e7b089", + "source_posix_mode": 436, + "source_relative_to_f": "unit07/review-caller-P3-v1.json" + }, + { + "byte_exact": true, + "bytes": 3588, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/review-caller-P3-v1.md", + "package_path": "archive/unit07/review-caller-P3-v1.md", + "role": "INERT_DATA; historical source/review/resource/execution evidence; not an executable dependency", + "sha256": "1c74424601982d24f731e99e9b98c8331913d8cd7799e1df926ae367a543f184", + "source_posix_mode": 436, + "source_relative_to_f": "unit07/review-caller-P3-v1.md" + }, + { + "byte_exact": true, + "bytes": 537, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/P3-ACCEPTANCE-OBSERVATION-v1.json", + "package_path": "archive/unit07/P3-ACCEPTANCE-OBSERVATION-v1.json", + "role": "INERT_DATA; historical source/review/resource/execution evidence; not an executable dependency", + "sha256": "81b5735d7bed9edebb5564efa6d1f1bb1393d19f8174600efa351c0140ca0829", + "source_posix_mode": 436, + "source_relative_to_f": "unit07/P3-ACCEPTANCE-OBSERVATION-v1.json" + }, + { + "byte_exact": true, + "bytes": 1434, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/INPUT-CALLER-v2.json", + "package_path": "archive/unit07/INPUT-CALLER-v2.json", + "role": "INERT_DATA; historical source/review/resource/execution evidence; not an executable dependency", + "sha256": "1f33892a73c1a394620857029be8a40683ff811c5aa4d830430f2f86a6a66523", + "source_posix_mode": 436, + "source_relative_to_f": "unit07/INPUT-CALLER-v2.json" + }, + { + "byte_exact": true, + "bytes": 3600, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/caller_resource_bill_v1.json", + "package_path": "archive/unit07/fixtures/caller_resource_bill_v1.json", + "role": "INERT_DATA; historical source/review/resource/execution evidence; not an executable dependency", + "sha256": "b22dc7fa984657ced87fe37052f38a10dc1fa0d61b2509715603514fe52fbdff", + "source_posix_mode": 436, + "source_relative_to_f": "unit07/fixtures/caller_resource_bill_v1.json" + }, + { + "byte_exact": true, + "bytes": 1722, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/caller_execution_linkage_v1.json", + "package_path": "archive/unit07/fixtures/caller_execution_linkage_v1.json", + "role": "INERT_DATA; historical source/review/resource/execution evidence; not an executable dependency", + "sha256": "f007c6951237a956b00b37ea546a29c19fe654e8febd204dbc0eb143f4e57214", + "source_posix_mode": 436, + "source_relative_to_f": "unit07/fixtures/caller_execution_linkage_v1.json" + }, + { + "byte_exact": true, + "bytes": 931, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/caller_control_source_v1.json", + "package_path": "archive/unit07/fixtures/caller_control_source_v1.json", + "role": "INERT_DATA; historical source/review/resource/execution evidence; not an executable dependency", + "sha256": "5e41744615206c2fe9e57b92254294a61aeb6205c7bd08d9c5ad7746ec622494", + "source_posix_mode": 436, + "source_relative_to_f": "unit07/fixtures/caller_control_source_v1.json" + }, + { + "byte_exact": true, + "bytes": 8375, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/caller_delta_design_v1.json", + "package_path": "archive/unit07/fixtures/caller_delta_design_v1.json", + "role": "INERT_DATA; historical source/review/resource/execution evidence; not an executable dependency", + "sha256": "8d5107a1fa480a0865d319a6f84c09bb9311fc0a01c204429fce66b338926cb8", + "source_posix_mode": 436, + "source_relative_to_f": "unit07/fixtures/caller_delta_design_v1.json" + }, + { + "byte_exact": true, + "bytes": 1523, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/caller_initial_freeze_v1.json", + "package_path": "archive/unit07/fixtures/caller_initial_freeze_v1.json", + "role": "INERT_DATA; historical source/review/resource/execution evidence; not an executable dependency", + "sha256": "2c5cbf9d644a50c755d58cbb654ed3901302210a311df1bf8d3eee51606d178a", + "source_posix_mode": 436, + "source_relative_to_f": "unit07/fixtures/caller_initial_freeze_v1.json" + }, + { + "byte_exact": true, + "bytes": 34412, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/caller_basis_unit06_90a.py.txt", + "package_path": "archive/unit07/fixtures/caller_basis_unit06_90a.py.txt", + "role": "INERT_DATA; historical source/review/resource/execution evidence; not an executable dependency", + "sha256": "90a7ed4a45b94e16fa313623e56f6f3efcd85f3ea40355a43b289d8c49a75825", + "source_posix_mode": 436, + "source_relative_to_f": "unit07/fixtures/caller_basis_unit06_90a.py.txt" + }, + { + "byte_exact": true, + "bytes": 9878, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/caller_bounded_T0_prefix_48bc.py.txt", + "package_path": "archive/unit07/fixtures/caller_bounded_T0_prefix_48bc.py.txt", + "role": "INERT_DATA; historical source/review/resource/execution evidence; not an executable dependency", + "sha256": "48bc4009acb7569fb4a2ac529bec928a3aafdedc017a0ebaae97f72b7c97eabe", + "source_posix_mode": 436, + "source_relative_to_f": "unit07/fixtures/caller_bounded_T0_prefix_48bc.py.txt" + }, + { + "byte_exact": true, + "bytes": 34716, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/caller_initial_candidate_v2.py.txt", + "package_path": "archive/unit07/fixtures/caller_initial_candidate_v2.py.txt", + "role": "INERT_DATA; historical source/review/resource/execution evidence; not an executable dependency", + "sha256": "25138c2c998762649c6a61cb8a6ae8aacd81bd533591b082ab6f58def712fca2", + "source_posix_mode": 436, + "source_relative_to_f": "unit07/fixtures/caller_initial_candidate_v2.py.txt" + }, + { + "byte_exact": true, + "bytes": 14236, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/caller_initial_controls_v1.py.txt", + "package_path": "archive/unit07/fixtures/caller_initial_controls_v1.py.txt", + "role": "INERT_DATA; historical source/review/resource/execution evidence; not an executable dependency", + "sha256": "310fe5a31db4c4ac2bab0794a1633ec2061e8f97de654f9701b019185b138765", + "source_posix_mode": 436, + "source_relative_to_f": "unit07/fixtures/caller_initial_controls_v1.py.txt" + }, + { + "byte_exact": true, + "bytes": 1729, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_executed_caller_v1.normal.txt", + "package_path": "archive/unit07/fixtures/preparer_executed_caller_v1.normal.txt", + "role": "INERT_DATA; historical source/review/resource/execution evidence; not an executable dependency", + "sha256": "43916b1a8cc23a845e6045beb69585a9d0dc21e5f873b5e75a5c5cecbcf01354", + "source_posix_mode": 436, + "source_relative_to_f": "unit07/fixtures/preparer_executed_caller_v1.normal.txt" + }, + { + "byte_exact": true, + "bytes": 1729, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_executed_caller_v1.optimized.txt", + "package_path": "archive/unit07/fixtures/preparer_executed_caller_v1.optimized.txt", + "role": "INERT_DATA; historical source/review/resource/execution evidence; not an executable dependency", + "sha256": "fb6ecad1f8860334c46616a38f8d14bf8e37c9ba39016b41a8f40001c52ee374", + "source_posix_mode": 436, + "source_relative_to_f": "unit07/fixtures/preparer_executed_caller_v1.optimized.txt" + }, + { + "byte_exact": true, + "bytes": 2599, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit06/SOURCE-CLOSE-v1.json", + "package_path": "archive/unit06/SOURCE-CLOSE-v1.json", + "role": "INERT_DATA; comparison/preservation/rejected caller gap evidence, no runtime admission", + "sha256": "7cac80142264ca41f80be6fa7ea4a0b268cd2ce6c44ff2755f0cb3294c59fd9b", + "source_posix_mode": 436, + "source_relative_to_f": "unit06/SOURCE-CLOSE-v1.json" + }, + { + "byte_exact": true, + "bytes": 4061, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit06/review-caller-source-v2.json", + "package_path": "archive/unit06/review-caller-source-v2.json", + "role": "INERT_DATA; comparison/preservation/rejected caller gap evidence, no runtime admission", + "sha256": "37c9f79c9f836fa14ea88d1ae5790b2ce350361699e848f35e2faebe6549c8b6", + "source_posix_mode": 436, + "source_relative_to_f": "unit06/review-caller-source-v2.json" + }, + { + "byte_exact": true, + "bytes": 3650, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit06/review-caller-source-v2.md", + "package_path": "archive/unit06/review-caller-source-v2.md", + "role": "INERT_DATA; comparison/preservation/rejected caller gap evidence, no runtime admission", + "sha256": "6fd0b3f5c47ffe81ccd362a526f37c15d18d762b0c5f0464977f93fac18d89b2", + "source_posix_mode": 436, + "source_relative_to_f": "unit06/review-caller-source-v2.md" + }, + { + "byte_exact": true, + "bytes": 11023, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit06/fixtures/caller_original_wrapper.py.txt", + "package_path": "archive/unit06/fixtures/caller_original_wrapper.py.txt", + "role": "INERT_DATA; comparison/preservation/rejected caller gap evidence, no runtime admission", + "sha256": "ea4c07337ccc1865accfd1b1fe485d51057a04a49e4bfb5f10cc36dc92b5f9a8", + "source_posix_mode": 436, + "source_relative_to_f": "unit06/fixtures/caller_original_wrapper.py.txt" + }, + { + "byte_exact": true, + "bytes": 2024, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit06/fixtures/caller_preservation_v1.json", + "package_path": "archive/unit06/fixtures/caller_preservation_v1.json", + "role": "INERT_DATA; comparison/preservation/rejected caller gap evidence, no runtime admission", + "sha256": "7d9c3d9b1e3742adeda2f54ed249e1791a3bf0b7fad354feb94d2e7a8086f5f0", + "source_posix_mode": 436, + "source_relative_to_f": "unit06/fixtures/caller_preservation_v1.json" + }, + { + "byte_exact": true, + "bytes": 9574, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit06/fixtures/caller_T0_support.py.txt", + "package_path": "archive/unit06/fixtures/caller_T0_support.py.txt", + "role": "INERT_DATA; comparison/preservation/rejected caller gap evidence, no runtime admission", + "sha256": "c20523438a6bb49ef43ea527cf6c96a07542cadea72a77eb822c54f8f64fb863", + "source_posix_mode": 436, + "source_relative_to_f": "unit06/fixtures/caller_T0_support.py.txt" + }, + { + "byte_exact": true, + "bytes": 23047, + "export_posix_mode": 420, + "intended_git_mode": "100644", + "origin": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit05/implementation/h25_parent_supervisor.py", + "package_path": "archive/unit06/prerequisites/h25_parent_supervisor.py.txt", + "role": "actual original supervisor source independently byte-compared to exact inert snapshot; not compiled/imported/executed", + "sha256": "cfb09a18dd10b597cc6d5a8139ee769bef679bc44ae029329755e3d97b055075", + "source_posix_mode": 436 + }, + { + "bytes": 11357, + "git_blob": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", + "intended_git_mode": "100644", + "origin_commit": "7c49fe32c55de02c2c873655c804b16e4c3fef0a", + "origin_repository_path": "LICENSE", + "package_path": "LICENSE", + "role": "exact upstream license/notice; retained without editing", + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + }, + { + "bytes": 24973, + "git_blob": "59d8e0cf3102e15bd11db430838365531e2d7f18", + "intended_git_mode": "100644", + "origin_commit": "7c49fe32c55de02c2c873655c804b16e4c3fef0a", + "origin_repository_path": "NOTICE", + "package_path": "NOTICE.upstream", + "role": "exact upstream license/notice; retained without editing", + "sha256": "b49022cb4104d90b182e4c335f670faf45529025b15db77bf0291835083c28bd" + } + ] +} diff --git a/research/h25-v03-bounded-prefix-caller/SOURCE-PRESERVATION-v1.json b/research/h25-v03-bounded-prefix-caller/SOURCE-PRESERVATION-v1.json new file mode 100644 index 0000000000..ccc9548a4e --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/SOURCE-PRESERVATION-v1.json @@ -0,0 +1,38 @@ +{ + "accepted_shared_prefix": { + "byte_equal_to_entry_b783_prefix": true, + "bytes": 9878, + "sha256": "48bc4009acb7569fb4a2ac529bec928a3aafdedc017a0ebaae97f72b7c97eabe" + }, + "actual_original_supervisor_equals_inert_copy": true, + "new_caller": [ + 34716, + "25138c2c998762649c6a61cb8a6ae8aacd81bd533591b082ab6f58def712fca2" + ], + "new_fixture": [ + 14236, + "310fe5a31db4c4ac2bab0794a1633ec2061e8f97de654f9701b019185b138765" + ], + "new_tail_equals_old_90a_tail": true, + "no_original_execution": true, + "old_prefix_bytes": 9574, + "old_unit06_90a": "comparison only; unfixed copied-prefix gap, not runtime admission", + "original_segments": { + "RootProxy": { + "byte_equal_to_ea4_original_wrapper": true, + "bytes": 3431, + "executed": false, + "sha256": "7b9bf07f770df3aa336646c2fbb8ec65e91acf9eeedbd7718e046fdf0e16ea6d" + }, + "source_packet": { + "byte_equal_to_ea4_original_wrapper": true, + "bytes": 1607, + "executed": false, + "sha256": "b467272679e3362c64220b2524d15d0180eca98537843bad8561f20998874987" + } + }, + "original_wrapper_sha256": "ea4c07337ccc1865accfd1b1fe485d51057a04a49e4bfb5f10cc36dc92b5f9a8", + "schema": "bounded-caller-source-preservation-v1", + "tail_bytes": 24838, + "tail_sha256": "d1378f1fea77dde8c05b265534b8900e2a32ef661e59f10c3349a8e2c7f7d174" +} diff --git a/research/h25-v03-bounded-prefix-caller/SOURCES.json b/research/h25-v03-bounded-prefix-caller/SOURCES.json new file mode 100644 index 0000000000..e06232847b --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/SOURCES.json @@ -0,0 +1,48 @@ +{ + "base_commit": "7c49fe32c55de02c2c873655c804b16e4c3fef0a", + "files": [ + { + "git_blob": "d59b5035e7b4cbaa9d688a1d32dd0d6eb79c466a", + "path": "certificates/selected-result.json", + "sha256": "9b8d0eea95b3bf0dfcb7938a732a6439b87a2685dec2a5ab9e525b3b34debbfa", + "usage": "provenance" + }, + { + "git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec", + "path": "docs/research/agent-task-catalog.json", + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81", + "usage": "provenance" + }, + { + "git_blob": "fa006ceb6b6b9d6c0e799f210963f4587ecfb162", + "path": "AGENTS.md", + "sha256": "fbee67ab9e0ae4629a35fd9dba69c8f7e29e4a15392eb2d0f75d8768ffb65f40", + "usage": "provenance" + }, + { + "git_blob": "5185786f2ec00f215019fb5777d70979429690a9", + "path": "CONTRIBUTING.md", + "sha256": "fcd1a8d0e52342a23b8ffa9e905e85ccc539fb084145ef016dfc93cedfb3d924", + "usage": "provenance" + }, + { + "git_blob": "06b35b9805b5c15d1623edfb20560266a4bbfdfc", + "path": "docs/research/agent-procedure.md", + "sha256": "8367063f9f2d48543415451e026f83224ea962b28801bea6904e6e425ed023e4", + "usage": "provenance" + }, + { + "git_blob": "24cf53c403ff4e72a1717d082296c3918c42fe92", + "path": "docs/research/research-package-guide.md", + "sha256": "5e3aa8b2ce657f943ef5fd187473a01a92a7073ef7e05b30affa08979daa2c6e", + "usage": "provenance" + }, + { + "git_blob": "ae656e706bf992a3c26c710611ff92dde75efe21", + "path": ".github/pull_request_template.md", + "sha256": "6fffbdcc80d32daa5d6940b21f4c0e61df7e5f588a120374269ff28dac26c562", + "usage": "provenance" + } + ], + "schema_version": 1 +} diff --git a/research/h25-v03-bounded-prefix-caller/TASK.json b/research/h25-v03-bounded-prefix-caller/TASK.json new file mode 100644 index 0000000000..ef43aa3873 --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/TASK.json @@ -0,0 +1,59 @@ +{ + "actual_scope": "Self-contained exact 34716-byte caller25138 and frozen11 NEW-only methods310fe, with exact passive basis/entry/supervisor sources, static resource bill, source reviews and historical raw logs.", + "ai_assistance": "Substantial ChatGPT Pro, OpenAI Codex and GPT-6.1 Sol Max source consultation, implementation, agent review and publication preparation; independent agent source acceptance is not human or proof-kernel acceptance.", + "author": "Chris R / Clear1nsight", + "base_commit": "7c49fe32c55de02c2c873655c804b16e4c3fef0a", + "bottleneck_link": "The accepted shared9878-byte prefix supplies before-call short-I/O caps while the original caller tail and interfaces remain exact; source preservation and bounded replay precede genuine integration.", + "evidence": "SOURCE-PRESERVATION-v1.json; exact P3 review f61464ed7496af2ae47414bcdfad2f63e773563411c4e70a2fc8955442e7b089; caller resource bill/execution linkage; final manifest and unchanged11-method NEW-only replay.", + "open_questions": [ + { + "blocked_by": "Genuine complete C05/nine-category inventory, current T0/source/native/stage/command/funding/execution, C07 interval/ancestor stability, complete physical fit and enclosing-parent exit remain unestablished.", + "first_step": "Export the frozen final preparer separately without altering or executing this full caller, then independently inspect the exact complete source composition and genuine input/funding/C07 requirements.", + "question": "Can the separately accepted preparer source and this bounded caller be exported and integrated under genuine original-instance inputs?", + "why_it_matters": "This package establishes the preserved caller source and 11 NEW-only controls; source composition and actual physical/runtime admission require separate evidence." + } + ], + "original_card": { + "acceptance_gate": "Preserve immutable source hashes and proof-relevant content; a different compressed byte stream alone is not a mathematical mismatch.", + "allowed_variations": [ + "One interpreter/version mismatch or one payload field comparison." + ], + "bottleneck_link": "Portable exact checks prevent environment failures from blocking valid contributions.", + "first_experiment": "Reproduce one specific mismatch or audit one canonical comparison for omitted proof-relevant fields.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_selected_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Resolve the current selected review, separate complex/ordinary BIT/admitted BIT/outer budgets, and compare the card against live handoffs before starting. Historical ceilings require exact source/model equivalence.", + "scope": "Source-binding orientation only; not a scientific replay or all-size proof. Materialize selected inputs if this checkout is sparse." + }, + "id": "portable-replay", + "methods": [ + "Reproduce one portability failure and add a minimal cross-environment fix.", + "Audit one canonical-payload comparison for omitted proof-relevant fields." + ], + "overlap_terms": [ + "gzip container", + "reproducibility", + "canonical payload" + ], + "question": "Can one reproducible environment or artifact-comparison failure be repaired?", + "scope_change_triggers": [ + "Removing immutable-source pins because generated compressed bytes differ." + ], + "starting_points": [ + "research/gzip-container-reproducibility/README.md", + "docs/ci-verification.md" + ] + }, + "outcome": "partial", + "priority_revision": 8, + "schema_version": 1, + "scope_change_reason": "Explicit incremental source-publication assignment exports the newly accepted Unit07 bounded caller after the Unit06 copied-prefix gap; no new frontier task is drawn. The preparer is a separate source export.", + "scope_status": "changed", + "stop_rule": "Source unit07 closed P1-P4 conditional source PASS; no source repair, full caller/original function execution, next research round or runtime qualification. Freeze this isolated export after scoped metadata and 11-method normal/optimized cold replay.", + "task_id": "portable-replay" +} diff --git a/research/h25-v03-bounded-prefix-caller/VERIFY.json b/research/h25-v03-bounded-prefix-caller/VERIFY.json new file mode 100644 index 0000000000..a58a90e121 --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/VERIFY.json @@ -0,0 +1,32 @@ +{ + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "-S", + "{package}/run.py" + ], + "checks": "Exact archive manifest/source-preservation/mode checks plus unchanged11 NEW-only methods; no full caller/original source_packet/RootProxy/main or original module execution", + "timeout_seconds": 30 + }, + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "-S", + "{package}/run.py" + ], + "checks": "Same exact11 NEW-only controls under optimized Python; frozen unittest assertions and fake-base dispatch preserved", + "timeout_seconds": 30 + } + ], + "inputs": [], + "python": "3.12", + "requirements": [], + "schema_version": 1, + "status": "ready" +} diff --git a/research/h25-v03-bounded-prefix-caller/archive/unit06/SOURCE-CLOSE-v1.json b/research/h25-v03-bounded-prefix-caller/archive/unit06/SOURCE-CLOSE-v1.json new file mode 100644 index 0000000000..8593a62c41 --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/archive/unit06/SOURCE-CLOSE-v1.json @@ -0,0 +1,71 @@ +{ + "recorded_utc": "2026-11-02T13:41:49.940426+00:00", + "phase": "closed_partial_with_independently_accepted_entry_only", + "accepted_checkpoints": [ + "U6.1", + "U6.2" + ], + "accepted_count": 2, + "fixed_local_denominator": 4, + "U6_2_independently_accepted_utc": "2026-11-02T13:38:29+00:00", + "source_and_fixture_edits_cutoff_utc": "2026-11-02T13:35:31+00:00", + "source_and_tests_finished_author_report_utc": "2026-11-02T13:34:18+00:00", + "sole_repair_clock_preserved": "13:20:31 through13:35:31UTC; parentenforcement/bookkeepinglate13:22:33 preserved", + "U6_3": "NOT_ACCEPTED actualP/Q/M/JOBS/STAGEpreparer absent; separate caller90a retainsuncappedcopiedprefix", + "U6_4": "NOT_ACCEPTED no complete integration or complete resourceoperationbill", + "historical_gaps": [ + "initial9950draft recovered verified reconstruction, notdirectsavedcopy", + "intermediate81de rawsnapshotgap disclosed", + "freeze bookkeeping13:36:18 and13:37:58 aftercutoff; no backdating" + ], + "evidence": [ + { + "path": "review-loader-source-v2.json", + "bytes": 5562, + "sha256": "7ed7ef8896abdaab443473038992f652a5054f43c4ea41a0f0aa0f028079b799" + }, + { + "path": "review-caller-source-v2.json", + "bytes": 4061, + "sha256": "37c9f79c9f836fa14ea88d1ae5790b2ce350361699e848f35e2faebe6549c8b6" + }, + { + "path": "AUTHOR-FREEZE-v1.json", + "bytes": 5794, + "sha256": "2c304f8810a17549e97a0a565a3e0a74dbde3f7f753d0942dad050e8feb8b2c4" + }, + { + "path": "AUTHOR-BOOKKEEPING-v1.json", + "bytes": 867, + "sha256": "e2088fd85f57dba85ea375b52af492cff6950469a1e5adedb584efdfd802b287" + }, + { + "path": "SOURCE-CUTOFF-OBSERVATION-v1.json", + "bytes": 3494, + "sha256": "5ef3dc17be7b3e08d49e9e442073952854a7a1f2fd810c34ed6e6f0b373c65f3" + }, + { + "path": "implementation/predecessor_entry.py", + "bytes": 21857, + "sha256": "b783c6812a6295069456cfb4187d4e09bb7acbcb20fffd76e0c10267f90c1201" + }, + { + "path": "implementation/run_queue4_prefix_v1.py", + "bytes": 34412, + "sha256": "90a7ed4a45b94e16fa313623e56f6f3efcd85f3ea40355a43b289d8c49a75825" + }, + { + "path": "fixtures/test_bootstrap_new_v1.py", + "bytes": 6532, + "sha256": "19c1b08d4daeaf0c2d40357b0e117fcb2ca2f632f627e290fe7442abf49b3504" + } + ], + "original_C05": false, + "original_V03": false, + "runtime_qualified": false, + "original_activity_credit_added": 0, + "original_completion_percent": 43.5, + "original_modules_or_target_executed": false, + "reopen_or_extension": false, + "costs": "OPEN_NOT_ZERO" +} diff --git a/research/h25-v03-bounded-prefix-caller/archive/unit06/fixtures/caller_T0_support.py.txt b/research/h25-v03-bounded-prefix-caller/archive/unit06/fixtures/caller_T0_support.py.txt new file mode 100644 index 0000000000..3bb886f273 --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/archive/unit06/fixtures/caller_T0_support.py.txt @@ -0,0 +1,198 @@ +"""Conditional Unit06 authenticated entry. No original project imports at load. + +T0 is the original trusted first-launcher/OS/interpreter/system-stdlib premise. +Source selection does not create source, native, C05/C07, funding or runtime +admission. Do not call main except in a separately admitted genuine instance. +""" +from __future__ import annotations +import ast +import builtins +import hashlib +import json +import os +from pathlib import Path +import stat +import sys +import types + +FILE_CAP=64*1024*1024 +TOTAL_CAP=256*1024*1024 +RECORD_CAP=1024*1024 +MAX_ROWS=8192 +IDENTITY_KEYS=('device','inode','mode','links','uid','gid','size','mtime_ns','ctime_ns') +ENV={'PATH':'/usr/bin:/bin','PYTHONHASHSEED':'0','LANG':'C.UTF-8','LC_ALL':'C.UTF-8','TZ':'UTC','PYTHONDONTWRITEBYTECODE':'1'} +SYSTEM_PATH=('/usr/lib/python312.zip','/usr/lib/python3.12','/usr/lib/python3.12/lib-dynload') + + +class Stop(RuntimeError):pass + + +def need(condition,message): + if condition is not True:raise Stop(message) + + +def plain(value): + nodes=text=0 + def walk(item,depth): + nonlocal nodes,text + nodes+=1 + need(depth<=24 and nodes<=65536,'plain structure bound') + kind=type(item) + if item is None or kind is bool:return + if kind is int:need(-(1<<127)<=item<(1<<127),'integer bound');return + if kind is str: + text+=len(item);need(len(item)<=8192 and text<=524288,'text bound');return + need(kind is list or kind is dict,'exact plain value required') + need(len(item)<=MAX_ROWS,'container bound') + if kind is list: + for child in item:walk(child,depth+1) + else: + for key,child in item.items(): + need(type(key) is str,'exact string key required');walk(key,depth+1);walk(child,depth+1) + walk(value,0) + + +def canonical(value,cap=RECORD_CAP): + need(type(cap) is int and 0<=cap<=FILE_CAP,'exact record cap') + plain(value) + raw=(json.dumps(value,sort_keys=True,separators=(',',':'),ensure_ascii=True,allow_nan=False)+'\n').encode('ascii') + need(len(raw)<=cap,'canonical record cap');return raw + + +def decode(raw,cap=RECORD_CAP): + need(type(cap) is int and 0<=cap<=FILE_CAP,'exact decode cap') + need(type(raw) is bytes and len(raw)<=cap,'raw record cap/type') + def pairs(rows): + result={} + for key,value in rows: + need(key not in result,'duplicate JSON key');result[key]=value + return result + def bad(token):raise Stop('non-integer JSON number') + value=json.loads(raw,object_pairs_hook=pairs,parse_float=bad,parse_constant=bad) + plain(value);return value + + +def path_text(value): + need(type(value) is str and 10 and row['size']==pin['bytes'] and stat.S_ISREG(row['mode']) and row['links']==1,'regular single-link identity') + + +class Owner: + """New T0-side retained failure state, never an original capability.""" + def __init__(self): + self.primary=None;self.secondary=[];self.pending=False;self.quarantined=False + self.busy=False;self.burned=False;self.fd_slots=[];self.captures=[];self.total_bytes=0 + self.last_block=None;self.last_raw=None;self.modules={};self.published=[];self.executed=[] + self.phase='NEW';self.result=None + def ready(self): + if self.primary is not None:raise self.primary + need(not self.quarantined and not self.pending and not self.busy,'owner terminal/uncertain') + def fail(self,error): + if self.primary is None:self.primary=error + elif error is not self.primary:self.secondary.append(error) + self.quarantined=True + return self.primary + + +def _retained_read(path,expected_sha256,cap,owner,expected_pin=None): + """Actual descriptor-bound read. Returned source bytes are never reopened for exec.""" + need(type(owner) is Owner,'actual local owner required');owner.ready();path_text(path) + need(type(cap) is int and 0<=cap<=FILE_CAP,'read cap') + if expected_sha256 is not None: + need(type(expected_sha256) is str and len(expected_sha256)==64 and all(c in '0123456789abcdef' for c in expected_sha256),'prior digest') + if expected_pin is not None:validate_blob(expected_pin,cap);need(expected_pin['path']==path and expected_pin['sha256']==expected_sha256,'prior pin path/digest') + record={'path':path,'chunks':[],'raw':None,'observed':None};owner.captures.append(record) + owner.fd_slots.append(None);slot=len(owner.fd_slots)-1;primary=None;owner.busy=True + try: + before=identity(os.stat(path,follow_symlinks=False)) + need(stat.S_ISREG(before['mode']) and before['links']==1 and before['size']<=cap,'source kind/link/size') + owner.pending=True + owner.fd_slots[slot]=os.open(path,os.O_RDONLY|os.O_NOFOLLOW|os.O_NONBLOCK|os.O_CLOEXEC) + owner.pending=False + opened=identity(os.fstat(owner.fd_slots[slot]));need(before==opened,'source open drift') + if expected_pin is not None:need(opened==expected_pin['identity'],'source installed identity differs') + count=0 + while count 262144 or hashlib.sha256(raw).hexdigest() != expected: + raise RuntimeError('Parent-reviewed source manifest differs') + manifest = json.loads(raw) + blobs = {} + for name, row in manifest['files'].items(): + if Path(name).name != name or name == 'SOURCE-READINESS.json': + raise RuntimeError('Unsafe source packet member') + path = here / name + if path.is_symlink() or path.stat().st_mode & 0o222: + raise RuntimeError('Parent must freeze the concrete source packet readonly') + with path.open('rb') as stream: + data = stream.read(262145) + if len(data) > 262144 or len(data) != row['bytes'] or hashlib.sha256(data).hexdigest() != row['sha256']: + raise RuntimeError('Source packet member differs: ' + name) + blobs[name] = data + if blobs[Path(__file__).name] != Path(__file__).read_bytes(): + raise RuntimeError('Actual queue entry differs from frozen source packet') + path = here / 'supervisor.py' + spec = importlib.util.spec_from_file_location('h25_parent_supervisor', path) + module = importlib.util.module_from_spec(spec) + exec(compile(blobs['supervisor.py'], str(path), 'exec'), module.__dict__) + return module, manifest + + + +class RootProxy: + def __init__(self, supervisor, root, cases, evidence, policy, deadline): + self.s, self.root, self.cases = supervisor, root, cases + self.evidence, self.policy, self.deadline = evidence, policy, deadline + self.next = 0 + self.records = [] + + def run(self, command, **kwargs): + s = self.s + s.need(self.next < len(self.cases), 'Unregistered extra queue root command') + case = self.cases[self.next] + expected = ['/usr/bin/python3.12', *s.FLAGS, str(self.root / 'run_guarded_v3.py'), + case['stage'], case['job'], case['label']] + s.need(command == expected and set(kwargs) == {'cwd', 'env', 'capture_output', 'timeout'} and + kwargs['cwd'] == self.root and kwargs['env'] == s.ENV and + kwargs['capture_output'] is True and kwargs['timeout'] == 190, + 'Queue subprocess alias call exceeded its exact reviewed interface') + folder = self.evidence / case['label'] + result = s.run_root(self.root, case, folder, self.policy['root_seconds'], self.deadline, + self.policy['root_address_space_bytes'], self.policy['root_rss_sum_bytes']) + original_rc = result['returncode'] + receipt_path = self.root / 'runtime/runs' / case['label'] / 'receipt.json' + if receipt_path.exists(): + root_receipt, root_pin = s.read_json(receipt_path, 4 * 1024 * 1024) + else: + root_receipt, root_pin = {'status': 'ABSENT_UNCLOSED_ROOT'}, None + failure = result['failure'] + if original_rc == 0 and (result['cleanup']['observed_after_root_exit'] or + result['cleanup']['reaped_adopted']): + failure = failure or {'type': 'OrphanAfterApparentPass', + 'message': 'Original root exit 0 retained; supervisor admission STOP'} + if not result['cleanup']['complete']: + failure = failure or {'type': 'CleanupIncomplete', 'message': 'Owned process groups not empty'} + originals = {'root_returncode': original_rc, 'root_status': root_receipt['status'], + 'root_receipt_pin': root_pin, 'root_stdout': result['outer_logs']['root.stdout.raw'], + 'root_stderr': result['outer_logs']['root.stderr.raw']} + row = {'label': case['label'], 'actual_consumer': 'wrapper+module-alias-proxy+supervisor+queue-v4', + 'original': originals, 'effective_admission': 'STOP' if failure else 'DEFER_TO_QUEUE_V4', + 'supervision_failure': failure, 'original_root_receipt_unchanged': True, + 'cleanup_before_queue_validation': True} + s.write_new(folder / 'PROXY.json', row) + self.records.append(row) + if failure: + s.stop_supplement(self.root, case['label'], failure) + raise RuntimeError('Root supervision rejected case; original status retained: ' + case['label']) + stdout_record, stdout = s.stable_file(folder / 'root.stdout.raw', s.LOG_CAP, True) + stderr_record, stderr = s.stable_file(folder / 'root.stderr.raw', s.LOG_CAP, True) + s.need(stdout_record == originals['root_stdout'] and stderr_record == originals['root_stderr'], + 'Original root command streams changed before queue consumption') + self.next += 1 + return subprocess.CompletedProcess(command, original_rc, stdout, stderr) + + +def main(): + began = time.monotonic() + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--root', type=Path, required=True) + parser.add_argument('--config', type=Path, required=True) + parser.add_argument('--policy', type=Path, required=True) + parser.add_argument('--source-sha256', required=True) + args = parser.parse_args() + s, source_manifest = source_packet(args.source_sha256) + s.launch_contract() + root = args.root.resolve() + config_path, policy_path = args.config.resolve(), args.policy.resolve() + s.need(config_path.is_relative_to(root / 'control') and policy_path.is_relative_to(root / 'control'), + 'Config and policy must be frozen round controls') + config, config_pin = s.read_json(config_path) + policy, policy_pin = s.read_json(policy_path) + s.need(set(policy) == {'queue', 'shared_seconds', 'root_seconds', 'root_address_space_bytes', 'root_rss_sum_bytes'}, + 'Exact supervisor policy shape required') + name = config['queue'] + s.need(type(name) is str and name.isalnum() and policy['queue'] == name, 'Queue policy identity differs') + s.need(type(policy['shared_seconds']) in (int, float) and 0 < policy['shared_seconds'] <= 600 and + type(policy['root_seconds']) in (int, float) and 0 < policy['root_seconds'] <= 190 and + type(policy['root_address_space_bytes']) is int and 0 < policy['root_address_space_bytes'] <= 1024 ** 3 and + type(policy['root_rss_sum_bytes']) is int and 0 < policy['root_rss_sum_bytes'] <= 1024 ** 3, + 'Unadmitted generic supervisor limits') + evidence = root / 'validation/attempts' / (name + '-supervision') + evidence.mkdir() + lock = s.parent_lock(root) + cap, initial = s.budget(root) + deadline = min(began + policy['shared_seconds'], began + cap - sum(initial.values())) + failure, proxy, keeper = None, None, None + old_argv = sys.argv + try: + subreaper, keeper = s.install_subreaper(root) + s.write_new(evidence / 'PARENT-SUBREAPER.json', subreaper) + path = root / 'integration/run_reviewed_queue_v4.py' + queue_pin, raw = s.stable_file(path, s.META_CAP, True) + s.need(queue_pin['sha256'] == s.QUEUE_SHA, 'Original reviewed queue-v4 bytes changed') + spec = importlib.util.spec_from_file_location('h25_original_queue_v4', path) + queue = importlib.util.module_from_spec(spec) + exec(compile(raw, str(path), 'exec'), queue.__dict__) + s.need(queue.ROOT == root and queue.subprocess is subprocess, 'Unexpected queue module binding') + proxy = RootProxy(s, root, config['cases'], evidence, policy, deadline) + # Only this authenticated module's alias changes. The stdlib module is intact. + queue.subprocess = proxy + sys.argv = [str(path), str(config_path)] + queue.main() + s.need(proxy.next == len(config['cases']), 'Queue omitted a registered root call') + s.need(not s.children_now(), 'Wrapper finished with children still present') + s.need(s.stable_file(config_path, s.META_CAP)['sha256'] == config_pin['sha256'] and + s.stable_file(policy_path, s.META_CAP)['sha256'] == policy_pin['sha256'], 'Control policy changed') + except BaseException as error: + failure = {'type': type(error).__name__, 'message': str(error)[:2048]} + raise + finally: + sys.argv = old_argv + try: + s.packet_unchanged(Path(__file__).resolve().parent, source_manifest) + except BaseException as error: + failure = failure or {'type': type(error).__name__, 'message': str(error)[:2048]} + elapsed = time.monotonic() - began + current = s.ledger(root, allow_unclosed=True) + s.need(all(current.get(k) == v for k, v in initial.items()), 'Prior cost records changed') + nested = sum(v for k, v in current.items() if k not in initial) + residual = max(0.0, elapsed - nested) + if time.monotonic() > deadline: + failure = failure or {'type': 'SupervisorBudget', 'message': 'Full wrapper bound crossed; cleanup remains charged'} + result = {'schema': 'h25-queue-v4-supervisor-envelope-v1', 'queue': name, + 'status': 'STOP' if failure else 'SUPERVISED_QUEUE_V4_COMPLETE', 'failure': failure, + 'actual_consumer': 'wrapper+module-alias-proxy+supervisor+queue-v4', + 'original_queue_sha256': s.QUEUE_SHA, 'original_root_sha256': s.RUNNER_SHA, + 'source_manifest_sha256': args.source_sha256, 'config_pin': config_pin, 'policy_pin': policy_pin, + 'controls': [] if proxy is None else proxy.records, + 'complete_wrapper_seconds_before_own_receipt': elapsed, + 'nested_queue_and_root_seconds': nested, 'wrapper_residual_seconds': residual, + 'outer_GNU_time_final_tail_reconciliation_required': True, + 'subreaper_is_same_queue_process': True, 'original_root_receipts_preserved': True} + folder = root / 'runtime/runs' / (name + '-supervisor-overhead') + folder.mkdir() + s.write_new(folder / 'START.json', {'kind': 'parent_cost_only'}) + s.write_new(folder / 'receipt.json', dict(result, label=folder.name, kind='parent_cost_only', + wall_seconds=residual, runner_wall_seconds=residual)) + s.write_new(evidence / 'WRAPPER.json', result) + lock.close() + if failure: + raise SystemExit(1) + + +if __name__ == '__main__': + main() diff --git a/research/h25-v03-bounded-prefix-caller/archive/unit06/fixtures/caller_preservation_v1.json b/research/h25-v03-bounded-prefix-caller/archive/unit06/fixtures/caller_preservation_v1.json new file mode 100644 index 0000000000..195e3e53af --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/archive/unit06/fixtures/caller_preservation_v1.json @@ -0,0 +1,44 @@ +{ + "schema": "unit06-caller-source-author-v1", + "recorded_utc": "2026-11-02T13:28:12.321488+00:00", + "source": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit06/implementation/run_queue4_prefix_v1.py", + "sha256": "90a7ed4a45b94e16fa313623e56f6f3efcd85f3ea40355a43b289d8c49a75825", + "bytes": 34412, + "original_wrapper_sha256": "ea4c07337ccc1865accfd1b1fe485d51057a04a49e4bfb5f10cc36dc92b5f9a8", + "shared_T0_support_bytes": 9574, + "shared_T0_support_sha256": "c20523438a6bb49ef43ea527cf6c96a07542cadea72a77eb822c54f8f64fb863", + "source_packet_and_RootProxy_text_unchanged": true, + "main_changes": [ + "two independent-selection CLI arguments", + "actual _caller_admit before source_packet first project execution", + "PriorAdmittedRootProxy actual full selection/stage recheck before unchanged RootProxy.run", + "final selection recheck and startup-read accounting within original began/budget/history residual path" + ], + "original_queue_runner_supervisor_functions_imported_or_executed_during_authoring": false, + "tests_or_candidate_code_run": false, + "execution_owner": "c05_header_closure author worker only", + "prebudget_failure_limit": "Startup remains under earliest original began. If prior authentication fails before original supervisor/budget availability, retained new owner/raw error remain and the genuine outer launcher must bill its actual tail; no fabricated untrusted ledger write or zero cost. Original wrapper overhead excludes own receipt tail and retains external GNU-time reconciliation.", + "selection_keys": [ + "config", + "entry", + "policy", + "queue_sha256", + "root", + "runner_sha256", + "schema", + "source_packet", + "stages" + ], + "stage_selection_keys": [ + "bootstrap", + "entry", + "excluded_stage_manifests", + "jobs", + "manifest", + "stage" + ], + "future_runtime_admission": false, + "full_C05": false, + "full_V03": false, + "costs": "OPEN_NOT_ZERO" +} diff --git a/research/h25-v03-bounded-prefix-caller/archive/unit06/implementation/predecessor_entry.py b/research/h25-v03-bounded-prefix-caller/archive/unit06/implementation/predecessor_entry.py new file mode 100644 index 0000000000..5afb10ca80 --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/archive/unit06/implementation/predecessor_entry.py @@ -0,0 +1,365 @@ +"""Conditional Unit06 authenticated entry. No original project imports at load. + +T0 is the original trusted first-launcher/OS/interpreter/system-stdlib premise. +Source selection does not create source, native, C05/C07, funding or runtime +admission. Do not call main except in a separately admitted genuine instance. +""" +from __future__ import annotations +import ast +import builtins +import hashlib +import json +import os +from pathlib import Path +import stat +import sys +import types + +FILE_CAP=64*1024*1024 +TOTAL_CAP=256*1024*1024 +RECORD_CAP=1024*1024 +MAX_ROWS=8192 +IDENTITY_KEYS=('device','inode','mode','links','uid','gid','size','mtime_ns','ctime_ns') +ENV={'PATH':'/usr/bin:/bin','PYTHONHASHSEED':'0','LANG':'C.UTF-8','LC_ALL':'C.UTF-8','TZ':'UTC','PYTHONDONTWRITEBYTECODE':'1'} +SYSTEM_PATH=('/usr/lib/python312.zip','/usr/lib/python3.12','/usr/lib/python3.12/lib-dynload') + + +class Stop(RuntimeError):pass + + +def need(condition,message): + if condition is not True:raise Stop(message) + + +def plain(value): + nodes=text=0 + def walk(item,depth): + nonlocal nodes,text + nodes+=1 + need(depth<=24 and nodes<=65536,'plain structure bound') + kind=type(item) + if item is None or kind is bool:return + if kind is int:need(-(1<<127)<=item<(1<<127),'integer bound');return + if kind is str: + text+=len(item);need(len(item)<=8192 and text<=524288,'text bound');return + need(kind is list or kind is dict,'exact plain value required') + need(len(item)<=MAX_ROWS,'container bound') + if kind is list: + for child in item:walk(child,depth+1) + else: + for key,child in item.items(): + need(type(key) is str,'exact string key required');walk(key,depth+1);walk(child,depth+1) + walk(value,0) + + +def canonical(value,cap=RECORD_CAP): + need(type(cap) is int and 0<=cap<=FILE_CAP,'exact record cap') + plain(value) + raw=(json.dumps(value,sort_keys=True,separators=(',',':'),ensure_ascii=True,allow_nan=False)+'\n').encode('ascii') + need(len(raw)<=cap,'canonical record cap');return raw + + +def decode(raw,cap=RECORD_CAP): + need(type(cap) is int and 0<=cap<=FILE_CAP,'exact decode cap') + need(type(raw) is bytes and len(raw)<=cap,'raw record cap/type') + def pairs(rows): + result={} + for key,value in rows: + need(key not in result,'duplicate JSON key');result[key]=value + return result + def bad(token):raise Stop('non-integer JSON number') + value=json.loads(raw,object_pairs_hook=pairs,parse_float=bad,parse_constant=bad) + plain(value);return value + + +def path_text(value): + need(type(value) is str and 10 and row['size']==pin['bytes'] and stat.S_ISREG(row['mode']) and row['links']==1,'regular single-link identity') + + +class Owner: + """New T0-side retained failure state, never an original capability.""" + def __init__(self): + self.primary=None;self.secondary=[];self.pending=False;self.quarantined=False + self.busy=False;self.burned=False;self.fd_slots=[];self.captures=[];self.total_bytes=0 + self.read_calls=0;self.write_calls=0 + self.last_block=None;self.last_raw=None;self.modules={};self.published=[];self.executed=[] + self.phase='NEW';self.result=None + def ready(self): + if self.primary is not None:raise self.primary + need(not self.quarantined and not self.pending and not self.busy,'owner terminal/uncertain') + def fail(self,error): + if self.primary is None:self.primary=error + elif error is not self.primary:self.secondary.append(error) + self.quarantined=True + return self.primary + + +def _retained_read(path,expected_sha256,cap,owner,expected_pin=None): + """Actual descriptor-bound read. Returned source bytes are never reopened for exec.""" + need(type(owner) is Owner,'actual local owner required');owner.ready();path_text(path) + need(type(cap) is int and 0<=cap<=FILE_CAP,'read cap') + if expected_sha256 is not None: + need(type(expected_sha256) is str and len(expected_sha256)==64 and all(c in '0123456789abcdef' for c in expected_sha256),'prior digest') + if expected_pin is not None:validate_blob(expected_pin,cap);need(expected_pin['path']==path and expected_pin['sha256']==expected_sha256,'prior pin path/digest') + record={'path':path,'chunks':[],'raw':None,'observed':None,'read_calls':0};owner.captures.append(record) + owner.fd_slots.append(None);slot=len(owner.fd_slots)-1;primary=None;owner.busy=True + try: + before=identity(os.stat(path,follow_symlinks=False)) + need(stat.S_ISREG(before['mode']) and before['links']==1 and before['size']<=cap,'source kind/link/size') + owner.pending=True + owner.fd_slots[slot]=os.open(path,os.O_RDONLY|os.O_NOFOLLOW|os.O_NONBLOCK|os.O_CLOEXEC) + owner.pending=False + opened=identity(os.fstat(owner.fd_slots[slot]));need(before==opened,'source open drift') + if expected_pin is not None:need(opened==expected_pin['identity'],'source installed identity differs') + count=0 + while count0 and row['size']==pin['bytes'] and stat.S_ISREG(row['mode']) and row['links']==1,'regular single-link identity') + + +class Owner: + """New T0-side retained failure state, never an original capability.""" + def __init__(self): + self.primary=None;self.secondary=[];self.pending=False;self.quarantined=False + self.busy=False;self.burned=False;self.fd_slots=[];self.captures=[];self.total_bytes=0 + self.last_block=None;self.last_raw=None;self.modules={};self.published=[];self.executed=[] + self.phase='NEW';self.result=None + def ready(self): + if self.primary is not None:raise self.primary + need(not self.quarantined and not self.pending and not self.busy,'owner terminal/uncertain') + def fail(self,error): + if self.primary is None:self.primary=error + elif error is not self.primary:self.secondary.append(error) + self.quarantined=True + return self.primary + + +def _retained_read(path,expected_sha256,cap,owner,expected_pin=None): + """Actual descriptor-bound read. Returned source bytes are never reopened for exec.""" + need(type(owner) is Owner,'actual local owner required');owner.ready();path_text(path) + need(type(cap) is int and 0<=cap<=FILE_CAP,'read cap') + if expected_sha256 is not None: + need(type(expected_sha256) is str and len(expected_sha256)==64 and all(c in '0123456789abcdef' for c in expected_sha256),'prior digest') + if expected_pin is not None:validate_blob(expected_pin,cap);need(expected_pin['path']==path and expected_pin['sha256']==expected_sha256,'prior pin path/digest') + record={'path':path,'chunks':[],'raw':None,'observed':None};owner.captures.append(record) + owner.fd_slots.append(None);slot=len(owner.fd_slots)-1;primary=None;owner.busy=True + try: + before=identity(os.stat(path,follow_symlinks=False)) + need(stat.S_ISREG(before['mode']) and before['links']==1 and before['size']<=cap,'source kind/link/size') + owner.pending=True + owner.fd_slots[slot]=os.open(path,os.O_RDONLY|os.O_NOFOLLOW|os.O_NONBLOCK|os.O_CLOEXEC) + owner.pending=False + opened=identity(os.fstat(owner.fd_slots[slot]));need(before==opened,'source open drift') + if expected_pin is not None:need(opened==expected_pin['identity'],'source installed identity differs') + count=0 + while count 262144 or hashlib.sha256(raw).hexdigest() != expected: + raise RuntimeError('Parent-reviewed source manifest differs') + manifest = json.loads(raw) + blobs = {} + for name, row in manifest['files'].items(): + if Path(name).name != name or name == 'SOURCE-READINESS.json': + raise RuntimeError('Unsafe source packet member') + path = here / name + if path.is_symlink() or path.stat().st_mode & 0o222: + raise RuntimeError('Parent must freeze the concrete source packet readonly') + with path.open('rb') as stream: + data = stream.read(262145) + if len(data) > 262144 or len(data) != row['bytes'] or hashlib.sha256(data).hexdigest() != row['sha256']: + raise RuntimeError('Source packet member differs: ' + name) + blobs[name] = data + if blobs[Path(__file__).name] != Path(__file__).read_bytes(): + raise RuntimeError('Actual queue entry differs from frozen source packet') + path = here / 'supervisor.py' + spec = importlib.util.spec_from_file_location('h25_parent_supervisor', path) + module = importlib.util.module_from_spec(spec) + exec(compile(blobs['supervisor.py'], str(path), 'exec'), module.__dict__) + return module, manifest + + + +class RootProxy: + def __init__(self, supervisor, root, cases, evidence, policy, deadline): + self.s, self.root, self.cases = supervisor, root, cases + self.evidence, self.policy, self.deadline = evidence, policy, deadline + self.next = 0 + self.records = [] + + def run(self, command, **kwargs): + s = self.s + s.need(self.next < len(self.cases), 'Unregistered extra queue root command') + case = self.cases[self.next] + expected = ['/usr/bin/python3.12', *s.FLAGS, str(self.root / 'run_guarded_v3.py'), + case['stage'], case['job'], case['label']] + s.need(command == expected and set(kwargs) == {'cwd', 'env', 'capture_output', 'timeout'} and + kwargs['cwd'] == self.root and kwargs['env'] == s.ENV and + kwargs['capture_output'] is True and kwargs['timeout'] == 190, + 'Queue subprocess alias call exceeded its exact reviewed interface') + folder = self.evidence / case['label'] + result = s.run_root(self.root, case, folder, self.policy['root_seconds'], self.deadline, + self.policy['root_address_space_bytes'], self.policy['root_rss_sum_bytes']) + original_rc = result['returncode'] + receipt_path = self.root / 'runtime/runs' / case['label'] / 'receipt.json' + if receipt_path.exists(): + root_receipt, root_pin = s.read_json(receipt_path, 4 * 1024 * 1024) + else: + root_receipt, root_pin = {'status': 'ABSENT_UNCLOSED_ROOT'}, None + failure = result['failure'] + if original_rc == 0 and (result['cleanup']['observed_after_root_exit'] or + result['cleanup']['reaped_adopted']): + failure = failure or {'type': 'OrphanAfterApparentPass', + 'message': 'Original root exit 0 retained; supervisor admission STOP'} + if not result['cleanup']['complete']: + failure = failure or {'type': 'CleanupIncomplete', 'message': 'Owned process groups not empty'} + originals = {'root_returncode': original_rc, 'root_status': root_receipt['status'], + 'root_receipt_pin': root_pin, 'root_stdout': result['outer_logs']['root.stdout.raw'], + 'root_stderr': result['outer_logs']['root.stderr.raw']} + row = {'label': case['label'], 'actual_consumer': 'wrapper+module-alias-proxy+supervisor+queue-v4', + 'original': originals, 'effective_admission': 'STOP' if failure else 'DEFER_TO_QUEUE_V4', + 'supervision_failure': failure, 'original_root_receipt_unchanged': True, + 'cleanup_before_queue_validation': True} + s.write_new(folder / 'PROXY.json', row) + self.records.append(row) + if failure: + s.stop_supplement(self.root, case['label'], failure) + raise RuntimeError('Root supervision rejected case; original status retained: ' + case['label']) + stdout_record, stdout = s.stable_file(folder / 'root.stdout.raw', s.LOG_CAP, True) + stderr_record, stderr = s.stable_file(folder / 'root.stderr.raw', s.LOG_CAP, True) + s.need(stdout_record == originals['root_stdout'] and stderr_record == originals['root_stderr'], + 'Original root command streams changed before queue consumption') + self.next += 1 + return subprocess.CompletedProcess(command, original_rc, stdout, stderr) + + +# Unit06 caller additions. Expected pins originate in the independently admitted +# --selection bytes/hash, never in observed candidate data. T0 authenticates this +# actual caller before its first body; none of these checks create that premise. +CALLER_QUEUE_SHA='1348a7b4d7cc1f9fef556f5e0abdaf04411a998afdcd574d7812c76ab37dcf68' +CALLER_RUNNER_SHA='bd882e3dadb1b6aeaa63ee824f1a1c58f8ef2546b6840a2bffa46885a184d3eb' +CALLER_SUPERVISOR_SHA='cfb09a18dd10b597cc6d5a8139ee769bef679bc44ae029329755e3d97b055075' +CALLER_KEYS={'schema','root','config','policy','source_packet','entry','stages','queue_sha256','runner_sha256'} +CALLER_STAGE_KEYS={'stage','manifest','entry','bootstrap','jobs','excluded_stage_manifests'} +CALLER_FALSE_FIELDS=('production_completion','full_c05','full_v03','runtime_qualified','enclosing_parent_exit_observed') +_CALLER_ADMISSION=None +_CALLER_FAILURE_OWNER=None + + +def _caller_simple(value): + need(type(value) is str and 0 deadline: + failure = failure or {'type': 'SupervisorBudget', 'message': 'Full wrapper bound crossed; cleanup remains charged'} + result = {'schema': 'h25-queue-v4-supervisor-envelope-v1', 'queue': name, + 'status': 'STOP' if failure else 'SUPERVISED_QUEUE_V4_COMPLETE', 'failure': failure, + 'actual_consumer': 'wrapper+module-alias-proxy+supervisor+queue-v4', + 'original_queue_sha256': s.QUEUE_SHA, 'original_root_sha256': s.RUNNER_SHA, + 'source_manifest_sha256': args.source_sha256, 'config_pin': config_pin, 'policy_pin': policy_pin, + 'controls': [] if proxy is None else proxy.records, + 'prior_selection_sha256': args.selection_sha256, + 'new_caller_retained_read_bytes': admission['owner'].total_bytes, + 'new_caller_rechecks': admission['rechecks'], + 'startup_authentication_in_original_began_budget': True, + 'C05_V03_runtime_admission_added': False, + 'complete_wrapper_seconds_before_own_receipt': elapsed, + 'nested_queue_and_root_seconds': nested, 'wrapper_residual_seconds': residual, + 'outer_GNU_time_final_tail_reconciliation_required': True, + 'subreaper_is_same_queue_process': True, 'original_root_receipts_preserved': True} + folder = root / 'runtime/runs' / (name + '-supervisor-overhead') + folder.mkdir() + s.write_new(folder / 'START.json', {'kind': 'parent_cost_only'}) + s.write_new(folder / 'receipt.json', dict(result, label=folder.name, kind='parent_cost_only', + wall_seconds=residual, runner_wall_seconds=residual)) + s.write_new(evidence / 'WRAPPER.json', result) + lock.close() + if failure: + raise SystemExit(1) + + +if __name__ == '__main__': + main() diff --git a/research/h25-v03-bounded-prefix-caller/archive/unit06/prerequisites/h25_parent_supervisor.py.txt b/research/h25-v03-bounded-prefix-caller/archive/unit06/prerequisites/h25_parent_supervisor.py.txt new file mode 100644 index 0000000000..73ed60fe21 --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/archive/unit06/prerequisites/h25_parent_supervisor.py.txt @@ -0,0 +1,475 @@ +"""Parent-only bounded process supervision; imports no candidate implementation. + +The runtime caller must establish the trusted clean launcher before calling us. +This source was prepared without loading ctypes or running any control. The +closed single-threaded child domain is an explicit premise, not a hostile-fork +sandbox. Numeric process IDs are never used as signal destinations. +""" +import fcntl +import hashlib +import json +import os +from pathlib import Path +import resource +import signal +import stat +import subprocess +import sys +import time + +FLAGS = ('-S', '-s', '-P', '-B') +ENV = {'PATH': '/usr/bin:/bin', 'PYTHONHASHSEED': '0', 'LANG': 'C.UTF-8', + 'LC_ALL': 'C.UTF-8', 'TZ': 'UTC', 'PYTHONDONTWRITEBYTECODE': '1'} +RUNNER_SHA = 'bd882e3dadb1b6aeaa63ee824f1a1c58f8ef2546b6840a2bffa46885a184d3eb' +QUEUE_SHA = '1348a7b4d7cc1f9fef556f5e0abdaf04411a998afdcd574d7812c76ab37dcf68' +TCB_SHA = '610492b3fc06baa0560175edc3ba27057de00d00b8fd3d58dbe55e5a371c042a' +LIBC = '/usr/lib/x86_64-linux-gnu/libc.so.6' +NATIVE_PINS = { + LIBC: '3a15d66867d83762c7f2f1e37359cb8f6c5743edb369c65285cb0b1c4f7498bf', + '/usr/lib/python3.12/lib-dynload/_ctypes.cpython-312-x86_64-linux-gnu.so': 'aad3e24f186e6c0a1c7efa8f16004f951f527db86f6451d30118657384a456c1', + '/usr/lib/x86_64-linux-gnu/libffi.so.8.1.4': '00f593fe192f2851b8ce23b25cec2488d769beb5a8f63e8c9e563071e1075153', + '/usr/lib/python3.12/ctypes/__init__.py': '0782592567ad71097198a3afe985ac3e2ea0b9b5e75452402c9460c89a86318a', + '/usr/lib/python3.12/ctypes/_endian.py': 'c5d692bdce10dfee242752620061bab684633bc72445a3def484961ef1bdbf3a', +} +CHUNK = 65536 +LOG_CAP = 2 * 1024 * 1024 +META_CAP = 256 * 1024 +CLEANUP_SECONDS = 2.0 + + +def need(condition, message): + if not condition: + raise RuntimeError(message) + + +def launch_contract(): + need(sys.executable == '/usr/bin/python3.12', 'Pinned interpreter required') + need(sys.flags.no_site == sys.flags.no_user_site == sys.flags.dont_write_bytecode == 1 and + sys.flags.safe_path and sys.flags.ignore_environment == sys.flags.isolated == + sys.flags.hash_randomization == 0, 'Trusted no-site safe-path fixed-seed flags required') + need(dict(os.environ) == ENV, 'Exact clean environment required') + need(tuple(sys.path) == ('/usr/lib/python312.zip', '/usr/lib/python3.12', + '/usr/lib/python3.12/lib-dynload'), 'Initial system stdlib path changed') + need(list(Path('/proc/self/task').iterdir()) == [Path('/proc/self/task') / str(os.getpid())], + 'Exactly one parent task required') + + +def identity(info): + return (info.st_dev, info.st_ino, info.st_mode, info.st_size, info.st_mtime_ns, info.st_ctime_ns) + + +def stable_file(path, limit, keep=False): + """Complete bounded snapshot; no file read can extend a growing snapshot.""" + path = Path(path) + before = path.stat(follow_symlinks=False) + need(stat.S_ISREG(before.st_mode) and before.st_size <= limit, 'File type/size bound: ' + str(path)) + fd = os.open(path, os.O_RDONLY | os.O_NOFOLLOW | os.O_NONBLOCK | os.O_CLOEXEC) + h, count, blocks = hashlib.sha256(), 0, [] + try: + opened = os.fstat(fd) + need(identity(before) == identity(opened), 'File changed while opening') + while count < opened.st_size: + block = os.read(fd, min(CHUNK, opened.st_size - count)) + need(bool(block), 'Short retained-file read') + count += len(block) + h.update(block) + if keep: + blocks.append(block) + after_fd = os.fstat(fd) + finally: + os.close(fd) + after = path.stat(follow_symlinks=False) + need(identity(before) == identity(after_fd) == identity(after), 'File drift during retained snapshot') + row = {'path': str(path), 'sha256': h.hexdigest(), 'bytes': count, + 'identity': list(identity(after)), 'stable': True, 'read_chunk_bytes': CHUNK} + return (row, b''.join(blocks)) if keep else row + + +def read_json(path, limit=META_CAP): + row, raw = stable_file(path, limit, True) + return json.loads(raw), row + + +def write_new(path, row): + raw = json.dumps(row, sort_keys=True, indent=2).encode('ascii') + b'\n' + need(len(raw) <= META_CAP, 'Bounded metadata record exceeded') + fd = os.open(path, os.O_WRONLY | os.O_CREAT | os.O_EXCL | os.O_CLOEXEC | os.O_NOFOLLOW, 0o600) + try: + view = memoryview(raw) + while view: + written = os.write(fd, view) + need(written > 0, 'Metadata write made no progress') + view = view[written:] + os.fsync(fd) + finally: + os.close(fd) + + +def proc(pid): + try: + with open('/proc/' + str(pid) + '/stat', 'rb') as stream: + raw = stream.read(8193) + need(len(raw) <= 8192, 'Unexpected process-stat size') + end = raw.rfind(b') ') + need(end >= 0, 'Malformed process stat') + fields = raw[end + 2:].split() + return {'pid': int(pid), 'ppid': int(fields[1]), 'pgid': int(fields[2]), + 'sid': int(fields[3]), 'start_ticks': int(fields[19]), + 'state': fields[0].decode('ascii'), + 'rss_bytes': int(fields[21]) * os.sysconf('SC_PAGE_SIZE')} + except (FileNotFoundError, ProcessLookupError, PermissionError): + return None + + +def census(): + found = {} + with os.scandir('/proc') as entries: + for entry in entries: + if entry.name.isdecimal(): + row = proc(int(entry.name)) + if row is not None: + found[row['pid']] = row + return found + + +def generation(row): + return row['pid'], row['start_ticks'] + + +def children_now(): + return [row for row in census().values() if row['ppid'] == os.getpid()] + + +def install_subreaper(root): + """Called only by the future parent, before any controlled root exists.""" + launch_contract() + need(not children_now(), 'Parent must own no preexisting child processes') + tcb, tcb_row = read_json(root / 'control/NATIVE-INITIAL-TCB-v1.json') + need(tcb_row['sha256'] == TCB_SHA, 'Accepted initial TCB changed') + need(any(row['path'] == LIBC and row['sha256'] == NATIVE_PINS[LIBC] + for row in tcb['files']), 'Pinned libc absent from accepted TCB') + evidence = {path: stable_file(path, 16 * 1024 * 1024) for path in NATIVE_PINS} + need(all(evidence[path]['sha256'] == expected for path, expected in NATIVE_PINS.items()), + 'Subreaper native/stdlib source supplement changed') + # This import and native call have NOT been performed during source authoring. + need(Path('/usr/lib/x86_64-linux-gnu/libffi.so.8').resolve() == + Path('/usr/lib/x86_64-linux-gnu/libffi.so.8.1.4'), 'Foreign libffi SONAME resolution') + import ctypes + need(sys.modules['_ctypes'].__file__ == + '/usr/lib/python3.12/lib-dynload/_ctypes.cpython-312-x86_64-linux-gnu.so', 'Foreign _ctypes owner') + need(ctypes.__file__ == '/usr/lib/python3.12/ctypes/__init__.py', 'Foreign ctypes owner') + library = ctypes.CDLL(LIBC, use_errno=True) + call = library.prctl + call.argtypes = [ctypes.c_int, ctypes.c_ulong, ctypes.c_ulong, ctypes.c_ulong, ctypes.c_ulong] + call.restype = ctypes.c_int + prior, actual = ctypes.c_int(), ctypes.c_int() + need(call(37, ctypes.addressof(prior), 0, 0, 0) == 0, 'PR_GET_CHILD_SUBREAPER failed') + need(call(36, 1, 0, 0, 0) == 0, 'PR_SET_CHILD_SUBREAPER failed') + need(call(37, ctypes.addressof(actual), 0, 0, 0) == 0 and actual.value == 1, + 'Same-process subreaper readback failed') + for path, expected in NATIVE_PINS.items(): + need(stable_file(path, 16 * 1024 * 1024)['sha256'] == expected, 'TCB bytes changed across load') + # Retain the CDLL and typed function in the owning parent for its whole queue. + return {'pid': os.getpid(), 'prior': prior.value, 'actual': actual.value, + 'tcb_sha256': TCB_SHA, 'native_source_evidence': evidence, + 'trust': 'Trusted OS/loader/initial system stdlib; file pins do not authenticate native memory'}, (library, call) + + +def ledger(root, allow_unclosed=False): + result = {} + runs = root / 'runtime/runs' + for folder in sorted(runs.iterdir()): + need(folder.is_dir() and not folder.is_symlink(), 'Unexpected round run entry') + if allow_unclosed and not (folder / 'receipt.json').exists(): + continue + receipt, _ = read_json(folder / 'receipt.json', 4 * 1024 * 1024) + amount = receipt.get('runner_wall_seconds', receipt.get('wall_seconds')) + need(type(amount) in (int, float) and amount >= 0, 'Invalid ledger amount') + result[folder.name] = float(amount) + return result + + +def budget(root): + phase, _ = read_json(root / 'control/EXECUTION-PHASE.json') + cap = phase['aggregate_cap_seconds'] + need(type(cap) is int and cap in (600, 2400), 'Unrecognized budget phase') + current = ledger(root) + need(sum(current.values()) < cap, 'Round budget consumed') + return cap, current + + +def parent_lock(root): + lock = (root / 'runtime/parent-queue.lock').open('a') + try: + fcntl.flock(lock, fcntl.LOCK_EX | fcntl.LOCK_NB) + except BaseException: + lock.close() + raise + return lock + + +class ExecutionDeadline(RuntimeError): + pass + + +def deadline_handler(signum, frame): + raise ExecutionDeadline('Outer execution deadline reached, including Popen/preexec') + + +class OwnedDomain: + """Only our new children and their observed descendants enter this domain.""" + def __init__(self): + need(not children_now(), 'Owned child domain was not initially empty') + self.rows, self.fds, self.groups, self.reaped = {}, {}, set(), [] + self.root = None + self.parent_group = os.getpgrp() + self.parent_session = os.getsid(0) + + def add(self, row): + key = generation(row) + if key in self.rows: + if row['pgid'] != self.parent_group: + self.groups.add((row['pgid'], row['sid'])) + return + need(len(self.rows) < 128, 'Owned process observation limit exceeded') + need(row['pid'] != os.getpid(), 'Parent cannot enter its own child domain') + try: + fd = os.pidfd_open(row['pid'], 0) + except ProcessLookupError: + return + current = proc(row['pid']) + if current is None or generation(current) != key: + os.close(fd) + return + self.rows[key], self.fds[key] = dict(current), fd + # During interrupted Popen a child can briefly precede setsid. Its + # individual pidfd is owned; the queue parent group never is. + if current['pgid'] != self.parent_group: + self.groups.add((current['pgid'], current['sid'])) + + def observe(self): + all_rows = census() + known = {pid for pid, start in self.rows if pid in all_rows and + all_rows[pid]['start_ticks'] == start} + for pid in known: + self.add(all_rows[pid]) + changed = True + while changed: + changed = False + for pid, row in all_rows.items(): + if pid not in known and (row['ppid'] == os.getpid() or row['ppid'] in known): + self.add(row) + if generation(row) in self.rows: + known.add(pid) + changed = True + return all_rows, [all_rows[pid] for pid in known] + + def kill_owned(self): + self.observe() + for key, fd in self.fds.items(): + current = proc(key[0]) + if current is not None and generation(current) == key and current['state'] != 'Z': + try: + signal.pidfd_send_signal(fd, signal.SIGKILL, None, 0) + except ProcessLookupError: + pass + + def cleanup(self, process): + start = time.monotonic() + seen_after_root = [] + completed = False + while True: + _, current = self.observe() + if process is not None and process.returncode is not None: + seen_after_root.extend(generation(row) for row in current if row['pid'] != process.pid) + self.kill_owned() + if process is not None: + process.poll() + for key in list(self.rows): + row = proc(key[0]) + if row is None or generation(row) != key or row['ppid'] != os.getpid(): + continue + if process is not None and row['pid'] == process.pid: + continue + try: + pid, status = os.waitpid(row['pid'], os.WNOHANG) + except ChildProcessError: + continue + if pid: + self.reaped.append({'pid': pid, 'start_ticks': key[1], 'wait_status': status}) + all_rows, current = self.observe() + occupied = [row for row in all_rows.values() if (row['pgid'], row['sid']) in self.groups] + if not current and not occupied and not children_now(): + completed = True + break + if time.monotonic() - start >= CLEANUP_SECONDS: + break + time.sleep(0.01) + final_rows = census() + remaining = [row for row in final_rows.values() if + generation(row) in self.rows or (row['pgid'], row['sid']) in self.groups or + row['ppid'] == os.getpid()] + for fd in self.fds.values(): + os.close(fd) + self.fds.clear() + return {'complete': completed and not remaining, + 'owned_generations': list(self.rows.values()), + 'groups': [{'pgid': g, 'sid': s} for g, s in sorted(self.groups)], + 'reaped_adopted': self.reaped, + 'observed_after_root_exit': [list(key) for key in sorted(set(seen_after_root))], + 'remaining': remaining, 'cleanup_seconds': time.monotonic() - start, + 'cleanup_tail_limit_seconds': CLEANUP_SECONDS, + 'group_empty_proved': completed and not remaining, + 'signal_method': 'SIGKILL via generation-checked pidfd only; never killpg'} + + +def reconcile_missing_receipt(root, label, began, cause, cleanup): + folder = root / 'runtime/runs' / label + folder.mkdir(exist_ok=True) + if not cleanup['complete'] and not (folder / 'receipt.json').exists(): + # A surviving root must never race a replacement canonical receipt. + # Leave its attempt unclosed, blocking the unchanged runner, and add a + # distinct charged STOP record for the parent to reconcile manually. + folder = root / 'runtime/runs' / (label + '-outer-unclosed-stop') + folder.mkdir() + path = folder / 'receipt.json' + if path.exists(): + return None + start = {} + if (folder / 'START.json').exists(): + start, _ = read_json(folder / 'START.json') + row = dict(start, schema='h25-outer-reconciled-stop-v1', status='STOP', label=label, + kind='outer_reconciled_incomplete_root', termination=cause, attempt_label=label, + wall_seconds=time.monotonic() - began, original_root_receipt_absent=True, + original_root_completion_claimed=False, cleanup_complete=cleanup['complete'], + all_prior_files_preserved=True) + row['label'] = folder.name + row['runner_wall_seconds'] = row['wall_seconds'] + if not (folder / 'START.json').exists(): + write_new(folder / 'START.json', {'kind': row['kind'], 'label': label}) + write_new(path, row) + return row + + +def run_root(root, case, evidence, seconds, shared_deadline, as_bytes=201326592, + rss_bytes=201326592): + """One root. Cleanup and stable custody finish before returning to a queue.""" + launch_contract() + need(stable_file(root / 'run_guarded_v3.py', META_CAP)['sha256'] == RUNNER_SHA, + 'Actual root runner changed') + need(time.monotonic() + CLEANUP_SECONDS < shared_deadline, 'No reserved cleanup tail remains') + command = ['/usr/bin/python3.12', *FLAGS, str(root / 'run_guarded_v3.py'), + case['stage'], case['job'], case['label']] + for value in (case['stage'], case['job'], case['label']): + need(type(value) is str and value and all(c in 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_' for c in value), + 'Unsafe case identity') + evidence.mkdir() + need(type(seconds) in (int, float) and 0 < seconds <= 190, 'Unadmitted root deadline') + need(type(as_bytes) is int and 0 < as_bytes <= 1024 ** 3, 'Unadmitted root address-space bound') + need(type(rss_bytes) is int and 0 < rss_bytes <= 1024 ** 3, 'Unadmitted aggregate RSS bound') + began = time.monotonic() + deadline = min(began + seconds, shared_deadline - CLEANUP_SECONDS) + domain = OwnedDomain() + process, failure, cleanup = None, None, None + peak, spawn_entered, captured = 0, False, None + setter, limit_kind, limits = resource.setrlimit, resource.RLIMIT_AS, (as_bytes, as_bytes) + need(list(Path('/proc/self/task').iterdir()) == [Path('/proc/self/task') / str(os.getpid())], + 'Root preexec requires exactly one task') + def child_limit(): + setter(limit_kind, limits) + old_handler = signal.getsignal(signal.SIGALRM) + need(signal.getitimer(signal.ITIMER_REAL) == (0.0, 0.0), 'Parent already has an execution alarm') + write_new(evidence / 'LAUNCH.json', {'command': command, 'parent_pid': os.getpid(), + 'parent_pgid': os.getpgrp(), 'parent_sid': os.getsid(0), + 'root_execution_seconds': seconds, 'address_space_bytes': as_bytes, + 'rss_sum_bytes': rss_bytes, 'new_session': True, 'cleanup_reserved_seconds': CLEANUP_SECONDS}) + try: + with (evidence / 'root.stdout.raw').open('xb') as out, (evidence / 'root.stderr.raw').open('xb') as err: + signal.signal(signal.SIGALRM, deadline_handler) + signal.setitimer(signal.ITIMER_REAL, max(0.000001, deadline - time.monotonic())) + try: + spawn_entered = True + process = subprocess.Popen(command, cwd=root, env=dict(ENV), stdout=out, + stderr=err, start_new_session=True, preexec_fn=child_limit) + # Popen leaves an exited root waitable; capture its generation BEFORE poll. + captured = proc(process.pid) + need(captured is not None and captured['pgid'] == captured['sid'] == process.pid, + 'New root process/session identity missing') + domain.root = generation(captured) + domain.add(captured) + write_new(evidence / 'ROOT-PROCESS.json', captured) + while True: + _, current = domain.observe() + peak = max(peak, sum(row['rss_bytes'] for row in current)) + need(peak <= rss_bytes, 'Owned process RSS sum exceeded') + need(max((evidence / name).stat().st_size for name in + ('root.stdout.raw', 'root.stderr.raw')) <= LOG_CAP, 'Outer raw log cap exceeded') + if process.poll() is not None: + break + time.sleep(0.01) + finally: + signal.setitimer(signal.ITIMER_REAL, 0) + signal.signal(signal.SIGALRM, old_handler) + except BaseException as error: + failure = {'type': type(error).__name__, 'message': str(error)[:2048]} + finally: + signal.setitimer(signal.ITIMER_REAL, 0) + signal.signal(signal.SIGALRM, old_handler) + # This is also required when Popen raised before returning an object. + try: + cleanup = domain.cleanup(process) + except BaseException as cleanup_error: + cleanup = {'complete': False, 'group_empty_proved': False, + 'owned_generations': list(domain.rows.values()), + 'groups': [{'pgid': g, 'sid': sid} for g, sid in sorted(domain.groups)], + 'reaped_adopted': domain.reaped, 'observed_after_root_exit': [], + 'remaining': 'UNKNOWN_AFTER_CLEANUP_ERROR', + 'error': {'type': type(cleanup_error).__name__, 'message': str(cleanup_error)[:2048]}} + for fd in domain.fds.values(): + os.close(fd) + domain.fds.clear() + if not cleanup['complete']: + failure = failure or {'type': 'CleanupIncomplete', 'message': 'Owned descendants/group remain after bounded cleanup tail'} + if time.monotonic() > shared_deadline: + failure = failure or {'type': 'SharedDeadline', 'message': 'Shared cap crossed; necessary cleanup charged'} + reconciled = reconcile_missing_receipt(root, case['label'], began, + failure or {'type': 'MissingRootReceipt', 'message': 'Root exited without receipt'}, cleanup) + if reconciled is not None: + failure = failure or {'type': 'MissingRootReceipt', 'message': 'New reconciled STOP receipt; no retry'} + logs = {} + for name in ('root.stdout.raw', 'root.stderr.raw'): + try: + logs[name] = stable_file(evidence / name, LOG_CAP) + except BaseException as error: + failure = failure or {'type': type(error).__name__, 'message': str(error)[:2048]} + logs[name] = {'path': str(evidence / name), 'complete_hash': None, 'stable': False} + result = {'schema': 'h25-parent-root-supervision-v1', 'label': case['label'], + 'status': 'STOP' if failure else 'ROOT_COMPLETED_AND_OWNED_DOMAIN_EMPTY', + 'failure': failure, 'spawn_entered': spawn_entered, + 'spawn_returned': process is not None, 'captured_root': captured, + 'returncode': None if process is None else process.returncode, + 'cleanup': cleanup, 'outer_logs': logs, 'sampled_owned_rss_bytes': peak, + 'execution_and_cleanup_seconds': time.monotonic() - began, + 'root_receipt_reconciled': reconciled is not None, + 'no_hostile_fork_or_concurrent_children_claim': True} + write_new(evidence / 'SUPERVISION.json', result) + return result + + +def stop_supplement(root, label, reason): + folder = root / 'runtime/runs' / (label + '-supervision-stop') + folder.mkdir() + row = {'status': 'STOP', 'label': folder.name, 'kind': 'supervision_failure_marker', + 'failure': reason, 'wall_seconds': 0.0, 'runner_wall_seconds': 0.0, + 'cost_accounted_by_enclosing_queue_overhead': True, 'original_receipts_preserved': True} + write_new(folder / 'START.json', {'kind': row['kind']}) + write_new(folder / 'receipt.json', row) + + +def packet_unchanged(directory, manifest): + for name, expected in manifest['files'].items(): + row = stable_file(directory / name, META_CAP) + need(row['sha256'] == expected['sha256'] and row['bytes'] == expected['bytes'], + 'Parent source packet changed: ' + name) + need(not (directory / name).stat().st_mode & 0o222, 'Parent source packet became writable') + return True diff --git a/research/h25-v03-bounded-prefix-caller/archive/unit06/review-caller-source-v2.json b/research/h25-v03-bounded-prefix-caller/archive/unit06/review-caller-source-v2.json new file mode 100644 index 0000000000..a76c9cb669 --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/archive/unit06/review-caller-source-v2.json @@ -0,0 +1,73 @@ +{ + "schema": "unit06-caller-source-review-v2", + "recorded_utc": "2026-11-02 13:37:57 UTC", + "verdict": "PARTIAL_SOURCE_ONLY_CALLER_CAP_GAP_PREPARATION_ABSENT_NO_U6_3_ACCEPTANCE", + "cutoff": "2026-11-02T13:35:31Z; no further source/test changes permitted by this reviewer", + "source_observed_at": "2026-11-02T13:35:33Z", + "entry": { + "bytes": 21857, + "sha256": "b783c6812a6295069456cfb4187d4e09bb7acbcb20fffd76e0c10267f90c1201", + "source_scope": "T0 helper and DATA bridge reviewed; full loader assessment owned separately by component reviewer", + "corrected_by_source_inspection": [ + "single Owner-controlled observation path", + "printable ASCII64component original schema paths", + "read8192 and write4096/8192 callbounds", + "exactmode/outerplan match", + "actual BOTH canonical lockpairs and exactordered Kpaths" + ], + "DATA_bridge": "Actual make_prefix_owner + run_prefix -> retain/verify result -> explicit falsefull/runtime/parentexit bounded exclusive science/receipt.json; no fixture owner substituted." + }, + "caller": { + "bytes": 34412, + "sha256": "90a7ed4a45b94e16fa313623e56f6f3efcd85f3ea40355a43b289d8c49a75825", + "positive_source_scope": [ + "prior selection digest before decode/use", + "config/policy/sourcepacket/entry/queue/runner/stage independent pins checked before first selected oldsupervisor/queue execution", + "actual full stage inventory including separately pinned excluded nested STAGE manifests", + "B/M/JOBS membership and oldqueue case DATA status/falsefield validation", + "actual pre-dispatch _caller_recheck then original RootProxy.run", + "canonical original root/history/locks/subreaper/run_root operations retained", + "first script authenticity stays original prior T0 premise" + ], + "unresolved": "Copied9574-byte T0support lacks new8192read and4096/8192write-call limits present in final entry. One-byte positive short returns can exceed originalcallcaps while respecting bytecaps. No post-cutoff synchronization is accepted as bookkeeping.", + "whole_caller_complete_operation_accepted": false + }, + "preparer": { + "present_at_cutoff": false, + "policy_plan_manifest_stage_preparation_implemented_and_reviewed": false, + "U6_3": false + }, + "tests": { + "source": "unit06/fixtures/test_bootstrap_new_v1.py", + "sha256": "19c1b08d4daeaf0c2d40357b0e117fcb2ca2f632f627e290fe7442abf49b3504", + "methods": 12, + "isolation": "PASS for exact inspected newpure/owned fixture source; imports only NEWentry with main guard inactive, executes only newliteral toy modules/freshfiles; actual15sources parsed/hashchecked only.", + "normal_v2_raw_read": "12PASS in0.290s; author-owned execution, not reviewer rerun", + "no_entry_operation_or_main_or_caller_or_original_graph_execution": true, + "caller_or_preparer_behavior_tested": false, + "rerun_by_reviewer": false + }, + "history": { + "initial_observe_issue": "oldA/read +B/close primary-loss sourcecounterexample; verified9950B d751 reconstruction explicitly not direct savedcopy; oldoverwritegap retained", + "old35b_path_schema_issue": "retained separately;35b already after first self-correction", + "lockpath_report": "earlier finding referred intermediate read; finalentry b783 fixesbothcanonicalpairs and orderedKpaths", + "v1_early_review_preserved": true + }, + "whole_authorship_or_runtime_claims_not_proved": [ + "complete actual caller under all original operationcaps", + "complete concrete P/Q/M/JOBS/STAGE preparer", + "current genuine outer/inner capability or prioradmission", + "originalC05/C07/native/funding/execution and parent-exit", + "full original baseline/V03 controls", + "physical fit or zero cost" + ], + "original_functions_imported_or_executed_by_reviewer": false, + "tests_run_by_reviewer": 0, + "author_code_modified_by_reviewer": false, + "old_units_reopened": false, + "full_C05": false, + "full_V03": false, + "runtime_qualified": false, + "original_activity_credit_added": 0, + "costs": "OPEN_NOT_ZERO" +} diff --git a/research/h25-v03-bounded-prefix-caller/archive/unit06/review-caller-source-v2.md b/research/h25-v03-bounded-prefix-caller/archive/unit06/review-caller-source-v2.md new file mode 100644 index 0000000000..8959abf0cd --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/archive/unit06/review-caller-source-v2.md @@ -0,0 +1,14 @@ +# Unit06 caller/preparation review — cutoff disposition + +**PARTIAL SOURCE ONLY. No complete U6.3 acceptance.** Source/test cutoff13:35:31 is retained. The caller's final observed helper still lacks the newly required operation-call caps, and no preparation body is present. This is a source/evidence verdict; no author code or tests were run or edited by this reviewer. + +The post-cutoff13:35:33 observed entry is21,857 bytes, SHA b783c6812a6295069456cfb4187d4e09bb7acbcb20fffd76e0c10267f90c1201. The new owned observation/read path, original printableASCII/64component blob path rules, read8192/write4096-or8192 call counters, exact plan/mode binding, BOTH canonical lock identities and exact ordered private K paths are present. Earlier lock-path reports described an intermediate draft and are not current defects. The DATA bridge source calls actual make_prefix_owner/run_prefix, verifies the real result pin/false qualification fields, then exclusively writes science/receipt.json. This is a source-derived new DATA contract, not an original completion. + +The observed caller is34,412 bytes, SHA90a7ed4a45b94e16fa313623e56f6f3efcd85f3ea40355a43b289d8c49a75825. Its concrete admission path authenticates the independent selection before decode, validates exact control/sourcepacket/stage/B/M/JOBS/queue/runner pins before first old supervisor/queue use, performs full stage inventory including separately pinned excluded nested STAGE manifests, constrains the old generic science receiver to the explicit nonqualifying DATA fields, and rechecks before original RootProxy.run. The unchanged historical queue/runner/outer owner/lock/native keeper and ledger operations remain actual calls. First-script authentication remains the pre-existing T0 premise; source_packet is not retroactive proof. Inherited exception-formatting/permission qualifications remain. + +However, its copied9,574-byte support prefix has no per-read/per-write call counters. Legal short positive returns can exceed original8192read/write or4096record-write call limits while byte counts remain bounded. The corrected entry counters do not repair this separate copy. No synchronization after13:35:31 is accepted as mere bookkeeping. No actual prepare_prefix_stage source is present at this review cutoff, so P/Q/M/JOBS/STAGE preparation remains architectural design, not an implemented operation. Conditional prior-admission code is not a complete deployable caller/bootstrap. + +I read the entire exact new fixture source SHA19c1b08d4daeaf0c2d40357b0e117fcb2ca2f632f627e290fe7442abf49b3504 and normal-v2 raw output showing12PASS/0.290s. Isolation PASS applies only to those inspected fixtures: the imported module is newly authored entry support with main guard inactive; compiled module bodies are explicit new toy byte literals; files are freshly owned; the actual15 project bodies are parsed/hashed, never imported/executed. The fixtures do not execute entry_operation/main, the caller, actual original ownership, or a preparer. No test rerun occurred here. Broader loader/source acceptance is the separate component review. + +The early rejected observe_regular and path-validator findings remain in review-caller-source-v1. Initial9,950-byte d751 evidence is a verified reconstruction with an explicit overwrite gap, not a direct saved copy;35b is already after the first author self-correction. Do not merge these identities or call restoration new progress. All prior units remain closed; original C05/V03/runtime/activity flags remain false/zero, costs OPEN_NOT_ZERO. Later bookkeeping can document frozen bytes and gaps, but cannot add source/tests or confer admission. + diff --git a/research/h25-v03-bounded-prefix-caller/archive/unit07/AUTHOR-COLD-RUN-v2.md b/research/h25-v03-bounded-prefix-caller/archive/unit07/AUTHOR-COLD-RUN-v2.md new file mode 100644 index 0000000000..b3b75cc1f4 --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/archive/unit07/AUTHOR-COLD-RUN-v2.md @@ -0,0 +1,26 @@ +# Unit07 author handoff and cold NEW-only checks + +Active source: `implementation/prepare_prefix_stage_v2.py`,47423B SHA256 `25c0ee198bcb5a7b77a9d56fe8c551799e1add398bab992782da5eb6bfc677a5`. Frozen rejected v1 remains byte-unchanged. Final author receipt is AUTHOR-RECEIPT-v2.json; independent source adoption belongs to the parent/reviewers. + +The actual public operation is `prepare_prefix_stage(request)`. It consumes one public attempt in a fresh process, validates exact bounded plain DATA, authenticates retained input bytes, owns actual directory contexts, exclusively creates/copies/files/records, finishes modes, observes exact nine-stat-field identities, constructs acyclic P/Q/M/JOBS/STAGE and caller packet/config/policy/selection, then consumes cleanup handles and returns its final attempt bill. It never launches its output. Failed owners remain in PREPARATIONS with raw primary/secondary exception objects and partial data; no delete, rollback, overwrite or ownership claim is made. The returned selection remains DATA requiring independent approval. + +Minimal cold preparer-check bundle preserves these relative paths under unit07: + +- `implementation/prepare_prefix_stage_v2.py` +- `fixtures/preparer_controls_v2.py` +- `fixtures/preparer_review_counterexamples_v2.py` +- `fixtures/preparer_data_dag_v2.py` +- `fixtures/preparer_repair_extra_v2.py` +- `fixtures/preparer_path_contract_v2.py` + +Run each fixture in its own fresh Python process, serially, normal then optimized. For example, from unit07 use `PYTHONDONTWRITEBYTECODE=1 python3 fixtures/preparer_controls_v2.py` and `PYTHONDONTWRITEBYTECODE=1 python3 -O fixtures/preparer_controls_v2.py`, and similarly for the other four fixtures. These five files contain22 methods total. All22 passed normal and optimized against the final source. The final logs use `.sealed.normal.txt`/`.sealed.optimized.txt`, except the final one-method path-contract fixture uses `.normal.txt`/`.optimized.txt` and was run after the final source change. + +The tests import only the NEW preparer/helper code. The whole metadata-DAG fixture uses explicitly inert owned fixture bytes and temporarily selected fixture literal pins in an isolated NEW module, then restores production pins. It does not execute or approve original15 module bodies or pretend its labelled nine-category fixture rows are a genuine runtime C05 inventory. It performs actual file installation/metadata/failure operations in TemporaryDirectory and removes only its own fixture files. An ordinary writable POSIX/Linux temporary filesystem supporting directory FDs, O_NOFOLLOW, chmod, fsync and same-user file creation is required. No original package, compiler, build, namespace, native installer, Popen or target process is needed. + +The separate caller11-method fixture is `fixtures/caller_new_controls_v1.py`, whose paired active source is `implementation/run_queue4_prefix_v2.py`,34716B SHA256 `25138c2c998762649c6a61cb8a6ae8aacd81bd533591b082ab6f58def712fca2`. It was inspected and executed serially normal/optimized by the preparer author; both11 passed. It extracts only the NEW prefix/helper/dispatch bodies and uses a fake dispatch base. Preserve F-relative layout for its three passive data dependencies: unit06/implementation/run_queue4_prefix_v1.py, unit06/implementation/predecessor_entry.py, unit06/prerequisites/h25_parent_supervisor.py.txt. Their old bytes are read/hash-compared only; the original supervisor bytes are copied as inert DATA into a fresh fixture packet. No full caller main/source_packet/original RootProxy/supervisor executes. + +The exact9878B NEW helper prefix remains byte-identical to accepted b783 Unit06 source (SHA256 `48bc4009acb7569fb4a2ac529bec928a3aafdedc017a0ebaae97f72b7c97eabe`). The preparer adds an instrumented NEW source-reader successor and actual descriptor-relative installation functions. It never imports Unit06 or any original receiver. Existing Unit06 and original sources are read-only and unchanged. + +Actual I/O-attempt counters include failed attempts, source before/open/after stats, owned directory operations, iterator operations, writes/chmod/fsync and consumed close attempts. The returned bill is finalized after cleanup. Its256MiB counter describes logical acquired payload plus generated record lengths. Physical allocation retention, CPU/wall time, approval, publication, enclosing parent/tail cost and full funding/fit remain OPEN_NOT_ZERO. Endpoint equality does not prove a C07 interval. None of these checks admits full C05/full V03, runtime, source/stage/command/native/funding/execution gates or scientific activity credit. + +Remaining actual instance inputs are the complete independently admitted C05/nine-category source rows, selected current child Sc/Root/configured driver/gate/manifest data, genuine admission digest records, original trusted launcher/caller/environment/native premises, C07 interval/ancestor stability, complete costs and funding/runtime admissions. The preparer refuses missing/mismatching shapes, bytes, paths, rows and bounds; no callback or Boolean supplies those operations. diff --git a/research/h25-v03-bounded-prefix-caller/archive/unit07/AUTHOR-RECEIPT-v2.json b/research/h25-v03-bounded-prefix-caller/archive/unit07/AUTHOR-RECEIPT-v2.json new file mode 100644 index 0000000000..30d9b1b38c --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/archive/unit07/AUTHOR-RECEIPT-v2.json @@ -0,0 +1,245 @@ +{ + "schema": "unit07-author-final-source-receipt-v2", + "recorded_utc": "2026-11-02T14:24:22.864605+00:00", + "source_and_new_fixture_state": "FROZEN_EARLY_WITHIN_SOLE_REPAIR_WINDOW", + "formal_independent_adoption": "PARENT_AND_INDEPENDENT_REVIEWERS_OWN_VERDICTS", + "public_api": "prepare_prefix_stage(request)", + "active_source": "implementation/prepare_prefix_stage_v2.py", + "source_bytes": 47423, + "source_sha256": "25c0ee198bcb5a7b77a9d56fe8c551799e1add398bab992782da5eb6bfc677a5", + "parent_input_gate": "2026-11-02T13:58:47+00:00", + "sole_repair_window": [ + "2026-11-02T14:12:24.512367+00:00", + "2026-11-02T14:27:24.512367+00:00" + ], + "artifacts": [ + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/implementation/prepare_prefix_stage_v1.py", + "bytes": 41449, + "sha256": "75bcddd650394187c2f63aedb28ad32cb840b358d372ad99e0973e6d84c6e80d" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/implementation/prepare_prefix_stage_v2.py", + "bytes": 47423, + "sha256": "25c0ee198bcb5a7b77a9d56fe8c551799e1add398bab992782da5eb6bfc677a5" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/implementation/run_queue4_prefix_v2.py", + "bytes": 34716, + "sha256": "25138c2c998762649c6a61cb8a6ae8aacd81bd533591b082ab6f58def712fca2" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_controls_v2.py", + "bytes": 7519, + "sha256": "801887622cac72f321050fbdce5cef1381da11d155730fe2b2ead9b5ad754447" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_review_counterexamples_v2.py", + "bytes": 2748, + "sha256": "7fd0fa01bd17bda9054105421bcf556473f523d18d779ad5af3d0f08bc9a0bda" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_data_dag_v2.py", + "bytes": 8779, + "sha256": "0b0fb6b475ac8185dd1624efab88b0fa54c6d4767b40af5a8923d2a700a33d89" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_repair_extra_v2.py", + "bytes": 4208, + "sha256": "bb562456230936609d367d4c0c105ce778e4dd9a99ef20079fab78f7e2e4b5ba" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_path_contract_v2.py", + "bytes": 1875, + "sha256": "d858c5ed25f1528d1165c2cc65826b9942b6efa35836e37787fa90f726855273" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/caller_new_controls_v1.py", + "bytes": 14236, + "sha256": "310fe5a31db4c4ac2bab0794a1633ec2061e8f97de654f9701b019185b138765" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_authoring_01.py.txt", + "bytes": 41390, + "sha256": "551dfc3baee3d8b81e71dcbbd7ade8acbc62dfda93c753979f02959604b0a092" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_reviewed_f8a020df_v2.py.txt", + "bytes": 47004, + "sha256": "f8a020dfdb3d205978034b749812932d1b119bc87d2d31495445b72a7a2dafde" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_reviewed_a2b5216c_v2.py.txt", + "bytes": 47300, + "sha256": "a2b5216cb9dbc3cb8d3b3ffbcbafcbe510a2af1e28a16f4246747a5ed2a7c772" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_data_dag_v1.py", + "bytes": 8378, + "sha256": "bdbb4c7dfc167cd17e0ac2a4a0d6b205ced665c42238d6fa1c4da9aba7fea4d2" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_data_dag_v1.normal.txt", + "bytes": 953, + "sha256": "d352548f2c1ba80fdfb9fb49d7d21e6a843fca9590c84114931d5bc35ae32ada" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_data_dag_v1.optimized.txt", + "bytes": 953, + "sha256": "316a3b0c4f328c3db554fcf3e9efb90eb697cafb550117026baf9b9c80c2891b" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_review_counterexamples_v1.initial.normal.txt", + "bytes": 6296, + "sha256": "4ebbaabe1ca873ae72e5c54c31337813aedb751083a946d3df0813aa12172cb5" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_review_counterexamples_v1.initial.optimized.txt", + "bytes": 6296, + "sha256": "9666ae455babc28ce21cc951b0b28b8667321c669db3957a48adc9212692d373" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_executed_caller_v1.normal.txt", + "bytes": 1729, + "sha256": "43916b1a8cc23a845e6045beb69585a9d0dc21e5f873b5e75a5c5cecbcf01354" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_executed_caller_v1.optimized.txt", + "bytes": 1729, + "sha256": "fb6ecad1f8860334c46616a38f8d14bf8e37c9ba39016b41a8f40001c52ee374" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_controls_v2.sealed.normal.txt", + "bytes": 1425, + "sha256": "9b02e57ec0379c5a59eeabd57b9c844737d19662e581e53cda0c0b0afa83963e" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_controls_v2.sealed.optimized.txt", + "bytes": 1425, + "sha256": "7bd0d9a132d27a0a6174f9ac0f5b36d15fc92ae1b7292b82cc0cfc35fb04d052" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_review_counterexamples_v2.sealed.normal.txt", + "bytes": 646, + "sha256": "9adf90c3d8d89d5ec4397da9deb39aeb2bb01e14260ea8e3cb6d6a639ec90adf" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_review_counterexamples_v2.sealed.optimized.txt", + "bytes": 646, + "sha256": "9adf90c3d8d89d5ec4397da9deb39aeb2bb01e14260ea8e3cb6d6a639ec90adf" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_data_dag_v2.sealed.normal.txt", + "bytes": 265, + "sha256": "8664e4136f61cfa115a1d972e2eaa7d5426e32ba13761c6b37c72e44446b19b4" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_data_dag_v2.sealed.optimized.txt", + "bytes": 265, + "sha256": "9812b5454b951a90ec0718dcde285564f896bea36e904c82a737e0cf55caa348" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_repair_extra_v2.sealed.normal.txt", + "bytes": 736, + "sha256": "6aafe37bb138cc4b87d81113f471144d5c4831098df7ed361ef3a3df331c3e4c" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_repair_extra_v2.sealed.optimized.txt", + "bytes": 736, + "sha256": "6aafe37bb138cc4b87d81113f471144d5c4831098df7ed361ef3a3df331c3e4c" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_path_contract_v2.normal.txt", + "bytes": 252, + "sha256": "b5b73bfdb2e9d7f4014048b609761f4e57290178e2a546cfed4bb096e576431e" + }, + { + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_path_contract_v2.optimized.txt", + "bytes": 252, + "sha256": "b5b73bfdb2e9d7f4014048b609761f4e57290178e2a546cfed4bb096e576431e" + } + ], + "results": { + "current_preparer_normal": "22/22 PASS", + "current_preparer_optimized": "22/22 PASS", + "unchanged_caller_NEW_only_normal": "11/11 PASS", + "unchanged_caller_NEW_only_optimized": "11/11 PASS", + "initial_source_counterexamples": "2ERROR+2FAIL each normal/O, retained", + "initial_whole_DAG_fixture": "FAIL each normal/O at fixture count21vsactual20, retained" + }, + "execution_boundary": { + "executed": "ONLY NEW preparer/helper functions, NEW caller helper/dispatch AST extraction, stdlib owned-data filesystem fixtures", + "inert_fixture_DATA": "Explicitly labelled fresh fixture bytes and fixture pins; actual production literal expectations are restored after patch.multiple. No fixture claims genuine authority. Original supervisor in caller fixture is inert hash-checked DATA only.", + "never_executed": [ + "original fifteen project modules", + "full archived entry", + "full caller main", + "original supervisor/domain/native installer", + "Popen/Root/provider/compiler/namespace/target processes" + ], + "protected_runtime_runs": "NEVER read or enumerated", + "all_original_and_Unit06_source_bytes": "UNCHANGED" + }, + "repairs": [ + "Restored exact original custody refusal branch.", + "Used actual b783 entry/Group01 codec intersection for metadata rather than blanket epoch256 limit.", + "NEW source-read successor and all preparation suffix OS attempts instrumented before actual calls, including cleanup/iterators; actual final bill after consumed cleanup.", + "Actual descriptor-relative file/directory endpoint reconciled with absolute pathname; this does not prove C07 interval.", + "Bound fixed caller source25138/34716, not basename alone.", + "Retained generated raw records before aggregate refusal; logical byte accounting distinguished from unknown physical memory/CPU/wall/approval/final tail.", + "Validated derived science and producer-output paths before first I/O.", + "Corrected preserved fixture expected copy count21 to actual20 in versioned v2 fixture." + ], + "operation_bounds": { + "file_bytes": 67108864, + "logical_captured_read_plus_generated_bytes": 268435456, + "record_bytes": 1048576, + "read_calls_per_file": 8192, + "write_calls_record": 4096, + "write_calls_other_file": 8192, + "private_copy_attempts": 41, + "parent_inner_plus_outer_plan_rows": 8192, + "metadata_codec": "actual b783 helper intersection with Group01: nodes<=65536,depth<=24,container<=8192,string<=8192,totaltext<=524288,record<=1MiB; no maximal inventory fit claim", + "all_IO_counts": "attempt counts, not monetary or complete scientific cost pricing" + }, + "open_external_inputs": [ + "genuine independently admitted complete C05 and all-nine-category source inventory", + "genuine source/stage/command/copy/funding/execution gate records", + "current separately admitted Sc and original Root/configured driver/gate source pins", + "original T0/caller/native policy/environment premises", + "C07 interval and ancestor stability", + "complete physical CPU/wall/memory/I/O/storage/approval/final-tail price and funding/runtime admission" + ], + "admission": { + "production_completion": false, + "full_C05": false, + "full_V03": false, + "runtime_qualified": false, + "source_admission": false, + "C07_interval": false, + "funding": false, + "final_fit": "OPEN_NOT_ZERO" + }, + "source_history": [ + { + "sha256": "551dfc3baee3d8b81e71dcbbd7ade8acbc62dfda93c753979f02959604b0a092", + "status": "pre-freeze authoring source with wrong transcribed constants; never executed; preserved" + }, + { + "sha256": "75bcddd650394187c2f63aedb28ad32cb840b358d372ad99e0973e6d84c6e80d", + "status": "complete initial rejected source, exact v1 retained" + }, + { + "sha256": "f8a020dfdb3d205978034b749812932d1b119bc87d2d31495445b72a7a2dafde", + "status": "first repair reviewed source, direct bytes retained" + }, + { + "sha256": "a2b5216cb9dbc3cb8d3b3ffbcbafcbe510a2af1e28a16f4246747a5ed2a7c772", + "status": "reviewed raw/cost clarification source before authorized derivedpath correction; direct bytes/logs retained" + }, + { + "sha256": "25c0ee198bcb5a7b77a9d56fe8c551799e1add398bab992782da5eb6bfc677a5", + "status": "final author-frozen source" + } + ] +} diff --git a/research/h25-v03-bounded-prefix-caller/archive/unit07/INPUT-CALLER-v2.json b/research/h25-v03-bounded-prefix-caller/archive/unit07/INPUT-CALLER-v2.json new file mode 100644 index 0000000000..efa262b044 --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/archive/unit07/INPUT-CALLER-v2.json @@ -0,0 +1,28 @@ +{ + "schema": "unit07-input-caller-v2-ack", + "recorded_utc": "2026-11-02 13:57:39 UTC", + "decision": "PASS_P1_EXACT_CALLER_PREPARER_INTERFACE_DESIGN", + "design_v2": { + "path": "unit07/DESIGN-v2.md", + "sha256": "cbe15f98ff3ac64ecbd7b15f2a3838e98ffdabd66ec0131ef74e0659257b79ab", + "read_in_full": true + }, + "preserved_v1_design_sha256": "5fe1fac04c60681295fff28f617e16897f215ba068dc443a626f876736600508", + "accepted_clarifications": [ + "Required independent source_closure_admission_sha256, no invented value", + "Exact outer_policy separates shared600/outer190 from prefixsession600/inner180 bounds", + "session/science/output derived from canonicalR+selectedlabel; preparer never creates runlabel/science", + "K/Sb/packet derived as exclusive private roots; childSc preexisting separate", + "Q exact original shape, memberships and canonical Root/provider/driver command", + "New caller basename/readonly readiness and fixed prior selection protocol preserved", + "No Q/M/STAGE selfhash, no admission flags fabricated" + ], + "meaning": "Input/schema/constructor route accepted for bounded source implementation only; actual candidate and isolated controls still require independent review.", + "prior_units_modified": false, + "code_or_tests_executed_by_reviewer": false, + "full_C05": false, + "full_V03": false, + "runtime_qualified": false, + "activity_credit_added": 0, + "costs": "OPEN_NOT_ZERO" +} diff --git a/research/h25-v03-bounded-prefix-caller/archive/unit07/P3-ACCEPTANCE-OBSERVATION-v1.json b/research/h25-v03-bounded-prefix-caller/archive/unit07/P3-ACCEPTANCE-OBSERVATION-v1.json new file mode 100644 index 0000000000..09fd393e06 --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/archive/unit07/P3-ACCEPTANCE-OBSERVATION-v1.json @@ -0,0 +1,13 @@ +{ + "recorded_utc": "2026-11-02T14:22:02.419270+00:00", + "independent_acceptance_utc": "2026-11-02T14:17:38+00:00", + "checkpoint": "P3", + "review_sha256": "f61464ed7496af2ae47414bcdfad2f63e773563411c4e70a2fc8955442e7b089", + "accepted_source": "25138c2c998762649c6a61cb8a6ae8aacd81bd533591b082ab6f58def712fca2", + "new_only_methods_per_profile": 11, + "actual_runtime_approval": false, + "P2_P4_pending": true, + "original_activity_credit_added": 0, + "no_source_or_repair_clock_extension": true, + "outside_costs": "OPEN_NOT_ZERO" +} diff --git a/research/h25-v03-bounded-prefix-caller/archive/unit07/SOURCE-CLOSE-v1.json b/research/h25-v03-bounded-prefix-caller/archive/unit07/SOURCE-CLOSE-v1.json new file mode 100644 index 0000000000..5e233d206a --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/archive/unit07/SOURCE-CLOSE-v1.json @@ -0,0 +1,69 @@ +{ + "recorded_utc": "2026-11-02T14:28:47.911235+00:00", + "phase": "closed_completed_conditional_source_components", + "accepted_checkpoints": [ + "P1", + "P2", + "P3", + "P4" + ], + "fixed_local_denominator": 4, + "last_independent_source_acceptance_utc": "2026-11-02T14:26:56+00:00", + "source_and_newtests_stopped_utc": "2026-11-02T14:25:26+00:00", + "sole_repair_deadline_utc": "2026-11-02T14:27:24.512367+00:00", + "original_hard_deadline_utc": "2026-11-02T14:44:59.177482+00:00", + "evidence": [ + { + "path": "implementation/prepare_prefix_stage_v2.py", + "bytes": 47423, + "sha256": "25c0ee198bcb5a7b77a9d56fe8c551799e1add398bab992782da5eb6bfc677a5" + }, + { + "path": "implementation/run_queue4_prefix_v2.py", + "bytes": 34716, + "sha256": "25138c2c998762649c6a61cb8a6ae8aacd81bd533591b082ab6f58def712fca2" + }, + { + "path": "AUTHOR-RECEIPT-v2.json", + "bytes": 13968, + "sha256": "62c0ab10cf8d97364aaee811642c6e405ef127b10ab0032205f1b51905aba333" + }, + { + "path": "review-preparer-source-v2.json", + "bytes": 9990, + "sha256": "034625ffbb0c6db3dcbf407d9d69a2b48128e4498f167196eab40d36e4980ddb" + }, + { + "path": "review-caller-P3-v1.json", + "bytes": 5719, + "sha256": "f61464ed7496af2ae47414bcdfad2f63e773563411c4e70a2fc8955442e7b089" + }, + { + "path": "review-caller-P4-v2.json", + "bytes": 4636, + "sha256": "cb97b3d66cbe4f062b166098840b5ce3b95bdf19efa3c501d53ec4e359ec28a8" + } + ], + "new_methods_per_profile": { + "preparer": 22, + "caller": 11, + "total": 33 + }, + "profiles": [ + "normal", + "optimized" + ], + "execution_scope": "NEWpure/owned-data helpers; explicitly inertfixturepins/fullmetadataDAG. No originalbodies/fullentry/caller/native/Popen/compiler/namespace/target execution.", + "codec_scope": "Exactintersecting actualentry/Group01limits; notall original8191row Qfit proved", + "inherited_owner_error_limits_preserved": true, + "actual_C05_C07_approval_and_physical_fit": "UNESTABLISHED", + "original_C05": false, + "original_V03": false, + "runtime_qualified": false, + "original_activity_credit_added": 0, + "original_completion_percent": 43.5, + "app_goal_service_separate": "paused", + "reopen_or_extension": false, + "all_failed_versions_and_gaps_preserved": true, + "outside_costs": "OPEN_NOT_ZERO" +} diff --git a/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/caller_basis_unit06_90a.py.txt b/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/caller_basis_unit06_90a.py.txt new file mode 100644 index 0000000000..89878cc73a --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/caller_basis_unit06_90a.py.txt @@ -0,0 +1,601 @@ +"""Conditional Unit06 authenticated entry. No original project imports at load. + +T0 is the original trusted first-launcher/OS/interpreter/system-stdlib premise. +Source selection does not create source, native, C05/C07, funding or runtime +admission. Do not call main except in a separately admitted genuine instance. +""" +from __future__ import annotations +import ast +import builtins +import hashlib +import json +import os +from pathlib import Path +import stat +import sys +import types + +FILE_CAP=64*1024*1024 +TOTAL_CAP=256*1024*1024 +RECORD_CAP=1024*1024 +MAX_ROWS=8192 +IDENTITY_KEYS=('device','inode','mode','links','uid','gid','size','mtime_ns','ctime_ns') +ENV={'PATH':'/usr/bin:/bin','PYTHONHASHSEED':'0','LANG':'C.UTF-8','LC_ALL':'C.UTF-8','TZ':'UTC','PYTHONDONTWRITEBYTECODE':'1'} +SYSTEM_PATH=('/usr/lib/python312.zip','/usr/lib/python3.12','/usr/lib/python3.12/lib-dynload') + + +class Stop(RuntimeError):pass + + +def need(condition,message): + if condition is not True:raise Stop(message) + + +def plain(value): + nodes=text=0 + def walk(item,depth): + nonlocal nodes,text + nodes+=1 + need(depth<=24 and nodes<=65536,'plain structure bound') + kind=type(item) + if item is None or kind is bool:return + if kind is int:need(-(1<<127)<=item<(1<<127),'integer bound');return + if kind is str: + text+=len(item);need(len(item)<=8192 and text<=524288,'text bound');return + need(kind is list or kind is dict,'exact plain value required') + need(len(item)<=MAX_ROWS,'container bound') + if kind is list: + for child in item:walk(child,depth+1) + else: + for key,child in item.items(): + need(type(key) is str,'exact string key required');walk(key,depth+1);walk(child,depth+1) + walk(value,0) + + +def canonical(value,cap=RECORD_CAP): + need(type(cap) is int and 0<=cap<=FILE_CAP,'exact record cap') + plain(value) + raw=(json.dumps(value,sort_keys=True,separators=(',',':'),ensure_ascii=True,allow_nan=False)+'\n').encode('ascii') + need(len(raw)<=cap,'canonical record cap');return raw + + +def decode(raw,cap=RECORD_CAP): + need(type(cap) is int and 0<=cap<=FILE_CAP,'exact decode cap') + need(type(raw) is bytes and len(raw)<=cap,'raw record cap/type') + def pairs(rows): + result={} + for key,value in rows: + need(key not in result,'duplicate JSON key');result[key]=value + return result + def bad(token):raise Stop('non-integer JSON number') + value=json.loads(raw,object_pairs_hook=pairs,parse_float=bad,parse_constant=bad) + plain(value);return value + + +def path_text(value): + need(type(value) is str and 10 and row['size']==pin['bytes'] and stat.S_ISREG(row['mode']) and row['links']==1,'regular single-link identity') + + +class Owner: + """New T0-side retained failure state, never an original capability.""" + def __init__(self): + self.primary=None;self.secondary=[];self.pending=False;self.quarantined=False + self.busy=False;self.burned=False;self.fd_slots=[];self.captures=[];self.total_bytes=0 + self.last_block=None;self.last_raw=None;self.modules={};self.published=[];self.executed=[] + self.phase='NEW';self.result=None + def ready(self): + if self.primary is not None:raise self.primary + need(not self.quarantined and not self.pending and not self.busy,'owner terminal/uncertain') + def fail(self,error): + if self.primary is None:self.primary=error + elif error is not self.primary:self.secondary.append(error) + self.quarantined=True + return self.primary + + +def _retained_read(path,expected_sha256,cap,owner,expected_pin=None): + """Actual descriptor-bound read. Returned source bytes are never reopened for exec.""" + need(type(owner) is Owner,'actual local owner required');owner.ready();path_text(path) + need(type(cap) is int and 0<=cap<=FILE_CAP,'read cap') + if expected_sha256 is not None: + need(type(expected_sha256) is str and len(expected_sha256)==64 and all(c in '0123456789abcdef' for c in expected_sha256),'prior digest') + if expected_pin is not None:validate_blob(expected_pin,cap);need(expected_pin['path']==path and expected_pin['sha256']==expected_sha256,'prior pin path/digest') + record={'path':path,'chunks':[],'raw':None,'observed':None};owner.captures.append(record) + owner.fd_slots.append(None);slot=len(owner.fd_slots)-1;primary=None;owner.busy=True + try: + before=identity(os.stat(path,follow_symlinks=False)) + need(stat.S_ISREG(before['mode']) and before['links']==1 and before['size']<=cap,'source kind/link/size') + owner.pending=True + owner.fd_slots[slot]=os.open(path,os.O_RDONLY|os.O_NOFOLLOW|os.O_NONBLOCK|os.O_CLOEXEC) + owner.pending=False + opened=identity(os.fstat(owner.fd_slots[slot]));need(before==opened,'source open drift') + if expected_pin is not None:need(opened==expected_pin['identity'],'source installed identity differs') + count=0 + while count 262144 or hashlib.sha256(raw).hexdigest() != expected: + raise RuntimeError('Parent-reviewed source manifest differs') + manifest = json.loads(raw) + blobs = {} + for name, row in manifest['files'].items(): + if Path(name).name != name or name == 'SOURCE-READINESS.json': + raise RuntimeError('Unsafe source packet member') + path = here / name + if path.is_symlink() or path.stat().st_mode & 0o222: + raise RuntimeError('Parent must freeze the concrete source packet readonly') + with path.open('rb') as stream: + data = stream.read(262145) + if len(data) > 262144 or len(data) != row['bytes'] or hashlib.sha256(data).hexdigest() != row['sha256']: + raise RuntimeError('Source packet member differs: ' + name) + blobs[name] = data + if blobs[Path(__file__).name] != Path(__file__).read_bytes(): + raise RuntimeError('Actual queue entry differs from frozen source packet') + path = here / 'supervisor.py' + spec = importlib.util.spec_from_file_location('h25_parent_supervisor', path) + module = importlib.util.module_from_spec(spec) + exec(compile(blobs['supervisor.py'], str(path), 'exec'), module.__dict__) + return module, manifest + + + +class RootProxy: + def __init__(self, supervisor, root, cases, evidence, policy, deadline): + self.s, self.root, self.cases = supervisor, root, cases + self.evidence, self.policy, self.deadline = evidence, policy, deadline + self.next = 0 + self.records = [] + + def run(self, command, **kwargs): + s = self.s + s.need(self.next < len(self.cases), 'Unregistered extra queue root command') + case = self.cases[self.next] + expected = ['/usr/bin/python3.12', *s.FLAGS, str(self.root / 'run_guarded_v3.py'), + case['stage'], case['job'], case['label']] + s.need(command == expected and set(kwargs) == {'cwd', 'env', 'capture_output', 'timeout'} and + kwargs['cwd'] == self.root and kwargs['env'] == s.ENV and + kwargs['capture_output'] is True and kwargs['timeout'] == 190, + 'Queue subprocess alias call exceeded its exact reviewed interface') + folder = self.evidence / case['label'] + result = s.run_root(self.root, case, folder, self.policy['root_seconds'], self.deadline, + self.policy['root_address_space_bytes'], self.policy['root_rss_sum_bytes']) + original_rc = result['returncode'] + receipt_path = self.root / 'runtime/runs' / case['label'] / 'receipt.json' + if receipt_path.exists(): + root_receipt, root_pin = s.read_json(receipt_path, 4 * 1024 * 1024) + else: + root_receipt, root_pin = {'status': 'ABSENT_UNCLOSED_ROOT'}, None + failure = result['failure'] + if original_rc == 0 and (result['cleanup']['observed_after_root_exit'] or + result['cleanup']['reaped_adopted']): + failure = failure or {'type': 'OrphanAfterApparentPass', + 'message': 'Original root exit 0 retained; supervisor admission STOP'} + if not result['cleanup']['complete']: + failure = failure or {'type': 'CleanupIncomplete', 'message': 'Owned process groups not empty'} + originals = {'root_returncode': original_rc, 'root_status': root_receipt['status'], + 'root_receipt_pin': root_pin, 'root_stdout': result['outer_logs']['root.stdout.raw'], + 'root_stderr': result['outer_logs']['root.stderr.raw']} + row = {'label': case['label'], 'actual_consumer': 'wrapper+module-alias-proxy+supervisor+queue-v4', + 'original': originals, 'effective_admission': 'STOP' if failure else 'DEFER_TO_QUEUE_V4', + 'supervision_failure': failure, 'original_root_receipt_unchanged': True, + 'cleanup_before_queue_validation': True} + s.write_new(folder / 'PROXY.json', row) + self.records.append(row) + if failure: + s.stop_supplement(self.root, case['label'], failure) + raise RuntimeError('Root supervision rejected case; original status retained: ' + case['label']) + stdout_record, stdout = s.stable_file(folder / 'root.stdout.raw', s.LOG_CAP, True) + stderr_record, stderr = s.stable_file(folder / 'root.stderr.raw', s.LOG_CAP, True) + s.need(stdout_record == originals['root_stdout'] and stderr_record == originals['root_stderr'], + 'Original root command streams changed before queue consumption') + self.next += 1 + return subprocess.CompletedProcess(command, original_rc, stdout, stderr) + + +# Unit06 caller additions. Expected pins originate in the independently admitted +# --selection bytes/hash, never in observed candidate data. T0 authenticates this +# actual caller before its first body; none of these checks create that premise. +CALLER_QUEUE_SHA='1348a7b4d7cc1f9fef556f5e0abdaf04411a998afdcd574d7812c76ab37dcf68' +CALLER_RUNNER_SHA='bd882e3dadb1b6aeaa63ee824f1a1c58f8ef2546b6840a2bffa46885a184d3eb' +CALLER_SUPERVISOR_SHA='cfb09a18dd10b597cc6d5a8139ee769bef679bc44ae029329755e3d97b055075' +CALLER_KEYS={'schema','root','config','policy','source_packet','entry','stages','queue_sha256','runner_sha256'} +CALLER_STAGE_KEYS={'stage','manifest','entry','bootstrap','jobs','excluded_stage_manifests'} +CALLER_FALSE_FIELDS=('production_completion','full_c05','full_v03','runtime_qualified','enclosing_parent_exit_observed') +_CALLER_ADMISSION=None +_CALLER_FAILURE_OWNER=None + + +def _caller_simple(value): + need(type(value) is str and 0 deadline: + failure = failure or {'type': 'SupervisorBudget', 'message': 'Full wrapper bound crossed; cleanup remains charged'} + result = {'schema': 'h25-queue-v4-supervisor-envelope-v1', 'queue': name, + 'status': 'STOP' if failure else 'SUPERVISED_QUEUE_V4_COMPLETE', 'failure': failure, + 'actual_consumer': 'wrapper+module-alias-proxy+supervisor+queue-v4', + 'original_queue_sha256': s.QUEUE_SHA, 'original_root_sha256': s.RUNNER_SHA, + 'source_manifest_sha256': args.source_sha256, 'config_pin': config_pin, 'policy_pin': policy_pin, + 'controls': [] if proxy is None else proxy.records, + 'prior_selection_sha256': args.selection_sha256, + 'new_caller_retained_read_bytes': admission['owner'].total_bytes, + 'new_caller_rechecks': admission['rechecks'], + 'startup_authentication_in_original_began_budget': True, + 'C05_V03_runtime_admission_added': False, + 'complete_wrapper_seconds_before_own_receipt': elapsed, + 'nested_queue_and_root_seconds': nested, 'wrapper_residual_seconds': residual, + 'outer_GNU_time_final_tail_reconciliation_required': True, + 'subreaper_is_same_queue_process': True, 'original_root_receipts_preserved': True} + folder = root / 'runtime/runs' / (name + '-supervisor-overhead') + folder.mkdir() + s.write_new(folder / 'START.json', {'kind': 'parent_cost_only'}) + s.write_new(folder / 'receipt.json', dict(result, label=folder.name, kind='parent_cost_only', + wall_seconds=residual, runner_wall_seconds=residual)) + s.write_new(evidence / 'WRAPPER.json', result) + lock.close() + if failure: + raise SystemExit(1) + + +if __name__ == '__main__': + main() diff --git a/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/caller_bounded_T0_prefix_48bc.py.txt b/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/caller_bounded_T0_prefix_48bc.py.txt new file mode 100644 index 0000000000..dd7565ac9a --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/caller_bounded_T0_prefix_48bc.py.txt @@ -0,0 +1,201 @@ +"""Conditional Unit06 authenticated entry. No original project imports at load. + +T0 is the original trusted first-launcher/OS/interpreter/system-stdlib premise. +Source selection does not create source, native, C05/C07, funding or runtime +admission. Do not call main except in a separately admitted genuine instance. +""" +from __future__ import annotations +import ast +import builtins +import hashlib +import json +import os +from pathlib import Path +import stat +import sys +import types + +FILE_CAP=64*1024*1024 +TOTAL_CAP=256*1024*1024 +RECORD_CAP=1024*1024 +MAX_ROWS=8192 +IDENTITY_KEYS=('device','inode','mode','links','uid','gid','size','mtime_ns','ctime_ns') +ENV={'PATH':'/usr/bin:/bin','PYTHONHASHSEED':'0','LANG':'C.UTF-8','LC_ALL':'C.UTF-8','TZ':'UTC','PYTHONDONTWRITEBYTECODE':'1'} +SYSTEM_PATH=('/usr/lib/python312.zip','/usr/lib/python3.12','/usr/lib/python3.12/lib-dynload') + + +class Stop(RuntimeError):pass + + +def need(condition,message): + if condition is not True:raise Stop(message) + + +def plain(value): + nodes=text=0 + def walk(item,depth): + nonlocal nodes,text + nodes+=1 + need(depth<=24 and nodes<=65536,'plain structure bound') + kind=type(item) + if item is None or kind is bool:return + if kind is int:need(-(1<<127)<=item<(1<<127),'integer bound');return + if kind is str: + text+=len(item);need(len(item)<=8192 and text<=524288,'text bound');return + need(kind is list or kind is dict,'exact plain value required') + need(len(item)<=MAX_ROWS,'container bound') + if kind is list: + for child in item:walk(child,depth+1) + else: + for key,child in item.items(): + need(type(key) is str,'exact string key required');walk(key,depth+1);walk(child,depth+1) + walk(value,0) + + +def canonical(value,cap=RECORD_CAP): + need(type(cap) is int and 0<=cap<=FILE_CAP,'exact record cap') + plain(value) + raw=(json.dumps(value,sort_keys=True,separators=(',',':'),ensure_ascii=True,allow_nan=False)+'\n').encode('ascii') + need(len(raw)<=cap,'canonical record cap');return raw + + +def decode(raw,cap=RECORD_CAP): + need(type(cap) is int and 0<=cap<=FILE_CAP,'exact decode cap') + need(type(raw) is bytes and len(raw)<=cap,'raw record cap/type') + def pairs(rows): + result={} + for key,value in rows: + need(key not in result,'duplicate JSON key');result[key]=value + return result + def bad(token):raise Stop('non-integer JSON number') + value=json.loads(raw,object_pairs_hook=pairs,parse_float=bad,parse_constant=bad) + plain(value);return value + + +def path_text(value): + need(type(value) is str and 10 and row['size']==pin['bytes'] and stat.S_ISREG(row['mode']) and row['links']==1,'regular single-link identity') + + +class Owner: + """New T0-side retained failure state, never an original capability.""" + def __init__(self): + self.primary=None;self.secondary=[];self.pending=False;self.quarantined=False + self.busy=False;self.burned=False;self.fd_slots=[];self.captures=[];self.total_bytes=0 + self.read_calls=0;self.write_calls=0 + self.last_block=None;self.last_raw=None;self.modules={};self.published=[];self.executed=[] + self.phase='NEW';self.result=None + def ready(self): + if self.primary is not None:raise self.primary + need(not self.quarantined and not self.pending and not self.busy,'owner terminal/uncertain') + def fail(self,error): + if self.primary is None:self.primary=error + elif error is not self.primary:self.secondary.append(error) + self.quarantined=True + return self.primary + + +def _retained_read(path,expected_sha256,cap,owner,expected_pin=None): + """Actual descriptor-bound read. Returned source bytes are never reopened for exec.""" + need(type(owner) is Owner,'actual local owner required');owner.ready();path_text(path) + need(type(cap) is int and 0<=cap<=FILE_CAP,'read cap') + if expected_sha256 is not None: + need(type(expected_sha256) is str and len(expected_sha256)==64 and all(c in '0123456789abcdef' for c in expected_sha256),'prior digest') + if expected_pin is not None:validate_blob(expected_pin,cap);need(expected_pin['path']==path and expected_pin['sha256']==expected_sha256,'prior pin path/digest') + record={'path':path,'chunks':[],'raw':None,'observed':None,'read_calls':0};owner.captures.append(record) + owner.fd_slots.append(None);slot=len(owner.fd_slots)-1;primary=None;owner.busy=True + try: + before=identity(os.stat(path,follow_symlinks=False)) + need(stat.S_ISREG(before['mode']) and before['links']==1 and before['size']<=cap,'source kind/link/size') + owner.pending=True + owner.fd_slots[slot]=os.open(path,os.O_RDONLY|os.O_NOFOLLOW|os.O_NONBLOCK|os.O_CLOEXEC) + owner.pending=False + opened=identity(os.fstat(owner.fd_slots[slot]));need(before==opened,'source open drift') + if expected_pin is not None:need(opened==expected_pin['identity'],'source installed identity differs') + count=0 + while count {sha256: lowerhex64, mode: int0..0777}; actual full inventory includes all ordinary regular entries, rejects symlinks/nonregulars, and accounts separately for every allowed excluded nested STAGE.json", + "source_packet": "SOURCE-READINESS.json fixed adjacent to actual new caller; files includes run_queue4_prefix_v2.py -> exactnewcaller sha256/bytes and supervisor.py -> exactcfb source row. Source_packet original body obtains new filename through __file__, unchanged.", + "root_queue_sha256": "1348a7b4d7cc1f9fef556f5e0abdaf04411a998afdcd574d7812c76ab37dcf68", + "root_runner_sha256": "bd882e3dadb1b6aeaa63ee824f1a1c58f8ef2546b6840a2bffa46885a184d3eb", + "supervisor_sha256": "cfb09a18dd10b597cc6d5a8139ee769bef679bc44ae029329755e3d97b055075", + "science_status": "PREFIX_OBSERVATION_DATA", + "science_fields_required_false": [ + "production_completion", + "full_c05", + "full_v03", + "runtime_qualified", + "enclosing_parent_exit_observed" + ] + }, + "authentication_order": [ + "Prior --selection digest checked on actual retained bytes before decode", + "Authenticate actual root/config/policy/sourcepacket/entry/oldqueue/runner pins and all approved stages, B/M/JOBS membership/actual inventory before source_packet first project exec", + "Independently supplied config cases bind actual STAGE/JOBS entry route and explicit nonqualifying DATA contract", + "Recheck selection/control/source/stage actual bytes immediately before each original RootProxy.run dispatch", + "Final recheck stays inside original history/budget/residual route; no new ownership or current runtime proof" + ], + "fixture_controls_to_author": [ + { + "id": "C7-PRESERVE", + "control": "Exact candidate prefix==accepted9878bytes; old9574replacement only; candidate remainder==frozen90a remainder, originalsource_packet/RootProxy/main chain source preserved; oldunit06 hashes unchanged." + }, + { + "id": "C7-SHORTREAD", + "control": "NEW support only: synthetic positive1-byte returns for an8193-byte owned fixture reject at8192read calls; counter and actualpartialbytes retained; no8193rdread; primary failure stays raw if close also fails." + }, + { + "id": "C7-SHORTWRITE", + "control": "NEW helper/owned bytes only: positive1-byte write progress crosses4096record or8192largefile call ceilings; noextraOSwrite; consumed descriptor close and primary/secondary retention." + }, + { + "id": "C7-PRIOR", + "control": "Independent expectedselection hash mismatch/changedblob identity/wrongsource member before any marker for projectexec; observed hash cannot be substituted as expected prior approval." + }, + { + "id": "C7-STAGE", + "control": "Owned small source-only stage: exact prior manifest/fullinventory/B/M/JOBS member checks; rejectmissing/extra ordinaryfile, mode mismatch, symlink, unselectednestedSTAGE, mismatchingexcludedmanifestpin, duplicate/missingcase stage, wrongJOBS entry." + }, + { + "id": "C7-DATA", + "control": "Pure caller case validator rejects missingstatus, wrongstatus or any missing/nonfalse completion/runtime/parentexit field; accepts only explicit selected DATA contract." + }, + { + "id": "C7-DISPATCH", + "control": "Only AST-extracted NEW PriorAdmittedRootProxy.run with fake base/dependencies: failed actual-selection recheck suppresses dispatch; successful fake recheck delegates once to the fakebase. Never execute old RootProxy.run, caller main or originalprojectbody." + }, + { + "id": "C7-COUNTEREXAMPLES", + "control": "Keepraw initial candidate+all failure outputs before any reviewed repair. c05_header_closure exclusively owns all serialized execution; this worker runs none." + } + ], + "execution_prohibition": "No tests/candidate code/callerfullmain/entry_operation/original15body/Root/provider/parent/domain/subreaper/native/Popen/compiler/namespace/target or protectedruntime operations by caller worker. Design only until explicit parent gate.", + "unresolved_runtime_premises": [ + "Authenticated original T0 first launcher and actual selected source/OS/interpreter/stdlib", + "Actual initialized receiver/source policy fit and stage identities; distinct real Klocks", + "Complete actual9category parentinventory and fullchildC05determinant/channel/cap/cost", + "C07immutable ancestor/lifetime, currentnative/source/stage/command/funding/execution admission", + "Actual enclosing-parent exit; inherited prebudgetauthentication-failure and ownreceipttail must be paid by genuineouterlauncher, never fabricated ledger" + ], + "old_units_modified": false, + "full_C05": false, + "full_V03": false, + "runtime_qualified": false, + "original_activity_credit_added": 0, + "costs": "OPEN_NOT_ZERO" +} diff --git a/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/caller_execution_linkage_v1.json b/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/caller_execution_linkage_v1.json new file mode 100644 index 0000000000..71c1cbd95a --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/caller_execution_linkage_v1.json @@ -0,0 +1,41 @@ +{ + "schema": "unit07-caller-author-execution-linkage-v1", + "observed_utc": "2026-11-02T14:08:38.367726+00:00", + "source_sha256": "25138c2c998762649c6a61cb8a6ae8aacd81bd533591b082ab6f58def712fca2", + "harness_sha256": "310fe5a31db4c4ac2bab0794a1633ec2061e8f97de654f9701b019185b138765", + "old_unit06_basis_sha256": "90a7ed4a45b94e16fa313623e56f6f3efcd85f3ea40355a43b289d8c49a75825", + "source_still_equals_initial_snapshot": true, + "harness_still_equals_initial_snapshot": true, + "actual_execution_owner": "c05_header_closure author worker only", + "worker_read_logs_only_no_code_or_test_execution": true, + "logs": [ + { + "mode": "normal", + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_executed_caller_v1.normal.txt", + "bytes": 1729, + "sha256": "43916b1a8cc23a845e6045beb69585a9d0dc21e5f873b5e75a5c5cecbcf01354", + "contains_11_tests": true, + "status": "PASS", + "summary": [ + "Ran 11 tests in 0.717s" + ] + }, + { + "mode": "optimized", + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/fixtures/preparer_executed_caller_v1.optimized.txt", + "bytes": 1729, + "sha256": "fb6ecad1f8860334c46616a38f8d14bf8e37c9ba39016b41a8f40001c52ee374", + "contains_11_tests": true, + "status": "PASS", + "summary": [ + "Ran 11 tests in 0.704s" + ] + } + ], + "independent_source_verdict_pending": true, + "full_C05": false, + "full_V03": false, + "runtime_qualified": false, + "original_activity_credit_added": 0, + "costs": "OPEN_NOT_ZERO" +} diff --git a/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/caller_initial_candidate_v2.py.txt b/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/caller_initial_candidate_v2.py.txt new file mode 100644 index 0000000000..890a0ee8c1 --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/caller_initial_candidate_v2.py.txt @@ -0,0 +1,604 @@ +"""Conditional Unit06 authenticated entry. No original project imports at load. + +T0 is the original trusted first-launcher/OS/interpreter/system-stdlib premise. +Source selection does not create source, native, C05/C07, funding or runtime +admission. Do not call main except in a separately admitted genuine instance. +""" +from __future__ import annotations +import ast +import builtins +import hashlib +import json +import os +from pathlib import Path +import stat +import sys +import types + +FILE_CAP=64*1024*1024 +TOTAL_CAP=256*1024*1024 +RECORD_CAP=1024*1024 +MAX_ROWS=8192 +IDENTITY_KEYS=('device','inode','mode','links','uid','gid','size','mtime_ns','ctime_ns') +ENV={'PATH':'/usr/bin:/bin','PYTHONHASHSEED':'0','LANG':'C.UTF-8','LC_ALL':'C.UTF-8','TZ':'UTC','PYTHONDONTWRITEBYTECODE':'1'} +SYSTEM_PATH=('/usr/lib/python312.zip','/usr/lib/python3.12','/usr/lib/python3.12/lib-dynload') + + +class Stop(RuntimeError):pass + + +def need(condition,message): + if condition is not True:raise Stop(message) + + +def plain(value): + nodes=text=0 + def walk(item,depth): + nonlocal nodes,text + nodes+=1 + need(depth<=24 and nodes<=65536,'plain structure bound') + kind=type(item) + if item is None or kind is bool:return + if kind is int:need(-(1<<127)<=item<(1<<127),'integer bound');return + if kind is str: + text+=len(item);need(len(item)<=8192 and text<=524288,'text bound');return + need(kind is list or kind is dict,'exact plain value required') + need(len(item)<=MAX_ROWS,'container bound') + if kind is list: + for child in item:walk(child,depth+1) + else: + for key,child in item.items(): + need(type(key) is str,'exact string key required');walk(key,depth+1);walk(child,depth+1) + walk(value,0) + + +def canonical(value,cap=RECORD_CAP): + need(type(cap) is int and 0<=cap<=FILE_CAP,'exact record cap') + plain(value) + raw=(json.dumps(value,sort_keys=True,separators=(',',':'),ensure_ascii=True,allow_nan=False)+'\n').encode('ascii') + need(len(raw)<=cap,'canonical record cap');return raw + + +def decode(raw,cap=RECORD_CAP): + need(type(cap) is int and 0<=cap<=FILE_CAP,'exact decode cap') + need(type(raw) is bytes and len(raw)<=cap,'raw record cap/type') + def pairs(rows): + result={} + for key,value in rows: + need(key not in result,'duplicate JSON key');result[key]=value + return result + def bad(token):raise Stop('non-integer JSON number') + value=json.loads(raw,object_pairs_hook=pairs,parse_float=bad,parse_constant=bad) + plain(value);return value + + +def path_text(value): + need(type(value) is str and 10 and row['size']==pin['bytes'] and stat.S_ISREG(row['mode']) and row['links']==1,'regular single-link identity') + + +class Owner: + """New T0-side retained failure state, never an original capability.""" + def __init__(self): + self.primary=None;self.secondary=[];self.pending=False;self.quarantined=False + self.busy=False;self.burned=False;self.fd_slots=[];self.captures=[];self.total_bytes=0 + self.read_calls=0;self.write_calls=0 + self.last_block=None;self.last_raw=None;self.modules={};self.published=[];self.executed=[] + self.phase='NEW';self.result=None + def ready(self): + if self.primary is not None:raise self.primary + need(not self.quarantined and not self.pending and not self.busy,'owner terminal/uncertain') + def fail(self,error): + if self.primary is None:self.primary=error + elif error is not self.primary:self.secondary.append(error) + self.quarantined=True + return self.primary + + +def _retained_read(path,expected_sha256,cap,owner,expected_pin=None): + """Actual descriptor-bound read. Returned source bytes are never reopened for exec.""" + need(type(owner) is Owner,'actual local owner required');owner.ready();path_text(path) + need(type(cap) is int and 0<=cap<=FILE_CAP,'read cap') + if expected_sha256 is not None: + need(type(expected_sha256) is str and len(expected_sha256)==64 and all(c in '0123456789abcdef' for c in expected_sha256),'prior digest') + if expected_pin is not None:validate_blob(expected_pin,cap);need(expected_pin['path']==path and expected_pin['sha256']==expected_sha256,'prior pin path/digest') + record={'path':path,'chunks':[],'raw':None,'observed':None,'read_calls':0};owner.captures.append(record) + owner.fd_slots.append(None);slot=len(owner.fd_slots)-1;primary=None;owner.busy=True + try: + before=identity(os.stat(path,follow_symlinks=False)) + need(stat.S_ISREG(before['mode']) and before['links']==1 and before['size']<=cap,'source kind/link/size') + owner.pending=True + owner.fd_slots[slot]=os.open(path,os.O_RDONLY|os.O_NOFOLLOW|os.O_NONBLOCK|os.O_CLOEXEC) + owner.pending=False + opened=identity(os.fstat(owner.fd_slots[slot]));need(before==opened,'source open drift') + if expected_pin is not None:need(opened==expected_pin['identity'],'source installed identity differs') + count=0 + while count 262144 or hashlib.sha256(raw).hexdigest() != expected: + raise RuntimeError('Parent-reviewed source manifest differs') + manifest = json.loads(raw) + blobs = {} + for name, row in manifest['files'].items(): + if Path(name).name != name or name == 'SOURCE-READINESS.json': + raise RuntimeError('Unsafe source packet member') + path = here / name + if path.is_symlink() or path.stat().st_mode & 0o222: + raise RuntimeError('Parent must freeze the concrete source packet readonly') + with path.open('rb') as stream: + data = stream.read(262145) + if len(data) > 262144 or len(data) != row['bytes'] or hashlib.sha256(data).hexdigest() != row['sha256']: + raise RuntimeError('Source packet member differs: ' + name) + blobs[name] = data + if blobs[Path(__file__).name] != Path(__file__).read_bytes(): + raise RuntimeError('Actual queue entry differs from frozen source packet') + path = here / 'supervisor.py' + spec = importlib.util.spec_from_file_location('h25_parent_supervisor', path) + module = importlib.util.module_from_spec(spec) + exec(compile(blobs['supervisor.py'], str(path), 'exec'), module.__dict__) + return module, manifest + + + +class RootProxy: + def __init__(self, supervisor, root, cases, evidence, policy, deadline): + self.s, self.root, self.cases = supervisor, root, cases + self.evidence, self.policy, self.deadline = evidence, policy, deadline + self.next = 0 + self.records = [] + + def run(self, command, **kwargs): + s = self.s + s.need(self.next < len(self.cases), 'Unregistered extra queue root command') + case = self.cases[self.next] + expected = ['/usr/bin/python3.12', *s.FLAGS, str(self.root / 'run_guarded_v3.py'), + case['stage'], case['job'], case['label']] + s.need(command == expected and set(kwargs) == {'cwd', 'env', 'capture_output', 'timeout'} and + kwargs['cwd'] == self.root and kwargs['env'] == s.ENV and + kwargs['capture_output'] is True and kwargs['timeout'] == 190, + 'Queue subprocess alias call exceeded its exact reviewed interface') + folder = self.evidence / case['label'] + result = s.run_root(self.root, case, folder, self.policy['root_seconds'], self.deadline, + self.policy['root_address_space_bytes'], self.policy['root_rss_sum_bytes']) + original_rc = result['returncode'] + receipt_path = self.root / 'runtime/runs' / case['label'] / 'receipt.json' + if receipt_path.exists(): + root_receipt, root_pin = s.read_json(receipt_path, 4 * 1024 * 1024) + else: + root_receipt, root_pin = {'status': 'ABSENT_UNCLOSED_ROOT'}, None + failure = result['failure'] + if original_rc == 0 and (result['cleanup']['observed_after_root_exit'] or + result['cleanup']['reaped_adopted']): + failure = failure or {'type': 'OrphanAfterApparentPass', + 'message': 'Original root exit 0 retained; supervisor admission STOP'} + if not result['cleanup']['complete']: + failure = failure or {'type': 'CleanupIncomplete', 'message': 'Owned process groups not empty'} + originals = {'root_returncode': original_rc, 'root_status': root_receipt['status'], + 'root_receipt_pin': root_pin, 'root_stdout': result['outer_logs']['root.stdout.raw'], + 'root_stderr': result['outer_logs']['root.stderr.raw']} + row = {'label': case['label'], 'actual_consumer': 'wrapper+module-alias-proxy+supervisor+queue-v4', + 'original': originals, 'effective_admission': 'STOP' if failure else 'DEFER_TO_QUEUE_V4', + 'supervision_failure': failure, 'original_root_receipt_unchanged': True, + 'cleanup_before_queue_validation': True} + s.write_new(folder / 'PROXY.json', row) + self.records.append(row) + if failure: + s.stop_supplement(self.root, case['label'], failure) + raise RuntimeError('Root supervision rejected case; original status retained: ' + case['label']) + stdout_record, stdout = s.stable_file(folder / 'root.stdout.raw', s.LOG_CAP, True) + stderr_record, stderr = s.stable_file(folder / 'root.stderr.raw', s.LOG_CAP, True) + s.need(stdout_record == originals['root_stdout'] and stderr_record == originals['root_stderr'], + 'Original root command streams changed before queue consumption') + self.next += 1 + return subprocess.CompletedProcess(command, original_rc, stdout, stderr) + + +# Unit06 caller additions. Expected pins originate in the independently admitted +# --selection bytes/hash, never in observed candidate data. T0 authenticates this +# actual caller before its first body; none of these checks create that premise. +CALLER_QUEUE_SHA='1348a7b4d7cc1f9fef556f5e0abdaf04411a998afdcd574d7812c76ab37dcf68' +CALLER_RUNNER_SHA='bd882e3dadb1b6aeaa63ee824f1a1c58f8ef2546b6840a2bffa46885a184d3eb' +CALLER_SUPERVISOR_SHA='cfb09a18dd10b597cc6d5a8139ee769bef679bc44ae029329755e3d97b055075' +CALLER_KEYS={'schema','root','config','policy','source_packet','entry','stages','queue_sha256','runner_sha256'} +CALLER_STAGE_KEYS={'stage','manifest','entry','bootstrap','jobs','excluded_stage_manifests'} +CALLER_FALSE_FIELDS=('production_completion','full_c05','full_v03','runtime_qualified','enclosing_parent_exit_observed') +_CALLER_ADMISSION=None +_CALLER_FAILURE_OWNER=None + + +def _caller_simple(value): + need(type(value) is str and 0 deadline: + failure = failure or {'type': 'SupervisorBudget', 'message': 'Full wrapper bound crossed; cleanup remains charged'} + result = {'schema': 'h25-queue-v4-supervisor-envelope-v1', 'queue': name, + 'status': 'STOP' if failure else 'SUPERVISED_QUEUE_V4_COMPLETE', 'failure': failure, + 'actual_consumer': 'wrapper+module-alias-proxy+supervisor+queue-v4', + 'original_queue_sha256': s.QUEUE_SHA, 'original_root_sha256': s.RUNNER_SHA, + 'source_manifest_sha256': args.source_sha256, 'config_pin': config_pin, 'policy_pin': policy_pin, + 'controls': [] if proxy is None else proxy.records, + 'prior_selection_sha256': args.selection_sha256, + 'new_caller_retained_read_bytes': admission['owner'].total_bytes, + 'new_caller_rechecks': admission['rechecks'], + 'startup_authentication_in_original_began_budget': True, + 'C05_V03_runtime_admission_added': False, + 'complete_wrapper_seconds_before_own_receipt': elapsed, + 'nested_queue_and_root_seconds': nested, 'wrapper_residual_seconds': residual, + 'outer_GNU_time_final_tail_reconciliation_required': True, + 'subreaper_is_same_queue_process': True, 'original_root_receipts_preserved': True} + folder = root / 'runtime/runs' / (name + '-supervisor-overhead') + folder.mkdir() + s.write_new(folder / 'START.json', {'kind': 'parent_cost_only'}) + s.write_new(folder / 'receipt.json', dict(result, label=folder.name, kind='parent_cost_only', + wall_seconds=residual, runner_wall_seconds=residual)) + s.write_new(evidence / 'WRAPPER.json', result) + lock.close() + if failure: + raise SystemExit(1) + + +if __name__ == '__main__': + main() diff --git a/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/caller_initial_controls_v1.py.txt b/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/caller_initial_controls_v1.py.txt new file mode 100644 index 0000000000..002930773d --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/caller_initial_controls_v1.py.txt @@ -0,0 +1,240 @@ +"""Unit07 NEW-only caller controls. Author worker alone executes this file. + +Only the accepted NEW T0 support prefix and explicitly named NEW caller helpers +are compiled. Original source_packet/RootProxy/main and all project modules stay +inert. Original supervisor bytes are used only as hash-checked fixture DATA. +Owned temporary stages and fake dispatch/short-I/O services grant no capability. +""" +import ast +import hashlib +import json +import os +from pathlib import Path +import sys +import tempfile +import types +import unittest + +UNIT=Path(__file__).resolve().parents[1] +F=UNIT.parent +CALLER=UNIT/'implementation/run_queue4_prefix_v2.py' +RAW=CALLER.read_bytes() +MARKER=b'# UNIT06_T0_SUPPORT_END\n' +PREFIX=RAW[:RAW.index(MARKER)+len(MARKER)] +BLOCKED={'parent_domain_v1','parent_closure_v1','parent_completion_v1', + 'h25_parent_supervisor','epoch_schema_v5','epoch_copy_v5', + 'v03_prefix_supervisor_v1','v03_prefix_derivation_v1', + 'v03_integrated_constructor_v2','predecessor_entry'} +NEW_FUNCTIONS={'_caller_simple','_caller_pin','_caller_inventory','_caller_stage', + '_caller_case','_caller_source_packet'} +CONSTANTS={'CALLER_QUEUE_SHA','CALLER_RUNNER_SHA','CALLER_SUPERVISOR_SHA', + 'CALLER_STAGE_KEYS','CALLER_FALSE_FIELDS'} + + +def sha(raw):return hashlib.sha256(raw).hexdigest() + + +def module(): + if BLOCKED & set(sys.modules):raise RuntimeError('original runtime module present') + if len(PREFIX)!=9878 or sha(PREFIX)!='48bc4009acb7569fb4a2ac529bec928a3aafdedc017a0ebaae97f72b7c97eabe': + raise RuntimeError('accepted new support prefix differs') + m=types.ModuleType('unit07_new_caller_fixture') + m.__file__=str(CALLER) + exec(compile(PREFIX,'','exec'),m.__dict__) + tree=ast.parse(RAW) + functions=[node for node in tree.body if type(node) is ast.FunctionDef and node.name in NEW_FUNCTIONS] + if {node.name for node in functions}!=NEW_FUNCTIONS:raise RuntimeError('new helper extraction incomplete') + exec(compile(ast.Module(body=functions,type_ignores=[]),'','exec'),m.__dict__) + for node in tree.body: + if type(node) is ast.Assign and len(node.targets)==1 and type(node.targets[0]) is ast.Name and node.targets[0].id in CONSTANTS: + m.__dict__[node.targets[0].id]=ast.literal_eval(node.value) + return m + + +def file(path,raw,mode=0o444): + path.parent.mkdir(parents=True,exist_ok=True) + path.write_bytes(raw);path.chmod(mode) + return path + + +def pin(m,path,raw): + # Fixture's expected contents are independently literal; observed metadata is + # only this owned fixture's installed identity, never a runtime admission. + return {'path':str(path),'sha256':sha(raw),'bytes':len(raw), + 'identity':m.identity(path.stat(follow_symlinks=False))} + + +def io_shim(read=None,write=None,close=None): + names=('stat','fstat','open','fchmod','fsync','O_RDONLY','O_NOFOLLOW', + 'O_NONBLOCK','O_CLOEXEC','O_WRONLY','O_CREAT','O_EXCL') + data={name:getattr(os,name) for name in names} + data.update(read=os.read if read is None else read, + write=os.write if write is None else write, + close=os.close if close is None else close) + return types.SimpleNamespace(**data) + + +class CallerNewControls(unittest.TestCase): + def tearDown(self): + self.assertFalse(BLOCKED & set(sys.modules)) + + def test_exact_prefix_only_delta_and_old_unit_unchanged(self): + old=(F/'unit06/implementation/run_queue4_prefix_v1.py').read_bytes() + entry=(F/'unit06/implementation/predecessor_entry.py').read_bytes() + self.assertEqual(sha(old),'90a7ed4a45b94e16fa313623e56f6f3efcd85f3ea40355a43b289d8c49a75825') + self.assertEqual(sha(entry),'b783c6812a6295069456cfb4187d4e09bb7acbcb20fffd76e0c10267f90c1201') + self.assertEqual(len(RAW),34716) + self.assertEqual(sha(RAW),'25138c2c998762649c6a61cb8a6ae8aacd81bd533591b082ab6f58def712fca2') + self.assertEqual(RAW[9878:],old[9574:]) + self.assertEqual(PREFIX,entry[:9878]) + + def test_read_at_8192_short_returns_can_complete(self): + m=module();calls=[] + def reading(fd,count):calls.append(count);return os.read(fd,min(1,count)) + m.os=io_shim(read=reading) + with tempfile.TemporaryDirectory(prefix='u7-caller-') as directory: + raw=b'x'*8192;p=file(Path(directory)/'input',raw);owner=m.Owner() + actual,retained=m.retained_read(str(p),sha(raw),len(raw),owner) + self.assertEqual(retained,raw) + self.assertEqual((len(calls),owner.read_calls,owner.captures[-1]['read_calls']),(8192,8192,8192)) + self.assertFalse(owner.quarantined) + self.assertEqual(owner.fd_slots,[None]) + + def test_8193rd_short_read_is_prevented_and_close_secondary_retained(self): + m=module();calls=[];closed=[];secondary=RuntimeError('NEW fixture close B') + def reading(fd,count):calls.append(count);return os.read(fd,min(1,count)) + def closing(fd):closed.append(fd);os.close(fd);raise secondary + m.os=io_shim(read=reading,close=closing) + with tempfile.TemporaryDirectory(prefix='u7-caller-') as directory: + raw=b'x'*8193;p=file(Path(directory)/'input',raw);owner=m.Owner() + with self.assertRaises(m.Stop) as caught:m.retained_read(str(p),sha(raw),len(raw),owner) + self.assertEqual(str(caught.exception),'read call bound') + self.assertIs(owner.primary,caught.exception) + self.assertIs(owner.secondary[0],secondary) + self.assertEqual((len(calls),owner.read_calls,len(closed)),(8192,8192,1)) + self.assertEqual(owner.total_bytes,8192) + self.assertEqual(owner.fd_slots,[None]) + self.assertTrue(owner.quarantined) + + def test_record_4097th_short_write_is_prevented(self): + m=module();calls=[] + def writing(fd,raw):calls.append(len(raw));return os.write(fd,raw[:1]) + m.os=io_shim(write=writing) + with tempfile.TemporaryDirectory(prefix='u7-caller-') as directory: + p=Path(directory)/'partial-record';owner=m.Owner() + with self.assertRaises(m.Stop) as caught:m.write_exclusive(str(p),b'x'*4097,0o444,owner) + self.assertEqual(str(caught.exception),'write call bound') + self.assertIs(owner.primary,caught.exception) + self.assertEqual((len(calls),owner.write_calls,p.stat().st_size),(4096,4096,4096)) + self.assertEqual(owner.fd_slots,[None]) + + def test_large_file_8193rd_short_write_is_prevented(self): + m=module();calls=[] + def writing(fd,raw):calls.append(len(raw));return os.write(fd,raw[:1]) + m.os=io_shim(write=writing) + with tempfile.TemporaryDirectory(prefix='u7-caller-') as directory: + p=Path(directory)/'partial-file';owner=m.Owner() + with self.assertRaises(m.Stop) as caught:m.write_exclusive(str(p),b'x'*(m.RECORD_CAP+1),0o444,owner) + self.assertEqual(str(caught.exception),'write call bound') + self.assertIs(owner.primary,caught.exception) + self.assertEqual((len(calls),owner.write_calls,p.stat().st_size),(8192,8192,8192)) + self.assertEqual(owner.fd_slots,[None]) + + def test_prior_digest_refuses_changed_bytes_and_retains_actual_raw(self): + m=module() + with tempfile.TemporaryDirectory(prefix='u7-caller-') as directory: + expected=b'{"independent":"expected"}\n';actual=b'{"changed":"actual"}\n' + p=file(Path(directory)/'selection',actual);owner=m.Owner() + with self.assertRaises(m.Stop):m.retained_read(str(p),sha(expected),m.RECORD_CAP,owner) + self.assertEqual(owner.captures[0]['raw'],actual) + self.assertTrue(owner.quarantined) + + def test_real_owned_inventory_and_negative_file_changes(self): + for fault in ('none','extra','missing','mode','symlink','nested'): + with self.subTest(fault=fault),tempfile.TemporaryDirectory(prefix='u7-caller-') as directory: + m=module();stage=Path(directory)/'stage';stage.mkdir() + raw=b'NEW owned inert input\n';p=file(stage/'input.txt',raw) + file(stage/'STAGE.json',b'NEW outer manifest bytes\n') + declared={'files':{'input.txt':{'sha256':sha(raw),'mode':0o444}}} + if fault=='extra':file(stage/'extra.txt',b'NEW extra\n') + if fault=='missing':p.unlink() + if fault=='mode':p.chmod(0o400) + if fault=='symlink':(stage/'alias').symlink_to(p) + if fault=='nested':file(stage/'nested/STAGE.json',b'NEW excluded without priorpin\n') + owner=m.Owner();state={'directory_scans':[],'inventory_observations':[]} + if fault=='none':self.assertEqual(m._caller_inventory(stage,declared,[],owner,state),declared['files']) + else: + with self.assertRaises(m.Stop):m._caller_inventory(stage,declared,[],owner,state) + self.assertTrue(all(row['handle'] is None and row['closed'] for row in state['directory_scans'])) + + def test_nested_excluded_manifest_requires_exact_prior_blob(self): + for changed in (False,True): + with self.subTest(changed=changed),tempfile.TemporaryDirectory(prefix='u7-caller-') as directory: + m=module();stage=Path(directory)/'stage';stage.mkdir() + raw=b'NEW input';file(stage/'input',raw);file(stage/'STAGE.json',b'outer') + nested_raw=b'NEW excluded bytes';nested=file(stage/'nested/STAGE.json',nested_raw) + expected=pin(m,nested,nested_raw) + if changed:expected['sha256']='0'*64 + state={'directory_scans':[],'inventory_observations':[]};owner=m.Owner() + declared={'files':{'input':{'sha256':sha(raw),'mode':0o444}}} + if changed: + with self.assertRaises(m.Stop):m._caller_inventory(stage,declared,[expected],owner,state) + else:self.assertEqual(m._caller_inventory(stage,declared,[expected],owner,state),declared['files']) + + def test_case_requires_actual_job_stage_and_all_five_false_fields(self): + m=module();digest='a'*64 + stages={'stage':{'selection':{'manifest':{'sha256':digest}},'jobs':{'job':{'entry':'integration/predecessor_entry.py','lanes':'1','optimized':False,'finite_only':True}}}} + case={'stage':'stage','stage_sha256':digest,'job':'job','label':'owned-fixture','science_status':'PREFIX_OBSERVATION_DATA','science_fields':{name:False for name in m.CALLER_FALSE_FIELDS}} + m._caller_case(case,stages) + for field in m.CALLER_FALSE_FIELDS: + for missing in (False,True): + with self.subTest(field=field,missing=missing): + changed=dict(case);changed['science_fields']=dict(case['science_fields']) + if missing:del changed['science_fields'][field] + else:changed['science_fields'][field]=True + with self.assertRaises(m.Stop):m._caller_case(changed,stages) + for key,value in (('science_status','PASS'),('stage_sha256','b'*64),('job','missing')): + changed=dict(case);changed[key]=value + with self.assertRaises(m.Stop):m._caller_case(changed,stages) + + def test_new_packet_basename_and_original_supervisor_data_only(self): + supervisor=(F/'unit06/prerequisites/h25_parent_supervisor.py.txt').read_bytes() + self.assertEqual(sha(supervisor),'cfb09a18dd10b597cc6d5a8139ee769bef679bc44ae029329755e3d97b055075') + for old_name_only in (False,True): + with self.subTest(old_name_only=old_name_only),tempfile.TemporaryDirectory(prefix='u7-caller-') as directory: + m=module();packet=Path(directory);own=b'# NEW inert fixture caller, never executed\n' + actual_name='run_queue4_prefix_v2.py';selected_name='run_queue4_prefix_v1.py' if old_name_only else actual_name + file(packet/actual_name,own);file(packet/'supervisor.py',supervisor) + manifest={'files':{selected_name:{'sha256':sha(own),'bytes':len(own)},'supervisor.py':{'sha256':sha(supervisor),'bytes':len(supervisor)}}} + raw=(json.dumps(manifest,sort_keys=True)+'\n').encode();path=file(packet/'SOURCE-READINESS.json',raw) + m.__file__=str(packet/actual_name);selection={'source_packet':pin(m,path,raw)};owner=m.Owner() + if old_name_only: + with self.assertRaises(m.Stop):m._caller_source_packet(selection,owner) + self.assertEqual(len(owner.captures),1) + else:self.assertEqual(m._caller_source_packet(selection,owner),manifest) + + def test_new_dispatch_recheck_precedes_fake_base_and_failure_suppresses_it(self): + cls=[node for node in ast.parse(RAW).body if type(node) is ast.ClassDef and node.name=='PriorAdmittedRootProxy'] + self.assertEqual(len(cls),1) + for fail in (False,True): + with self.subTest(fail=fail): + m=module();events=[];error=RuntimeError('NEW fixture recheck A') + class FakeBase: + def __init__(self):self.next=0;self.cases=[{'NEW':'fixture'}] + def run(self,command,**kwargs):events.append('fake-base');return 'NEW-FAKE-NOT-RUNTIME' + def recheck(state,case): + events.append('new-recheck') + if fail:raise error + m.RootProxy=FakeBase;m._caller_recheck=recheck;m._CALLER_ADMISSION=object() + exec(compile(ast.Module(body=cls,type_ignores=[]),'','exec'),m.__dict__) + proxy=m.PriorAdmittedRootProxy() + if fail: + with self.assertRaises(RuntimeError) as caught:proxy.run(['NEW-FAKE-NO-EXEC']) + self.assertIs(caught.exception,error) + self.assertEqual(events,['new-recheck']) + else: + self.assertEqual(proxy.run(['NEW-FAKE-NO-EXEC']),'NEW-FAKE-NOT-RUNTIME') + self.assertEqual(events,['new-recheck','fake-base']) + + +if __name__=='__main__':unittest.main(verbosity=2) diff --git a/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/caller_initial_freeze_v1.json b/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/caller_initial_freeze_v1.json new file mode 100644 index 0000000000..98230e4bf8 --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/caller_initial_freeze_v1.json @@ -0,0 +1,26 @@ +{ + "schema": "unit07-caller-v2-initial-freeze-v1", + "recorded_utc": "2026-11-02T14:01:26.536108+00:00", + "source": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/unit07/implementation/run_queue4_prefix_v2.py", + "bytes": 34716, + "sha256": "25138c2c998762649c6a61cb8a6ae8aacd81bd533591b082ab6f58def712fca2", + "gate_sha256": "aedf7d0c548a8ed7f241179685a0a734628f1833d4442e9dc782064d0bbfdfc0", + "basis_sha256": "90a7ed4a45b94e16fa313623e56f6f3efcd85f3ea40355a43b289d8c49a75825", + "accepted_entry_sha256": "b783c6812a6295069456cfb4187d4e09bb7acbcb20fffd76e0c10267f90c1201", + "old_prefix_bytes": 9574, + "old_prefix_sha256": "c20523438a6bb49ef43ea527cf6c96a07542cadea72a77eb822c54f8f64fb863", + "new_prefix_bytes": 9878, + "new_prefix_sha256": "48bc4009acb7569fb4a2ac529bec928a3aafdedc017a0ebaae97f72b7c97eabe", + "remainder_byte_identical": true, + "all_original_source_packet_RootProxy_main_operations_unchanged": true, + "initial_candidate_direct_snapshot": "unit07/fixtures/caller_initial_candidate_v2.py.txt", + "initial_candidate_frozen_before_independent_verdict": true, + "source_delta": "Exact prefix replacement only,304B larger. No additional semantic/algorithm changes.", + "old_units_modified": false, + "tests_or_candidate_code_executed_by_worker": false, + "sole_execution_owner": "c05_header_closure", + "actual_runtime_or_current_approval_provided": false, + "full_C05": false, + "full_V03": false, + "costs": "OPEN_NOT_ZERO" +} diff --git a/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/caller_new_controls_v1.py b/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/caller_new_controls_v1.py new file mode 100644 index 0000000000..002930773d --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/caller_new_controls_v1.py @@ -0,0 +1,240 @@ +"""Unit07 NEW-only caller controls. Author worker alone executes this file. + +Only the accepted NEW T0 support prefix and explicitly named NEW caller helpers +are compiled. Original source_packet/RootProxy/main and all project modules stay +inert. Original supervisor bytes are used only as hash-checked fixture DATA. +Owned temporary stages and fake dispatch/short-I/O services grant no capability. +""" +import ast +import hashlib +import json +import os +from pathlib import Path +import sys +import tempfile +import types +import unittest + +UNIT=Path(__file__).resolve().parents[1] +F=UNIT.parent +CALLER=UNIT/'implementation/run_queue4_prefix_v2.py' +RAW=CALLER.read_bytes() +MARKER=b'# UNIT06_T0_SUPPORT_END\n' +PREFIX=RAW[:RAW.index(MARKER)+len(MARKER)] +BLOCKED={'parent_domain_v1','parent_closure_v1','parent_completion_v1', + 'h25_parent_supervisor','epoch_schema_v5','epoch_copy_v5', + 'v03_prefix_supervisor_v1','v03_prefix_derivation_v1', + 'v03_integrated_constructor_v2','predecessor_entry'} +NEW_FUNCTIONS={'_caller_simple','_caller_pin','_caller_inventory','_caller_stage', + '_caller_case','_caller_source_packet'} +CONSTANTS={'CALLER_QUEUE_SHA','CALLER_RUNNER_SHA','CALLER_SUPERVISOR_SHA', + 'CALLER_STAGE_KEYS','CALLER_FALSE_FIELDS'} + + +def sha(raw):return hashlib.sha256(raw).hexdigest() + + +def module(): + if BLOCKED & set(sys.modules):raise RuntimeError('original runtime module present') + if len(PREFIX)!=9878 or sha(PREFIX)!='48bc4009acb7569fb4a2ac529bec928a3aafdedc017a0ebaae97f72b7c97eabe': + raise RuntimeError('accepted new support prefix differs') + m=types.ModuleType('unit07_new_caller_fixture') + m.__file__=str(CALLER) + exec(compile(PREFIX,'','exec'),m.__dict__) + tree=ast.parse(RAW) + functions=[node for node in tree.body if type(node) is ast.FunctionDef and node.name in NEW_FUNCTIONS] + if {node.name for node in functions}!=NEW_FUNCTIONS:raise RuntimeError('new helper extraction incomplete') + exec(compile(ast.Module(body=functions,type_ignores=[]),'','exec'),m.__dict__) + for node in tree.body: + if type(node) is ast.Assign and len(node.targets)==1 and type(node.targets[0]) is ast.Name and node.targets[0].id in CONSTANTS: + m.__dict__[node.targets[0].id]=ast.literal_eval(node.value) + return m + + +def file(path,raw,mode=0o444): + path.parent.mkdir(parents=True,exist_ok=True) + path.write_bytes(raw);path.chmod(mode) + return path + + +def pin(m,path,raw): + # Fixture's expected contents are independently literal; observed metadata is + # only this owned fixture's installed identity, never a runtime admission. + return {'path':str(path),'sha256':sha(raw),'bytes':len(raw), + 'identity':m.identity(path.stat(follow_symlinks=False))} + + +def io_shim(read=None,write=None,close=None): + names=('stat','fstat','open','fchmod','fsync','O_RDONLY','O_NOFOLLOW', + 'O_NONBLOCK','O_CLOEXEC','O_WRONLY','O_CREAT','O_EXCL') + data={name:getattr(os,name) for name in names} + data.update(read=os.read if read is None else read, + write=os.write if write is None else write, + close=os.close if close is None else close) + return types.SimpleNamespace(**data) + + +class CallerNewControls(unittest.TestCase): + def tearDown(self): + self.assertFalse(BLOCKED & set(sys.modules)) + + def test_exact_prefix_only_delta_and_old_unit_unchanged(self): + old=(F/'unit06/implementation/run_queue4_prefix_v1.py').read_bytes() + entry=(F/'unit06/implementation/predecessor_entry.py').read_bytes() + self.assertEqual(sha(old),'90a7ed4a45b94e16fa313623e56f6f3efcd85f3ea40355a43b289d8c49a75825') + self.assertEqual(sha(entry),'b783c6812a6295069456cfb4187d4e09bb7acbcb20fffd76e0c10267f90c1201') + self.assertEqual(len(RAW),34716) + self.assertEqual(sha(RAW),'25138c2c998762649c6a61cb8a6ae8aacd81bd533591b082ab6f58def712fca2') + self.assertEqual(RAW[9878:],old[9574:]) + self.assertEqual(PREFIX,entry[:9878]) + + def test_read_at_8192_short_returns_can_complete(self): + m=module();calls=[] + def reading(fd,count):calls.append(count);return os.read(fd,min(1,count)) + m.os=io_shim(read=reading) + with tempfile.TemporaryDirectory(prefix='u7-caller-') as directory: + raw=b'x'*8192;p=file(Path(directory)/'input',raw);owner=m.Owner() + actual,retained=m.retained_read(str(p),sha(raw),len(raw),owner) + self.assertEqual(retained,raw) + self.assertEqual((len(calls),owner.read_calls,owner.captures[-1]['read_calls']),(8192,8192,8192)) + self.assertFalse(owner.quarantined) + self.assertEqual(owner.fd_slots,[None]) + + def test_8193rd_short_read_is_prevented_and_close_secondary_retained(self): + m=module();calls=[];closed=[];secondary=RuntimeError('NEW fixture close B') + def reading(fd,count):calls.append(count);return os.read(fd,min(1,count)) + def closing(fd):closed.append(fd);os.close(fd);raise secondary + m.os=io_shim(read=reading,close=closing) + with tempfile.TemporaryDirectory(prefix='u7-caller-') as directory: + raw=b'x'*8193;p=file(Path(directory)/'input',raw);owner=m.Owner() + with self.assertRaises(m.Stop) as caught:m.retained_read(str(p),sha(raw),len(raw),owner) + self.assertEqual(str(caught.exception),'read call bound') + self.assertIs(owner.primary,caught.exception) + self.assertIs(owner.secondary[0],secondary) + self.assertEqual((len(calls),owner.read_calls,len(closed)),(8192,8192,1)) + self.assertEqual(owner.total_bytes,8192) + self.assertEqual(owner.fd_slots,[None]) + self.assertTrue(owner.quarantined) + + def test_record_4097th_short_write_is_prevented(self): + m=module();calls=[] + def writing(fd,raw):calls.append(len(raw));return os.write(fd,raw[:1]) + m.os=io_shim(write=writing) + with tempfile.TemporaryDirectory(prefix='u7-caller-') as directory: + p=Path(directory)/'partial-record';owner=m.Owner() + with self.assertRaises(m.Stop) as caught:m.write_exclusive(str(p),b'x'*4097,0o444,owner) + self.assertEqual(str(caught.exception),'write call bound') + self.assertIs(owner.primary,caught.exception) + self.assertEqual((len(calls),owner.write_calls,p.stat().st_size),(4096,4096,4096)) + self.assertEqual(owner.fd_slots,[None]) + + def test_large_file_8193rd_short_write_is_prevented(self): + m=module();calls=[] + def writing(fd,raw):calls.append(len(raw));return os.write(fd,raw[:1]) + m.os=io_shim(write=writing) + with tempfile.TemporaryDirectory(prefix='u7-caller-') as directory: + p=Path(directory)/'partial-file';owner=m.Owner() + with self.assertRaises(m.Stop) as caught:m.write_exclusive(str(p),b'x'*(m.RECORD_CAP+1),0o444,owner) + self.assertEqual(str(caught.exception),'write call bound') + self.assertIs(owner.primary,caught.exception) + self.assertEqual((len(calls),owner.write_calls,p.stat().st_size),(8192,8192,8192)) + self.assertEqual(owner.fd_slots,[None]) + + def test_prior_digest_refuses_changed_bytes_and_retains_actual_raw(self): + m=module() + with tempfile.TemporaryDirectory(prefix='u7-caller-') as directory: + expected=b'{"independent":"expected"}\n';actual=b'{"changed":"actual"}\n' + p=file(Path(directory)/'selection',actual);owner=m.Owner() + with self.assertRaises(m.Stop):m.retained_read(str(p),sha(expected),m.RECORD_CAP,owner) + self.assertEqual(owner.captures[0]['raw'],actual) + self.assertTrue(owner.quarantined) + + def test_real_owned_inventory_and_negative_file_changes(self): + for fault in ('none','extra','missing','mode','symlink','nested'): + with self.subTest(fault=fault),tempfile.TemporaryDirectory(prefix='u7-caller-') as directory: + m=module();stage=Path(directory)/'stage';stage.mkdir() + raw=b'NEW owned inert input\n';p=file(stage/'input.txt',raw) + file(stage/'STAGE.json',b'NEW outer manifest bytes\n') + declared={'files':{'input.txt':{'sha256':sha(raw),'mode':0o444}}} + if fault=='extra':file(stage/'extra.txt',b'NEW extra\n') + if fault=='missing':p.unlink() + if fault=='mode':p.chmod(0o400) + if fault=='symlink':(stage/'alias').symlink_to(p) + if fault=='nested':file(stage/'nested/STAGE.json',b'NEW excluded without priorpin\n') + owner=m.Owner();state={'directory_scans':[],'inventory_observations':[]} + if fault=='none':self.assertEqual(m._caller_inventory(stage,declared,[],owner,state),declared['files']) + else: + with self.assertRaises(m.Stop):m._caller_inventory(stage,declared,[],owner,state) + self.assertTrue(all(row['handle'] is None and row['closed'] for row in state['directory_scans'])) + + def test_nested_excluded_manifest_requires_exact_prior_blob(self): + for changed in (False,True): + with self.subTest(changed=changed),tempfile.TemporaryDirectory(prefix='u7-caller-') as directory: + m=module();stage=Path(directory)/'stage';stage.mkdir() + raw=b'NEW input';file(stage/'input',raw);file(stage/'STAGE.json',b'outer') + nested_raw=b'NEW excluded bytes';nested=file(stage/'nested/STAGE.json',nested_raw) + expected=pin(m,nested,nested_raw) + if changed:expected['sha256']='0'*64 + state={'directory_scans':[],'inventory_observations':[]};owner=m.Owner() + declared={'files':{'input':{'sha256':sha(raw),'mode':0o444}}} + if changed: + with self.assertRaises(m.Stop):m._caller_inventory(stage,declared,[expected],owner,state) + else:self.assertEqual(m._caller_inventory(stage,declared,[expected],owner,state),declared['files']) + + def test_case_requires_actual_job_stage_and_all_five_false_fields(self): + m=module();digest='a'*64 + stages={'stage':{'selection':{'manifest':{'sha256':digest}},'jobs':{'job':{'entry':'integration/predecessor_entry.py','lanes':'1','optimized':False,'finite_only':True}}}} + case={'stage':'stage','stage_sha256':digest,'job':'job','label':'owned-fixture','science_status':'PREFIX_OBSERVATION_DATA','science_fields':{name:False for name in m.CALLER_FALSE_FIELDS}} + m._caller_case(case,stages) + for field in m.CALLER_FALSE_FIELDS: + for missing in (False,True): + with self.subTest(field=field,missing=missing): + changed=dict(case);changed['science_fields']=dict(case['science_fields']) + if missing:del changed['science_fields'][field] + else:changed['science_fields'][field]=True + with self.assertRaises(m.Stop):m._caller_case(changed,stages) + for key,value in (('science_status','PASS'),('stage_sha256','b'*64),('job','missing')): + changed=dict(case);changed[key]=value + with self.assertRaises(m.Stop):m._caller_case(changed,stages) + + def test_new_packet_basename_and_original_supervisor_data_only(self): + supervisor=(F/'unit06/prerequisites/h25_parent_supervisor.py.txt').read_bytes() + self.assertEqual(sha(supervisor),'cfb09a18dd10b597cc6d5a8139ee769bef679bc44ae029329755e3d97b055075') + for old_name_only in (False,True): + with self.subTest(old_name_only=old_name_only),tempfile.TemporaryDirectory(prefix='u7-caller-') as directory: + m=module();packet=Path(directory);own=b'# NEW inert fixture caller, never executed\n' + actual_name='run_queue4_prefix_v2.py';selected_name='run_queue4_prefix_v1.py' if old_name_only else actual_name + file(packet/actual_name,own);file(packet/'supervisor.py',supervisor) + manifest={'files':{selected_name:{'sha256':sha(own),'bytes':len(own)},'supervisor.py':{'sha256':sha(supervisor),'bytes':len(supervisor)}}} + raw=(json.dumps(manifest,sort_keys=True)+'\n').encode();path=file(packet/'SOURCE-READINESS.json',raw) + m.__file__=str(packet/actual_name);selection={'source_packet':pin(m,path,raw)};owner=m.Owner() + if old_name_only: + with self.assertRaises(m.Stop):m._caller_source_packet(selection,owner) + self.assertEqual(len(owner.captures),1) + else:self.assertEqual(m._caller_source_packet(selection,owner),manifest) + + def test_new_dispatch_recheck_precedes_fake_base_and_failure_suppresses_it(self): + cls=[node for node in ast.parse(RAW).body if type(node) is ast.ClassDef and node.name=='PriorAdmittedRootProxy'] + self.assertEqual(len(cls),1) + for fail in (False,True): + with self.subTest(fail=fail): + m=module();events=[];error=RuntimeError('NEW fixture recheck A') + class FakeBase: + def __init__(self):self.next=0;self.cases=[{'NEW':'fixture'}] + def run(self,command,**kwargs):events.append('fake-base');return 'NEW-FAKE-NOT-RUNTIME' + def recheck(state,case): + events.append('new-recheck') + if fail:raise error + m.RootProxy=FakeBase;m._caller_recheck=recheck;m._CALLER_ADMISSION=object() + exec(compile(ast.Module(body=cls,type_ignores=[]),'','exec'),m.__dict__) + proxy=m.PriorAdmittedRootProxy() + if fail: + with self.assertRaises(RuntimeError) as caught:proxy.run(['NEW-FAKE-NO-EXEC']) + self.assertIs(caught.exception,error) + self.assertEqual(events,['new-recheck']) + else: + self.assertEqual(proxy.run(['NEW-FAKE-NO-EXEC']),'NEW-FAKE-NOT-RUNTIME') + self.assertEqual(events,['new-recheck','fake-base']) + + +if __name__=='__main__':unittest.main(verbosity=2) diff --git a/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/caller_resource_bill_v1.json b/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/caller_resource_bill_v1.json new file mode 100644 index 0000000000..0e03e089c6 --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/caller_resource_bill_v1.json @@ -0,0 +1,52 @@ +{ + "schema": "unit07-caller-resource-operation-disposition-v1", + "recorded_utc": "2026-11-02T14:06:38.841571+00:00", + "source_sha256": "25138c2c998762649c6a61cb8a6ae8aacd81bd533591b082ab6f58def712fca2", + "source_scope": "Static parameterized new-operation bill, not executed runtime or complete physical invoice. All old source/queue/supervisor/root operations remain paid by original history/residual and enclosing GNU-time tail.", + "symbols": { + "S": "selected stage count1..256", + "C": "selected case count1..256", + "P": "source packet member count1..128", + "F_i": "ordinary stage file count1..8192", + "E_i": "independently pinned excluded nested STAGE manifest count0..128", + "N_i": "actual stage entries at most16384 with depth at most24", + "H_i": "F_i+E_i+5 new retained reads in one _caller_stage pass" + }, + "new_retained_read_API_calls": { + "initial_admission": "7+P+sum_i(H_i)", + "each_dispatch_recheck": "7+P+H_case_stage", + "final_all_stage_recheck": "7+P+sum_i(H_i)", + "complete_successful_route": "(C+2)*(7+P)+2*sum_i(H_i)+sum_cases(H_case_stage)", + "failed_routes": "Actual reached prefix only; retained owner/captures/counters/phase/partial buffers and raw first/secondary failures are evidence, never successful exhaustion." + }, + "per_file_calls": { + "read_cap": 8192, + "block_bytes_max": 65536, + "read_call_consumed_before_OS_read": true, + "positive_short_returns_are_charged": true, + "record_write_cap": 4096, + "larger_file_write_cap": 8192, + "actual_caller_route_invokes_new_write_exclusive": false, + "old_wrapper_receipt_writes": "Actual old s.write_new operations remain; zero new helper calls is not zero actual write cost." + }, + "byte_bounds": { + "individual_source_max": 67108864, + "retained_Owner_aggregate_read_bytes_max": 268435456, + "selection_config_policy_STAGEmetadata_JOBSM_max": 1048576, + "source_packet_manifest_and_each_member_max": 262144, + "retention_memory": "Raw plus chunk references, last returned block, stat/identity/scan objects, module/code/object allocations and all failure tails remain paid; no heap/1GiB fit proven by this static formula." + }, + "stage_exclusion": "Root STAGE is retained twice per stage pass; each explicitly selected nested STAGE is read and charged separately; ordinary M/B/JOBS are included in fullinventory and read again against their prior complete blobs. Unselected nested manifests fail.", + "resources": "At most one active scandir iterator for the stack traversal plus the currently owned read FD. Scan/read descriptor slots are consumed before close; uncertainty burns the new owner. Actual directory/metadata/identity syscall and physical costs are additional, OPEN_NOT_ZERO.", + "time_history": "Original began remains first main instruction; startup and all predispatch/final rechecks remain before original elapsed/residual calculation and under original aggregate budget accounting. Prebudget authentication failure cannot write a fabricated ledger; genuine enclosing launch owner must pay actual error/receipt tail. Original own-receipt tail reconciliation remains external.", + "unproved": [ + "Current canonical history, genuine approval/capability, initialized receiver48/512 fit", + "Actual complete9-category parent and childC05 inventory/cap/channel", + "C07 ancestor/lifetime; actual native/source/stage/command/funding/execution", + "Actual complete physical cost/memory/time fit and enclosing-parent exit" + ], + "full_C05": false, + "full_V03": false, + "runtime_qualified": false, + "costs": "OPEN_NOT_ZERO" +} diff --git a/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/preparer_executed_caller_v1.normal.txt b/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/preparer_executed_caller_v1.normal.txt new file mode 100644 index 0000000000..887bed0bf6 --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/preparer_executed_caller_v1.normal.txt @@ -0,0 +1,16 @@ +test_8193rd_short_read_is_prevented_and_close_secondary_retained (__main__.CallerNewControls.test_8193rd_short_read_is_prevented_and_close_secondary_retained) ... ok +test_case_requires_actual_job_stage_and_all_five_false_fields (__main__.CallerNewControls.test_case_requires_actual_job_stage_and_all_five_false_fields) ... ok +test_exact_prefix_only_delta_and_old_unit_unchanged (__main__.CallerNewControls.test_exact_prefix_only_delta_and_old_unit_unchanged) ... ok +test_large_file_8193rd_short_write_is_prevented (__main__.CallerNewControls.test_large_file_8193rd_short_write_is_prevented) ... ok +test_nested_excluded_manifest_requires_exact_prior_blob (__main__.CallerNewControls.test_nested_excluded_manifest_requires_exact_prior_blob) ... ok +test_new_dispatch_recheck_precedes_fake_base_and_failure_suppresses_it (__main__.CallerNewControls.test_new_dispatch_recheck_precedes_fake_base_and_failure_suppresses_it) ... ok +test_new_packet_basename_and_original_supervisor_data_only (__main__.CallerNewControls.test_new_packet_basename_and_original_supervisor_data_only) ... ok +test_prior_digest_refuses_changed_bytes_and_retains_actual_raw (__main__.CallerNewControls.test_prior_digest_refuses_changed_bytes_and_retains_actual_raw) ... ok +test_read_at_8192_short_returns_can_complete (__main__.CallerNewControls.test_read_at_8192_short_returns_can_complete) ... ok +test_real_owned_inventory_and_negative_file_changes (__main__.CallerNewControls.test_real_owned_inventory_and_negative_file_changes) ... ok +test_record_4097th_short_write_is_prevented (__main__.CallerNewControls.test_record_4097th_short_write_is_prevented) ... ok + +---------------------------------------------------------------------- +Ran 11 tests in 0.717s + +OK diff --git a/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/preparer_executed_caller_v1.optimized.txt b/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/preparer_executed_caller_v1.optimized.txt new file mode 100644 index 0000000000..eba998c667 --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/archive/unit07/fixtures/preparer_executed_caller_v1.optimized.txt @@ -0,0 +1,16 @@ +test_8193rd_short_read_is_prevented_and_close_secondary_retained (__main__.CallerNewControls.test_8193rd_short_read_is_prevented_and_close_secondary_retained) ... ok +test_case_requires_actual_job_stage_and_all_five_false_fields (__main__.CallerNewControls.test_case_requires_actual_job_stage_and_all_five_false_fields) ... ok +test_exact_prefix_only_delta_and_old_unit_unchanged (__main__.CallerNewControls.test_exact_prefix_only_delta_and_old_unit_unchanged) ... ok +test_large_file_8193rd_short_write_is_prevented (__main__.CallerNewControls.test_large_file_8193rd_short_write_is_prevented) ... ok +test_nested_excluded_manifest_requires_exact_prior_blob (__main__.CallerNewControls.test_nested_excluded_manifest_requires_exact_prior_blob) ... ok +test_new_dispatch_recheck_precedes_fake_base_and_failure_suppresses_it (__main__.CallerNewControls.test_new_dispatch_recheck_precedes_fake_base_and_failure_suppresses_it) ... ok +test_new_packet_basename_and_original_supervisor_data_only (__main__.CallerNewControls.test_new_packet_basename_and_original_supervisor_data_only) ... ok +test_prior_digest_refuses_changed_bytes_and_retains_actual_raw (__main__.CallerNewControls.test_prior_digest_refuses_changed_bytes_and_retains_actual_raw) ... ok +test_read_at_8192_short_returns_can_complete (__main__.CallerNewControls.test_read_at_8192_short_returns_can_complete) ... ok +test_real_owned_inventory_and_negative_file_changes (__main__.CallerNewControls.test_real_owned_inventory_and_negative_file_changes) ... ok +test_record_4097th_short_write_is_prevented (__main__.CallerNewControls.test_record_4097th_short_write_is_prevented) ... ok + +---------------------------------------------------------------------- +Ran 11 tests in 0.704s + +OK diff --git a/research/h25-v03-bounded-prefix-caller/archive/unit07/implementation/run_queue4_prefix_v2.py b/research/h25-v03-bounded-prefix-caller/archive/unit07/implementation/run_queue4_prefix_v2.py new file mode 100644 index 0000000000..890a0ee8c1 --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/archive/unit07/implementation/run_queue4_prefix_v2.py @@ -0,0 +1,604 @@ +"""Conditional Unit06 authenticated entry. No original project imports at load. + +T0 is the original trusted first-launcher/OS/interpreter/system-stdlib premise. +Source selection does not create source, native, C05/C07, funding or runtime +admission. Do not call main except in a separately admitted genuine instance. +""" +from __future__ import annotations +import ast +import builtins +import hashlib +import json +import os +from pathlib import Path +import stat +import sys +import types + +FILE_CAP=64*1024*1024 +TOTAL_CAP=256*1024*1024 +RECORD_CAP=1024*1024 +MAX_ROWS=8192 +IDENTITY_KEYS=('device','inode','mode','links','uid','gid','size','mtime_ns','ctime_ns') +ENV={'PATH':'/usr/bin:/bin','PYTHONHASHSEED':'0','LANG':'C.UTF-8','LC_ALL':'C.UTF-8','TZ':'UTC','PYTHONDONTWRITEBYTECODE':'1'} +SYSTEM_PATH=('/usr/lib/python312.zip','/usr/lib/python3.12','/usr/lib/python3.12/lib-dynload') + + +class Stop(RuntimeError):pass + + +def need(condition,message): + if condition is not True:raise Stop(message) + + +def plain(value): + nodes=text=0 + def walk(item,depth): + nonlocal nodes,text + nodes+=1 + need(depth<=24 and nodes<=65536,'plain structure bound') + kind=type(item) + if item is None or kind is bool:return + if kind is int:need(-(1<<127)<=item<(1<<127),'integer bound');return + if kind is str: + text+=len(item);need(len(item)<=8192 and text<=524288,'text bound');return + need(kind is list or kind is dict,'exact plain value required') + need(len(item)<=MAX_ROWS,'container bound') + if kind is list: + for child in item:walk(child,depth+1) + else: + for key,child in item.items(): + need(type(key) is str,'exact string key required');walk(key,depth+1);walk(child,depth+1) + walk(value,0) + + +def canonical(value,cap=RECORD_CAP): + need(type(cap) is int and 0<=cap<=FILE_CAP,'exact record cap') + plain(value) + raw=(json.dumps(value,sort_keys=True,separators=(',',':'),ensure_ascii=True,allow_nan=False)+'\n').encode('ascii') + need(len(raw)<=cap,'canonical record cap');return raw + + +def decode(raw,cap=RECORD_CAP): + need(type(cap) is int and 0<=cap<=FILE_CAP,'exact decode cap') + need(type(raw) is bytes and len(raw)<=cap,'raw record cap/type') + def pairs(rows): + result={} + for key,value in rows: + need(key not in result,'duplicate JSON key');result[key]=value + return result + def bad(token):raise Stop('non-integer JSON number') + value=json.loads(raw,object_pairs_hook=pairs,parse_float=bad,parse_constant=bad) + plain(value);return value + + +def path_text(value): + need(type(value) is str and 10 and row['size']==pin['bytes'] and stat.S_ISREG(row['mode']) and row['links']==1,'regular single-link identity') + + +class Owner: + """New T0-side retained failure state, never an original capability.""" + def __init__(self): + self.primary=None;self.secondary=[];self.pending=False;self.quarantined=False + self.busy=False;self.burned=False;self.fd_slots=[];self.captures=[];self.total_bytes=0 + self.read_calls=0;self.write_calls=0 + self.last_block=None;self.last_raw=None;self.modules={};self.published=[];self.executed=[] + self.phase='NEW';self.result=None + def ready(self): + if self.primary is not None:raise self.primary + need(not self.quarantined and not self.pending and not self.busy,'owner terminal/uncertain') + def fail(self,error): + if self.primary is None:self.primary=error + elif error is not self.primary:self.secondary.append(error) + self.quarantined=True + return self.primary + + +def _retained_read(path,expected_sha256,cap,owner,expected_pin=None): + """Actual descriptor-bound read. Returned source bytes are never reopened for exec.""" + need(type(owner) is Owner,'actual local owner required');owner.ready();path_text(path) + need(type(cap) is int and 0<=cap<=FILE_CAP,'read cap') + if expected_sha256 is not None: + need(type(expected_sha256) is str and len(expected_sha256)==64 and all(c in '0123456789abcdef' for c in expected_sha256),'prior digest') + if expected_pin is not None:validate_blob(expected_pin,cap);need(expected_pin['path']==path and expected_pin['sha256']==expected_sha256,'prior pin path/digest') + record={'path':path,'chunks':[],'raw':None,'observed':None,'read_calls':0};owner.captures.append(record) + owner.fd_slots.append(None);slot=len(owner.fd_slots)-1;primary=None;owner.busy=True + try: + before=identity(os.stat(path,follow_symlinks=False)) + need(stat.S_ISREG(before['mode']) and before['links']==1 and before['size']<=cap,'source kind/link/size') + owner.pending=True + owner.fd_slots[slot]=os.open(path,os.O_RDONLY|os.O_NOFOLLOW|os.O_NONBLOCK|os.O_CLOEXEC) + owner.pending=False + opened=identity(os.fstat(owner.fd_slots[slot]));need(before==opened,'source open drift') + if expected_pin is not None:need(opened==expected_pin['identity'],'source installed identity differs') + count=0 + while count 262144 or hashlib.sha256(raw).hexdigest() != expected: + raise RuntimeError('Parent-reviewed source manifest differs') + manifest = json.loads(raw) + blobs = {} + for name, row in manifest['files'].items(): + if Path(name).name != name or name == 'SOURCE-READINESS.json': + raise RuntimeError('Unsafe source packet member') + path = here / name + if path.is_symlink() or path.stat().st_mode & 0o222: + raise RuntimeError('Parent must freeze the concrete source packet readonly') + with path.open('rb') as stream: + data = stream.read(262145) + if len(data) > 262144 or len(data) != row['bytes'] or hashlib.sha256(data).hexdigest() != row['sha256']: + raise RuntimeError('Source packet member differs: ' + name) + blobs[name] = data + if blobs[Path(__file__).name] != Path(__file__).read_bytes(): + raise RuntimeError('Actual queue entry differs from frozen source packet') + path = here / 'supervisor.py' + spec = importlib.util.spec_from_file_location('h25_parent_supervisor', path) + module = importlib.util.module_from_spec(spec) + exec(compile(blobs['supervisor.py'], str(path), 'exec'), module.__dict__) + return module, manifest + + + +class RootProxy: + def __init__(self, supervisor, root, cases, evidence, policy, deadline): + self.s, self.root, self.cases = supervisor, root, cases + self.evidence, self.policy, self.deadline = evidence, policy, deadline + self.next = 0 + self.records = [] + + def run(self, command, **kwargs): + s = self.s + s.need(self.next < len(self.cases), 'Unregistered extra queue root command') + case = self.cases[self.next] + expected = ['/usr/bin/python3.12', *s.FLAGS, str(self.root / 'run_guarded_v3.py'), + case['stage'], case['job'], case['label']] + s.need(command == expected and set(kwargs) == {'cwd', 'env', 'capture_output', 'timeout'} and + kwargs['cwd'] == self.root and kwargs['env'] == s.ENV and + kwargs['capture_output'] is True and kwargs['timeout'] == 190, + 'Queue subprocess alias call exceeded its exact reviewed interface') + folder = self.evidence / case['label'] + result = s.run_root(self.root, case, folder, self.policy['root_seconds'], self.deadline, + self.policy['root_address_space_bytes'], self.policy['root_rss_sum_bytes']) + original_rc = result['returncode'] + receipt_path = self.root / 'runtime/runs' / case['label'] / 'receipt.json' + if receipt_path.exists(): + root_receipt, root_pin = s.read_json(receipt_path, 4 * 1024 * 1024) + else: + root_receipt, root_pin = {'status': 'ABSENT_UNCLOSED_ROOT'}, None + failure = result['failure'] + if original_rc == 0 and (result['cleanup']['observed_after_root_exit'] or + result['cleanup']['reaped_adopted']): + failure = failure or {'type': 'OrphanAfterApparentPass', + 'message': 'Original root exit 0 retained; supervisor admission STOP'} + if not result['cleanup']['complete']: + failure = failure or {'type': 'CleanupIncomplete', 'message': 'Owned process groups not empty'} + originals = {'root_returncode': original_rc, 'root_status': root_receipt['status'], + 'root_receipt_pin': root_pin, 'root_stdout': result['outer_logs']['root.stdout.raw'], + 'root_stderr': result['outer_logs']['root.stderr.raw']} + row = {'label': case['label'], 'actual_consumer': 'wrapper+module-alias-proxy+supervisor+queue-v4', + 'original': originals, 'effective_admission': 'STOP' if failure else 'DEFER_TO_QUEUE_V4', + 'supervision_failure': failure, 'original_root_receipt_unchanged': True, + 'cleanup_before_queue_validation': True} + s.write_new(folder / 'PROXY.json', row) + self.records.append(row) + if failure: + s.stop_supplement(self.root, case['label'], failure) + raise RuntimeError('Root supervision rejected case; original status retained: ' + case['label']) + stdout_record, stdout = s.stable_file(folder / 'root.stdout.raw', s.LOG_CAP, True) + stderr_record, stderr = s.stable_file(folder / 'root.stderr.raw', s.LOG_CAP, True) + s.need(stdout_record == originals['root_stdout'] and stderr_record == originals['root_stderr'], + 'Original root command streams changed before queue consumption') + self.next += 1 + return subprocess.CompletedProcess(command, original_rc, stdout, stderr) + + +# Unit06 caller additions. Expected pins originate in the independently admitted +# --selection bytes/hash, never in observed candidate data. T0 authenticates this +# actual caller before its first body; none of these checks create that premise. +CALLER_QUEUE_SHA='1348a7b4d7cc1f9fef556f5e0abdaf04411a998afdcd574d7812c76ab37dcf68' +CALLER_RUNNER_SHA='bd882e3dadb1b6aeaa63ee824f1a1c58f8ef2546b6840a2bffa46885a184d3eb' +CALLER_SUPERVISOR_SHA='cfb09a18dd10b597cc6d5a8139ee769bef679bc44ae029329755e3d97b055075' +CALLER_KEYS={'schema','root','config','policy','source_packet','entry','stages','queue_sha256','runner_sha256'} +CALLER_STAGE_KEYS={'stage','manifest','entry','bootstrap','jobs','excluded_stage_manifests'} +CALLER_FALSE_FIELDS=('production_completion','full_c05','full_v03','runtime_qualified','enclosing_parent_exit_observed') +_CALLER_ADMISSION=None +_CALLER_FAILURE_OWNER=None + + +def _caller_simple(value): + need(type(value) is str and 0 deadline: + failure = failure or {'type': 'SupervisorBudget', 'message': 'Full wrapper bound crossed; cleanup remains charged'} + result = {'schema': 'h25-queue-v4-supervisor-envelope-v1', 'queue': name, + 'status': 'STOP' if failure else 'SUPERVISED_QUEUE_V4_COMPLETE', 'failure': failure, + 'actual_consumer': 'wrapper+module-alias-proxy+supervisor+queue-v4', + 'original_queue_sha256': s.QUEUE_SHA, 'original_root_sha256': s.RUNNER_SHA, + 'source_manifest_sha256': args.source_sha256, 'config_pin': config_pin, 'policy_pin': policy_pin, + 'controls': [] if proxy is None else proxy.records, + 'prior_selection_sha256': args.selection_sha256, + 'new_caller_retained_read_bytes': admission['owner'].total_bytes, + 'new_caller_rechecks': admission['rechecks'], + 'startup_authentication_in_original_began_budget': True, + 'C05_V03_runtime_admission_added': False, + 'complete_wrapper_seconds_before_own_receipt': elapsed, + 'nested_queue_and_root_seconds': nested, 'wrapper_residual_seconds': residual, + 'outer_GNU_time_final_tail_reconciliation_required': True, + 'subreaper_is_same_queue_process': True, 'original_root_receipts_preserved': True} + folder = root / 'runtime/runs' / (name + '-supervisor-overhead') + folder.mkdir() + s.write_new(folder / 'START.json', {'kind': 'parent_cost_only'}) + s.write_new(folder / 'receipt.json', dict(result, label=folder.name, kind='parent_cost_only', + wall_seconds=residual, runner_wall_seconds=residual)) + s.write_new(evidence / 'WRAPPER.json', result) + lock.close() + if failure: + raise SystemExit(1) + + +if __name__ == '__main__': + main() diff --git a/research/h25-v03-bounded-prefix-caller/archive/unit07/review-caller-P3-v1.json b/research/h25-v03-bounded-prefix-caller/archive/unit07/review-caller-P3-v1.json new file mode 100644 index 0000000000..0228c5b264 --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/archive/unit07/review-caller-P3-v1.json @@ -0,0 +1,109 @@ +{ + "schema": "unit07-review-caller-P3-v1", + "recorded_utc": "2026-11-02 14:17:38 UTC", + "decision": "PASS_COMPLETE_P3_CONDITIONAL_NEW_CALLER_SOURCE_AND_NEW_ONLY_CONTROLS", + "accepted_scope": "Explicit new caller_v2 fixes closed copied-prefix resource gap, preserves actual original prior-admission/history/domain/queue source interfaces, and passes meaningful isolated new-only controls. This is not complete preparation/integration P2/P4 or runtime admission.", + "source": { + "path": "unit07/implementation/run_queue4_prefix_v2.py", + "bytes": 34716, + "sha256": "25138c2c998762649c6a61cb8a6ae8aacd81bd533591b082ab6f58def712fca2", + "initial_source_unchanged": true + }, + "independent_passive_preservation": { + "accepted_prefix_bytes": 9878, + "accepted_prefix_sha256": "48bc4009acb7569fb4a2ac529bec928a3aafdedc017a0ebaae97f72b7c97eabe", + "remainder_equal_closed90a_after9574": true, + "source_packet_function_exact_ea4_source": true, + "RootProxy_class_exact_ea4_source": true, + "closed_unit06_entry_b783_and_caller90a_unchanged": true + }, + "reviewed_actual_route": [ + "Independent selection digest before decode/use", + "Exact config/policy/sourcepacket/entry/runner/queue pins and full approved stage inventory before first selected original supervisor/queue code execution", + "B/M/JOBS membership, separately pinned nested STAGE exclusions and DATA case validation", + "Actual new predispatch recheck then unchanged RootProxy.run", + "Real original canonical lock/budget/history/subreaper/run_root/retained-log/residual calls preserved", + "First script/selection authenticity remains explicit prior original T0 premise, never supplied by later source_packet selfcheck" + ], + "caller_basename": { + "actual_function_uses": "Path(__file__).name", + "new_packet_required": "SOURCE-READINESS.files['run_queue4_prefix_v2.py'] with actual final source hash/34716 bytes and readonly file; supervisor.py exactcfb", + "old_basename_only_refused": true, + "original_source_packet_not_executed_in_controls": true, + "whole_actual_program_selfcorrespondence_supported_by_source_and_exact_actual_source_selection": true + }, + "resource_disposition": { + "new_per_read_calls_max": 8192, + "record_write_calls_max": 4096, + "larger_write_calls_max": 8192, + "per_file_bytes_max": 67108864, + "owner_retained_bytes_max": 268435456, + "bill": "unit07/fixtures/caller_resource_bill_v1.json", + "bill_sha256": "b22dc7fa984657ced87fe37052f38a10dc1fa0d61b2509715603514fe52fbdff", + "formula_checked": "H_i=F_i+E_i+5; complete successful route (C+2)*(7+P)+2*sum_i(H_i)+sum_cases(H_case_stage) new retained-read API calls.", + "limitations": "Static API/counter bill only. Original wrapper/native/syscall/history/own-receipt and outer GNU-time tail costs remain paid; no physical/memory/time fit or zero-cost claim." + }, + "harness": { + "path": "unit07/fixtures/caller_new_controls_v1.py", + "bytes": 14236, + "sha256": "310fe5a31db4c4ac2bab0794a1633ec2061e8f97de654f9701b019185b138765", + "isolation": "PASS: compile only exact accepted NEW T0 prefix, six explicitly named NEW caller helper functions and NEW PriorAdmittedRootProxy with fake base/recheck. Original source_packet/RootProxy/main and original project bodies never compiled/executed; supervisor source is inert hashchecked data.", + "new_cases": [ + "exact prefix-only preservation", + "8192 short read completes", + "8193rd read prevented plus same-object cleanup secondary", + "4097th record write prevented", + "8193rd larger-file write prevented", + "prior digest rejection retains actual bytes", + "real owned inventory and extra/missing/mode/symlink/nested negatives", + "nested excluded manifest correct/wrong prior pins", + "actual selected stage/JOBS and five false DATA fields", + "new basename accepts and old-only basename refuses", + "recheck precedes fake base and failure suppresses dispatch" + ], + "execution_owner": "c05_header_closure author worker only", + "reviewer_reran": false + }, + "logs": [ + { + "profile": "normal", + "path": "unit07/fixtures/preparer_executed_caller_v1.normal.txt", + "bytes": 1729, + "sha256": "43916b1a8cc23a845e6045beb69585a9d0dc21e5f873b5e75a5c5cecbcf01354", + "methods": 11, + "status": "PASS", + "seconds": 0.717 + }, + { + "profile": "optimized", + "path": "unit07/fixtures/preparer_executed_caller_v1.optimized.txt", + "bytes": 1729, + "sha256": "fb6ecad1f8860334c46616a38f8d14bf8e37c9ba39016b41a8f40001c52ee374", + "methods": 11, + "status": "PASS", + "seconds": 0.704 + } + ], + "execution_linkage_sha256": "f007c6951237a956b00b37ea546a29c19fe654e8febd204dbc0eb143f4e57214", + "not_proved": [ + "Actual canonical history/approval/resource identity or currently obtainable owner", + "C05 complete9category/fullchild determinant/channel/cap/cost", + "C07 immutable ancestor/lifetime", + "Native/current source/stage/command/funding/execution admission", + "Initialized48module/512global receiver fit", + "Actual original fullbaseline/allnamedV03 controls or enclosing-parent exit", + "Complete newpreparer output/integration P2/P4" + ], + "inherited_limits_retained": [ + "Outer PermissionError-as-absence", + "Outer str(error) formatting", + "Original no-hostile-fork/closed-domain and prehandler/cleanup assumptions", + "Prebudget failure and ownreceipt tail require actual enclosing-owner accounting" + ], + "formal_repair_changes_to_caller": false, + "full_C05": false, + "full_V03": false, + "runtime_qualified": false, + "original_activity_credit_added": 0, + "costs": "OPEN_NOT_ZERO" +} diff --git a/research/h25-v03-bounded-prefix-caller/archive/unit07/review-caller-P3-v1.md b/research/h25-v03-bounded-prefix-caller/archive/unit07/review-caller-P3-v1.md new file mode 100644 index 0000000000..f796c7367f --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/archive/unit07/review-caller-P3-v1.md @@ -0,0 +1,18 @@ +# Unit07 P3 independent caller source/control verdict + +**PASS: complete P3 conditional new caller source and new-only controls.** This acceptance is separate from the repaired preparer P2/P4 still under review. It grants no genuine runtime, C05/V03 or original activity credit. + +The unchanged initial caller_v2 is34,716 bytes, SHA25138c2c998762649c6a61cb8a6ae8aacd81bd533591b082ab6f58def712fca2. Independent atomic source inspection confirms its9,878-byte48bc prefix equals accepted b783 support, and every byte afterward equals closed90a after its old9,574-byte prefix. Exact original ea4 source_packet and RootProxy source segments are preserved. Closed Unit06 files remain unchanged. + +The actual program validates a previously selected digest before decoding its selection; checks real control/sourcepacket/entry/queue/runner and complete stage/B/M/JOBS inputs before first selected original code use; separately accounts for excluded nested STAGE files; validates the old generic receiver's new DATA status/five false fields; and rechecks before original RootProxy.run. Canonical original locks/budget/history/subreaper/domain/log/residual operations remain actual calls. Original first-script T0 authentication is an external prior premise, not a result of source_packet. + +The filename edge is valid because source_packet and the new prior checker use the actual Path(__file__).name. A new readonly packet row for run_queue4_prefix_v2.py with its actual final SHA/size can satisfy that correspondence. An old-basename-only packet refuses. The retained source itself is not rewritten to learn a later manifest hash; source/readiness/selection finalization remains acyclic. + +Read the complete exact14,236-byte harness SHA310fe5a31db4c4ac2bab0794a1633ec2061e8f97de654f9701b019185b138765. Isolation PASS: it compiles only accepted NEW support, six named NEW functions and a NEW subclass with fake base/recheck. It never compiles/executes original source_packet/RootProxy/main or the project graph. Fresh owned files and literal expected bytes exercise real I/O/metadata; original supervisor bytes remain inert data. Short-I/O tests prove successful8192reads and refusal before8193,4097th recordwrite/8193rd largerwrite, with raw primary/cleanup identity and partial-file evidence. Inventory, exclusions, malformed DATA fields, basename and dispatch ordering are meaningful separate discriminators. + +Author-owned raw outputs show11/11 normal0.717s and optimized0.704s; hashes43916b1a8cc23a845e6045beb69585a9d0dc21e5f873b5e75a5c5cecbcf01354 andfb6ecad1f8860334c46616a38f8d14bf8e37c9ba39016b41a8f40001c52ee374. I inspected source and raw records without rerunning tests. Source/harness remain equal to initial snapshots; the caller needed no formal repair. + +Parameterized resource bill b22dc7fa984657ced87fe37052f38a10dc1fa0d61b2509715603514fe52fbdff matches the actual new API path: H_i=F_i+E_i+5 and total(C+2)*(7+P)+2*sum(H_i)+sum_cases(H_case_stage). Per-file8192reads,4096recordwrites/8192largerwrites and64MiB/256MiB byte guards are real before-call checks. This is not a complete physical invoice or memory/time fit. All original operations, metadata/system-call work, inherited failure limits, prebudget/ownreceipt/final outer tails remain charged OPEN_NOT_ZERO. + +No wholepreparer/integration/runtime source admission follows. Actual T0 selection, current canonical history, source/OS/native/stage/funding approvals, C05/C07 complete domain/lifetime/fit, receiver capture and observed enclosing-parent exit remain unestablished. All original flags and denominators stay unchanged. + diff --git a/research/h25-v03-bounded-prefix-caller/run.py b/research/h25-v03-bounded-prefix-caller/run.py new file mode 100644 index 0000000000..99b9e06b42 --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/run.py @@ -0,0 +1,92 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +"""Run exactly frozen NEW-only controls with package/owned-fixture path bindings.""" +from pathlib import Path +import importlib.util +import json +import sys +import tempfile +from types import ModuleType +import unittest + +PACKAGE = Path(__file__).resolve().parent + + +def need(ok, message): + if ok is not True: + raise RuntimeError(message) + + +def main(): + spec = importlib.util.spec_from_file_location('bounded_caller_export_integrity', PACKAGE / 'verify.py') + checker = importlib.util.module_from_spec(spec) + spec.loader.exec_module(checker) + checker.main() + fixture_path = PACKAGE / 'archive/unit07/fixtures/caller_new_controls_v1.py' + # No original source is imported. The exact frozen fixture itself controls + # extraction of only NEW prefix/helpers and NEW fake-base subclass code. + fixture = ModuleType('bounded_caller_frozen_new_controls') + fixture.__file__ = str(fixture_path) + exec(compile(fixture_path.read_bytes(), str(fixture_path), 'exec', dont_inherit=True, optimize=sys.flags.optimize), fixture.__dict__) + need(fixture.UNIT == PACKAGE / 'archive/unit07' and fixture.F == PACKAGE / 'archive', 'fixture relative path binding') + need(fixture.CALLER == PACKAGE / 'archive/unit07/implementation/run_queue4_prefix_v2.py', 'fixture caller binding') + need(not fixture.BLOCKED.intersection(sys.modules), 'original runtime module present') + adapter = json.loads((PACKAGE / 'PATH-ADAPTER-v1.json').read_bytes()) + translations = {original: PACKAGE / relative for original, relative in adapter['exact_source_translations'].items()} + real_path = Path + with tempfile.TemporaryDirectory(prefix='bounded-caller-replay-', dir='/tmp') as temporary: + scratch = real_path(temporary) + need(not scratch.is_relative_to(PACKAGE), 'scratch inside package') + def path_binding(value, *extra): + if type(value) is not str or extra: + raise RuntimeError('one exact path string; no extra components') + if value in translations: + return translations[value] + if not value.startswith('/') or not all(32 <= ord(c) < 127 for c in value) or any(p in ('', '.', '..') for p in value.split('/')[1:]): + raise RuntimeError('canonical absolute path required') + candidate = real_path(value) + if not candidate.is_relative_to(scratch): + raise RuntimeError('unknown host path outside owned scratch') + return candidate + for original, target in translations.items(): + need(path_binding(original) == target, 'source origin translation') + for altered in ((original, 'extra'), (original + '/extra',)): + try: + path_binding(*altered) + except RuntimeError: + pass + else: + raise RuntimeError('source path extra-component bypass') + for unknown in ('/etc/passwd', '/home/d3lerium/unmapped-source', '/tmp/unowned-caller-replay', temporary + '/../outside'): + try: + path_binding(unknown) + except RuntimeError: + pass + else: + raise RuntimeError('unknown host path accepted') + need(path_binding(str(scratch / 'owned')) == scratch / 'owned', 'owned path binding') + print('PASS_PATH_BINDINGS exact_sources=' + str(len(translations)) + ' extra_components=REFUSED unknown_host_paths=REFUSED', flush=True) + # Path binding only: frozen algorithms and expected values are untouched. + # This adapter is not a Python sandbox; the source-authenticated fixture + # supplies the closed NEW-only extraction/execution boundary. + fixture.Path = path_binding + previous_tempdir = tempfile.tempdir + tempfile.tempdir = str(scratch) + try: + suite = unittest.defaultTestLoader.loadTestsFromModule(fixture) + need(suite.countTestCases() == 11, 'exact eleven frozen NEW methods required') + result = unittest.TextTestRunner(verbosity=2).run(suite) + if not result.wasSuccessful(): + return 1 + finally: + tempfile.tempdir = previous_tempdir + need(not fixture.BLOCKED.intersection(sys.modules), 'original runtime module after replay') + # Authenticate the final packet again after owned-file cleanup; no new log, + # pycache or fixture output may have appeared inside it. + checker.main() + print('PASS_ELEVEN_FROZEN_NEW_CALLER_METHODS optimized=' + str(sys.flags.optimize) + ' original_runtime_executed=False', flush=True) + return 0 + + +if __name__ == '__main__': + raise SystemExit(main()) diff --git a/research/h25-v03-bounded-prefix-caller/verify.py b/research/h25-v03-bounded-prefix-caller/verify.py new file mode 100644 index 0000000000..c49baeb0e4 --- /dev/null +++ b/research/h25-v03-bounded-prefix-caller/verify.py @@ -0,0 +1,113 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +"""Bounded export integrity and passive source checks; no archived code execution.""" +from pathlib import Path, PurePosixPath +import ast +import hashlib +import json +import stat + +PACKAGE = Path(__file__).resolve().parent +FROZEN = { + 'archive/unit07/implementation/run_queue4_prefix_v2.py': (34716, '25138c2c998762649c6a61cb8a6ae8aacd81bd533591b082ab6f58def712fca2'), + 'archive/unit07/fixtures/caller_new_controls_v1.py': (14236, '310fe5a31db4c4ac2bab0794a1633ec2061e8f97de654f9701b019185b138765'), + 'archive/unit06/implementation/run_queue4_prefix_v1.py': (34412, '90a7ed4a45b94e16fa313623e56f6f3efcd85f3ea40355a43b289d8c49a75825'), + 'archive/unit06/implementation/predecessor_entry.py': (21857, 'b783c6812a6295069456cfb4187d4e09bb7acbcb20fffd76e0c10267f90c1201'), + 'archive/unit06/prerequisites/h25_parent_supervisor.py.txt': (23047, 'cfb09a18dd10b597cc6d5a8139ee769bef679bc44ae029329755e3d97b055075'), + 'archive/unit06/fixtures/caller_original_wrapper.py.txt': (None, 'ea4c07337ccc1865accfd1b1fe485d51057a04a49e4bfb5f10cc36dc92b5f9a8'), + 'archive/unit07/review-caller-P3-v1.json': (5719, 'f61464ed7496af2ae47414bcdfad2f63e773563411c4e70a2fc8955442e7b089'), + 'archive/unit07/fixtures/caller_resource_bill_v1.json': (None, 'b22dc7fa984657ced87fe37052f38a10dc1fa0d61b2509715603514fe52fbdff'), +} +NEW_FUNCTIONS = {'_caller_simple', '_caller_pin', '_caller_inventory', '_caller_stage', '_caller_case', '_caller_source_packet'} +CONSTANTS = {'CALLER_QUEUE_SHA', 'CALLER_RUNNER_SHA', 'CALLER_SUPERVISOR_SHA', 'CALLER_STAGE_KEYS', 'CALLER_FALSE_FIELDS'} +METHODS = { + 'test_exact_prefix_only_delta_and_old_unit_unchanged', + 'test_read_at_8192_short_returns_can_complete', + 'test_8193rd_short_read_is_prevented_and_close_secondary_retained', + 'test_record_4097th_short_write_is_prevented', + 'test_large_file_8193rd_short_write_is_prevented', + 'test_prior_digest_refuses_changed_bytes_and_retains_actual_raw', + 'test_real_owned_inventory_and_negative_file_changes', + 'test_nested_excluded_manifest_requires_exact_prior_blob', + 'test_case_requires_actual_job_stage_and_all_five_false_fields', + 'test_new_packet_basename_and_original_supervisor_data_only', + 'test_new_dispatch_recheck_precedes_fake_base_and_failure_suppresses_it', +} + + +def need(ok, message): + if ok is not True: + raise RuntimeError(message) + + +def sha(raw): + return hashlib.sha256(raw).hexdigest() + + +def source_segment(raw, name): + text = raw.decode('utf-8') + nodes = [n for n in ast.parse(text).body if isinstance(n, (ast.FunctionDef, ast.ClassDef)) and n.name == name] + need(len(nodes) == 1, 'source segment count: ' + name) + return ast.get_source_segment(text, nodes[0]).encode('utf-8') + + +def main(): + manifest_path = PACKAGE / 'MANIFEST.json' + need(not manifest_path.is_symlink(), 'manifest symlink') + need(stat.S_IMODE(manifest_path.stat().st_mode) == 0o644, 'manifest mode') + manifest = json.loads(manifest_path.read_bytes()) + rows = manifest['files'] + expected = set(rows) | {'MANIFEST.json'} + actual = set() + for p in PACKAGE.rglob('*'): + need(not p.is_symlink(), 'package symlink: ' + str(p)) + if p.is_dir(): + continue + need(p.is_file(), 'nonregular package entry') + name = p.relative_to(PACKAGE).as_posix() + actual.add(name) + need(actual == expected, 'package file inventory mismatch: ' + repr(sorted(actual ^ expected))) + for name, row in rows.items(): + parts = PurePosixPath(name).parts + need(type(name) is str and parts and not name.startswith('/') and all(v not in ('', '.', '..') for v in name.split('/')), 'manifest path') + p = PACKAGE / name + raw = p.read_bytes() + need(len(raw) == row['bytes'] and sha(raw) == row['sha256'], 'package bytes differ: ' + name) + need(stat.S_IMODE(p.stat().st_mode) == row['posix_mode'] == 0o644, 'package mode differs: ' + name) + need(row['intended_git_mode'] == '100644', 'intended Git mode') + for name, (size, digest) in FROZEN.items(): + raw = (PACKAGE / name).read_bytes() + need((size is None or len(raw) == size) and sha(raw) == digest, 'frozen source pin differs: ' + name) + for row in json.loads((PACKAGE / 'SOURCE-ORIGINS-v1.json').read_bytes())['sources']: + raw = (PACKAGE / row['package_path']).read_bytes() + need(len(raw) == row['bytes'] and sha(raw) == row['sha256'], 'source origin copy differs') + new = (PACKAGE / 'archive/unit07/implementation/run_queue4_prefix_v2.py').read_bytes() + old = (PACKAGE / 'archive/unit06/implementation/run_queue4_prefix_v1.py').read_bytes() + entry = (PACKAGE / 'archive/unit06/implementation/predecessor_entry.py').read_bytes() + wrapper = (PACKAGE / 'archive/unit06/fixtures/caller_original_wrapper.py.txt').read_bytes() + need(new[:9878] == entry[:9878] and sha(new[:9878]) == '48bc4009acb7569fb4a2ac529bec928a3aafdedc017a0ebaae97f72b7c97eabe', 'accepted prefix differs') + need(new[9878:] == old[9574:], 'old caller tail differs') + need(new.index(b'# UNIT06_T0_SUPPORT_END\n') + len(b'# UNIT06_T0_SUPPORT_END\n') == 9878, 'prefix marker') + for name in ('source_packet', 'RootProxy'): + need(source_segment(new, name) == source_segment(wrapper, name), 'preserved original source differs: ' + name) + need((PACKAGE / 'archive/unit07/fixtures/caller_initial_candidate_v2.py.txt').read_bytes() == new, 'frozen initial caller differs') + need((PACKAGE / 'archive/unit07/fixtures/caller_basis_unit06_90a.py.txt').read_bytes() == old, 'basis snapshot differs') + need((PACKAGE / 'archive/unit07/fixtures/caller_bounded_T0_prefix_48bc.py.txt').read_bytes() == new[:9878], 'support snapshot differs') + fixture_raw = (PACKAGE / 'archive/unit07/fixtures/caller_new_controls_v1.py').read_bytes() + need((PACKAGE / 'archive/unit07/fixtures/caller_initial_controls_v1.py.txt').read_bytes() == fixture_raw, 'frozen controls snapshot differs') + tree = ast.parse(fixture_raw) + classes = [n for n in tree.body if isinstance(n, ast.ClassDef)] + need(len(classes) == 1 and classes[0].name == 'CallerNewControls', 'fixture class inventory') + methods = {n.name for n in classes[0].body if isinstance(n, ast.FunctionDef) and n.name.startswith('test_')} + need(methods == METHODS and len(methods) == 11, 'frozen method inventory') + assignments = {n.targets[0].id: n.value for n in tree.body if isinstance(n, ast.Assign) and len(n.targets) == 1 and isinstance(n.targets[0], ast.Name)} + need(ast.literal_eval(assignments['NEW_FUNCTIONS']) == NEW_FUNCTIONS, 'helper extraction whitelist') + need(ast.literal_eval(assignments['CONSTANTS']) == CONSTANTS, 'constant extraction whitelist') + close = json.loads((PACKAGE / 'archive/unit07/SOURCE-CLOSE-v1.json').read_bytes()) + need(close['accepted_checkpoints'] == ['P1', 'P2', 'P3', 'P4'] and close['runtime_qualified'] is False and close['original_activity_credit_added'] == 0, 'closed source boundary') + print('PASS_BOUNDED_CALLER_EXPORT_INTEGRITY files=' + str(len(actual)) + ' frozen_methods=11 original_source_execution=NONE', flush=True) + return 0 + + +if __name__ == '__main__': + raise SystemExit(main())