-
Notifications
You must be signed in to change notification settings - Fork 0
Proof: вынести общую BUILD-границу #508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
f6c7dbf
Proof: вынести общую BUILD-границу
lemone112 2e415d3
Proof: изолировать CID cleanup и lifecycle
lemone112 f34fa37
Proof: укрепить transport boundary и receipt trust
lemone112 6600223
Proof: preserve stream ownership during cleanup
lemone112 1b3ffbf
Test: always reap hostile observer fixture
lemone112 08e0243
Test: register observer cleanup before fixture setup
lemone112 c010af9
Build: типизировать невалидный public input
lemone112 9e10df2
Proof: сохранить Arb binding и total probe
lemone112 f465413
Proof: totalize native cleanup failure
lemone112 ba538b0
Test: уточнить fixed-arity boundary
lemone112 f645d75
Proof: totalize native build observations
lemone112 284ee16
Proof: retain native cleanup evidence
lemone112 33dfded
Proof: зафиксировать BUILD binding на capability
lemone112 f23c627
Proof: seal V2 build identity review fixes
lemone112 78a174e
Merge remote-tracking branch 'origin/agent/mpfi-source' into agent/bu…
lemone112 13e4fbf
Docs: уточнить CID-root boundary
lemone112 8327636
Test: закрепить безопасный native fallback
lemone112 f77acc9
Proof: make Arb build environment entrypoint structural
lemone112 29c7b5c
Proof: bind split build recipes to the right coordinates
lemone112 1268d4d
Proof: independently replay every comparator coordinate
lemone112 8998ada
Proof: expose the comparator replay boundary
lemone112 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,156 @@ | ||
| #!/bin/sh | ||
| # Internal Arb recipe. The source-bound transport dispatches this file only | ||
| # after establishing its clean child environment; it is not a standalone API. | ||
| set -eu | ||
|
|
||
| if [ "$#" -ne 0 ]; then | ||
| printf '%s\n' 'arb build takes no arguments' >&2 | ||
| exit 64 | ||
| fi | ||
|
|
||
| umask 022 | ||
|
|
||
| readonly inputs=/build/snapshot/inputs | ||
| readonly workspace=/build/snapshot/workspace | ||
| readonly build=/build/work | ||
|
|
||
| require_regular() { | ||
| if [ ! -f "$1" ] || [ -L "$1" ]; then | ||
| printf 'missing regular build input: %s\n' "$1" >&2 | ||
| exit 66 | ||
| fi | ||
| } | ||
|
|
||
| require_directory() { | ||
| if [ ! -d "$1" ] || [ -L "$1" ]; then | ||
| printf 'missing normalized source directory: %s\n' "$1" >&2 | ||
| exit 66 | ||
| fi | ||
| } | ||
|
|
||
| require_empty_directory() { | ||
| if [ ! -d "$1" ] || [ -L "$1" ]; then | ||
| printf 'missing build directory: %s\n' "$1" >&2 | ||
| exit 66 | ||
| fi | ||
| if [ -n "$(find "$1" -mindepth 1 -maxdepth 1 -print -quit)" ]; then | ||
| printf 'build directory is not empty: %s\n' "$1" >&2 | ||
| exit 65 | ||
| fi | ||
| } | ||
|
|
||
| require_directory "$inputs/gmp-6.3.0" | ||
| require_directory "$inputs/mpfr-4.2.2" | ||
| require_directory "$inputs/flint-3.6.0" | ||
| require_regular "$inputs/formula.generated.c" | ||
| printf '%s %s\n' \ | ||
| '9958f20c8ca598625db0593a45f8f8bc79e4b2f22b53263b6c32d78a5e1d2693' \ | ||
| "$inputs/formula.generated.c" \ | ||
| | /usr/bin/sha256sum --check --strict - | ||
| for source in main.c wire.c hash.c interval.c region.c; do | ||
| require_regular "$workspace/proof/region/v1/arb/evaluator/$source" | ||
| done | ||
| require_regular "$workspace/proof/region/v1/arb/evaluator/formula.h" | ||
| for header in wire.h hash.h interval.h region.h; do | ||
| require_regular "$workspace/proof/region/v1/arb/evaluator/$header" | ||
| done | ||
| require_empty_directory "$build" | ||
|
|
||
| /usr/bin/mkdir "$build/prefix" "$build/gmp" "$build/mpfr" "$build/flint" "$build/tmp" | ||
|
|
||
| # GCC 15 changed its implicit dialect to GNU C23, where GMP 6.3.0's locked | ||
| # no-prototype configure probes have different semantics. GNU C17 is the last | ||
| # default those probes targeted; changing it requires a source/toolchain slice | ||
| # and a fresh live build, not reliance on a compiler's moving default. | ||
| readonly common_cflags='-O2 -g0 -fno-ident -fno-fast-math -ffp-contract=off -fno-lto -std=gnu17 -march=x86-64 -mtune=generic -ffile-prefix-map=/build=. -fdebug-prefix-map=/build=.' | ||
| readonly common_ldflags='-Wl,--build-id=none -fno-lto' | ||
| readonly prefix="$build/prefix" | ||
|
|
||
| cd "$build/gmp" | ||
| ABI=64 CC=/usr/local/bin/gcc CFLAGS="$common_cflags" LDFLAGS="$common_ldflags" \ | ||
| "$inputs/gmp-6.3.0/configure" \ | ||
| --build=x86_64-pc-linux-gnu \ | ||
| --host=x86_64-pc-linux-gnu \ | ||
| --prefix="$prefix" \ | ||
| --disable-shared \ | ||
| --enable-static \ | ||
| --disable-assembly \ | ||
| --disable-cxx | ||
| /usr/bin/make -j1 | ||
| /usr/bin/make check -j1 | ||
| /usr/bin/make install | ||
|
|
||
| cd "$build/mpfr" | ||
| CC=/usr/local/bin/gcc CFLAGS="$common_cflags" LDFLAGS="$common_ldflags" \ | ||
| "$inputs/mpfr-4.2.2/configure" \ | ||
| --build=x86_64-pc-linux-gnu \ | ||
| --host=x86_64-pc-linux-gnu \ | ||
| --prefix="$prefix" \ | ||
| --with-gmp="$prefix" \ | ||
| --disable-shared \ | ||
| --enable-static \ | ||
| --enable-formally-proven-code | ||
| /usr/bin/make -j1 | ||
| /usr/bin/make check -j1 | ||
| /usr/bin/make install | ||
|
|
||
| cd "$build/flint" | ||
| CC=/usr/local/bin/gcc CFLAGS="$common_cflags" LDFLAGS="$common_ldflags" \ | ||
| "$inputs/flint-3.6.0/configure" \ | ||
| --build=x86_64-pc-linux-gnu \ | ||
| --host=x86_64-pc-linux-gnu \ | ||
| --prefix="$prefix" \ | ||
| --with-gmp="$prefix" \ | ||
| --with-mpfr="$prefix" \ | ||
| --disable-shared \ | ||
| --enable-static \ | ||
| --disable-assembly \ | ||
| --disable-lto \ | ||
| --enable-assert | ||
| /usr/bin/make -j1 | ||
| /usr/bin/make check -j1 | ||
| /usr/bin/make install | ||
|
|
||
| cd "$workspace/proof/region/v1/arb/evaluator" | ||
| /usr/local/bin/gcc \ | ||
| -O2 -g0 -fno-ident -fno-fast-math -ffp-contract=off -fno-lto \ | ||
| -march=x86-64 -mtune=generic \ | ||
| -ffile-prefix-map=/build=. -fdebug-prefix-map=/build=. \ | ||
| -std=c17 -Wall -Wextra -Werror -pedantic \ | ||
| -I. -I"$prefix/include" \ | ||
| main.c wire.c hash.c interval.c region.c "$inputs/formula.generated.c" \ | ||
| -static -Wl,--build-id=none -fno-lto \ | ||
| "$prefix/lib/libflint.a" "$prefix/lib/libmpfr.a" "$prefix/lib/libgmp.a" \ | ||
| -lm -lpthread \ | ||
| -o "$build/arb-evaluator-v1" | ||
|
|
||
| if ! /usr/bin/readelf -l "$build/arb-evaluator-v1" > "$build/program-headers"; then | ||
| printf '%s\n' 'cannot inspect evaluator program headers' >&2 | ||
| exit 70 | ||
| fi | ||
| if /usr/bin/grep -q INTERP "$build/program-headers"; then | ||
| printf '%s\n' 'evaluator unexpectedly contains PT_INTERP' >&2 | ||
| exit 70 | ||
| else | ||
| grep_status=$? | ||
| if [ "$grep_status" -ne 1 ]; then | ||
| printf '%s\n' 'cannot search evaluator program headers' >&2 | ||
| exit 70 | ||
| fi | ||
| fi | ||
| if ! /usr/bin/readelf -d "$build/arb-evaluator-v1" > "$build/dynamic-section"; then | ||
| printf '%s\n' 'cannot inspect evaluator dynamic section' >&2 | ||
| exit 70 | ||
| fi | ||
| if /usr/bin/grep -q NEEDED "$build/dynamic-section"; then | ||
| printf '%s\n' 'evaluator unexpectedly contains DT_NEEDED' >&2 | ||
| exit 70 | ||
| else | ||
| grep_status=$? | ||
| if [ "$grep_status" -ne 1 ]; then | ||
| printf '%s\n' 'cannot search evaluator dynamic section' >&2 | ||
| exit 70 | ||
| fi | ||
| fi | ||
|
|
||
| /usr/bin/sha256sum "$build/arb-evaluator-v1" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Раздел точно описывает код
build/input.pyиbuild/transport.py: caller-owned limits, четыре разделённые identity, one-shot lease, две попытки и сохранение causal prefix.Одно уточнение по пункту про causal prefix. В
ControlledBuildTransportV1._build_onceотказ при невалидной сессии или при сбоеtempfile.TemporaryDirectoryвозвращаетBuildRejectedV1(attempt, CONTRACT_VIOLATION)безsessionи безcompleted_processes. Формулировка «при отказе сохраняется весь уже завершённый causal prefix» здесь не выполняется. Добавьте оговорку про context-free contract violation, чтобы документ не заявлял больше, чем даёт код.🤖 Prompt for AI Agents