From a4777d5d646c7e12621378cccb4ed95e22880de6 Mon Sep 17 00:00:00 2001 From: sergio Date: Thu, 18 Jun 2026 09:47:28 -0400 Subject: [PATCH] selfhost-verify: auto-consistencia rust VERIFICADA in-VM + PRESEED=hammerd requerido MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✓ REPRODUCIBLE in-VM (2026-06-18): SWAP_RUST=1 KVM=1 PRESEED=hammerd selfhost-verify.sh → el host construye stage1 con hammer-rust (of_tree b3:7fa6cb4e), la VM lo reconstruye con hammer-rust y reproduce 7fa6cb4e BIT A BIT (stage1' == stage1, DRIVER_RC=0). hammerd reconstruido in-VM = byte-idéntico al host (d08fd273). Cierra el frente rust del auto-alojamiento: el compilador (rustc 1.91.1 hammer-built, mrustc→1.90→1.91.0→1.91.1) se auto-aloja bit a bit, con su propio EXPECT_REF (≠ 9adefb82 de Alpine; rustc emite los bytes). PRESEED=hammerd es OBLIGATORIO con SWAP_RUST: arje-zero (monorepo tawasuyu) vendorea ~1973 crates; un rebuild in-VM completo (PRESEED=all) desborda el rootfs en RAM (ENOSPC). Con PRESEED=hammerd se preseedea el arje-zero host-built (hammer-rust, locked desde 9967b02c) y sólo hammerd se reconstruye in-VM. Documentado en el bloque SWAP_RUST y en rust-frontier/README. Co-Authored-By: Claude Opus 4.8 --- scripts/rust-frontier/README.md | 14 +++++++++++++- scripts/selfhost-verify.sh | 4 ++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/scripts/rust-frontier/README.md b/scripts/rust-frontier/README.md index e058ff67..293415b2 100644 --- a/scripts/rust-frontier/README.md +++ b/scripts/rust-frontier/README.md @@ -144,7 +144,12 @@ STAGE0=.scratch/rust-1.91.0-prefix .scratch/run-xpy.sh \ .scratch/rustc-1.91.1-src .scratch/rust-1.91.1-prefix -- \ install --stage 2 rustc library/std cargo # -> hammer rustc+cargo 1.91.1 -# 6. (next) swap rust 1.91.1 into /toolchain + auto-consistency criterion (EXPECT_REF) +# 6. swap rust 1.91.1 into /toolchain + auto-consistency verify (in-VM) +# PRESEED=hammerd es OBLIGATORIO con SWAP_RUST: arje-zero (monorepo tawasuyu) vendorea +# ~1973 crates; en un rebuild in-VM completo (PRESEED=all) ese vendor desborda el +# rootfs en RAM de la VM → ENOSPC. Con PRESEED=hammerd se preseedea el arje-zero +# host-built (hammer-rust, locked) y sólo hammerd se reconstruye in-VM. +SWAP_RUST=1 KVM=1 MEM=16384 PRESEED=hammerd ./scripts/selfhost-verify.sh ``` **DONE (2026-06-16):** both hops built. `rust-1.91.1-prefix/bin/{rustc,cargo}` run @@ -153,4 +158,11 @@ LLVM 20.1.8, `cargo 1.91.1`. Alpine's exact rust version, fully self-hosted from the mrustc chain (mrustc → 1.90.0 → 1.91.0 → 1.91.1). Each hop ≈45 min compile (LLVM reused throughout); hop 2's cargo needed the `cargo-native-static` fix. +**✓ AUTO-CONSISTENCY VERIFICADA IN-VM (2026-06-18):** `SWAP_RUST=1 … PRESEED=hammerd` +→ el host construye stage1 con hammer-rust (of_tree `7fa6cb4e`), la VM lo reconstruye +con hammer-rust y reproduce `7fa6cb4e` **bit a bit** (`stage1' == stage1`, DRIVER_RC=0). +`RUST_EXPECT_REF=7fa6cb4e` (≠ el `9adefb82` de Alpine — rustc emite los bytes). El drift +de arje-zero quedó cerrado fijando su `Cargo.lock` en tawasuyu (`recipes/arje-zero.toml` +→ commit `9967b02c`): build `--locked` ⇒ bit-reproducible (`lock1 == lock2`). + Full diagnostic history is in the `selfhost-verify-rust-frontier` memory. diff --git a/scripts/selfhost-verify.sh b/scripts/selfhost-verify.sh index 688de86c..d4d26b42 100755 --- a/scripts/selfhost-verify.sh +++ b/scripts/selfhost-verify.sh @@ -78,6 +78,10 @@ say "semilla: $SEED_HASH" # SWAP_RUST=1 → overlay .scratch/rust-1.91.1-prefix sobre /toolchain/usr/{bin,lib}. # RUST_PREFIX=DIR → prefix hammer-rust alternativo (default .scratch/rust-1.91.1-prefix). # RUST_EXPECT_REF=… → REF conocido-bueno de hammer-rust (cross-check; vacío ⇒ sólo lo imprime). +# ⚠️ Usá PRESEED=hammerd con SWAP_RUST: arje-zero (monorepo tawasuyu) vendorea ~1973 crates; +# en un rebuild in-VM completo (PRESEED=all) ese vendor desborda el rootfs en RAM de la VM +# (ENOSPC). PRESEED=hammerd preseedea el arje-zero host-built (hammer-rust, locked) y sólo +# reconstruye hammerd in-VM. ✓ REPRODUCIBLE verificado así (2026-06-18, of_tree 7fa6cb4e). if [[ "${SWAP_RUST:-0}" == 1 ]]; then RUST_PREFIX="${RUST_PREFIX:-.scratch/rust-1.91.1-prefix}" [[ -x "$RUST_PREFIX/bin/rustc" ]] || die "SWAP_RUST=1 pero no veo el prefix hammer-rust en $RUST_PREFIX (corré el climb: scripts/rust-frontier/README.md)"