diff --git a/.github/workflows/native-ccache-columns.yml b/.github/workflows/native-ccache-columns.yml new file mode 100644 index 0000000000..ce1d4ac281 --- /dev/null +++ b/.github/workflows/native-ccache-columns.yml @@ -0,0 +1,43 @@ +name: Native compiler cache boundary +on: + pull_request: + paths: + - 'research/native-ccache-columns/**' + - '.github/workflows/native-ccache-columns.yml' + - 'research/e8-bit-carrier-skeleton/code/bit/checkers/columns_k.cpp' + - 'research/e8-bit-carrier-skeleton/code/bit/checkers/json.hpp' + - 'research/e8-bit-carrier-skeleton/NOTICE.md' + push: + branches: [main] + paths: + - 'research/native-ccache-columns/**' + - '.github/workflows/native-ccache-columns.yml' + - 'research/e8-bit-carrier-skeleton/code/bit/checkers/columns_k.cpp' + - 'research/e8-bit-carrier-skeleton/code/bit/checkers/json.hpp' + - 'research/e8-bit-carrier-skeleton/NOTICE.md' + workflow_dispatch: +permissions: + contents: read +jobs: + native: + runs-on: ubuntu-24.04 + timeout-minutes: 15 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + with: + persist-credentials: false + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 + with: + python-version: '3.12' + - name: Install native benchmark dependencies + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends g++ libboost-dev ccache + - name: Independent columns and failure controls + run: python -B scripts/research_package.py --package research/native-ccache-columns + - name: Fresh native benchmark with actual invalidation controls + run: | + python -I -O -B research/native-ccache-columns/benchmark.py \ + --work "$RUNNER_TEMP/native-cache-run" --cxx /usr/bin/g++ \ + --ccache /usr/bin/ccache --boost-include /usr/include --repeats 3 + - run: git diff --exit-code diff --git a/research/native-ccache-columns/BENCHMARK.json b/research/native-ccache-columns/BENCHMARK.json new file mode 100644 index 0000000000..4d74c4e351 --- /dev/null +++ b/research/native-ccache-columns/BENCHMARK.json @@ -0,0 +1,1085 @@ +{ + "builds": [ + { + "binary_sha256": "453650f9a0228647356e20c6f623c28c64b8ee2b1cb59563527284e72488727b", + "build_seconds": 2.9359512209994136, + "cached": true, + "commands": [ + [ + "/home/gaz/tmp/math/sprint/pass-47/ccache-local/usr/bin/ccache", + "/usr/bin/x86_64-linux-gnu-g++-15", + "-O2", + "-std=c++17", + "-DHDIM=8", + "-DVPORTS=111", + "-DRHELP=439", + "-I/home/gaz/tmp/math/sprint/pass-45/boost/usr/include", + "-include", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/source/fixture_config.hpp", + "-DKPAIRS=4", + "-c", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/source/columns_k.cpp", + "-o", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/fill/columns.o" + ], + [ + "/usr/bin/x86_64-linux-gnu-g++-15", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/fill/columns.o", + "-o", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/fill/columns" + ] + ], + "compile_seconds": 2.8600878750003176, + "link_seconds": 0.023151260997110512, + "name": "fill", + "native_seconds": 0.0039363790056086145, + "object_sha256": "b663ce933c6e6f1fcbcd0d01e4e7ed5b3b713ecaea802fc119db2dd55371a9f1", + "pairs": 4, + "profile_sha256": "86b7fc4ac394f5c134fe1d71e45745ec8e6ce39169c2890a82a9dd620856ffb0", + "source_sha256": "1c344d18fcd494eeca93e259f10cafae7705780e6592f6dcb35b34752dab9bc2", + "stats_delta": { + "cache_miss": 1, + "cache_size_kibibyte": 88, + "files_in_cache": 1, + "local_storage_miss": 1, + "local_storage_read_miss": 1, + "local_storage_write": 1, + "preprocessed_cache_miss": 1, + "stats_updated_timestamp": 1792051625 + }, + "total_replay_seconds": 2.9417026810042444 + }, + { + "binary_sha256": "453650f9a0228647356e20c6f623c28c64b8ee2b1cb59563527284e72488727b", + "build_seconds": 2.8162508309978875, + "cached": false, + "commands": [ + [ + "/usr/bin/x86_64-linux-gnu-g++-15", + "-O2", + "-std=c++17", + "-DHDIM=8", + "-DVPORTS=111", + "-DRHELP=439", + "-I/home/gaz/tmp/math/sprint/pass-45/boost/usr/include", + "-include", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/source/fixture_config.hpp", + "-DKPAIRS=4", + "-c", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/source/columns_k.cpp", + "-o", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/uncached-0/columns.o" + ], + [ + "/usr/bin/x86_64-linux-gnu-g++-15", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/uncached-0/columns.o", + "-o", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/uncached-0/columns" + ] + ], + "compile_seconds": 2.7405254260011134, + "link_seconds": 0.023220982002385426, + "name": "uncached-0", + "native_seconds": 0.004043138993438333, + "object_sha256": "b663ce933c6e6f1fcbcd0d01e4e7ed5b3b713ecaea802fc119db2dd55371a9f1", + "pairs": 4, + "profile_sha256": "86b7fc4ac394f5c134fe1d71e45745ec8e6ce39169c2890a82a9dd620856ffb0", + "source_sha256": "1c344d18fcd494eeca93e259f10cafae7705780e6592f6dcb35b34752dab9bc2", + "stats_delta": {}, + "total_replay_seconds": 2.821791362002841 + }, + { + "binary_sha256": "453650f9a0228647356e20c6f623c28c64b8ee2b1cb59563527284e72488727b", + "build_seconds": 0.237100193000515, + "cached": true, + "commands": [ + [ + "/home/gaz/tmp/math/sprint/pass-47/ccache-local/usr/bin/ccache", + "/usr/bin/x86_64-linux-gnu-g++-15", + "-O2", + "-std=c++17", + "-DHDIM=8", + "-DVPORTS=111", + "-DRHELP=439", + "-I/home/gaz/tmp/math/sprint/pass-45/boost/usr/include", + "-include", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/source/fixture_config.hpp", + "-DKPAIRS=4", + "-c", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/source/columns_k.cpp", + "-o", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/warm-0/columns.o" + ], + [ + "/usr/bin/x86_64-linux-gnu-g++-15", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/warm-0/columns.o", + "-o", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/warm-0/columns" + ] + ], + "compile_seconds": 0.16201924499910092, + "link_seconds": 0.024683488998562098, + "name": "warm-0", + "native_seconds": 0.003759074999834411, + "object_sha256": "b663ce933c6e6f1fcbcd0d01e4e7ed5b3b713ecaea802fc119db2dd55371a9f1", + "pairs": 4, + "profile_sha256": "86b7fc4ac394f5c134fe1d71e45745ec8e6ce39169c2890a82a9dd620856ffb0", + "source_sha256": "1c344d18fcd494eeca93e259f10cafae7705780e6592f6dcb35b34752dab9bc2", + "stats_delta": { + "local_storage_hit": 1, + "local_storage_read_hit": 1, + "preprocessed_cache_hit": 1, + "stats_updated_timestamp": 3 + }, + "total_replay_seconds": 0.24228023600153392 + }, + { + "binary_sha256": "453650f9a0228647356e20c6f623c28c64b8ee2b1cb59563527284e72488727b", + "build_seconds": 0.23165936800069176, + "cached": true, + "commands": [ + [ + "/home/gaz/tmp/math/sprint/pass-47/ccache-local/usr/bin/ccache", + "/usr/bin/x86_64-linux-gnu-g++-15", + "-O2", + "-std=c++17", + "-DHDIM=8", + "-DVPORTS=111", + "-DRHELP=439", + "-I/home/gaz/tmp/math/sprint/pass-45/boost/usr/include", + "-include", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/source/fixture_config.hpp", + "-DKPAIRS=4", + "-c", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/source/columns_k.cpp", + "-o", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/warm-1/columns.o" + ], + [ + "/usr/bin/x86_64-linux-gnu-g++-15", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/warm-1/columns.o", + "-o", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/warm-1/columns" + ] + ], + "compile_seconds": 0.15680903400061652, + "link_seconds": 0.02380861999699846, + "name": "warm-1", + "native_seconds": 0.003986212992458604, + "object_sha256": "b663ce933c6e6f1fcbcd0d01e4e7ed5b3b713ecaea802fc119db2dd55371a9f1", + "pairs": 4, + "profile_sha256": "86b7fc4ac394f5c134fe1d71e45745ec8e6ce39169c2890a82a9dd620856ffb0", + "source_sha256": "1c344d18fcd494eeca93e259f10cafae7705780e6592f6dcb35b34752dab9bc2", + "stats_delta": { + "local_storage_hit": 1, + "local_storage_read_hit": 1, + "preprocessed_cache_hit": 1 + }, + "total_replay_seconds": 0.23724235100235092 + }, + { + "binary_sha256": "453650f9a0228647356e20c6f623c28c64b8ee2b1cb59563527284e72488727b", + "build_seconds": 2.7477112480046344, + "cached": false, + "commands": [ + [ + "/usr/bin/x86_64-linux-gnu-g++-15", + "-O2", + "-std=c++17", + "-DHDIM=8", + "-DVPORTS=111", + "-DRHELP=439", + "-I/home/gaz/tmp/math/sprint/pass-45/boost/usr/include", + "-include", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/source/fixture_config.hpp", + "-DKPAIRS=4", + "-c", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/source/columns_k.cpp", + "-o", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/uncached-1/columns.o" + ], + [ + "/usr/bin/x86_64-linux-gnu-g++-15", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/uncached-1/columns.o", + "-o", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/uncached-1/columns" + ] + ], + "compile_seconds": 2.6737269970035413, + "link_seconds": 0.02389517200208502, + "name": "uncached-1", + "native_seconds": 0.00367459500557743, + "object_sha256": "b663ce933c6e6f1fcbcd0d01e4e7ed5b3b713ecaea802fc119db2dd55371a9f1", + "pairs": 4, + "profile_sha256": "86b7fc4ac394f5c134fe1d71e45745ec8e6ce39169c2890a82a9dd620856ffb0", + "source_sha256": "1c344d18fcd494eeca93e259f10cafae7705780e6592f6dcb35b34752dab9bc2", + "stats_delta": {}, + "total_replay_seconds": 2.7527704419990187 + }, + { + "binary_sha256": "453650f9a0228647356e20c6f623c28c64b8ee2b1cb59563527284e72488727b", + "build_seconds": 2.744565444998443, + "cached": false, + "commands": [ + [ + "/usr/bin/x86_64-linux-gnu-g++-15", + "-O2", + "-std=c++17", + "-DHDIM=8", + "-DVPORTS=111", + "-DRHELP=439", + "-I/home/gaz/tmp/math/sprint/pass-45/boost/usr/include", + "-include", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/source/fixture_config.hpp", + "-DKPAIRS=4", + "-c", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/source/columns_k.cpp", + "-o", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/uncached-2/columns.o" + ], + [ + "/usr/bin/x86_64-linux-gnu-g++-15", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/uncached-2/columns.o", + "-o", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/uncached-2/columns" + ] + ], + "compile_seconds": 2.668287030995998, + "link_seconds": 0.02473009599634679, + "name": "uncached-2", + "native_seconds": 0.0037050430037197657, + "object_sha256": "b663ce933c6e6f1fcbcd0d01e4e7ed5b3b713ecaea802fc119db2dd55371a9f1", + "pairs": 4, + "profile_sha256": "86b7fc4ac394f5c134fe1d71e45745ec8e6ce39169c2890a82a9dd620856ffb0", + "source_sha256": "1c344d18fcd494eeca93e259f10cafae7705780e6592f6dcb35b34752dab9bc2", + "stats_delta": {}, + "total_replay_seconds": 2.7496696739981417 + }, + { + "binary_sha256": "453650f9a0228647356e20c6f623c28c64b8ee2b1cb59563527284e72488727b", + "build_seconds": 0.23499315499793738, + "cached": true, + "commands": [ + [ + "/home/gaz/tmp/math/sprint/pass-47/ccache-local/usr/bin/ccache", + "/usr/bin/x86_64-linux-gnu-g++-15", + "-O2", + "-std=c++17", + "-DHDIM=8", + "-DVPORTS=111", + "-DRHELP=439", + "-I/home/gaz/tmp/math/sprint/pass-45/boost/usr/include", + "-include", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/source/fixture_config.hpp", + "-DKPAIRS=4", + "-c", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/source/columns_k.cpp", + "-o", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/warm-2/columns.o" + ], + [ + "/usr/bin/x86_64-linux-gnu-g++-15", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/warm-2/columns.o", + "-o", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/warm-2/columns" + ] + ], + "compile_seconds": 0.15956388199992944, + "link_seconds": 0.023818297995603643, + "name": "warm-2", + "native_seconds": 0.0036845539943897165, + "object_sha256": "b663ce933c6e6f1fcbcd0d01e4e7ed5b3b713ecaea802fc119db2dd55371a9f1", + "pairs": 4, + "profile_sha256": "86b7fc4ac394f5c134fe1d71e45745ec8e6ce39169c2890a82a9dd620856ffb0", + "source_sha256": "1c344d18fcd494eeca93e259f10cafae7705780e6592f6dcb35b34752dab9bc2", + "stats_delta": { + "local_storage_hit": 1, + "local_storage_read_hit": 1, + "preprocessed_cache_hit": 1, + "stats_updated_timestamp": 6 + }, + "total_replay_seconds": 0.2402953369964962 + }, + { + "binary_sha256": "e1acce3b934a58e342be7ba27e86d4e88ed8e51464c4c995d2bc43219f5daf80", + "build_seconds": 2.8977318899997044, + "cached": true, + "commands": [ + [ + "/home/gaz/tmp/math/sprint/pass-47/ccache-local/usr/bin/ccache", + "/usr/bin/x86_64-linux-gnu-g++-15", + "-O2", + "-std=c++17", + "-DHDIM=8", + "-DVPORTS=111", + "-DRHELP=439", + "-I/home/gaz/tmp/math/sprint/pass-45/boost/usr/include", + "-include", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/source/fixture_config.hpp", + "-DKPAIRS=4", + "-c", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/source/columns_k.cpp", + "-o", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/changed-transitive-header/columns.o" + ], + [ + "/usr/bin/x86_64-linux-gnu-g++-15", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/changed-transitive-header/columns.o", + "-o", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/changed-transitive-header/columns" + ] + ], + "compile_seconds": 2.8228606099946774, + "link_seconds": 0.02411729100276716, + "name": "changed-transitive-header", + "object_sha256": "469febb8edb2f678bc948e38e92b5e0c5ee96c70c544522cc2bfd82b2cc84d4a", + "pairs": 4, + "profile_sha256": "86b7fc4ac394f5c134fe1d71e45745ec8e6ce39169c2890a82a9dd620856ffb0", + "source_sha256": "1c344d18fcd494eeca93e259f10cafae7705780e6592f6dcb35b34752dab9bc2", + "stats_delta": { + "cache_miss": 1, + "cache_size_kibibyte": 88, + "files_in_cache": 1, + "local_storage_miss": 1, + "local_storage_read_miss": 1, + "local_storage_write": 1, + "preprocessed_cache_miss": 1, + "stats_updated_timestamp": 2 + } + }, + { + "binary_sha256": "0cb4cdc4665e66e44083ebae7611bb0a49c2e666882ed92df7697133f3d9899b", + "build_seconds": 2.9011425290009356, + "cached": true, + "commands": [ + [ + "/home/gaz/tmp/math/sprint/pass-47/ccache-local/usr/bin/ccache", + "/usr/bin/x86_64-linux-gnu-g++-15", + "-O2", + "-std=c++17", + "-DHDIM=8", + "-DVPORTS=111", + "-DRHELP=439", + "-I/home/gaz/tmp/math/sprint/pass-45/boost/usr/include", + "-include", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/source/fixture_config.hpp", + "-DKPAIRS=4", + "-c", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/source/columns_k.cpp", + "-o", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/changed-source/columns.o" + ], + [ + "/usr/bin/x86_64-linux-gnu-g++-15", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/changed-source/columns.o", + "-o", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/changed-source/columns" + ] + ], + "compile_seconds": 2.8241070419971948, + "link_seconds": 0.02440686600311892, + "name": "changed-source", + "object_sha256": "8c5a543428d705cf034defd98b2466a99a22df03f2eafd2029966266070f4113", + "pairs": 4, + "profile_sha256": "86b7fc4ac394f5c134fe1d71e45745ec8e6ce39169c2890a82a9dd620856ffb0", + "source_sha256": "55f23d41713685490f63c8eb4424217d9ae100b99132dc26b4e2df1f4a36ebe2", + "stats_delta": { + "cache_miss": 1, + "cache_size_kibibyte": 88, + "files_in_cache": 1, + "local_storage_miss": 1, + "local_storage_read_miss": 1, + "local_storage_write": 1, + "preprocessed_cache_miss": 1, + "stats_updated_timestamp": 3 + } + }, + { + "binary_sha256": "c39c8372beed2e6ecaff932c7f9f76eac1e9ad12d283bf55f8a37595049e52e0", + "build_seconds": 2.9109372300008545, + "cached": true, + "commands": [ + [ + "/home/gaz/tmp/math/sprint/pass-47/ccache-local/usr/bin/ccache", + "/usr/bin/x86_64-linux-gnu-g++-15", + "-O2", + "-std=c++17", + "-DHDIM=8", + "-DVPORTS=111", + "-DRHELP=439", + "-I/home/gaz/tmp/math/sprint/pass-45/boost/usr/include", + "-include", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/source/fixture_config.hpp", + "-DKPAIRS=5", + "-c", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/source/columns_k.cpp", + "-o", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/changed-flags/columns.o" + ], + [ + "/usr/bin/x86_64-linux-gnu-g++-15", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/changed-flags/columns.o", + "-o", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/changed-flags/columns" + ] + ], + "compile_seconds": 2.833275593002327, + "link_seconds": 0.02394907300185878, + "name": "changed-flags", + "object_sha256": "87345f8b2b7bf8d5ff91b59c738238e1edff76210987b45c0dbe9036eed1e4d8", + "pairs": 5, + "profile_sha256": "86b7fc4ac394f5c134fe1d71e45745ec8e6ce39169c2890a82a9dd620856ffb0", + "source_sha256": "1c344d18fcd494eeca93e259f10cafae7705780e6592f6dcb35b34752dab9bc2", + "stats_delta": { + "cache_miss": 1, + "cache_size_kibibyte": 88, + "files_in_cache": 1, + "local_storage_miss": 1, + "local_storage_read_miss": 1, + "local_storage_write": 1, + "preprocessed_cache_miss": 1, + "stats_updated_timestamp": 3 + } + }, + { + "binary_sha256": "453650f9a0228647356e20c6f623c28c64b8ee2b1cb59563527284e72488727b", + "build_seconds": 3.0314828019982087, + "cached": true, + "commands": [ + [ + "/home/gaz/tmp/math/sprint/pass-47/ccache-local/usr/bin/ccache", + "/usr/bin/x86_64-linux-gnu-g++-15", + "-O2", + "-std=c++17", + "-DHDIM=8", + "-DVPORTS=111", + "-DRHELP=439", + "-I/home/gaz/tmp/math/sprint/pass-45/boost/usr/include", + "-include", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/source/fixture_config.hpp", + "-DKPAIRS=4", + "-c", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/source/columns_k.cpp", + "-o", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/changed-profile/columns.o" + ], + [ + "/usr/bin/x86_64-linux-gnu-g++-15", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/changed-profile/columns.o", + "-o", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/changed-profile/columns" + ] + ], + "compile_seconds": 2.9553506989977905, + "link_seconds": 0.023846139003580902, + "name": "changed-profile", + "object_sha256": "b663ce933c6e6f1fcbcd0d01e4e7ed5b3b713ecaea802fc119db2dd55371a9f1", + "pairs": 4, + "profile_sha256": "b8912596d6873d0a64239019f7a14b053b9bad874f11fd35d52575f3dc7b902b", + "source_sha256": "1c344d18fcd494eeca93e259f10cafae7705780e6592f6dcb35b34752dab9bc2", + "stats_delta": { + "cache_miss": 1, + "cache_size_kibibyte": 88, + "files_in_cache": 1, + "local_storage_miss": 1, + "local_storage_read_miss": 1, + "local_storage_write": 1, + "preprocessed_cache_miss": 1, + "stats_updated_timestamp": 3 + } + }, + { + "binary_sha256": "453650f9a0228647356e20c6f623c28c64b8ee2b1cb59563527284e72488727b", + "build_seconds": 0.23090458299702732, + "cached": true, + "commands": [ + [ + "/home/gaz/tmp/math/sprint/pass-47/ccache-local/usr/bin/ccache", + "/usr/bin/x86_64-linux-gnu-g++-15", + "-O2", + "-std=c++17", + "-DHDIM=8", + "-DVPORTS=111", + "-DRHELP=439", + "-I/home/gaz/tmp/math/sprint/pass-45/boost/usr/include", + "-include", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/source/fixture_config.hpp", + "-DKPAIRS=4", + "-c", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/source/columns_k.cpp", + "-o", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/restored-inputs/columns.o" + ], + [ + "/usr/bin/x86_64-linux-gnu-g++-15", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/restored-inputs/columns.o", + "-o", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/restored-inputs/columns" + ] + ], + "compile_seconds": 0.1567484949991922, + "link_seconds": 0.02238368299731519, + "name": "restored-inputs", + "object_sha256": "b663ce933c6e6f1fcbcd0d01e4e7ed5b3b713ecaea802fc119db2dd55371a9f1", + "pairs": 4, + "profile_sha256": "86b7fc4ac394f5c134fe1d71e45745ec8e6ce39169c2890a82a9dd620856ffb0", + "source_sha256": "1c344d18fcd494eeca93e259f10cafae7705780e6592f6dcb35b34752dab9bc2", + "stats_delta": { + "local_storage_hit": 1, + "local_storage_read_hit": 1, + "preprocessed_cache_hit": 1, + "stats_updated_timestamp": 1 + } + }, + { + "binary_sha256": "453650f9a0228647356e20c6f623c28c64b8ee2b1cb59563527284e72488727b", + "build_seconds": 3.0088414790006937, + "cached": true, + "commands": [ + [ + "/home/gaz/tmp/math/sprint/pass-47/ccache-local/usr/bin/ccache", + "/usr/bin/x86_64-linux-gnu-g++-15", + "-O2", + "-std=c++17", + "-DHDIM=8", + "-DVPORTS=111", + "-DRHELP=439", + "-I/home/gaz/tmp/math/sprint/pass-45/boost/usr/include", + "-include", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/source/fixture_config.hpp", + "-DKPAIRS=4", + "-c", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/source/columns_k.cpp", + "-o", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/damaged-cache/columns.o" + ], + [ + "/usr/bin/x86_64-linux-gnu-g++-15", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/damaged-cache/columns.o", + "-o", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/damaged-cache/columns" + ] + ], + "compile_seconds": 2.931611788997543, + "link_seconds": 0.023480298004869837, + "name": "damaged-cache", + "object_sha256": "b663ce933c6e6f1fcbcd0d01e4e7ed5b3b713ecaea802fc119db2dd55371a9f1", + "pairs": 4, + "profile_sha256": "86b7fc4ac394f5c134fe1d71e45745ec8e6ce39169c2890a82a9dd620856ffb0", + "source_sha256": "1c344d18fcd494eeca93e259f10cafae7705780e6592f6dcb35b34752dab9bc2", + "stats_delta": { + "cache_miss": 1, + "local_storage_hit": 1, + "local_storage_miss": 1, + "local_storage_read_hit": 1, + "local_storage_write": 1, + "preprocessed_cache_miss": 1, + "stats_updated_timestamp": 3 + } + } + ], + "ccache_sha256": "7d2751d15c9155129623875208b244eba175d6a75f3c4d2ff21bac8f613f09bd", + "ccache_version": "ccache version 4.12.3", + "controls": [ + "same-size same-mtime transitive header", + "same-size same-mtime source", + "changed compile flag", + "changed toolchain profile", + "restored-input cache hit", + "invalid word after cache hit", + "corrupt private cache result" + ], + "executions": [ + { + "build": "fill", + "command": [ + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/fill/columns", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/baseline.bin", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/fill/baseline.json" + ], + "exit_code": 0, + "input_sha256": "2df55087c71725651b7fc531323a371810f6c8c6d49d84d2c397bdc2d1862133", + "label": "baseline", + "name": "baseline", + "receipt_sha256": "52cef7fb4000f8596f32f9fc394e824f430754a4bf20e53e139704c9ef6890ca", + "seconds": 0.0017794340019463561, + "stderr_sha256": "a56d9c3fbb76cdf0d05df28605ad3e3ea46da3caf419504d055a2ba32d6b1dfa", + "stdout_sha256": "18fdac272e880e217a9129a2353ef88d133def76921055b85e0a3b68583c0819" + }, + { + "build": "fill", + "command": [ + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/fill/columns", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/deferred.bin", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/fill/deferred.json" + ], + "exit_code": 0, + "input_sha256": "9732a8373b845d090615a39a693dc3c1fdb165777aa9b136f4f86aaac8f90e0c", + "label": "deferred", + "name": "deferred", + "receipt_sha256": "f9e00efd26d1846826f6604e1970d9b5dcc996f8b9b2995a0a03e49b3eee2cb0", + "seconds": 0.0021569450036622584, + "stderr_sha256": "9acdae9d14f0706b83b0c43b0e6cd99f99e0ead18c4998618c89797a94e598c8", + "stdout_sha256": "1ff46eac997d6a93782719ea686247ff0ceca73b8777d22c3c81d7abc7e36c96" + }, + { + "build": "uncached-0", + "command": [ + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/uncached-0/columns", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/baseline.bin", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/uncached-0/baseline.json" + ], + "exit_code": 0, + "input_sha256": "2df55087c71725651b7fc531323a371810f6c8c6d49d84d2c397bdc2d1862133", + "label": "baseline", + "name": "baseline", + "receipt_sha256": "52cef7fb4000f8596f32f9fc394e824f430754a4bf20e53e139704c9ef6890ca", + "seconds": 0.002286868999362923, + "stderr_sha256": "6622265dc69ca9e26a4e6e4cf23785eb14a09dc84de66178f4fad7039ed9a8ff", + "stdout_sha256": "3dba180efe16e1eb6c92757d311589baa6cf6fecf27147df39cfba175522a6b2" + }, + { + "build": "uncached-0", + "command": [ + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/uncached-0/columns", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/deferred.bin", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/uncached-0/deferred.json" + ], + "exit_code": 0, + "input_sha256": "9732a8373b845d090615a39a693dc3c1fdb165777aa9b136f4f86aaac8f90e0c", + "label": "deferred", + "name": "deferred", + "receipt_sha256": "f9e00efd26d1846826f6604e1970d9b5dcc996f8b9b2995a0a03e49b3eee2cb0", + "seconds": 0.00175626999407541, + "stderr_sha256": "7a3d0269229edf85aa456d5dcb422891e995e35c3722d041c58a4befff11a0bc", + "stdout_sha256": "0785d119d51bba658c83dc4eb2e59ff5f61379382514fd3b13ef029369a997bb" + }, + { + "build": "warm-0", + "command": [ + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/warm-0/columns", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/baseline.bin", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/warm-0/baseline.json" + ], + "exit_code": 0, + "input_sha256": "2df55087c71725651b7fc531323a371810f6c8c6d49d84d2c397bdc2d1862133", + "label": "baseline", + "name": "baseline", + "receipt_sha256": "52cef7fb4000f8596f32f9fc394e824f430754a4bf20e53e139704c9ef6890ca", + "seconds": 0.001965675000974443, + "stderr_sha256": "15316f8f01616de55eb28931ecc845729a76c59d2178b20c64731d8acda53542", + "stdout_sha256": "de22e303d2615d39e404479db6e9460cee9c15844a6f056340864a345c1497b4" + }, + { + "build": "warm-0", + "command": [ + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/warm-0/columns", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/deferred.bin", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/warm-0/deferred.json" + ], + "exit_code": 0, + "input_sha256": "9732a8373b845d090615a39a693dc3c1fdb165777aa9b136f4f86aaac8f90e0c", + "label": "deferred", + "name": "deferred", + "receipt_sha256": "f9e00efd26d1846826f6604e1970d9b5dcc996f8b9b2995a0a03e49b3eee2cb0", + "seconds": 0.001793399998859968, + "stderr_sha256": "bb1e32c8ed4bfcbad8b7312c1ace1485e3d5f862c125dcb460c022bc8463e084", + "stdout_sha256": "8fc1b2ee9dd63cf7e09d86942121e2d2aaf9012f9c262eef3e99bab0224fda17" + }, + { + "build": "warm-1", + "command": [ + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/warm-1/columns", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/baseline.bin", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/warm-1/baseline.json" + ], + "exit_code": 0, + "input_sha256": "2df55087c71725651b7fc531323a371810f6c8c6d49d84d2c397bdc2d1862133", + "label": "baseline", + "name": "baseline", + "receipt_sha256": "52cef7fb4000f8596f32f9fc394e824f430754a4bf20e53e139704c9ef6890ca", + "seconds": 0.0019304379966342822, + "stderr_sha256": "825d7abb65c63dcdfb3403d5d15a63cab1203e5bdd01f398040d7b4ce3b22c86", + "stdout_sha256": "aa424219051276190cb0dcfd030eeb3cd20caac16942806a5e67fe6393cef360" + }, + { + "build": "warm-1", + "command": [ + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/warm-1/columns", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/deferred.bin", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/warm-1/deferred.json" + ], + "exit_code": 0, + "input_sha256": "9732a8373b845d090615a39a693dc3c1fdb165777aa9b136f4f86aaac8f90e0c", + "label": "deferred", + "name": "deferred", + "receipt_sha256": "f9e00efd26d1846826f6604e1970d9b5dcc996f8b9b2995a0a03e49b3eee2cb0", + "seconds": 0.002055774995824322, + "stderr_sha256": "17d13551b0a078d50e4138d33875275f7d8248511dbd2a0c4c5aed261c87f7e6", + "stdout_sha256": "8894daed05574267cd00c96a9d2b0f0bb6bacf7113ac4e672a6c935d434b0d97" + }, + { + "build": "uncached-1", + "command": [ + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/uncached-1/columns", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/baseline.bin", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/uncached-1/baseline.json" + ], + "exit_code": 0, + "input_sha256": "2df55087c71725651b7fc531323a371810f6c8c6d49d84d2c397bdc2d1862133", + "label": "baseline", + "name": "baseline", + "receipt_sha256": "52cef7fb4000f8596f32f9fc394e824f430754a4bf20e53e139704c9ef6890ca", + "seconds": 0.0019037680031033233, + "stderr_sha256": "4828a52ad172f0fe23dd47371021779cb39e9ebc2934857cabf11fa2ab22e2cd", + "stdout_sha256": "dae0e35a996de0dabfde53cff4abf5f39f8ae9d50625f9381cf0d95e37739c59" + }, + { + "build": "uncached-1", + "command": [ + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/uncached-1/columns", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/deferred.bin", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/uncached-1/deferred.json" + ], + "exit_code": 0, + "input_sha256": "9732a8373b845d090615a39a693dc3c1fdb165777aa9b136f4f86aaac8f90e0c", + "label": "deferred", + "name": "deferred", + "receipt_sha256": "f9e00efd26d1846826f6604e1970d9b5dcc996f8b9b2995a0a03e49b3eee2cb0", + "seconds": 0.0017708270024741068, + "stderr_sha256": "8876efed5de54176da8a4b8ef157aabd8c07376f15773b7bfc94f2494c1050c9", + "stdout_sha256": "9eb7e6f1dd4145c1b7d71d91e31baf55d95ee2018af7a38ec2fecdf16fef7bfe" + }, + { + "build": "uncached-2", + "command": [ + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/uncached-2/columns", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/baseline.bin", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/uncached-2/baseline.json" + ], + "exit_code": 0, + "input_sha256": "2df55087c71725651b7fc531323a371810f6c8c6d49d84d2c397bdc2d1862133", + "label": "baseline", + "name": "baseline", + "receipt_sha256": "52cef7fb4000f8596f32f9fc394e824f430754a4bf20e53e139704c9ef6890ca", + "seconds": 0.0019228240053053014, + "stderr_sha256": "85f4542f4d4e277e19dcee0133f458b4feb4defaed291a3938c8d69440411987", + "stdout_sha256": "f4856474fdcb8d393bdd38a16360c243532a4879149badf178919caa47d03a97" + }, + { + "build": "uncached-2", + "command": [ + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/uncached-2/columns", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/deferred.bin", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/uncached-2/deferred.json" + ], + "exit_code": 0, + "input_sha256": "9732a8373b845d090615a39a693dc3c1fdb165777aa9b136f4f86aaac8f90e0c", + "label": "deferred", + "name": "deferred", + "receipt_sha256": "f9e00efd26d1846826f6604e1970d9b5dcc996f8b9b2995a0a03e49b3eee2cb0", + "seconds": 0.0017822189984144643, + "stderr_sha256": "1d37e8f45928177cff87723b4b9ffe1565eee8234fa1dccd9b2a5ca5922f6053", + "stdout_sha256": "0d2ac1082a405c5ae2c557d653dc9d797a26589795c3b7ea66e5ec770787827c" + }, + { + "build": "warm-2", + "command": [ + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/warm-2/columns", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/baseline.bin", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/warm-2/baseline.json" + ], + "exit_code": 0, + "input_sha256": "2df55087c71725651b7fc531323a371810f6c8c6d49d84d2c397bdc2d1862133", + "label": "baseline", + "name": "baseline", + "receipt_sha256": "52cef7fb4000f8596f32f9fc394e824f430754a4bf20e53e139704c9ef6890ca", + "seconds": 0.0018471009971108288, + "stderr_sha256": "27d4445557548a13f62dee07394289e1460f6ad70efd84195c5bf0456e72132d", + "stdout_sha256": "a67d7ec3c5364ad73103b8af3d6ebec27e73ea2886b727fcec7fd22f144f5808" + }, + { + "build": "warm-2", + "command": [ + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/warm-2/columns", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/deferred.bin", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/warm-2/deferred.json" + ], + "exit_code": 0, + "input_sha256": "9732a8373b845d090615a39a693dc3c1fdb165777aa9b136f4f86aaac8f90e0c", + "label": "deferred", + "name": "deferred", + "receipt_sha256": "f9e00efd26d1846826f6604e1970d9b5dcc996f8b9b2995a0a03e49b3eee2cb0", + "seconds": 0.0018374529972788878, + "stderr_sha256": "e5a21e3e4a736040f6e8f85ad91b172e1590b2c43a230102cd9879566f41dd72", + "stdout_sha256": "40c2463d9c0d62f69b8f5a342ca3f272fc45b6459ee1d4afa8ea3a3f2d3d914b" + }, + { + "build": "changed-transitive-header", + "command": [ + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/changed-transitive-header/columns", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/deferred.bin", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/changed-transitive-header/wrong-copy-count.json" + ], + "exit_code": 2, + "expected_failure": "center boundaries", + "input_sha256": "9732a8373b845d090615a39a693dc3c1fdb165777aa9b136f4f86aaac8f90e0c", + "label": "deferred", + "name": "wrong-copy-count", + "seconds": 0.0011029279994545504, + "stderr_sha256": "edf541e1764f5dbadd57d4f3c8a42eee965a40ae195d8281bd959dfa7df03db7", + "stdout_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + { + "build": "changed-source", + "command": [ + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/changed-source/columns", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/deferred.bin", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/changed-source/wrong-parity.json" + ], + "exit_code": 2, + "expected_failure": "local defining-decoder full formal column", + "input_sha256": "9732a8373b845d090615a39a693dc3c1fdb165777aa9b136f4f86aaac8f90e0c", + "label": "deferred", + "name": "wrong-parity", + "seconds": 0.0010102139931404963, + "stderr_sha256": "f85c6d1b3e3ba33de33b8a1b67726ed7eec2aeb725bdfa096baaf51dac0724e1", + "stdout_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + { + "build": "changed-flags", + "command": [ + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/changed-flags/columns", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/deferred.bin", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/changed-flags/eleven-stages.json" + ], + "exit_code": 0, + "input_sha256": "9732a8373b845d090615a39a693dc3c1fdb165777aa9b136f4f86aaac8f90e0c", + "label": "deferred", + "name": "eleven-stages", + "receipt_sha256": "a3b64fca70cb8238d70786b8313ba0f976a6378b30f6c5877b76e14ef0a47ccf", + "seconds": 0.0022687659948132932, + "stderr_sha256": "baa854822d335717fedaa24a294c96f0c76bb1dcf4f1f98d3ad1888a1b4371ab", + "stdout_sha256": "bcda9f4f59063ffe8f2336a0c9cfaecdc489c71fa88ba39700d6b7806a54d6e9" + }, + { + "build": "changed-profile", + "command": [ + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/changed-profile/columns", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/baseline.bin", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/changed-profile/baseline.json" + ], + "exit_code": 0, + "input_sha256": "2df55087c71725651b7fc531323a371810f6c8c6d49d84d2c397bdc2d1862133", + "label": "baseline", + "name": "baseline", + "receipt_sha256": "52cef7fb4000f8596f32f9fc394e824f430754a4bf20e53e139704c9ef6890ca", + "seconds": 0.0019031260017072782, + "stderr_sha256": "d336cd7217da401f36ab76f9b4bc012ea88089d1f6406df83dc32b4c04467512", + "stdout_sha256": "30da32398452892c903c806682d4500f470993752e0b3fea614c1bc5d0b25b45" + }, + { + "build": "changed-profile", + "command": [ + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/changed-profile/columns", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/deferred.bin", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/changed-profile/deferred.json" + ], + "exit_code": 0, + "input_sha256": "9732a8373b845d090615a39a693dc3c1fdb165777aa9b136f4f86aaac8f90e0c", + "label": "deferred", + "name": "deferred", + "receipt_sha256": "f9e00efd26d1846826f6604e1970d9b5dcc996f8b9b2995a0a03e49b3eee2cb0", + "seconds": 0.0018455079989507794, + "stderr_sha256": "c244ff4f3727ddd03e84818e1c8603a70c5ca3a311ef657463ac221e605b655f", + "stdout_sha256": "bf0ba11d7c378332fe278a1603f7f25b47cf1c2cd183ff3799a809be4a737f7c" + }, + { + "build": "restored-inputs", + "command": [ + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/restored-inputs/columns", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/baseline.bin", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/restored-inputs/baseline.json" + ], + "exit_code": 0, + "input_sha256": "2df55087c71725651b7fc531323a371810f6c8c6d49d84d2c397bdc2d1862133", + "label": "baseline", + "name": "baseline", + "receipt_sha256": "52cef7fb4000f8596f32f9fc394e824f430754a4bf20e53e139704c9ef6890ca", + "seconds": 0.0017879500010167249, + "stderr_sha256": "b9b75f468788c5056262e3a03e6b8c782d63f8cf5d3b061ec701e4cbbbfd1cb8", + "stdout_sha256": "011d84a8a3b7e745370938f85f6c59788b08212531a6855b914f75756d8a5223" + }, + { + "build": "restored-inputs", + "command": [ + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/restored-inputs/columns", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/deferred.bin", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/restored-inputs/deferred.json" + ], + "exit_code": 0, + "input_sha256": "9732a8373b845d090615a39a693dc3c1fdb165777aa9b136f4f86aaac8f90e0c", + "label": "deferred", + "name": "deferred", + "receipt_sha256": "f9e00efd26d1846826f6604e1970d9b5dcc996f8b9b2995a0a03e49b3eee2cb0", + "seconds": 0.0017318129976047203, + "stderr_sha256": "04fff71c627da55a0bc5c1962fbf52be80cd7e4a25a0635b98658789d9e03c14", + "stdout_sha256": "9fe7c50d9a934ee36b4eea9390d5b1a41f6399ad5a1569e7ca0d5dbfefb65719" + }, + { + "build": "restored-inputs", + "command": [ + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/restored-inputs/columns", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/missing-undo.bin", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/restored-inputs/missing-undo.json" + ], + "exit_code": 2, + "expected_failure": "local defining-decoder full formal column", + "input_sha256": "2049f0fc960d3462561f372dc3b6cb9a8e33a90d84e18d4b513867208366e37b", + "label": "missing-undo", + "name": "missing-undo", + "seconds": 0.0010663399953045882, + "stderr_sha256": "f85c6d1b3e3ba33de33b8a1b67726ed7eec2aeb725bdfa096baaf51dac0724e1", + "stdout_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + { + "build": "damaged-cache", + "command": [ + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/damaged-cache/columns", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/baseline.bin", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/damaged-cache/baseline.json" + ], + "exit_code": 0, + "input_sha256": "2df55087c71725651b7fc531323a371810f6c8c6d49d84d2c397bdc2d1862133", + "label": "baseline", + "name": "baseline", + "receipt_sha256": "52cef7fb4000f8596f32f9fc394e824f430754a4bf20e53e139704c9ef6890ca", + "seconds": 0.0019571779994294047, + "stderr_sha256": "c51db48da2aca76812e019da59d7b50399998a9f721e654687bd7769d16ddc89", + "stdout_sha256": "9bf196d85a58034d31b3ea4276ac2e962bebc271f33f3654466eae983ee0aecd" + }, + { + "build": "damaged-cache", + "command": [ + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/damaged-cache/columns", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/deferred.bin", + "/home/gaz/tmp/math/sprint/pass-47/benchmark-final/damaged-cache/deferred.json" + ], + "exit_code": 0, + "input_sha256": "9732a8373b845d090615a39a693dc3c1fdb165777aa9b136f4f86aaac8f90e0c", + "label": "deferred", + "name": "deferred", + "receipt_sha256": "f9e00efd26d1846826f6604e1970d9b5dcc996f8b9b2995a0a03e49b3eee2cb0", + "seconds": 0.0018085679985233583, + "stderr_sha256": "0454b99a8491b3d2383ff6e22c63913dfa1cda53879c2879f689678d8078462a", + "stdout_sha256": "2b869daaa2ccaa523e1dd2271699c42af530d6cafe2af90c00619d5ab9190de6" + } + ], + "fill_seconds": 2.9417026810042444, + "input_replay": { + "formal_columns_per_word": 1327, + "native_executed": false, + "payload_sha256": { + "baseline": "2df55087c71725651b7fc531323a371810f6c8c6d49d84d2c397bdc2d1862133", + "deferred": "9732a8373b845d090615a39a693dc3c1fdb165777aa9b136f4f86aaac8f90e0c", + "missing-undo": "2049f0fc960d3462561f372dc3b6cb9a8e33a90d84e18d4b513867208366e37b" + }, + "stages_per_word": 9, + "status": "PASS_NATIVE_CACHE_INPUTS_AND_PYTHON_COLUMNS_ONLY", + "words": 2 + }, + "median_seconds": { + "uncached": 2.7527704419990187, + "warm": 0.2402953369964962 + }, + "native_executed": true, + "profiles": { + "86b7fc4ac394f5c134fe1d71e45745ec8e6ce39169c2890a82a9dd620856ffb0": { + "content_sha256": { + "/usr/bin/x86_64-linux-gnu-as": "4e5fcaa3cdc160173cb5cfe7aa35dc39d7aa1f06ba8d75b8d923bbae5473991b", + "/usr/bin/x86_64-linux-gnu-g++-15": "e6718f7e0c7d057c3ff77b550c603da9bc4030e3ede3c053705acce1293dbe4d", + "/usr/bin/x86_64-linux-gnu-ld.bfd": "97f48d93b8b076a92d2809ec29dcb17f0f37c8827358f832255e2ed22fef6075", + "/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2": "bda779ea9e9ad234f60315477d7cfd0bdde861cd8ddd9df8cdaf62f18c4cec14", + "/usr/lib/x86_64-linux-gnu/libbfd-2.46-system.so": "950810b40b5d4d2e98769cfce6ec16b10f7f472afe069670b7dfeb3cde11a621", + "/usr/lib/x86_64-linux-gnu/libc.so.6": "85e64f97e348786a8fb4d9f3d52fec289e2fb86bba20f0731dfe61990525e0f7", + "/usr/lib/x86_64-linux-gnu/libctf.so.0.0.0": "8bc1c7c363920416d47ccee8eada9fb4c4b8a16c56e98df301976cd005670896", + "/usr/lib/x86_64-linux-gnu/libgmp.so.10.5.0": "fda9699eef15deda5f1c626e9140377a7f5d88c41516a54278ac02429cb20fa5", + "/usr/lib/x86_64-linux-gnu/libisl.so.23.4.0": "cef5afa0bca3dee62939b617c48a194138f238de0f8a7e272fae9fead65374ef", + "/usr/lib/x86_64-linux-gnu/libjansson.so.4.14.0": "8061b955f9d6bf15c6302470323c5cec3d7109482f306707ed019780cf0e7b33", + "/usr/lib/x86_64-linux-gnu/libm.so.6": "1c488db6f4fe8cecb72456bc018de000b7a9b539c2994864b0416b5e8371b3d8", + "/usr/lib/x86_64-linux-gnu/libmpc.so.3.3.1": "1fedb101971828caa0701a5b04620bb35841c2df3bf427cad131ec355bc0b5cd", + "/usr/lib/x86_64-linux-gnu/libmpfr.so.6.2.2": "1aed080b3143049fbe016cd82cdc5fb47db386386556cc1bb37cfccc133c0fae", + "/usr/lib/x86_64-linux-gnu/libsframe.so.3.0.0": "8ec144cd07697b4c1ff3a346541fe51d6f2e67304544c537e2e454c2d31e96ba", + "/usr/lib/x86_64-linux-gnu/libz.so.1.3.1": "47b61967895b30e8c0c6818dd633ffeb87711cf637c688f981896f0dd84ce23b", + "/usr/lib/x86_64-linux-gnu/libzstd.so.1.5.7": "060eeb79531d435306665fd78329d8a9dd579f95876c5960bb67937825362a80", + "/usr/libexec/gcc/x86_64-linux-gnu/15/cc1plus": "6f2b2c0e3fd32042eb2acace19a57fdb0b229d9c24cdd5e2cc100639c77e9ff0", + "/usr/libexec/gcc/x86_64-linux-gnu/15/collect2": "8ab5d946ba2c948e5ea5c91e25a104439302e0599a521785770d10690c565437" + }, + "environment_sha256": "ae281f1ad93d5689c661d8f6cd190092f59a21429224c23a65d2ae9b4225495b", + "machine": "x86_64", + "specs_sha256": "a719f80ca369e2646e95c5449c763404308fe1e77f00b235cb42fc651b24989b", + "system": "Linux", + "target": "x86_64-linux-gnu", + "tools": { + "as": "/usr/bin/x86_64-linux-gnu-as", + "cc1plus": "/usr/libexec/gcc/x86_64-linux-gnu/15/cc1plus", + "collect2": "/usr/libexec/gcc/x86_64-linux-gnu/15/collect2", + "driver": "/usr/bin/x86_64-linux-gnu-g++-15", + "ld": "/usr/bin/x86_64-linux-gnu-ld.bfd" + }, + "version": "x86_64-linux-gnu-g++-15 (Ubuntu 15.2.0-16ubuntu1) 15.2.0\nCopyright (C) 2025 Free Software Foundation, Inc.\nThis is free software; see the source for copying conditions. There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + }, + "b8912596d6873d0a64239019f7a14b053b9bad874f11fd35d52575f3dc7b902b": { + "content_sha256": { + "/usr/bin/x86_64-linux-gnu-as": "4e5fcaa3cdc160173cb5cfe7aa35dc39d7aa1f06ba8d75b8d923bbae5473991b", + "/usr/bin/x86_64-linux-gnu-g++-15": "e6718f7e0c7d057c3ff77b550c603da9bc4030e3ede3c053705acce1293dbe4d", + "/usr/bin/x86_64-linux-gnu-ld.bfd": "97f48d93b8b076a92d2809ec29dcb17f0f37c8827358f832255e2ed22fef6075", + "/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2": "bda779ea9e9ad234f60315477d7cfd0bdde861cd8ddd9df8cdaf62f18c4cec14", + "/usr/lib/x86_64-linux-gnu/libbfd-2.46-system.so": "950810b40b5d4d2e98769cfce6ec16b10f7f472afe069670b7dfeb3cde11a621", + "/usr/lib/x86_64-linux-gnu/libc.so.6": "85e64f97e348786a8fb4d9f3d52fec289e2fb86bba20f0731dfe61990525e0f7", + "/usr/lib/x86_64-linux-gnu/libctf.so.0.0.0": "8bc1c7c363920416d47ccee8eada9fb4c4b8a16c56e98df301976cd005670896", + "/usr/lib/x86_64-linux-gnu/libgmp.so.10.5.0": "fda9699eef15deda5f1c626e9140377a7f5d88c41516a54278ac02429cb20fa5", + "/usr/lib/x86_64-linux-gnu/libisl.so.23.4.0": "cef5afa0bca3dee62939b617c48a194138f238de0f8a7e272fae9fead65374ef", + "/usr/lib/x86_64-linux-gnu/libjansson.so.4.14.0": "8061b955f9d6bf15c6302470323c5cec3d7109482f306707ed019780cf0e7b33", + "/usr/lib/x86_64-linux-gnu/libm.so.6": "1c488db6f4fe8cecb72456bc018de000b7a9b539c2994864b0416b5e8371b3d8", + "/usr/lib/x86_64-linux-gnu/libmpc.so.3.3.1": "1fedb101971828caa0701a5b04620bb35841c2df3bf427cad131ec355bc0b5cd", + "/usr/lib/x86_64-linux-gnu/libmpfr.so.6.2.2": "1aed080b3143049fbe016cd82cdc5fb47db386386556cc1bb37cfccc133c0fae", + "/usr/lib/x86_64-linux-gnu/libsframe.so.3.0.0": "8ec144cd07697b4c1ff3a346541fe51d6f2e67304544c537e2e454c2d31e96ba", + "/usr/lib/x86_64-linux-gnu/libz.so.1.3.1": "47b61967895b30e8c0c6818dd633ffeb87711cf637c688f981896f0dd84ce23b", + "/usr/lib/x86_64-linux-gnu/libzstd.so.1.5.7": "060eeb79531d435306665fd78329d8a9dd579f95876c5960bb67937825362a80", + "/usr/libexec/gcc/x86_64-linux-gnu/15/cc1plus": "6f2b2c0e3fd32042eb2acace19a57fdb0b229d9c24cdd5e2cc100639c77e9ff0", + "/usr/libexec/gcc/x86_64-linux-gnu/15/collect2": "8ab5d946ba2c948e5ea5c91e25a104439302e0599a521785770d10690c565437" + }, + "environment_sha256": "ae281f1ad93d5689c661d8f6cd190092f59a21429224c23a65d2ae9b4225495b", + "invalidation_control": "simulated-toolchain-content-change", + "machine": "x86_64", + "specs_sha256": "a719f80ca369e2646e95c5449c763404308fe1e77f00b235cb42fc651b24989b", + "system": "Linux", + "target": "x86_64-linux-gnu", + "tools": { + "as": "/usr/bin/x86_64-linux-gnu-as", + "cc1plus": "/usr/libexec/gcc/x86_64-linux-gnu/15/cc1plus", + "collect2": "/usr/libexec/gcc/x86_64-linux-gnu/15/collect2", + "driver": "/usr/bin/x86_64-linux-gnu-g++-15", + "ld": "/usr/bin/x86_64-linux-gnu-ld.bfd" + }, + "version": "x86_64-linux-gnu-g++-15 (Ubuntu 15.2.0-16ubuntu1) 15.2.0\nCopyright (C) 2025 Free Software Foundation, Inc.\nThis is free software; see the source for copying conditions. There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + } + }, + "python": "3.12.3 (main, Jan 22 2026, 20:57:42) [GCC 13.3.0]", + "scope": "One native column checker and two pinned words; fresh link and execution every time. No full selected replay or new mathematical result.", + "status": "PASS_NATIVE_CCACHE_COLUMNS", + "timings_seconds": { + "uncached": [ + 2.821791362002841, + 2.7527704419990187, + 2.7496696739981417 + ], + "warm": [ + 0.24228023600153392, + 0.23724235100235092, + 0.2402953369964962 + ] + }, + "warm_speedup": 11.455779693465951 +} diff --git a/research/native-ccache-columns/FIXTURES.json b/research/native-ccache-columns/FIXTURES.json new file mode 100644 index 0000000000..de07a58cc4 --- /dev/null +++ b/research/native-ccache-columns/FIXTURES.json @@ -0,0 +1,33 @@ +{ + "pr": 2373, + "head": "b52f87f5355ad9f02ca4ac4395117655ac1b19c7", + "inputs": { + "baseline": { + "path": "fixtures/baseline.bin.gz", + "container_sha256": "1a7d64777c6214084b6608048c6c02ca08b4fe682dd203fd4d1a6c086c4601be", + "payload_sha256": "2df55087c71725651b7fc531323a371810f6c8c6d49d84d2c397bdc2d1862133", + "records": 13421, + "endianness": "little", + "record_format": "six signed 32-bit integers", + "source": "Exact exported COHORT249-RECORDS.bin from the complete local PR2373 native replay." + }, + "deferred": { + "path": "fixtures/deferred.bin.gz", + "container_sha256": "b96c541149162e01c497b1fbbdf0f92da2044b51ae7e5e39e675c5af50794f5d", + "payload_sha256": "9732a8373b845d090615a39a693dc3c1fdb165777aa9b136f4f86aaac8f90e0c", + "records": 12991, + "endianness": "little", + "record_format": "six signed 32-bit integers", + "source": "Exact exported COHORT249-RECORDS.bin from the complete local PR2373 native replay." + }, + "missing-undo": { + "path": "fixtures/missing-undo.bin.gz", + "container_sha256": "eaada3c215e8c1bbdef1cf2551f9e51f4f851362d9dae997a365d8e389a964f4", + "payload_sha256": "2049f0fc960d3462561f372dc3b6cb9a8e33a90d84e18d4b513867208366e37b", + "records": 12990, + "endianness": "little", + "record_format": "six signed 32-bit integers", + "source": "Exact exported COHORT249-RECORDS.bin from the complete local PR2373 native replay." + } + } +} diff --git a/research/native-ccache-columns/NATIVE.json b/research/native-ccache-columns/NATIVE.json new file mode 100644 index 0000000000..b52f8d7c6d --- /dev/null +++ b/research/native-ccache-columns/NATIVE.json @@ -0,0 +1,392 @@ +{ + "baseline": { + "bridge_additions": 1998, + "copied_center_original_source_immutable": true, + "formal_columns_checked": 1327, + "fresh_center_copies": 81, + "global_live_registers": 1327, + "independent_dirty_registers": 439, + "local_odd_scalar_additions": 10492, + "local_raw_H": [ + [ + 1, + 1323 + ], + [ + 2, + 1342 + ], + [ + 3, + 79 + ], + [ + 4, + 44 + ], + [ + 5, + 102 + ], + [ + 6, + 11 + ], + [ + 7, + 19 + ] + ], + "local_registers": 661, + "local_scalar_additions": 10492, + "local_scalar_stream": "sha256:2df55087c71725651b7fc531323a371810f6c8c6d49d84d2c397bdc2d1862133", + "negative_controls": [ + { + "omit_bridge": 0, + "rejected": true + }, + { + "omit_bridge": 1, + "rejected": true + }, + { + "omit_bridge": 2, + "rejected": true + }, + { + "omit_bridge": 3, + "rejected": true + }, + { + "omit_bridge": 4, + "rejected": true + }, + { + "omit_bridge": 5, + "rejected": true + }, + { + "omit_bridge": 6, + "rejected": true + }, + { + "omit_bridge": 7, + "rejected": true + }, + { + "omit_bridge": 8, + "rejected": true + }, + { + "omit_bridge": 9, + "rejected": true + }, + { + "omit_bridge": 10, + "rejected": true + }, + { + "omit_bridge": 11, + "rejected": true + }, + { + "omit_bridge": 12, + "rejected": true + }, + { + "omit_bridge": 13, + "rejected": true + }, + { + "omit_bridge": 14, + "rejected": true + }, + { + "omit_bridge": 15, + "rejected": true + }, + { + "omit_bridge": 16, + "rejected": true + }, + { + "omit_bridge": 17, + "rejected": true + } + ], + "new_Q_categories": [ + 28, + 29 + ], + "payload_prefix_bits": 91, + "payload_prefix_upper": "2307861360443122886999501568", + "reverse_fresh_center_copies": 36, + "scope": "All independent physical input columns over F2, including all arbitrary helper dirt, restored; external copied-center work closes to zero. New cohort scalar lift uses actual signed coefficients and computed cancellation-free bounds; unchanged source527 signed decoder remains separate defining evidence. Physical projector routing and paid rank/bank receipts are independently bound, not inferred from scalar check.", + "signed_lift_prefix": [ + { + "bits": 14, + "cancellation_free_signed_row_l1_upper": "13667", + "reverse": false + }, + { + "bits": 22, + "cancellation_free_signed_row_l1_upper": "3758418", + "reverse": true + } + ], + "signed_reverse_semantics": "Reverse ADD coefficient negated; reverse DISCARD is fresh COPY from recorded unchanged original center; reverse COPY is DISCARD. Each such block is inverse over every commutative coefficient ring, by elementary-shear induction.", + "stage_additions": 94428, + "stages": [ + { + "fresh_copies": 9, + "scalar_additions": 10492, + "signed_inverse": false, + "stage": 0 + }, + { + "fresh_copies": 9, + "scalar_additions": 10492, + "signed_inverse": true, + "stage": 1 + }, + { + "fresh_copies": 9, + "scalar_additions": 10492, + "signed_inverse": false, + "stage": 2 + }, + { + "fresh_copies": 9, + "scalar_additions": 10492, + "signed_inverse": true, + "stage": 3 + }, + { + "fresh_copies": 9, + "scalar_additions": 10492, + "signed_inverse": false, + "stage": 4 + }, + { + "fresh_copies": 9, + "scalar_additions": 10492, + "signed_inverse": true, + "stage": 5 + }, + { + "fresh_copies": 9, + "scalar_additions": 10492, + "signed_inverse": false, + "stage": 6 + }, + { + "fresh_copies": 9, + "scalar_additions": 10492, + "signed_inverse": true, + "stage": 7 + }, + { + "fresh_copies": 9, + "scalar_additions": 10492, + "signed_inverse": false, + "stage": 8 + } + ], + "status": "PASS_NEW_COHORT249_ALL_BRIDGED_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL" + }, + "deferred": { + "bridge_additions": 1998, + "copied_center_original_source_immutable": true, + "formal_columns_checked": 1327, + "fresh_center_copies": 81, + "global_live_registers": 1327, + "independent_dirty_registers": 439, + "local_odd_scalar_additions": 10062, + "local_raw_H": [ + [ + 1, + 1323 + ], + [ + 2, + 1342 + ], + [ + 3, + 79 + ], + [ + 4, + 44 + ], + [ + 5, + 102 + ], + [ + 6, + 11 + ], + [ + 7, + 19 + ] + ], + "local_registers": 661, + "local_scalar_additions": 10062, + "local_scalar_stream": "sha256:9732a8373b845d090615a39a693dc3c1fdb165777aa9b136f4f86aaac8f90e0c", + "negative_controls": [ + { + "omit_bridge": 0, + "rejected": true + }, + { + "omit_bridge": 1, + "rejected": true + }, + { + "omit_bridge": 2, + "rejected": true + }, + { + "omit_bridge": 3, + "rejected": true + }, + { + "omit_bridge": 4, + "rejected": true + }, + { + "omit_bridge": 5, + "rejected": true + }, + { + "omit_bridge": 6, + "rejected": true + }, + { + "omit_bridge": 7, + "rejected": true + }, + { + "omit_bridge": 8, + "rejected": true + }, + { + "omit_bridge": 9, + "rejected": true + }, + { + "omit_bridge": 10, + "rejected": true + }, + { + "omit_bridge": 11, + "rejected": true + }, + { + "omit_bridge": 12, + "rejected": true + }, + { + "omit_bridge": 13, + "rejected": true + }, + { + "omit_bridge": 14, + "rejected": true + }, + { + "omit_bridge": 15, + "rejected": true + }, + { + "omit_bridge": 16, + "rejected": true + }, + { + "omit_bridge": 17, + "rejected": true + } + ], + "new_Q_categories": [ + 28, + 29 + ], + "payload_prefix_bits": 91, + "payload_prefix_upper": "1304011286425361906630611712", + "reverse_fresh_center_copies": 36, + "scope": "All independent physical input columns over F2, including all arbitrary helper dirt, restored; external copied-center work closes to zero. New cohort scalar lift uses actual signed coefficients and computed cancellation-free bounds; unchanged source527 signed decoder remains separate defining evidence. Physical projector routing and paid rank/bank receipts are independently bound, not inferred from scalar check.", + "signed_lift_prefix": [ + { + "bits": 14, + "cancellation_free_signed_row_l1_upper": "13667", + "reverse": false + }, + { + "bits": 22, + "cancellation_free_signed_row_l1_upper": "2825146", + "reverse": true + } + ], + "signed_reverse_semantics": "Reverse ADD coefficient negated; reverse DISCARD is fresh COPY from recorded unchanged original center; reverse COPY is DISCARD. Each such block is inverse over every commutative coefficient ring, by elementary-shear induction.", + "stage_additions": 90558, + "stages": [ + { + "fresh_copies": 9, + "scalar_additions": 10062, + "signed_inverse": false, + "stage": 0 + }, + { + "fresh_copies": 9, + "scalar_additions": 10062, + "signed_inverse": true, + "stage": 1 + }, + { + "fresh_copies": 9, + "scalar_additions": 10062, + "signed_inverse": false, + "stage": 2 + }, + { + "fresh_copies": 9, + "scalar_additions": 10062, + "signed_inverse": true, + "stage": 3 + }, + { + "fresh_copies": 9, + "scalar_additions": 10062, + "signed_inverse": false, + "stage": 4 + }, + { + "fresh_copies": 9, + "scalar_additions": 10062, + "signed_inverse": true, + "stage": 5 + }, + { + "fresh_copies": 9, + "scalar_additions": 10062, + "signed_inverse": false, + "stage": 6 + }, + { + "fresh_copies": 9, + "scalar_additions": 10062, + "signed_inverse": true, + "stage": 7 + }, + { + "fresh_copies": 9, + "scalar_additions": 10062, + "signed_inverse": false, + "stage": 8 + } + ], + "status": "PASS_NEW_COHORT249_ALL_BRIDGED_STAGE_FORMAL_COLUMNS_AND_PREFIX_BILL" + } +} diff --git a/research/native-ccache-columns/NOTICE.md b/research/native-ccache-columns/NOTICE.md new file mode 100644 index 0000000000..90c1a9571a --- /dev/null +++ b/research/native-ccache-columns/NOTICE.md @@ -0,0 +1,24 @@ +# Attribution + +New experiment, independent Python columns, wrapper, controls and writing: +Gareth Davidson (@bitplane), with substantial OpenAI Codex assistance. +No subagents or independent human review were used. Apache-2.0. + +Compilation reuse is provided by ccache, by Andrew Tridgell, Joel Rosdahl and +its contributors (GPL-3.0-or-later). Ccache is an external executable and is not +vendored or reimplemented. Its manual documents the options used here: +https://ccache.dev/manual/4.12.3.html + +The unchanged columns_k.cpp is DaysSky's PR #381 extension of Dylan Crow's +PR #370 / PR #346/#352 native cohort checker lineage. The authenticated +research/e8-bit-carrier-skeleton/NOTICE.md retains the complete predecessor +credit (eumemic, Anthropic Claude-assisted). The accompanying nlohmann/json +header retains Niels Lohmann and contributors' MIT license in its header. + +The raw fixtures come from our PR #2373, head +b52f87f5355ad9f02ca4ac4395117655ac1b19c7, which replays the PR #1188 baseline +and Sagar Thakrar's PR #2115 deferred-target-undo construction. No construction, +undo optimization or native checker theorem is claimed as new here. The +independent Python bitset and prefix implementation adds a replay of this +fixed nine-stage boundary; it does not replace the native engine in the timed +experiment. The benchmark runs unchanged, pinned native bytes. diff --git a/research/native-ccache-columns/README.md b/research/native-ccache-columns/README.md new file mode 100644 index 0000000000..191d4616c1 --- /dev/null +++ b/research/native-ccache-columns/README.md @@ -0,0 +1,149 @@ +# Reuse native compilation while rerunning every column check + +On this Linux/GCC fixture, a warm private compiler cache reduces the measured +build-and-replay median from **2.753 s to 0.240 s (11.46×)**. A fresh cache fill +takes **2.942 s**. These are local wall times for one native nine-stage checker +and two exact words; they are not whole selected-replay timings. + +This uses the existing **ccache** implementation. The contribution is the +source-bound experiment, full native receipt comparison, toolchain binding and +actual invalidation controls. No production entry point, frozen source or +selected certificate is changed. Mathematical success receipts are never reused. + +## Measured boundary + +The unchanged `columns_k.cpp` comes from the merged +`research/e8-bit-carrier-skeleton` at canonical base +`0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2`. Its lineage is DaysSky's PR #381, +Dylan Crow's PR #370 and the original cohort checkers; upstream attribution and +the nlohmann/json header are authenticated by `SOURCES.json`. + +The two RAW6 fixtures are exact outputs of the complete native replay in +[our PR #2373](https://github.com/CrocSwap/integer-mult-bounds/pull/2373), +head `b52f87f5355ad9f02ca4ac4395117655ac1b19c7`: the PR #1188 baseline and +Sagar Thakrar's PR #2115 deferred-target-undo word. `FIXTURES.json` pins each +committed gzip container and its full uncompressed payload. The fixtures have +13,421 / 12,991 raw records and 10,492 / 10,062 scalar ADDs. The third fixture +removes one required undo from the latter word and must fail. + +Every normal native execution retains all **1,327 formal columns**, **439 dirty +helper rows**, **nine stages**, **81 fresh copies**, **36 reverse fresh copies**, +**1,998 bridge additions**, exact signed-prefix bounds and **18 omitted-bridge +controls**. Both words have local rank mass 5,129 and the same paid histogram; +the existing source checker, not this optimization, establishes its native +column conclusions. The source's phase-label, geometric, hosting, owner and +physical admission limits remain; this package does not rerun the complete +legality/exporter/5-stage/11-stage pipeline from PR #2373. + +Three uncached and three warm-cache samples were interleaved. Each sample +includes source and fixture authentication, fresh toolchain fingerprinting, +compilation or cache lookup, fresh linking, execution of both words and complete +receipt comparison. Each gets a new object/output directory. The fresh fill is +reported separately. `BENCHMARK.json` contains all individual times, command +arguments, object hashes, cache counters and execution receipts. + +| Mode | Local median / time | Native execution | +| --- | ---: | --- | +| Uncached, three samples | 2.752770 s | Both complete words every sample | +| Warm cache, three samples | 0.240295 s | Both complete words every sample | +| Initial cache fill | 2.941703 s | Both complete words | + +The warm improvement is 11.4558× on this host; first use is slower. The experiment +used GCC 15.2, ccache 4.12.3, Boost 1.90 and Python 3.12. Timing varies with host, +compiler, headers and cache state. `VALIDATION.json` records the separate +Python 3.14 read-only export replay. Hosted CI success is not implied. + +## Cache and comparison contract + +Ccache's [preprocessor mode](https://ccache.dev/manual/4.12.3.html#_the_preprocessor_mode) +keys the expanded translation unit and relevant compiler options. This experiment +turns direct/depend modes off, uses `compiler_check=content`, no sloppiness and +no remote storage. A dedicated config overrides system settings; all inherited +`CCACHE_*` variables are removed. A file named through `extra_files_to_hash` +adds fresh content hashes for the GCC driver, cc1plus, assembler, collect2, +linker and their shared libraries, plus target, compiler specs and a digest of +the effective environment. Compiler tools and the private cache remain trusted +build infrastructure, not an execution-authentication system. Those settings +follow the [ccache manual](https://ccache.dev/manual/4.12.3.html). + +The linker runs every time. Every resulting executable runs on both positive +fixtures during timing. Reference and cached object SHA-256 values must match +within each experiment. Every native JSON field participates in strict canonical +comparison, with exactly two declared treatments: elapsed `seconds` must be a +finite nonnegative number and is removed; `local_scalar_stream` must equal the +actual input path and is replaced by the SHA-256 of the complete consumed raw +bytes. No role, stage, histogram, bill, control or scope field is dropped. + +Seven actual controls run through the compiler/cache/executable chain: + +1. Change a transitive header's COPY count from 9 to 8, preserving size and + nanosecond mtime: cache miss, then the native COPY-count guard rejects it. +2. Change the source parity predicate, also preserving size and mtime: cache + miss, then the full-column identity fails. +3. Change KPAIRS from 4 to 5: cache miss, and the actual eleven-stage executable + checks 1,549 columns and 24 omitted bridges. This is a flag control, not a + full eleven-stage supplier admission. +4. Change the extra toolchain profile: cache miss, with the same native result. + This simulates a fingerprint change; no second GCC version was installed. +5. Restore the original inputs: a preprocessor-mode hit and both words pass. +6. Run the missing-undo word after that hit: the native defining column check + fails, demonstrating that compilation reuse cannot reuse a mathematical pass. +7. Damage this experiment's private cached object result: ccache rebuilds it; + both words then pass with complete receipts unchanged. + +The full benchmark performs **13 builds and 24 native executions**: 21 positive +executions and three expected mathematical rejections. Twenty positive executions +use nine stages; the flag control uses eleven. In total the successful runs +execute 384 of the source's omitted-bridge controls. No timing sample substitutes +an old proof receipt for a command. + +## Replay + +The registered replay is standard-library Python 3.12: + +```sh +python3.12 -B scripts/research_package.py --package research/native-ccache-columns +``` + +It authenticates source/fixture bytes and independently checks every dirty +column with Python integer bitsets, every local signed-prefix bound and the +missing-undo failure. Nine package control groups check pin drift, payload +binding, strict comparison, location binding, invalid JSON, inherited cache +policy, actual-entry-point receipt corruption and output preservation. Its +marker explicitly says `PYTHON_COLUMNS_ONLY`: it does not compile C++ or measure +native performance. + +For the actual native benchmark, install GCC, Boost headers and ccache, then: + +```sh +python3.12 -I -O -B research/native-ccache-columns/benchmark.py \ + --work /tmp/native-cache-new-run --cxx /usr/bin/g++ \ + --ccache /usr/bin/ccache --boost-include /usr/include --repeats 3 +``` + +The work directory must be new and outside the checkout. This harness currently +supports dynamically linked GCC tools on little-endian Linux. It uses a private +cache under that directory and changes no system cache. Each build, native run +and rejection retains its stdout/stderr there. The scoped workflow executes the +same benchmark. The locally downloaded ccache/Boost tools are not vendored in +this contribution. + +## Selection and next scope + +One fresh draw `2f939a000f93b5f7feca53d415dcfc3b` selected verifier-engineering, +first card `replay-runtime`, method source-bound reuse. No reroll or scope change. +The required selected baseline passed. Priority revision 4; selected κ unchanged. +Canonical claim: [Discussion #2408](https://github.com/CrocSwap/integer-mult-bounds/discussions/2408). + +## Open next questions + +Can the measured compilation boundary be integrated into a named production +native harness while retaining its exact pins and every required execution? +Start with PR #2373's native harness, keep its legality and 5/9/11-stage commands +and controls, and measure the entire before/after pipeline. This experiment +establishes one reusable compilation boundary; production adoption, persistent +CI caching and end-to-end speed remain separate work. + +Gareth Davidson (@bitplane), with substantial OpenAI Codex assistance. No +subagents or independent human review. See `NOTICE.md` for the unchanged native +checker, fixture lineage and ccache attribution. diff --git a/research/native-ccache-columns/SELECTION.json b/research/native-ccache-columns/SELECTION.json new file mode 100644 index 0000000000..db29f1d53b --- /dev/null +++ b/research/native-ccache-columns/SELECTION.json @@ -0,0 +1,91 @@ +{ + "seed": "2f939a000f93b5f7feca53d415dcfc3b", + "track": "verifier-engineering", + "suggestions": [ + { + "task_id": "replay-runtime", + "scope_key": "a76657a85478d269d19f", + "question": "Can one measured replay bottleneck be sped up without dropping coverage?", + "method": "Design source-bound reuse with explicit dependency invalidation and negative controls.", + "starting_points": [ + "scripts/run_isolated_tests.py", + "scripts/verify_replay_coverage.py", + "certificates/selected-result.json" + ], + "acceptance_gate": "Report before/after wall time on the same fixture, retained checks and invalidation behavior.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read the selected reproduction command and choose a single replay stage for profiling.", + "scope": "Positive control / source-bound orientation only; this is not a new construction or full cold replay." + }, + "first_experiment": "Measure one unchanged fixture, preserve check coverage, and test one optimization with invalidation controls.", + "bottleneck_link": "Faster trustworthy replays increase review throughput and let mechanism candidates be checked sooner.", + "allowed_variations": [ + "Profile one stage or design one source-bound cache boundary." + ], + "scope_change_triggers": [ + "Skipping coverage or comparing different fixtures to claim speedup." + ], + "overlap_terms": [ + "replay runtime", + "cache invalidation", + "isolated tests" + ], + "scope_rule": "If you change the card's premise, record scope_status=changed and explain why. A package metadata check cannot establish mathematical relevance." + }, + { + "task_id": "portable-replay", + "scope_key": "831cc1a3c8f9ff01b197", + "question": "Can one reproducible environment or artifact-comparison failure be repaired?", + "method": "Reproduce one portability failure and add a minimal cross-environment fix.", + "starting_points": [ + "research/gzip-container-reproducibility/README.md", + "docs/ci-verification.md" + ], + "acceptance_gate": "Preserve immutable source hashes and proof-relevant content; a different compressed byte stream alone is not a mathematical mismatch.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read the gzip-container reproducibility examples and distinguish frozen source bytes from regenerated payloads.", + "scope": "Positive control / source-bound orientation only; this is not a new construction or full cold replay." + }, + "first_experiment": "Reproduce one specific mismatch or audit one canonical comparison for omitted proof-relevant fields.", + "bottleneck_link": "Portable exact checks prevent environment failures from blocking valid contributions.", + "allowed_variations": [ + "One interpreter/version mismatch or one payload field comparison." + ], + "scope_change_triggers": [ + "Removing immutable-source pins because generated compressed bytes differ." + ], + "overlap_terms": [ + "gzip container", + "reproducibility", + "canonical payload" + ], + "scope_rule": "If you change the card's premise, record scope_status=changed and explain why. A package metadata check cannot establish mathematical relevance." + } + ], + "base_commit": "0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2", + "catalog_assessed_on": "2026-10-14", + "priority_revision": 4, + "priority_log": "docs/research/research-priority-log.md", + "catalog_sha256": "d46eb6d5b3e279428753d770653663fbdf1063e55c255ea073d768f344927ef7", + "selected_record_sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32", + "selected": { + "kappa": "836330098538459/500000000000000000", + "review": "docs/research/community-batch1099-review.md", + "source_manifest": "research/community-frontier1094-audit/SELECTED-SOURCE.json", + "reproduce": "make frontier1094-verify" + }, + "status": "SUGGESTIONS_ONLY_NOT_RESERVED", + "next_step": "Check live overlap, refine one question's object and domain, and record a bounded task card. A different seed or scope key is not evidence of novelty." +} diff --git a/research/native-ccache-columns/SOURCES.json b/research/native-ccache-columns/SOURCES.json new file mode 100644 index 0000000000..71fb935334 --- /dev/null +++ b/research/native-ccache-columns/SOURCES.json @@ -0,0 +1,36 @@ +{ + "schema_version": 1, + "base_commit": "0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "ae6a99f28aa468649eb66a361e764d769363bf11", + "sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "e8870e5917057d59b730eb14721a778639eca050", + "sha256": "d46eb6d5b3e279428753d770653663fbdf1063e55c255ea073d768f344927ef7" + }, + { + "path": "research/e8-bit-carrier-skeleton/code/bit/checkers/columns_k.cpp", + "usage": "input", + "git_blob": "42bb232fbec4de703e70cc13dc2f39a3b43a3a01", + "sha256": "1c344d18fcd494eeca93e259f10cafae7705780e6592f6dcb35b34752dab9bc2" + }, + { + "path": "research/e8-bit-carrier-skeleton/code/bit/checkers/json.hpp", + "usage": "input", + "git_blob": "82d69f7c5d044c9887c96b90c97f5639083ecd14", + "sha256": "aaf127c04cb31c406e5b04a63f1ae89369fccde6d8fa7cdda1ed4f32dfc5de63" + }, + { + "path": "research/e8-bit-carrier-skeleton/NOTICE.md", + "usage": "input", + "git_blob": "5a0ecdcd2c7fad0488740a1da0f633b73b56a809", + "sha256": "5f4b7fcbf99f572be28b6da612ce775363908cdfc7810f7aca167be01c86e49a" + } + ] +} diff --git a/research/native-ccache-columns/TASK.json b/research/native-ccache-columns/TASK.json new file mode 100644 index 0000000000..af66645ec7 --- /dev/null +++ b/research/native-ccache-columns/TASK.json @@ -0,0 +1,89 @@ +{ + "schema_version": 1, + "task_id": "replay-runtime", + "priority_revision": 4, + "base_commit": "0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2", + "original_card": { + "id": "replay-runtime", + "question": "Can one measured replay bottleneck be sped up without dropping coverage?", + "starting_points": [ + "scripts/run_isolated_tests.py", + "scripts/verify_replay_coverage.py", + "certificates/selected-result.json" + ], + "methods": [ + "Profile one isolated replay and optimize the measured bottleneck.", + "Design source-bound reuse with explicit dependency invalidation and negative controls." + ], + "acceptance_gate": "Report before/after wall time on the same fixture, retained checks and invalidation behavior.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read the selected reproduction command and choose a single replay stage for profiling.", + "scope": "Positive control / source-bound orientation only; this is not a new construction or full cold replay." + }, + "first_experiment": "Measure one unchanged fixture, preserve check coverage, and test one optimization with invalidation controls.", + "bottleneck_link": "Faster trustworthy replays increase review throughput and let mechanism candidates be checked sooner.", + "allowed_variations": [ + "Profile one stage or design one source-bound cache boundary." + ], + "scope_change_triggers": [ + "Skipping coverage or comparing different fixtures to claim speedup." + ], + "overlap_terms": [ + "replay runtime", + "cache invalidation", + "isolated tests" + ] + }, + "scope_status": "refined", + "actual_scope": "Measure opt-in ccache object reuse for the unchanged native nine-stage BIT column checker on the two exact PR2373 words; retain fresh linking, every mathematical check and complete receipt comparison.", + "scope_change_reason": "Refines the drawn source-bound reuse method to one unchanged native column-checker compilation and two exact PR2373 fixtures, within the card's allowed one-stage boundary.", + "bottleneck_link": "Repeated native compilation dominates this measured replay stage. Source-bound compiler reuse can shorten candidate reviews without reusing mathematical success receipts.", + "budget_minutes": 60, + "stop_rule": "Compare three interleaved uncached/warm samples and a separate cache-fill run on identical inputs, prove actual invalidation controls, or report a precise negative result. Do not infer whole selected replay speedup.", + "outcome": "completed", + "evidence": "BENCHMARK.json: 13 native builds, 24 executions, exact reference/cached objects and complete native receipt equality; seven real invalidation/execution controls. Independent Python columns, source pins and nine package control groups.", + "author": "Gareth Davidson (@bitplane), with substantial OpenAI Codex assistance", + "ai_assistance": "Substantial OpenAI Codex assistance in design, implementation, execution and writing. No subagents or independent human review.", + "open_questions": [ + { + "question": "Can this opt-in compilation boundary be integrated into a named production native harness without changing its input pins or required executions?", + "why_it_matters": "The measured benefit covers this stage and a warm private cache. Production adoption and whole-pipeline timing remain separate.", + "first_step": "Wire a split compile/object-cache/fresh-link step into the PR2373 native harness, retain its legality and 5/9/11-stage commands and controls, and benchmark a complete before/after run.", + "blocked_by": "No production entry point or frozen source manifest is changed in this experiment." + } + ], + "selection": { + "seed": "2f939a000f93b5f7feca53d415dcfc3b", + "suggestion_index": 1, + "scope_key": "a76657a85478d269d19f", + "method": "Design source-bound reuse with explicit dependency invalidation and negative controls." + }, + "claim": "https://github.com/CrocSwap/integer-mult-bounds/discussions/2408", + "upstream_checkpoint": { + "commit": "0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2", + "priority_revision": 4, + "checked_at_utc": "2026-10-15T08:15:17.573599+00:00", + "guidance_changed": false, + "selected_record_changed": false, + "overlap_coverage": { + "open_prs": { + "fetched_at": "2026-10-15T08:11:51.282742+00:00", + "complete_pagination": true, + "records": 617 + }, + "discussions": { + "fetched_at": "2026-10-15T08:13:44.536120+00:00", + "complete_pagination": true, + "records": 1140 + } + }, + "overlap_warnings": [], + "decision": "Continue the compilation-only experiment; matching current discussion is our own claim. Native source files and canonical base are unchanged." + } +} diff --git a/research/native-ccache-columns/VALIDATION.json b/research/native-ccache-columns/VALIDATION.json new file mode 100644 index 0000000000..f01d408c27 --- /dev/null +++ b/research/native-ccache-columns/VALIDATION.json @@ -0,0 +1,85 @@ +{ + "schema": "native-ccache-columns-validation/1", + "checked_at_utc": "2026-10-15T08:15:17.573599+00:00", + "native_executed": true, + "registered_python312": "PASS_REGISTERED_RESEARCH_PACKAGE; nine control groups", + "full_native_python312": { + "command": "python3.12 -I -O -B research/native-ccache-columns/benchmark.py --work --cxx /usr/bin/g++ --ccache --boost-include --repeats 3", + "receipt_sha256": "92511c79d1f7481af842aff094dc0e5b65e492b249579edbc3ac97289c6c5fd1", + "median_seconds": { + "uncached": 2.7527704419990187, + "warm": 0.2402953369964962 + }, + "warm_speedup": 11.455779693465951, + "fill_seconds": 2.9417026810042444, + "builds": 13, + "native_executions": 24, + "native_positive": 21, + "native_negative": 3, + "actual_controls": [ + "same-size same-mtime transitive header", + "same-size same-mtime source", + "changed compile flag", + "changed toolchain profile", + "restored-input cache hit", + "invalid word after cache hit", + "corrupt private cache result" + ] + }, + "full_native_python314_readonly": { + "command": "python3.14 -I -O -B /research/native-ccache-columns/benchmark.py --work --cxx /usr/bin/g++ --ccache --boost-include --repeats 3; python3.14 -I -O -B /research/native-ccache-columns/test_package.py", + "receipt_sha256": "dc553f2c93b8b58095ddb87ba451db85d36b0e241a97fd6701373ba278806b92", + "median_seconds": { + "uncached": 2.761171769001521, + "warm": 0.241031349003606 + }, + "warm_speedup": 11.455654131364513, + "all_normalized_native_execution_results_identical": true, + "nine_control_groups_passed": true, + "git_free": true, + "read_only": true, + "files_unchanged": 18, + "execution_snapshot_hashes": { + "research/e8-bit-carrier-skeleton/NOTICE.md": "5f4b7fcbf99f572be28b6da612ce775363908cdfc7810f7aca167be01c86e49a", + "research/native-ccache-columns/FIXTURES.json": "09dea334b5f848cef170d37425b813398a7d648492f38eb1348b71a108a6479b", + "research/native-ccache-columns/verify.py": "cc2a5a1eb8520569b5010285f56fdfe7050b8259c1acd62a09c9d82e55247874", + "research/native-ccache-columns/README.md": "dd05fba19effe6929e8ccdd31eb70218266b6714406c6a089c0056cc41f6a68a", + "research/native-ccache-columns/BENCHMARK.json": "92511c79d1f7481af842aff094dc0e5b65e492b249579edbc3ac97289c6c5fd1", + "research/native-ccache-columns/SOURCES.json": "8fbfba5efe736d831223d276ceee0eb32b8076959a8770d1b0707c2ab0a921c0", + "research/native-ccache-columns/NATIVE.json": "6e462c823e42ea136cf615462689f12478b123b16234001b3a1af5fe1415ed60", + "research/native-ccache-columns/test_package.py": "4684ded24b23204eeb631139cae79d83b9b5ce34a5656c8fa53fa0ba45eb4a6b", + "research/native-ccache-columns/SELECTION.json": "a621c366d2ef370426cb5cbf1f38f23f0ea8ee40fddf793ab0d382419eaa21a4", + "research/native-ccache-columns/VERIFY.json": "aa1fe01abc1e21dcbf6ad93b0669ace1cb4856fe7ce90264c7f767ba755593a1", + "research/native-ccache-columns/TASK.json": "1fe3c416aaeaf49d16a1acaf8f96efefaedef1d9a678f681f49d3caa7c6538a4", + "research/native-ccache-columns/benchmark.py": "afb6e0cd8dbfe9a9896f66743586917cae6e26ebdea8d56e8f61cc9bae0c973f", + "research/native-ccache-columns/NOTICE.md": "940cf90dd6ae613008c2ed77170d6ede44e365e3ff4a89fc7d21cac2f3a221ff", + "research/e8-bit-carrier-skeleton/code/bit/checkers/json.hpp": "aaf127c04cb31c406e5b04a63f1ae89369fccde6d8fa7cdda1ed4f32dfc5de63", + "research/e8-bit-carrier-skeleton/code/bit/checkers/columns_k.cpp": "1c344d18fcd494eeca93e259f10cafae7705780e6592f6dcb35b34752dab9bc2", + "research/native-ccache-columns/fixtures/deferred.bin.gz": "b96c541149162e01c497b1fbbdf0f92da2044b51ae7e5e39e675c5af50794f5d", + "research/native-ccache-columns/fixtures/baseline.bin.gz": "1a7d64777c6214084b6608048c6c02ca08b4fe682dd203fd4d1a6c086c4601be", + "research/native-ccache-columns/fixtures/missing-undo.bin.gz": "eaada3c215e8c1bbdef1cf2551f9e51f4f851362d9dae997a365d8e389a964f4" + }, + "snapshot_scope": "All execution code, fixtures, native receipts and exact live source inputs. Registration input declarations and final freshness/validation metadata were completed separately; no execution code or scientific input changed." + }, + "executed_source_sha256": { + "benchmark.py": "afb6e0cd8dbfe9a9896f66743586917cae6e26ebdea8d56e8f61cc9bae0c973f", + "verify.py": "cc2a5a1eb8520569b5010285f56fdfe7050b8259c1acd62a09c9d82e55247874", + "test_package.py": "4684ded24b23204eeb631139cae79d83b9b5ce34a5656c8fa53fa0ba45eb4a6b" + }, + "log_sha256": { + "BASELINE.log": "7ce90399c294ef676369ffbbf137bebe30bd219f701407c28ce96af46e60892a", + "REGISTERED-FINAL2.log": "1122fba823d069a6b66b18adf128dc2082e3fa6e121b3c1e6a251eba3083c47d", + "BENCHMARK-FINAL.log": "e9af684323f907d92fcd7e7e8ac9aa3b45831a9e4c9b145b9b46e7bd619e1472", + "BENCHMARK-EXPORT314.log": "01a9e74f41aeeda81b65fef7c024cf966e1a98ec1f2c3a60328c6291e1a89fc0", + "TESTS-EXPORT314.log": "eecf0c14416c5f74e1c30a949d4bc339c3e0aad592ea6db02a6848ef52bff510" + }, + "compiler_cache_documentation": "https://ccache.dev/manual/4.12.3.html", + "hosted_ci": "not claimed; scoped full-native workflow supplied", + "not_claimed": [ + "Production harness integration", + "whole selected replay speedup", + "new checker or cache algorithm", + "physical supplier admission", + "new kappa" + ] +} diff --git a/research/native-ccache-columns/VERIFY.json b/research/native-ccache-columns/VERIFY.json new file mode 100644 index 0000000000..d8e8fbd71e --- /dev/null +++ b/research/native-ccache-columns/VERIFY.json @@ -0,0 +1,35 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/e8-bit-carrier-skeleton/code/bit/checkers/columns_k.cpp", + "research/e8-bit-carrier-skeleton/code/bit/checkers/json.hpp", + "research/e8-bit-carrier-skeleton/NOTICE.md" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 60, + "checks": "Authenticate exact native sources and raw fixtures; independently replay every dirty column and local prefix bill in Python, including the missing-undo rejection. Does not compile or execute native code." + }, + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/test_package.py" + ], + "timeout_seconds": 60, + "checks": "Nine package control groups for source/fixture binding, strict full-receipt comparison, cache-policy isolation and output preservation." + } + ] +} diff --git a/research/native-ccache-columns/benchmark.py b/research/native-ccache-columns/benchmark.py new file mode 100644 index 0000000000..99aceb39ab --- /dev/null +++ b/research/native-ccache-columns/benchmark.py @@ -0,0 +1,279 @@ +"""Opt-in native compilation benchmark. Every build is linked and executed afresh. + +Uses ccache's existing preprocessor mode, not a new cache algorithm. +Gareth Davidson with substantial OpenAI Codex assistance. Apache-2.0. +""" +from pathlib import Path +import argparse +import json +import os +import platform +import re +import shutil +import statistics +import subprocess +import sys +import time + +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +from verify import HUB, ROOT, canonical, fixtures, need, normalize, read, replay, sha, source_pins + + +def clean_environment(): + # Never inherit a user's relaxed cache policy, remote storage or cache directory. + env = {k: v for k, v in os.environ.items() if not k.startswith("CCACHE_")} + env.update(LC_ALL="C", LANG="C") + return env + + +def toolchain_profile(cxx, env): + """Fresh content digests, including compiler subprocesses and their libraries.""" + def query(*args): + return subprocess.check_output([str(cxx), *args], env=env, text=True).strip() + + tools = {"driver": cxx.resolve()} + for name in ("cc1plus", "as", "collect2", "ld"): + value = query("-print-prog-name=" + name) + resolved = Path(value) if Path(value).is_absolute() else Path(shutil.which(value, path=env.get("PATH")) or value) + need(resolved.is_file(), "GCC tool missing: " + name) + tools[name] = resolved.resolve() + files = set(tools.values()) + for path in tools.values(): + result = subprocess.run(["ldd", str(path)], env=env, capture_output=True, text=True, timeout=15) + need(result.returncode == 0, "supported dynamically linked Linux GCC toolchain required") + for item in re.findall(r"/[^\s()]+", result.stdout): + library = Path(item) + if library.is_file(): + files.add(library.resolve()) + return {"version": query("--version"), "target": query("-dumpmachine"), + "specs_sha256": sha(query("-dumpspecs").encode()), + "environment_sha256": sha(canonical(env).encode()), + "system": platform.system(), "machine": platform.machine(), + "tools": {key: str(value) for key, value in tools.items()}, + "content_sha256": {str(path): sha(path.read_bytes()) for path in sorted(files)}} + + +def cache_environment(work, env): + config = work / "ccache.conf" + config.write_text("compiler_check = content\ndirect_mode = false\ndepend_mode = false\n" + "sloppiness =\nremote_storage =\nhard_link = false\n" + "hash_dir = true\nstats = true\nmax_size = 200M\n") + return dict(env, CCACHE_CONFIGPATH=str(config), CCACHE_DIR=str(work / "cache"), + CCACHE_EXTRAFILES=str(work / "toolchain.json")) + + +def stats(ccache, env): + raw = subprocess.check_output([str(ccache), "--print-stats"], env=env, text=True) + return {row.split()[0]: int(row.split()[1]) for row in raw.splitlines()} + + +def delta(before, after): + return {key: after.get(key, 0) - before.get(key, 0) for key in set(before) | set(after) + if after.get(key, 0) != before.get(key, 0)} + + +def run_benchmark(args): + work = args.work.resolve() + need(not work.exists() and not work.is_relative_to(ROOT), "fresh external work directory required") + need(sys.byteorder == "little", "native RAW6 fixture requires little-endian host") + need(args.repeats >= 2, "at least two paired timing samples required") + independent = replay() + work.mkdir(parents=True) + raw = fixtures() + expected = read(HERE / "NATIVE.json") + source = work / "source" + source.mkdir() + for name in ("columns_k.cpp", "json.hpp"): + shutil.copyfile(ROOT / HUB / "code/bit/checkers" / name, source / name) + # A two-level include gives a real transitive-header invalidation control. + (source / "fixture_config.hpp").write_text('#include "copy_count.hpp"\n') + (source / "copy_count.hpp").write_text("#define NCOPY 9\n") + for label, data in raw.items(): + (work / (label + ".bin")).write_bytes(data) + cxx, ccache = args.cxx.resolve(), args.ccache.resolve() + need(cxx.is_file() and ccache.is_file(), "compiler and ccache executables required") + env = clean_environment() + cenv = cache_environment(work, env) + version = subprocess.check_output([str(ccache), "--version"], env=env, text=True).splitlines()[0] + flags = ["-O2", "-std=c++17", "-DHDIM=8", "-DVPORTS=111", "-DRHELP=439", + "-I" + str(args.boost_include.resolve()), "-include", str(source / "fixture_config.hpp")] + builds, executions, profiles = [], [], {} + + def execute(command, folder, name, *, command_env=env): + t = time.perf_counter() + result = subprocess.run([str(x) for x in command], cwd=source, env=command_env, + capture_output=True, timeout=120) + seconds = time.perf_counter() - t + (folder / (name + ".stdout")).write_bytes(result.stdout) + (folder / (name + ".stderr")).write_bytes(result.stderr) + return result, seconds + + def build(name, cached, *, pairs=4, profile_salt=None): + t = time.perf_counter() + # Input hashing and profile collection remain inside every measured build. + source_pins() + fixtures() + profile = toolchain_profile(cxx, env) + if profile_salt is not None: + profile["invalidation_control"] = profile_salt + profile_raw = (canonical(profile) + "\n").encode() + (work / "toolchain.json").write_bytes(profile_raw) + key = sha(profile_raw) + profiles[key] = profile + before = stats(ccache, cenv) + folder = work / name + folder.mkdir() + object_file, binary = folder / "columns.o", folder / "columns" + compile_cmd = ([str(ccache)] if cached else []) + [str(cxx), *flags, + "-DKPAIRS=" + str(pairs), "-c", str(source / "columns_k.cpp"), "-o", str(object_file)] + r, compile_seconds = execute(compile_cmd, folder, "compile", command_env=cenv if cached else env) + need(r.returncode == 0, "compile failed: " + name) + # The linker always executes; no executable or proof receipt is cached here. + link_cmd = [str(cxx), str(object_file), "-o", str(binary)] + r, link_seconds = execute(link_cmd, folder, "link") + need(r.returncode == 0, "link failed: " + name) + changes = delta(before, stats(ccache, cenv)) + build_seconds = time.perf_counter() - t + record = {"name": name, "cached": cached, "pairs": pairs, "profile_sha256": key, + "build_seconds": build_seconds, "compile_seconds": compile_seconds, + "link_seconds": link_seconds, "stats_delta": changes, + "object_sha256": sha(object_file.read_bytes()), "binary_sha256": sha(binary.read_bytes()), + "source_sha256": sha((source / "columns_k.cpp").read_bytes()), + "commands": [compile_cmd, link_cmd]} + builds.append(record) + print("build", name, round(build_seconds, 4), changes, flush=True) + return binary, record + + def hit(record): + need(record["stats_delta"].get("preprocessed_cache_hit") == 1 and + record["stats_delta"].get("cache_miss", 0) == 0 and + record["stats_delta"].get("direct_cache_hit", 0) == 0, "expected preprocessor cache hit") + + def miss(record): + need(record["stats_delta"].get("cache_miss") == 1 and + record["stats_delta"].get("preprocessed_cache_hit", 0) == 0, "expected cache invalidation") + + def native(binary, name, label, *, error=None, pairs=4): + folder = binary.parent + data = work / (label + ".bin") + receipt_path = folder / (name + ".json") + command = [binary, data, receipt_path] + r, seconds = execute(command, folder, name) + record = {"build": folder.name, "name": name, "label": label, "seconds": seconds, + "exit_code": r.returncode, "input_sha256": sha(data.read_bytes()), + "stdout_sha256": sha(r.stdout), "stderr_sha256": sha(r.stderr), + "command": list(map(str, command))} + if error is None: + need(r.returncode == 0 and receipt_path.is_file(), "native execution failed: " + name) + receipt = normalize(read(receipt_path), data, data.read_bytes()) + need(canonical(json.loads(r.stdout, object_pairs_hook=None)) == canonical(read(receipt_path)), + "native stdout and receipt differ") + stages = 2 * pairs + 1 + lines = r.stderr.decode().splitlines() + need(len(lines) == stages and all(re.fullmatch(r"stage " + str(i) + r" PASS elapsed [0-9.e+-]+s", line) + for i, line in enumerate(lines)), "native stage execution log") + if pairs == 4: + need(canonical(receipt) == canonical(expected[label]), "complete native receipt differs") + else: + need(receipt["formal_columns_checked"] == 2 * pairs * 111 + 439 and + len(receipt["stages"]) == stages and len(receipt["negative_controls"]) == 6 * (pairs - 1), + "changed flag coverage") + record["receipt_sha256"] = sha(canonical(receipt).encode()) + else: + need(r.returncode == 2 and not receipt_path.exists() and error in r.stderr.decode(), + "invalid mathematical rejection control: " + name) + record["expected_failure"] = error + executions.append(record) + return seconds + + def both(binary): + return sum(native(binary, label, label) for label in ("baseline", "deferred")) + + timings = {"uncached": [], "warm": []} + fill_start = time.perf_counter() + binary, fill = build("fill", True) + miss(fill) + fill["native_seconds"] = both(binary) + fill["total_replay_seconds"] = time.perf_counter() - fill_start + result_files = list((work / "cache").rglob("*R")) + need(len(result_files) == 1, "one cache result after initial fill") + base_result = result_files[0] + # Interleave timing modes to avoid attributing a one-way warmup trend to caching. + for i in range(args.repeats): + for mode in (("uncached", "warm") if i % 2 == 0 else ("warm", "uncached")): + start = time.perf_counter() + binary, record = build(mode + "-" + str(i), mode == "warm") + if mode == "warm": + hit(record) + need(record["object_sha256"] == fill["object_sha256"], "reference/cached object differs") + record["native_seconds"] = both(binary) + record["total_replay_seconds"] = time.perf_counter() - start + timings[mode].append(record["total_replay_seconds"]) + + # Every invalidation uses the actual C++ compiler, cache and executable. + header = source / "copy_count.hpp" + old, stat = header.read_bytes(), header.stat() + header.write_bytes(old.replace(b"NCOPY 9", b"NCOPY 8")) + os.utime(header, ns=(stat.st_atime_ns, stat.st_mtime_ns)) + binary, record = build("changed-transitive-header", True) + miss(record) + native(binary, "wrong-copy-count", "deferred", error="center boundaries") + header.write_bytes(old) + os.utime(header, ns=(stat.st_atime_ns, stat.st_mtime_ns)) + cpp = source / "columns_k.cpp" + old, stat = cpp.read_bytes(), cpp.stat() + need(old.count(b"if(q.c&1)xo") == 1, "source mutation site") + cpp.write_bytes(old.replace(b"if(q.c&1)xo", b"if(q.c&0)xo")) + os.utime(cpp, ns=(stat.st_atime_ns, stat.st_mtime_ns)) + binary, record = build("changed-source", True) + miss(record) + native(binary, "wrong-parity", "deferred", error="local defining-decoder full formal column") + cpp.write_bytes(old) + os.utime(cpp, ns=(stat.st_atime_ns, stat.st_mtime_ns)) + binary, record = build("changed-flags", True, pairs=5) + miss(record) + native(binary, "eleven-stages", "deferred", pairs=5) + binary, record = build("changed-profile", True, profile_salt="simulated-toolchain-content-change") + miss(record) + both(binary) + binary, record = build("restored-inputs", True) + hit(record) + both(binary) + native(binary, "missing-undo", "missing-undo", error="local defining-decoder full formal column") + # Corrupt only this experiment's private cached compiler result. + broken = bytearray(base_result.read_bytes()) + broken[len(broken) // 2] ^= 1 + base_result.write_bytes(broken) + binary, record = build("damaged-cache", True) + miss(record) + both(binary) + medians = {key: statistics.median(value) for key, value in timings.items()} + result = {"status": "PASS_NATIVE_CCACHE_COLUMNS", "native_executed": True, + "ccache_version": version, "ccache_sha256": sha(ccache.read_bytes()), + "python": sys.version, "profiles": profiles, + "input_replay": independent, "builds": builds, "executions": executions, + "timings_seconds": timings, "median_seconds": medians, + "warm_speedup": medians["uncached"] / medians["warm"], + "fill_seconds": fill["total_replay_seconds"], + "controls": ["same-size same-mtime transitive header", "same-size same-mtime source", + "changed compile flag", "changed toolchain profile", "restored-input cache hit", + "invalid word after cache hit", "corrupt private cache result"], + "scope": "One native column checker and two pinned words; fresh link and execution every time. No full selected replay or new mathematical result."} + (work / "BENCHMARK.json").write_text(json.dumps(result, indent=2, sort_keys=True) + "\n") + print(result["status"], "warm_speedup=" + str(result["warm_speedup"]), flush=True) + return result + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--work", type=Path, required=True) + parser.add_argument("--cxx", type=Path, required=True) + parser.add_argument("--ccache", type=Path, required=True) + parser.add_argument("--boost-include", type=Path, default=Path("/usr/include")) + parser.add_argument("--repeats", type=int, default=3) + run_benchmark(parser.parse_args()) + + +if __name__ == "__main__": + main() diff --git a/research/native-ccache-columns/fixtures/baseline.bin.gz b/research/native-ccache-columns/fixtures/baseline.bin.gz new file mode 100644 index 0000000000..db249d0bf8 Binary files /dev/null and b/research/native-ccache-columns/fixtures/baseline.bin.gz differ diff --git a/research/native-ccache-columns/fixtures/deferred.bin.gz b/research/native-ccache-columns/fixtures/deferred.bin.gz new file mode 100644 index 0000000000..e210af1efd Binary files /dev/null and b/research/native-ccache-columns/fixtures/deferred.bin.gz differ diff --git a/research/native-ccache-columns/fixtures/missing-undo.bin.gz b/research/native-ccache-columns/fixtures/missing-undo.bin.gz new file mode 100644 index 0000000000..af66ad1eeb Binary files /dev/null and b/research/native-ccache-columns/fixtures/missing-undo.bin.gz differ diff --git a/research/native-ccache-columns/test_package.py b/research/native-ccache-columns/test_package.py new file mode 100644 index 0000000000..450b85ed96 --- /dev/null +++ b/research/native-ccache-columns/test_package.py @@ -0,0 +1,149 @@ +"""Actual-input and receipt failure controls; no native execution is implied. + +Gareth Davidson with substantial OpenAI Codex assistance. Apache-2.0. +""" +from pathlib import Path +import copy +import json +import os +import shutil +import subprocess +import sys +import tempfile +import unittest +from unittest.mock import patch + +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +import verify as v +import benchmark as b + + +def clone(temporary): + root = Path(temporary) / "repo" + package = root / "research" / HERE.name + shutil.copytree(HERE, package, copy_function=shutil.copyfile) + for row in v.source_pins(): + dst = root / row["path"] + dst.parent.mkdir(parents=True, exist_ok=True) + shutil.copyfile(v.ROOT / row["path"], dst) + for item in root.rglob("*"): + if item.is_dir(): + item.chmod(0o755) + return root, package + + +class Controls(unittest.TestCase): + def test_source_drift(self): + with tempfile.TemporaryDirectory() as temporary: + root, package = clone(temporary) + for row in v.source_pins(root, package): + with self.subTest(source=row["path"]): + p = root / row["path"] + old = p.read_bytes() + p.write_bytes(old + b"\n") + with self.assertRaisesRegex(ValueError, "source hash"): + v.source_pins(root, package) + p.write_bytes(old) + + def test_fixture_bytes_and_payload_binding(self): + with tempfile.TemporaryDirectory() as temporary: + _, package = clone(temporary) + meta = v.read(package / "FIXTURES.json") + for label, row in meta["inputs"].items(): + with self.subTest(fixture=label): + p = package / row["path"] + old = p.read_bytes() + p.write_bytes(old + b"changed") + with self.assertRaisesRegex(ValueError, "immutable fixture container"): + v.fixtures(package) + p.write_bytes(old) + meta["inputs"]["baseline"]["payload_sha256"] = "0" * 64 + (package / "FIXTURES.json").write_text(json.dumps(meta)) + with self.assertRaisesRegex(ValueError, "fixture payload"): + v.fixtures(package) + + def test_missing_undo_is_a_mathematical_failure(self): + with self.assertRaisesRegex(ValueError, "local defining full column"): + v.independent(v.fixtures()["missing-undo"]) + + def test_location_must_bind_before_normalization(self): + raw = v.fixtures()["baseline"] + expected = v.read(HERE / "NATIVE.json")["baseline"] + receipt = dict(expected, local_scalar_stream="/expected/input.bin", seconds=0.1) + self.assertEqual(v.normalize(receipt, Path("/expected/input.bin"), raw), expected) + with self.assertRaisesRegex(ValueError, "native input path binding"): + v.normalize(receipt, Path("/different/input.bin"), raw) + wrong = raw[:-1] + bytes([raw[-1] ^ 1]) + self.assertNotEqual(v.canonical(v.normalize(receipt, Path("/expected/input.bin"), wrong)), + v.canonical(expected)) + + def test_only_elapsed_and_bound_location_normalize(self): + raw = v.fixtures()["baseline"] + expected = v.read(HERE / "NATIVE.json")["baseline"] + receipt = dict(expected, local_scalar_stream="/input.bin", seconds=1.0) + bad = [] + r = copy.deepcopy(receipt); r["stages"][1]["signed_inverse"] = 1; bad.append(r) + r = copy.deepcopy(receipt); r["negative_controls"].pop(); bad.append(r) + r = copy.deepcopy(receipt); r["local_raw_H"][0][1] += 1; bad.append(r) + r = copy.deepcopy(receipt); r["payload_prefix_upper"] = "1"; bad.append(r) + r = copy.deepcopy(receipt); del r["scope"]; bad.append(r) + r = copy.deepcopy(receipt); r["bridge_additions"] -= 1; bad.append(r) + for r in bad: + self.assertNotEqual(v.canonical(v.normalize(r, Path("/input.bin"), raw)), v.canonical(expected)) + for elapsed in (None, True, float("nan"), -1): + with self.subTest(elapsed=elapsed), self.assertRaisesRegex(ValueError, "native elapsed field"): + v.normalize(dict(receipt, seconds=elapsed), Path("/input.bin"), raw) + + def test_strict_json(self): + with tempfile.TemporaryDirectory() as temporary: + p = Path(temporary) / "bad.json" + for text in ('{"x":1,"x":2}', '{"x":NaN}', '{"x":Infinity}'): + p.write_text(text) + with self.assertRaises(ValueError): + v.read(p) + + def test_inherited_cache_policy_is_removed(self): + with patch.dict(os.environ, {"CCACHE_SLOPPINESS": "time_macros,system_headers", + "CCACHE_COMPILERCHECK": "none", "CCACHE_REMOTE_STORAGE": "unused", + "CCACHE_DIR": "/outside", "CCACHE_DISABLE": "1"}): + env = b.clean_environment() + self.assertFalse(any(key.startswith("CCACHE_") for key in env)) + self.assertEqual(env["LC_ALL"], "C") + with tempfile.TemporaryDirectory() as temporary: + work = Path(temporary) + cenv = b.cache_environment(work, env) + self.assertEqual(cenv["CCACHE_DIR"], str(work / "cache")) + self.assertEqual(cenv["CCACHE_CONFIGPATH"], str(work / "ccache.conf")) + config = (work / "ccache.conf").read_text() + self.assertIn("compiler_check = content\n", config) + self.assertIn("direct_mode = false\n", config) + self.assertIn("sloppiness =\n", config) + self.assertIn("remote_storage =\n", config) + + def test_corrupted_receipt_actual_entry_point(self): + with tempfile.TemporaryDirectory() as temporary: + _, package = clone(temporary) + p = package / "NATIVE.json" + data = v.read(p) + data["deferred"]["local_scalar_additions"] -= 1 + p.write_text(json.dumps(data)) + r = subprocess.run([sys.executable, "-I", "-O", "-B", str(package / "verify.py")], + cwd=temporary, capture_output=True, text=True, timeout=30) + self.assertNotEqual(r.returncode, 0) + self.assertIn("independent native field: local_scalar_additions", r.stderr) + + def test_existing_work_is_preserved(self): + with tempfile.TemporaryDirectory() as temporary: + p = Path(temporary) / "keep" + p.write_bytes(b"preserve evidence\n") + r = subprocess.run([sys.executable, "-I", "-O", "-B", str(HERE / "benchmark.py"), + "--work", temporary, "--cxx", "/missing", "--ccache", "/missing"], + capture_output=True, text=True, timeout=30) + self.assertNotEqual(r.returncode, 0) + self.assertIn("fresh external work directory required", r.stderr) + self.assertEqual(p.read_bytes(), b"preserve evidence\n") + + +if __name__ == "__main__": + unittest.main(verbosity=2) diff --git a/research/native-ccache-columns/verify.py b/research/native-ccache-columns/verify.py new file mode 100644 index 0000000000..4189816694 --- /dev/null +++ b/research/native-ccache-columns/verify.py @@ -0,0 +1,194 @@ +"""Exact inputs and independent nine-stage replay. This does not compile C++. + +Gareth Davidson with substantial OpenAI Codex assistance. Apache-2.0. +""" +from pathlib import Path +from collections import Counter +import gzip +import hashlib +import json +import math +import struct + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +HUB = Path("research/e8-bit-carrier-skeleton") + + +def need(value, message): + if not value: + raise ValueError(message) + + +def pairs(items): + out = {} + for key, value in items: + need(key not in out, "duplicate JSON key") + out[key] = value + return out + + +def reject(value): + raise ValueError("nonfinite JSON: " + value) + + +def read(path): + return json.loads(Path(path).read_bytes(), object_pairs_hook=pairs, parse_constant=reject) + + +def canonical(value): + return json.dumps(value, sort_keys=True, separators=(",", ":"), allow_nan=False) + + +def sha(raw): + return hashlib.sha256(raw).hexdigest() + + +def source_pins(root=ROOT, package=HERE): + rows = [x for x in read(package / "SOURCES.json")["files"] if x["usage"] == "input"] + need({x["path"] for x in rows} == {str(HUB / x) for x in + ("code/bit/checkers/columns_k.cpp", "code/bit/checkers/json.hpp", "NOTICE.md")}, + "exact native source inventory") + for row in rows: + need(sha((root / row["path"]).read_bytes()) == row["sha256"], "source hash: " + row["path"]) + return rows + + +def fixtures(package=HERE): + meta = read(package / "FIXTURES.json") + need(meta["head"] == "b52f87f5355ad9f02ca4ac4395117655ac1b19c7", "fixture predecessor") + need(set(meta["inputs"]) == {"baseline", "deferred", "missing-undo"}, "fixture inventory") + out = {} + for label, item in meta["inputs"].items(): + path = Path(item["path"]) + need(path.parts == ("fixtures", label + ".bin.gz"), "fixture path") + container = (package / path).read_bytes() + need(sha(container) == item["container_sha256"], "immutable fixture container") + raw = gzip.decompress(container) + need(sha(raw) == item["payload_sha256"] and len(raw) == 24 * item["records"], "fixture payload") + out[label] = raw + return out + + +def normalize(receipt, raw_path, raw): + """Bind the sole location field before replacing it by the consumed byte hash.""" + out = dict(receipt) + need(out.get("local_scalar_stream") == str(raw_path), "native input path binding") + elapsed = out.pop("seconds", None) + need(type(elapsed) in (int, float) and math.isfinite(elapsed) and elapsed >= 0, "native elapsed field") + out["local_scalar_stream"] = "sha256:" + sha(raw) + return out + + +def independent(raw): + """All dirty columns as Python integer bitsets; literal fixed nine-stage schedule.""" + records = list(struct.iter_unpack("<6i", raw)) + operations = [q for q in records if q[0] != 0] + need(all(q[0] in (0, 1, 2, 3) for q in records), "raw opcode") + hist = Counter(q[4] for q in records if q[0] == 0 and q[4]) + hist.update(q[5] for q in operations if q[0] == 2) + local, v, dirt, total = 661, 111, 439, 1327 + adds = sum(q[0] == 1 for q in operations) + odd = sum(q[0] == 1 and q[3] % 2 for q in operations) + copies = sum(q[0] == 2 for q in operations) + need(copies == sum(q[0] == 3 for q in operations) == 9, "local copy count") + maxima = [] + for reverse in (False, True): + norms = [1] * (local + 1) + maximum, opened = 1, False + for op, a, b, c, _, _ in (reversed(operations) if reverse else operations): + if reverse and op in (2, 3): + op = 5 - op + if op == 1: + norms[a] += abs(c) * norms[b] + maximum = max(maximum, norms[a]) + elif op == 2: + need(not opened, "fresh prefix copy") + norms[local], opened = norms[a], True + else: + need(opened, "prefix erase") + norms[local], opened = 0, False + need(not opened, "prefix copy closed") + maxima.append(maximum) + # Independently spell the fixed 9-stage schedule, rather than generate it in C++. + active = [(0, 1), (1, 0), (0, 1), (3, 2), (2, 3), (5, 4), (4, 5), (7, 6), (6, 7)] + bridges = {1: [(0, 2), (3, 1)], 2: [(3, 1), (0, 2)], + 3: [(2, 4), (5, 3)], 4: [(5, 3), (2, 4)], + 5: [(4, 6), (7, 5)], 6: [(7, 5), (4, 6)], + 8: [(5, 7), (6, 4), (3, 5), (4, 2), (1, 3), (2, 0)]} + state = [1 << i for i in range(total)] + [0] + for stage, (left, right) in enumerate(active): + reverse = stage % 2 == 1 + opened = False + + def loc(i): + need(0 <= i <= local, "raw local index") + if i < v: + return left * v + i + if i < 2 * v: + return right * v + i - v + return 8 * v + i - 2 * v + + for op, a, b, c, _, _ in (reversed(operations) if reverse else operations): + if reverse and op in (2, 3): + op = 5 - op + if op == 1: + if c % 2: + state[loc(a)] ^= state[loc(b)] + elif op == 2: + need(not opened, "fresh physical copy") + state[total], opened = state[loc(a)], True + else: + need(opened, "physical erase") + state[total], opened = 0, False + need(not opened, "stage copy closed") + if stage == 0: + need(state[:total] == [(1 << i) ^ ((1 << (i - v)) if v <= i < 2 * v else 0) + for i in range(total)], "local defining full column") + for dst, src in bridges.get(stage, []): + for j in range(v): + state[dst * v + j] ^= state[src * v + j] + for bank in range(0, 8, 2): + for j in range(v): + a, b = bank * v + j, (bank + 1) * v + j + state[a], state[b] = state[b], state[a] + need(state == [1 << i for i in range(total)] + [0], "nine-stage full-column endpoint") + bound = 64 * maxima[0]**3 * maxima[1]**2 + need(bound < 2**104, "local prefix bound") + return {"formal_columns_checked": total, "independent_dirty_registers": dirt, + "local_scalar_additions": adds, "local_odd_scalar_additions": odd, + "stage_additions": 9 * adds, "bridge_additions": 18 * v, + "fresh_center_copies": 81, "reverse_fresh_center_copies": 36, + "local_raw_H": [[k, hist[k]] for k in sorted(hist)], + "payload_prefix_upper": str(bound), "payload_prefix_bits": bound.bit_length(), + "signed_lift_prefix": [{"reverse": bool(i), "cancellation_free_signed_row_l1_upper": str(m), + "bits": m.bit_length()} for i, m in enumerate(maxima)]} + + +def replay(root=ROOT, package=HERE): + source_pins(root, package) + raw = fixtures(package) + expected = read(package / "NATIVE.json") + need(set(expected) == {"baseline", "deferred"}, "native receipt inventory") + for label in ("baseline", "deferred"): + actual = independent(raw[label]) + need(expected[label]["local_scalar_stream"] == "sha256:" + sha(raw[label]), "record binding") + for key, value in actual.items(): + need(canonical(expected[label][key]) == canonical(value), "independent native field: " + key) + need(len(expected[label]["stages"]) == 9, "native nine-stage receipt") + controls = expected[label]["negative_controls"] + need(canonical(controls) == canonical([{"omit_bridge": i, "rejected": True} for i in range(18)]), + "bridge control inventory") + try: + independent(raw["missing-undo"]) + except ValueError as error: + need(str(error) == "local defining full column", "wrong negative-control failure") + else: + raise ValueError("missing undo accepted") + return {"status": "PASS_NATIVE_CACHE_INPUTS_AND_PYTHON_COLUMNS_ONLY", "native_executed": False, + "words": 2, "formal_columns_per_word": 1327, "stages_per_word": 9, + "payload_sha256": {key: sha(value) for key, value in raw.items()}} + + +if __name__ == "__main__": + print(json.dumps(replay(), sort_keys=True))