recipes: arje-zero como receta puente Cargo a tawasuyu (track arje, build-side)
Puente concreto hacia "arje es el init de hammer" (ADR 0007): recipes/arje-zero.toml construye el init PID 1 de arje con el lab de hammer. - Cargo recipe: fuente = monorepo tawasuyu a commit fijado (el de la migración A0 arje-cas → BLAKE3, así el CAS es coherente con hammer), -p arje-zero, estático con zig cc; deps vendoreadas en el fetch (Lote 6) ⇒ build --offline - prueba que el lab cruza al repo de tawasuyu y produce el binario del init; NO es PID 1 todavía (eso es el paso "init real": seed card + arje-bus + hammerd Card) - nuevo test que escanea recipes/ y valida que toda receta parsea + hashea offline Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
02827f62c9
commit
778c3900ea
@@ -692,4 +692,27 @@ mod tests {
|
||||
assert!(h.as_str().starts_with("b3:"), "hash con prefijo b3:");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn all_shipped_recipes_parse_and_hash() {
|
||||
// Toda receta en recipes/ (incluida arje-zero, el puente Cargo a tawasuyu) debe parsear y
|
||||
// hashear offline. Cubre las que no están en STAGE1_COMPONENTS y futuras.
|
||||
let recipes_dir = Path::new(env!("CARGO_MANIFEST_DIR")).join("../../recipes");
|
||||
let tmp = tempfile::tempdir().unwrap();
|
||||
let store = Store::open(tmp.path().join("store")).unwrap();
|
||||
let mut count = 0;
|
||||
for entry in std::fs::read_dir(&recipes_dir).unwrap() {
|
||||
let path = entry.unwrap().path();
|
||||
if path.extension().and_then(|e| e.to_str()) != Some("toml") {
|
||||
continue;
|
||||
}
|
||||
let r = Recipe::load_from_path(&path)
|
||||
.unwrap_or_else(|e| panic!("parse {}: {e}", path.display()));
|
||||
let h = hammer_build::artifact_hash(&r, &store)
|
||||
.unwrap_or_else(|e| panic!("hash {}: {e}", path.display()));
|
||||
assert!(h.as_str().starts_with("b3:"), "{}: hash con prefijo b3:", path.display());
|
||||
count += 1;
|
||||
}
|
||||
assert!(count >= 5, "esperaba ≥5 recetas (grep/musl/busybox/hammerd/arje-zero), vi {count}");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user