Repository navigation
docs: independent reproduction and cold-start fixes - #8
Merged
Merged
Conversation
Apple Silicon docker compose was installing x86_64 Zig into an arm64 Ubuntu image and failing at link with invalid ELF machine type AARCH64.
Empty-array set -u, BSD sed -i, sha256sum/shasum, and missing objcopy all broke the host cold-start path on Darwin.
The claims script re-rendered the scorecard region first, so a planted wrong fraction still exited 0. Check-only; verify renders explicitly.
Record cold-start friction, host-dependent nest cliffs, licence review, and which CI gates were watched failing on a second machine.
There was a problem hiding this comment.
Pull request overview
This PR improves the project’s “cold start” and independent reproducibility story across macOS (Apple Silicon) and Docker by hardening verification scripts, fixing multi-arch Zig selection in the Docker judge path, and adding structured reproduction/evidence documentation.
Changes:
- Make Docker judge builds work on arm64 by selecting the Zig Linux tarball via
TARGETARCH, with pinned SHA-256 per arch. - Improve host script portability (macOS bash 3.2, BSD
sed -i, missingsha256sum/objcopy) and make README claim checking non-mutating. - Add reproduction tables, gate-failure proofs, and process metadata (PR template + decisions log).
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/verify.sh | Improves portability (sed -i), skips enumeration when objcopy is missing, and separates README render/check steps. |
| scripts/verify-original-hashes.sh | Adds shasum -a 256 fallback for hosts without sha256sum. |
| scripts/run-original-suite.sh | Adjusts flag handling to avoid macOS bash 3.2 set -u empty-array issues. |
| scripts/run-enumerate.sh | Removes mapfile, adds objcopy detection and GNU/BSD nm compatibility handling. |
| scripts/check-readme-claims.sh | Stops rewriting README prior to checking numeric claims. |
| README.md | Updates build prerequisites and clarifies Docker-first verification path. |
| docs/REPRODUCTION.md | New independent reproduction report and measured claim table. |
| docs/journal.md | Adds a dated journal entry documenting the second-machine reproduction work. |
| docs/evidence/upstream-diff.txt | New evidence artifact recording upstream fetch/diff results. |
| docs/evidence/gate-failure-proofs.md | New evidence artifact proving key gates fail under intentional mutations. |
| Dockerfile | Fixes Apple Silicon Docker builds by selecting Zig tarball by TARGETARCH with pinned hashes. |
| DECISIONS.md | Records decisions D030–D032 for multi-arch Docker, README gate behavior, and host portability. |
| .port-mortem.toml | Records additional official Zig SHA-256 values (aarch64 linux/macos) alongside the existing pin. |
| .gitignore | Ignores host layout probe binaries. |
| .github/PULL_REQUEST_TEMPLATE.md | Adds a template requiring the four assertion counts and related evidence/gate checklist. |
Suppressed comments (2)
scripts/run-original-suite.sh:40
- The loop uses an unquoted
${@+"$@"}expansion, which can trigger pathname expansion (globbing) and can also split arguments unexpectedly if any flag ever contains whitespace. Since these are already positional parameters aftershift, iterate safely withfor f in "$@"; do.
for f in ${@+"$@"}; do
scripts/run-enumerate.sh:99
- The objcopy invocation expands
RENAME_ARGSunquoted. If any element ever contains shell metacharacters it can be glob-expanded or split. SinceRENAME_ARGSis always initialized to an array, use a quoted array expansion ("${RENAME_ARGS[@]}").
"$OBJCOPY" ${RENAME_ARGS[@]+"${RENAME_ARGS[@]}"} "$ORIGINAL_OBJECT" "$RENAMED_OBJECT"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| PREFIX="$ROOT/zig-out-$NAME" | ||
| rm -rf "$PREFIX" | ||
| zig build "${ZIG_FLAGS[@]}" -p "$PREFIX" --cache-dir "$CACHE" | ||
| zig build ${@+"$@"} -p "$PREFIX" --cache-dir "$CACHE" |
Comment on lines
87
to
90
| RENAME_ARGS=() | ||
| for symbol in "${EXPORTED[@]}"; do | ||
| for symbol in ${EXPORTED[@]+"${EXPORTED[@]}"}; do | ||
| RENAME_ARGS+=(--redefine-sym "$symbol=c_$symbol") | ||
| done |
CI docker-build-and-verify timed out resolving docker/dockerfile:1.7 from registry-1.docker.io. The image does not need that frontend.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
docs/REPRODUCTION.md.TARGETARCH(pinned SHAs for x86_64-linux and aarch64-linux).set -u, BSDsed -i,shasumfallback, missingobjcopyskip) and stopped the README claim checker from silently rewriting before checking.docs/evidence/gate-failure-proofs.md); added PR template asking for the four assertion counts.Four assertion counts (required before merge)
Also confirmed inside
docker compose up --build verifyafter the Dockerfile fix (VERIFY OK in 122.71s).Evidence artifacts touched
docs/REPRODUCTION.md(new)docs/evidence/gate-failure-proofs.md(new)docs/evidence/upstream-diff.txt(new live fetch log)docs/journal.md(append)DECISIONS.md(D030-D032)Gates exercised
scripts/verify-original-hashes.shscripts/fetch-upstream-and-diff.shzig build fmt-check/ hostzig build test(four configs)zig build verify(host; enumeration skipped without objcopy)docker compose up --build verifyNotes for reviewers
ulimit -s~8k both). Suite counts are unchanged.fuzz/or long-running campaigns.