Preserve unchanged release submodule inputs

This commit is contained in:
Meta Vens 2026-08-10 21:57:48 +01:00
commit 0ef0c0b8db
4 changed files with 59 additions and 28 deletions

View file

@ -297,6 +297,7 @@ impl ReleaseSourceGuard {
if path.exists() {
verify_cached_worktree_owner(repo, &path)?;
reset_and_clean_cached_submodules(&path, "pre-clean cached release submodules")?;
run_git_checked(
&path,
&["-c", "core.longpaths=true", "clean", "-ffdx"],
@ -336,27 +337,10 @@ impl ReleaseSourceGuard {
run_git_checked(
&path,
&[
"-c",
"core.longpaths=true",
"submodule",
"update",
"--init",
"--recursive",
"--force",
],
&release_submodule_update_args(),
"failed to initialize exact release submodules",
)?;
run_git_checked(
&path,
&["submodule", "foreach", "--recursive", "git reset --hard"],
"failed to reset exact release submodules",
)?;
run_git_checked(
&path,
&["submodule", "foreach", "--recursive", "git clean -ffdx"],
"failed to clean exact release submodules",
)?;
reset_and_clean_cached_submodules(&path, "clean exact release submodules")?;
let head = git_output(&path, &["rev-parse", "HEAD"])?;
if head.trim() != commit {
bail!("cached release worktree resolved {head:?}, expected {commit}");
@ -382,6 +366,31 @@ impl ReleaseSourceGuard {
}
}
fn release_submodule_update_args() -> [&'static str; 6] {
[
"-c",
"core.longpaths=true",
"submodule",
"update",
"--init",
"--recursive",
]
}
fn reset_and_clean_cached_submodules(repo: &Path, context: &str) -> Result<()> {
run_git_checked(
repo,
&["submodule", "foreach", "--recursive", "git reset --hard"],
&format!("failed to reset {context}"),
)?;
run_git_checked(
repo,
&["submodule", "foreach", "--recursive", "git clean -ffdx"],
&format!("failed to clean {context}"),
)?;
Ok(())
}
fn verify_cached_worktree_owner(repo: &Path, worktree: &Path) -> Result<()> {
let expected = PathBuf::from(git_output(repo, &["rev-parse", "--git-common-dir"])?.trim());
let expected = if expected.is_absolute() {
@ -996,6 +1005,23 @@ mod tests {
);
}
#[test]
fn cached_source_update_does_not_force_refresh_unchanged_submodules() {
let args = release_submodule_update_args();
assert_eq!(
args,
[
"-c",
"core.longpaths=true",
"submodule",
"update",
"--init",
"--recursive",
]
);
assert!(!args.contains(&"--force"));
}
#[test]
fn release_bundle_cache_separates_targets_and_toolchains() {
let root = Path::new("release-build-cache");

View file

@ -1658,11 +1658,13 @@ partition this cache and never becomes derived build authority.
The source cache is identified by canonical repository identity. It owns one
persistent detached worktree so unchanged tracked files retain stable paths and
timestamps across commits. Before every build it exclusively locks that source,
force-checks out the exact clean commit, cleans the main tree and recursive
submodules, and verifies repository ownership, HEAD, status, and submodule
identity with long-path-aware Git commands. It remains locked until the release
has copied and witnessed every binary. No concurrent packager can mutate source
or graph outputs during that interval.
pre-cleans cached submodules, checks out the exact parent commit, updates only
changed submodule pins without forcing unchanged worktrees, re-cleans the main
tree and recursive submodules, and verifies repository ownership, HEAD, status,
and submodule identity with long-path-aware Git commands. It remains locked
until the release has copied and witnessed every binary. No concurrent packager
can mutate source or graph outputs during that interval. Submodule mtimes and
Cargo fingerprints are cache mechanics, never release identity.
The release witness remains the only packaged-output authority: exact commit,
runtime, target, toolchain, sorted binary roles, lengths, and byte digests.

View file

@ -43,8 +43,11 @@ A copied c006 restart is clean and actual c006 remains untouched. Exact payload
inspection corrected an initial false alarm: the retained grant is unconsumed,
nonterminal, and exactly matches Heartbeat's running schedule/action. The brake
is coherently holding pending authority; there is no orphan repair to perform.
Remove the release source guard's unconditional submodule force-checkout and
measure the next exact package before waking c006. Yggdrasil never builds.
The release source guard now pre-cleans cached submodules, updates only changed
pins without `--force`, then re-cleans and verifies the exact tree. Its twenty
focused tests pass. Commit and package this cut, compare it with the 11m04s
`a4756857` baseline, and require an identical warm replay before waking c006.
Yggdrasil never builds.
## Exact packaged outer-worker retention accepted — 2026-08-10

View file

@ -38,7 +38,7 @@ current_status:
summary: Epiphany is a supervised engineering alpha on Starfire, not deployment-ready. Exact b8138a6b active-child SIGTERM and restart, exact 9f369528 deterministic warm packaging, exact c930f505 cross-container ownership, exact ed15f83a resident lifecycle retention, exact 16c4b19f coordinator receipt and Heartbeat artifact retention, exact cce2b8ac narrow model-generation retention, exact eea15e82 model-turn JSON ingress, exact b1e8c89a semantic unattempted-generation retention, exact 6bc3ec3f semantic physical-epoch retirement, and exact 44230a05 Persona conversation retention are proven. Gamecult-ops 059821f owns Yggdrasil stream retention and exact 6ee08a4 owns stable Starfire Persona-permit firewall ingress. Exact 16c4b19f genuine idle and exact a987d2f7 active cognition completed 900-pulse bounded plateaus. Runtime-owned typed fulfillment is accepted live under exact 6dd9b132. Yggdrasil is the small public crossing body, never the release forge.
latest_phase: Exact pushed 53678374 release sha256-5d50fa7dab6bbfae78982d6dd8e8a21f2c3642bb6678686660c59fb42aa97d05 with witness sha256-1814d2b7ee0bd93ab93a2878beb6ab7916fa7e1a476b8bde6dc7e06cd79bda73 authenticates 24 binaries with zero warnings. Exact packaged swarm proves failed and fulfilled outer-worker retention on copied Body-bound Linux state. The same body now directly proves proposal Modeling: immutable proposal/request/payload, generation-one Body carrier, exact launch binding/hash, terminal Modeling result, accepted Evolution patch, and one proposal-citing Eyes frontier. Zero-receipt recovery closed the resident grant recovered-fulfilled; packaged retention removed its lifecycle; an eight-envelope worker archive preserved exact fulfillment while removing launch/job/claim. Heartbeat then issued only the causally new admitted-model-direction grant, not a proposal retry. Actual c006 remains braked and stopped.
operational_state:
local_worktree: exact_a4756857_named_volume_and_copied_restart_accepted_build_cache_force_checkout_cut_next
local_worktree: release_source_guard_force_checkout_removed_package_timing_next
operator_wireguard: restored
starfire_persona_permit_firewall: persistent_exact_gamecult_ops_6ee08a4
yggdrasil: canonical_small_public_crossing_body
@ -70,7 +70,7 @@ current_status:
yggdrasil_epiphany_service_contract: repaired_in_gamecult_ops_812b427_not_installed
resident_physiology: c006_exact_c693aaea_settled_braked_no_active_lease_no_attempt_three_old_processes_stopped
unresolved_authority: Coordinator receipt, Heartbeat pulse-artifact, genuine-idle and active resource plateaus, exact-grant terminality, restart-persistent cooldown refusal, schedule/action issuance cardinality, runtime-owned typed fulfillment, all three packaged fulfilled-before-receipt lanes, narrow model-generation retention, published model-turn JSON ingress, semantic logical/physical retention, Persona conversation retention, stable Starfire firewall ownership, completed model-adapter session archival, normal coordinator lifecycle opening/error closure/legacy repair/archival, co-resident resident lifecycle retention, authenticated outer-worker attempt retention, deployed supervisor/projector journald ownership, and Docker named-volume atomic snapshot visibility are accepted live. Starfire's Docker Desktop F: bind is rejected for mutable authority after an exact packaged lockless reader observed an empty published snapshot during writer interruption. Historical migrated semantic attempts without recorded physical namespace remain durable and non-retirable. One completed Discord consequence remains blocked by the absent Yggdrasil credential.
next_action: Remove release source preparation's unconditional recursive submodule force-checkout: it refreshes unchanged vendored trees and invalidates Cargo fingerprints, causing the measured 11m04s package despite a stable graph cache. Pre-clean existing submodules, update only changed commits without force, re-clean, then prove hostile dirty-source cleanup and measure exact cold-source/warm-graph packaging. The copied c006 pending grant is coherent and must remain untouched; wake actual c006 only after the faster exact package is authenticated. Yggdrasil never builds.
next_action: Commit and package the release source guard cut: cached submodules are pre-cleaned, only changed pins are updated without force, and the exact tree is re-cleaned and verified. Compare the package against a4756857's 11m04s baseline, then require an identical warm replay with the same release and witness. Unchanged vendored crates must not rebuild. Preserve c006's coherent pending grant and wake actual c006 only after the faster exact package is authenticated. Yggdrasil never builds.
active_subgoals:
- Prove Persona, Self, Eyes, Modeling, Imagination, Hands, Soul, Mind, Continuity, and nervous-system behavior individually.