Persist release construction Cargo cache

This commit is contained in:
Meta Vens 2026-08-09 10:07:51 +01:00
commit 9f369528ef
3 changed files with 41 additions and 3 deletions

View file

@ -472,6 +472,13 @@ fn build_required_release_siblings(
)
})?;
let mut outputs = BTreeMap::new();
let cargo_home = target_root.join("cargo-home");
fs::create_dir_all(&cargo_home).with_context(|| {
format!(
"failed to create release Cargo cache {}",
cargo_home.display()
)
})?;
let required = required_packaged_release_binaries(target);
for (role, file_name) in &required {
required_release_build_target(role)?;
@ -480,7 +487,14 @@ fn build_required_release_siblings(
target_dir.join(target).join("release").join(file_name),
);
}
let mut command = release_build_command(cargo, &manifest, &target_dir, target, &required)?;
let mut command = release_build_command(
cargo,
&manifest,
&target_dir,
&cargo_home,
target,
&required,
)?;
let status = command
.status()
.context("failed to start Epiphany release bundle build")?;
@ -497,12 +511,14 @@ fn release_build_command(
cargo: &std::ffi::OsStr,
manifest: &Path,
target_dir: &Path,
cargo_home: &Path,
target: &str,
required: &[(&'static str, String)],
) -> Result<std::process::Command> {
let mut command = std::process::Command::new(cargo);
command
.env("CARGO_INCREMENTAL", "0")
.env("CARGO_HOME", cargo_home)
.arg("build")
.arg("--release")
.arg("--manifest-path")
@ -1064,6 +1080,7 @@ mod tests {
std::ffi::OsStr::new("cargo"),
Path::new("Cargo.toml"),
Path::new("target"),
Path::new("cargo-home"),
"x86_64-unknown-linux-gnu",
&required,
)
@ -1083,6 +1100,10 @@ mod tests {
.collect::<BTreeMap<_, _>>();
assert_eq!(envs.get("CARGO_INCREMENTAL"), Some(&Some("0".to_string())));
assert_eq!(
envs.get("CARGO_HOME"),
Some(&Some("cargo-home".to_string()))
);
assert_eq!(args.iter().filter(|arg| *arg == "--bin").count(), 24);
assert_eq!(args.iter().filter(|arg| *arg == "--package").count(), 1);
assert!(

View file

@ -1,5 +1,22 @@
# Fresh workspace handoff
## Corrected shutdown replay and Cargo-home ownership — 2026-08-09
Exact `b8138a6b` release `sha256-f3e0966333b86181bf13893a45f7636d0c6ff13720fbf535b29cca485c3fd58d`
with witness `sha256-4652c86f4a5560475de597fd162dfc7a5369df711cd00e51a3805e769b68a0ee`
passed native 24-binary inspection. Frozen coordinator PID 88 retained pending
SIGTERM, resumed, terminalized, and the resident exited zero in 1.613 seconds
with final `braked`. Restart reached `sleeping`; idle SIGTERM then exited zero
in 871 ms with final `braked`. Receipts are under
`.epiphany-run/shutdown-active8-b8138a6b/`.
The exact package took 19m26s. The Docker recipe mounted a Cargo-home volume at
`/cargo-home` without setting `CARGO_HOME`, so fresh containers still updated
and downloaded through throwaway `/usr/local/cargo`. Release construction now
owns `build_cache_root/cargo-home` and exports it to Cargo. All 19 focused tests
pass. The first exact build after this change is a one-time source-path
migration; require a second warm replay before claiming the iteration fix.
## Active resident shutdown proof — 2026-08-09
Exact authenticated `00ee3821` idle SIGTERM exited zero. In the active proof,

View file

@ -35,7 +35,7 @@ invariants:
- Evidence and git retain history; this map retains only state that changes future decisions.
current_status:
summary: Epiphany is a supervised engineering alpha on Starfire, not deployment-ready. Exact 00ee3821 adds resident Self signal ownership. Idle SIGTERM exits zero, and an exact authenticated active coordinator was stopped, given pending SIGTERM, resumed, terminalized, and followed by a zero resident exit. That live proof exposed a false failed operator projection after successful shutdown cancellation; source now derives Braked for shutdown cancellation and awaits exact packaging. Concurrent external writes to the live resident store can be overwritten by its in-memory owner and remain an open authority seam. Retention, long-duration plateau, log ownership, and stable Starfire firewall ownership remain open. Yggdrasil is the small public crossing body, never the release forge.
summary: Epiphany is a supervised engineering alpha on Starfire, not deployment-ready. Exact b8138a6b active-child SIGTERM and restart are proven on copied Linux physiology: exact coordinator termination, zero resident exit, truthful braked projection, restart to sleeping, and second idle zero exit. Concurrent external writes to the live resident store can be overwritten by its in-memory owner and remain an open authority seam. Exact b8138a6b packaging took 19m26s because routine release construction still has cold-cache corrosion; source now makes build_cache_root own Cargo home instead of relying on a throwaway container home, and awaits exact benchmark. Retention, long-duration plateau, log ownership, and stable Starfire firewall ownership remain open. Yggdrasil is the small public crossing body, never the release forge.
latest_phase: Commit 76afdaf0 moved release construction, filesystem verification, and witness inspection out of monolithic epiphany-core into epiphany-release-construction; core retains only CultMesh publication, load, and authentication. The bootstrap dependency graph excludes epiphany-core, all 19 construction tests pass, and the full core test harness compiles. Exact Linux bootstrap fell from 7m57s to 30.24s cold and 4.40s warm. Exact source 76afdaf0 then produced warning-free 24-binary release sha256-30caab9ef1ea89f9a885d87832b1e312a35288ec3f895bd5b0e83f7f7a6a1aec with witness sha256-89c2ad604254faec3e1e01f753b5dff38a402f43d009074ba4b47b1ec46fdecf. Independent inspection accepted the 12m16s cold build and the identical 10.16s warm replay with Cargo at 0.82s. The packaged full publisher accepted the narrow constructor's witness and changed c005 local-verse.cc from SHA-256 b160c610988753278afbad7f5bad436193144a92e9fd506982099ad58d213909 to 83ed430f5bf0c33996d7c4ee7bf0fa6c9f5f80bc8db94621395ea560852cae81 without body activation.
operational_state:
local_worktree: release_construction_receipts_pending_commit
@ -69,7 +69,7 @@ current_status:
yggdrasil_epiphany_service_contract: repaired_in_gamecult_ops_812b427_not_installed
resident_physiology: authenticated_9b8df0b4_c005_bound_to_eyes_tools_nervous_system_with_217dd_and_bd96305e_helpers_running
unresolved_authority: SIGTERM is not observed by epiphany-swarm; serve owns an unconditional loop and blocking sleep, so Docker stops end in exit 137 even while idle. Repository Body observation still performs two authenticated full-tree Git index/manifest passes. Execute-mode workers require a persistent process body. Keyed storage has not earned live migration. One Discord consequence remains blocked by the absent Yggdrasil credential. Resident stdout/stderr logs remain an unbounded supervisor-owned surface.
next_action: Commit the shutdown-projection correction, construct one exact release, replay the active-child SIGTERM proof, and require final braked projection with shutdown-cancelled acknowledgement and no failure pressure. Then prove restart and address the live resident-store single-writer seam before retention and endurance.
next_action: Commit and benchmark construction-owned Cargo home with one cold migration and one warm replay. Then map and repair the live resident-store single-writer/command-ingress seam before retention and endurance.
active_subgoals:
- Prove Persona, Self, Eyes, Modeling, Imagination, Hands, Soul, Mind, Continuity, and nervous-system behavior individually.