From 41c91785c7e4c2b97df6ccdf4d91b2e24d85ffb2 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 7 Aug 2026 20:56:23 +0100 Subject: [PATCH] Reject target-only release cache sharing --- epiphany-core/src/packaged_release.rs | 39 ++++++++++++++++++--------- notes/fresh-workspace-handoff.md | 18 ++++++++----- state/map.yaml | 8 +++--- 3 files changed, 42 insertions(+), 23 deletions(-) diff --git a/epiphany-core/src/packaged_release.rs b/epiphany-core/src/packaged_release.rs index 886a696e..fa2c337c 100644 --- a/epiphany-core/src/packaged_release.rs +++ b/epiphany-core/src/packaged_release.rs @@ -340,7 +340,7 @@ fn build_required_release_siblings( manifest.display() ); } - let target_dir = release_commit_target_dir(target_root, source_commit_sha); + let target_dir = release_manifest_target_dir(target_root, source_commit_sha, manifest_dir); let mut command = std::process::Command::new(cargo); command .arg("build") @@ -403,8 +403,12 @@ fn verify_owned_release_lock( Ok(()) } -fn release_commit_target_dir(target_root: &Path, source_commit_sha: &str) -> PathBuf { - target_root.join(source_commit_sha) +fn release_manifest_target_dir( + target_root: &Path, + source_commit_sha: &str, + manifest_dir: &str, +) -> PathBuf { + target_root.join(source_commit_sha).join(manifest_dir) } fn required_release_build_target(role: &str) -> Result<(&'static str, &'static str)> { @@ -866,22 +870,31 @@ mod tests { } #[test] - fn owning_manifests_share_the_exact_commit_build_root() { - let root = Path::new("release-build-cache"); + fn owning_manifests_have_isolated_build_roots() { + let root = Path::new("isolated-release-build"); let commit = "0123456789abcdef0123456789abcdef01234567"; - let core = release_commit_target_dir(root, commit); - let model = release_commit_target_dir(root, commit); - let tools = release_commit_target_dir(root, commit); - assert_eq!(core, model); - assert_eq!(core, tools); - assert_eq!(core, root.join(commit)); + let core = release_manifest_target_dir(root, commit, "epiphany-core"); + let model = release_manifest_target_dir(root, commit, "epiphany-openai-runtime"); + let tools = release_manifest_target_dir(root, commit, "epiphany-tool-mcp-runtime"); + assert_ne!(core, model); + assert_ne!(core, tools); + assert_ne!(model, tools); + assert!(core.starts_with(root) && model.starts_with(root) && tools.starts_with(root)); } #[test] fn source_commits_have_isolated_build_roots() { let root = Path::new("isolated-release-build"); - let first = release_commit_target_dir(root, "0123456789abcdef0123456789abcdef01234567"); - let second = release_commit_target_dir(root, "89abcdef0123456789abcdef0123456789abcdef"); + let first = release_manifest_target_dir( + root, + "0123456789abcdef0123456789abcdef01234567", + "epiphany-core", + ); + let second = release_manifest_target_dir( + root, + "89abcdef0123456789abcdef0123456789abcdef", + "epiphany-core", + ); assert_ne!(first, second); } diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 2ae9aeaa..9aae4dc3 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -58,15 +58,21 @@ That package run exposed a release-forge ownership fault. One exact commit was split across manifest-specific Cargo target directories, so `epiphany-core`, `epiphany-openai-runtime`, and `epiphany-tool-mcp-runtime` rebuilt overlapping dependency graphs independently. The third manifest alone took 8m45s. The -working cut gives the exact commit one shared target root while retaining -separate lockfile validation, sequential builds, detached clean source, and -byte-level release witnessing. All fourteen packaged-release tests pass. +first cut gave the exact commit one shared target root while retaining separate +lockfile validation, sequential builds, detached clean source, and byte-level +release witnessing. All fourteen packaged-release tests passed, but the exact +timed b86491d8 run disproved the real hypothesis: after the first owner finished, +the second manifest immediately rebuilt common crates because the repository has +no root workspace and its independent lock/resolution graph changes Cargo +fingerprints. The shared-target mechanism is rejected and is being removed. ## Next action -Commit and push the release build-graph collapse, package that exact commit, -and compare elapsed time against the three-root b8c76fd0 baseline. Publish the -result only into a clean successor generation. Without overrides, prove: +Finish recording the b86491d8 rejected-path timing, then replace the nine +independent Epiphany package roots with one root workspace, one lockfile, +root-owned patches, and one Cargo invocation for the required release binaries. +Package and time that exact replacement. Publish the result only into a clean +successor generation. Without overrides, prove: 1. Self derives proposal-bound Modeling and canonical Imagination. 2. Self selects and launches canonical Imagination. diff --git a/state/map.yaml b/state/map.yaml index 9ac8a2a2..68018484 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -34,9 +34,9 @@ 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 pushed b8c76fd0 seals ordinary bounded worker errors and is packaged as sha256-f5a78dc6 with witness sha256-7a0b060f; v28 remains sealed Continuity failure evidence and has not been mutated by publication. Packaging exposed a build-graph fault: three manifest-specific target directories rebuilt shared dependencies three times, with the third compile alone taking 8m45s. The tested cut makes the exact source commit the single target-cache owner while preserving separate lock validation, sequential Cargo invocations, clean detached source, and byte-level witnessing. A clean successor generation still must prove the repaired Modeling-to-Imagination-to-Mind path, adopted-plan Hands authority, deliberate worker failure/restart/closure, Persona consequence, retention, endurance, and Linux/Yggdrasil cognition. + summary: Epiphany is a supervised engineering alpha on Starfire, not deployment-ready. Exact pushed b8c76fd0 seals ordinary bounded worker errors and is packaged as sha256-f5a78dc6 with witness sha256-7a0b060f; v28 remains sealed Continuity failure evidence and has not been mutated by publication. Packaging exposed the actual build-graph fault: nine Epiphany crates have no root workspace, five lockfiles and three duplicated patch surfaces create independent resolution universes, and the three release-owner manifests rebuild common crates. Exact b86491d8 tested one shared target directory, but its timed run proved the second manifest still recompiles shared dependencies; that rejected mechanism is being removed. A clean successor generation still must prove the repaired Modeling-to-Imagination-to-Mind path, adopted-plan Hands authority, deliberate worker failure/restart/closure, Persona consequence, retention, endurance, and Linux/Yggdrasil cognition. operational_state: - local_worktree: release_build_graph_cache_collapse + local_worktree: rejected_shared_target_cut operator_wireguard: restored yggdrasil: canonical_small_public_crossing_body starfire: temporary_epiphany_cognition_body @@ -52,8 +52,8 @@ current_status: bifrost_feedback_crossing: authenticated_transport_only yggdrasil_epiphany_services: absent resident_physiology: heartbeat_and_self_running - unresolved_authority: Exact b8c76fd0 packages the worker-terminalization repair but has not been published or replayed. The release forge also partitions one exact commit into three redundant dependency graphs; the shared commit-root cut is test-proven but still needs an exact timed package. Persona consequence, restart/closure, retention, long-duration behavior, and Linux/Yggdrasil cognition remain open. - next_action: Commit and push the tested release build-graph collapse, package that exact commit, and compare its elapsed time with the three-root b8c76fd0 baseline. Publish only into a clean successor generation, then replay Modeling-to-Imagination-to-Mind, prove adopted-plan Hands authority, and deliberately prove typed worker failure, restart, and Soul-verifiable closure. + unresolved_authority: Exact b8c76fd0 packages the worker-terminalization repair but has not been published or replayed. Sharing only a target directory did not collapse the three dependency-resolution owners. One root workspace, one lockfile, root-owned patches, and one release Cargo invocation still need implementation and timed proof. Persona consequence, restart/closure, retention, long-duration behavior, and Linux/Yggdrasil cognition remain open. + next_action: Finish recording the exact b86491d8 rejected-path benchmark, remove its shared-target mechanism, then establish one root Cargo workspace and one locked release build invocation. Package and time the exact replacement, publish only into a clean successor generation, replay Modeling-to-Imagination-to-Mind, prove adopted-plan Hands authority, and deliberately prove typed worker failure, restart, and Soul-verifiable closure. active_subgoals: - Prove Persona, Self, Eyes, Modeling, Imagination, Hands, Soul, Mind, Continuity, and nervous-system behavior individually.