Unify packaged release build ownership

This commit is contained in:
Meta Vens 2026-08-07 21:26:07 +01:00
commit f9dfd93ac6
6 changed files with 8437 additions and 103 deletions

8232
Cargo.lock generated Normal file

File diff suppressed because it is too large Load diff

140
Cargo.toml Normal file
View file

@ -0,0 +1,140 @@
[package]
name = "epiphany-release-bundle"
version = "0.1.0"
edition = "2024"
publish = false
autobins = false
license-file = "LICENSE"
[dependencies]
anyhow = "1"
bm25 = "2.3.2"
chrono = "0.4.44"
cultcache-rs = { path = "vendor/cultcache-rs" }
cultmesh-rs = { path = "vendor/cultmesh-rs" }
cultnet-rs = { path = "vendor/cultnet-rs" }
ed25519-dalek = "2"
epiphany-core = { path = "epiphany-core" }
epiphany-model-adapter = { path = "epiphany-model-adapter" }
epiphany-openai-adapter = { path = "epiphany-openai-adapter" }
epiphany-openai-runtime = { path = "epiphany-openai-runtime" }
epiphany-state-model = { path = "epiphany-state-model" }
epiphany-tool-adapter = { path = "epiphany-tool-adapter" }
epiphany-tool-mcp-runtime = { path = "epiphany-tool-mcp-runtime" }
http = "1"
ignore = "0.4.23"
postgres = "0.19"
rand_core = { version = "0.6", features = ["getrandom"] }
reqwest = { version = "0.13.2", default-features = false, features = ["blocking", "json", "rustls"] }
rmp-serde = "1"
rmcp = { version = "2.2.0", default-features = false, features = ["client", "transport-child-process", "transport-streamable-http-client-reqwest"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
sha1 = "0.10.6"
sha2 = "0.10"
tokio = { version = "1", features = ["io-util", "macros", "process", "rt", "rt-multi-thread", "time"] }
toml = "0.9"
tracing = "0.1.44"
uuid = { version = "1", features = ["v4"] }
zeroize = "1"
[features]
semantic-recovery-smoke = []
workspace-coverage-recovery-smoke = []
[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.59", features = ["Win32_Foundation", "Win32_Security", "Win32_Security_Cryptography", "Win32_Storage_FileSystem", "Win32_System_Diagnostics_ToolHelp", "Win32_System_Threading"] }
[target.'cfg(unix)'.dependencies]
libc = "0.2"
[patch.crates-io]
tokio-tungstenite = { git = "https://github.com/openai-oss-forks/tokio-tungstenite", rev = "132f5b39c862e3a970f731d709608b3e6276d5f6" }
tungstenite = { git = "https://github.com/openai-oss-forks/tungstenite-rs", rev = "9200079d3b54a1ff51072e24d81fd354f085156f" }
[patch."ssh://git@github.com/openai-oss-forks/tungstenite-rs.git"]
tungstenite = { git = "https://github.com/openai-oss-forks/tungstenite-rs", rev = "9200079d3b54a1ff51072e24d81fd354f085156f" }
[[bin]]
name = "epiphany-daemon-supervisor"
path = "epiphany-core/src/bin/epiphany-daemon-supervisor.rs"
[[bin]]
name = "epiphany-release"
path = "epiphany-core/src/bin/epiphany-release.rs"
[[bin]]
name = "epiphany-memory-semantic-projector"
path = "epiphany-core/src/bin/epiphany-memory-semantic-projector.rs"
[[bin]]
name = "epiphany-workspace-coverage-projector"
path = "epiphany-core/src/bin/epiphany-workspace-coverage-projector.rs"
[[bin]]
name = "epiphany-memory-semantic"
path = "epiphany-core/src/bin/epiphany-memory-semantic.rs"
[[bin]]
name = "epiphany-verse-query"
path = "epiphany-core/src/bin/epiphany-verse-query.rs"
[[bin]]
name = "epiphany-repository-body"
path = "epiphany-core/src/bin/epiphany-repository-body.rs"
[[bin]]
name = "epiphany-host-identity"
path = "epiphany-core/src/bin/epiphany-host-identity.rs"
[[bin]]
name = "epiphany-swarm"
path = "epiphany-core/src/bin/epiphany-swarm.rs"
[[bin]]
name = "epiphany-operator-command"
path = "epiphany-core/src/bin/epiphany-operator-command.rs"
[[bin]]
name = "epiphany-heartbeat-store"
path = "epiphany-core/src/bin/epiphany-heartbeat-store.rs"
[[bin]]
name = "epiphany-persona-feedback-ingress"
path = "epiphany-core/src/bin/epiphany-persona-feedback-ingress.rs"
[[bin]]
name = "epiphany-persona-service"
path = "epiphany-openai-runtime/src/bin/epiphany-persona-service.rs"
[[bin]]
name = "epiphany-persona-mouth-identity"
path = "epiphany-core/src/bin/epiphany-persona-mouth-identity.rs"
[[bin]]
name = "epiphany-persona-discord-permit"
path = "epiphany-core/src/bin/epiphany-persona-discord-permit.rs"
[[bin]]
name = "epiphany-persona-discord-permit-identity"
path = "epiphany-core/src/bin/epiphany-persona-discord-permit-identity.rs"
[[bin]]
name = "epiphany-mvp-coordinator"
path = "epiphany-core/src/bin/epiphany-mvp-coordinator.rs"
[[bin]]
name = "epiphany-frontier-proposal"
path = "epiphany-core/src/bin/epiphany-frontier-proposal.rs"
[[bin]]
name = "epiphany-hands-action"
path = "epiphany-core/src/bin/epiphany-hands-action.rs"
[[bin]]
name = "epiphany-model-runtime"
path = "epiphany-openai-runtime/src/bin/epiphany-model-runtime.rs"
[[bin]]
name = "epiphany-tool-mcp-runtime"
path = "epiphany-tool-mcp-runtime/src/main.rs"

View file

@ -321,66 +321,44 @@ fn build_required_release_siblings(
cargo: &std::ffi::OsStr,
) -> Result<BTreeMap<&'static str, PathBuf>> {
validate_commit(source_commit_sha)?;
let mut manifests = BTreeSet::new();
for (role, _) in required_packaged_release_binaries(target) {
manifests.insert(required_release_build_target(role)?.0);
}
// Validate every independently locked owner before compiling any sibling.
// Otherwise a late stale lockfile can waste the earlier builds and make a
// release candidate fail only after several minutes of unrelated work.
for manifest_dir in &manifests {
verify_owned_release_lock(repo, manifest_dir, cargo)?;
}
verify_release_bundle_lock(repo, cargo)?;
let manifest = repo.join("Cargo.toml");
let target_dir = release_bundle_target_dir(target_root, source_commit_sha);
let mut outputs = BTreeMap::new();
for manifest_dir in manifests {
let manifest = repo.join(manifest_dir).join("Cargo.toml");
if !manifest.is_file() {
bail!(
"Epiphany release manifest is absent: {}",
manifest.display()
);
}
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")
.arg("--release")
.arg("--manifest-path")
.arg(&manifest)
.arg("--target-dir")
.arg(&target_dir)
.arg("--target")
.arg(target)
.arg("--locked");
for (role, file_name) in required_packaged_release_binaries(target) {
let (owner, binary) = required_release_build_target(role)?;
if owner == manifest_dir {
command.arg("--bin").arg(binary);
outputs.insert(
role,
target_dir.join(target).join("release").join(file_name),
);
}
}
let status = command
.status()
.with_context(|| format!("failed to start {manifest_dir} release build"))?;
if !status.success() {
bail!("owned Epiphany release build failed for {manifest_dir}");
}
let required = required_packaged_release_binaries(target);
for (role, file_name) in &required {
required_release_build_target(role)?;
outputs.insert(
*role,
target_dir.join(target).join("release").join(file_name),
);
}
let mut command = std::process::Command::new(cargo);
command
.arg("build")
.arg("--release")
.arg("--manifest-path")
.arg(&manifest)
.arg("--target-dir")
.arg(&target_dir)
.arg("--target")
.arg(target)
.arg("--locked")
.arg("--bins");
let status = command
.status()
.context("failed to start Epiphany release bundle build")?;
if !status.success() {
bail!("Epiphany release bundle build failed");
}
Ok(outputs)
}
fn verify_owned_release_lock(
repo: &Path,
manifest_dir: &str,
cargo: &std::ffi::OsStr,
) -> Result<()> {
let manifest = repo.join(manifest_dir).join("Cargo.toml");
fn verify_release_bundle_lock(repo: &Path, cargo: &std::ffi::OsStr) -> Result<()> {
let manifest = repo.join("Cargo.toml");
if !manifest.is_file() {
bail!(
"Epiphany release manifest is absent: {}",
"Epiphany release bundle manifest is absent: {}",
manifest.display()
);
}
@ -393,22 +371,18 @@ fn verify_owned_release_lock(
.arg("--manifest-path")
.arg(&manifest)
.output()
.with_context(|| format!("failed to validate {manifest_dir} release lockfile"))?;
.context("failed to validate Epiphany release bundle lockfile")?;
if !output.status.success() {
bail!(
"owned Epiphany release lockfile is stale for {manifest_dir}: {}",
"Epiphany release bundle lockfile is stale: {}",
String::from_utf8_lossy(&output.stderr).trim()
);
}
Ok(())
}
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 release_bundle_target_dir(target_root: &Path, source_commit_sha: &str) -> PathBuf {
target_root.join(source_commit_sha)
}
fn required_release_build_target(role: &str) -> Result<(&'static str, &'static str)> {
@ -870,49 +844,31 @@ mod tests {
}
#[test]
fn owning_manifests_have_isolated_build_roots() {
let root = Path::new("isolated-release-build");
fn release_bundle_has_one_exact_commit_build_root() {
let root = Path::new("release-build-cache");
let commit = "0123456789abcdef0123456789abcdef01234567";
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));
assert_eq!(release_bundle_target_dir(root, commit), root.join(commit));
}
#[test]
fn source_commits_have_isolated_build_roots() {
let root = Path::new("isolated-release-build");
let first = release_manifest_target_dir(
root,
"0123456789abcdef0123456789abcdef01234567",
"epiphany-core",
);
let second = release_manifest_target_dir(
root,
"89abcdef0123456789abcdef0123456789abcdef",
"epiphany-core",
);
let first =
release_bundle_target_dir(root, "0123456789abcdef0123456789abcdef01234567");
let second =
release_bundle_target_dir(root, "89abcdef0123456789abcdef0123456789abcdef");
assert_ne!(first, second);
}
#[test]
fn every_owned_release_lockfile_is_frozen() {
fn release_bundle_lockfile_is_frozen() {
let core = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
let repo = core
.parent()
.expect("epiphany-core has a repository parent");
let cargo = std::env::var_os("CARGO").unwrap_or_else(|| "cargo".into());
for manifest_dir in [
"epiphany-core",
"epiphany-openai-runtime",
"epiphany-tool-mcp-runtime",
] {
verify_owned_release_lock(repo, manifest_dir, &cargo)
.unwrap_or_else(|error| panic!("{manifest_dir} lockfile is not frozen: {error:#}"));
}
verify_release_bundle_lock(repo, &cargo)
.unwrap_or_else(|error| panic!("release bundle lockfile is not frozen: {error:#}"));
}
#[test]

View file

@ -60,19 +60,25 @@ split across manifest-specific Cargo target directories, so `epiphany-core`,
dependency graphs independently. The third manifest alone took 8m45s. The
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.
release witnessing. Exact b86491d8 disproved the hypothesis: the three Cargo
owners took 11m41s, 17m20s, and 6m45s, 35m46s total, slower than the 32m36s
baseline because their independent resolutions changed Cargo fingerprints.
That mechanism was reverted in pushed commit `41c91785`.
A literal root workspace was also rejected: it annexed nested vendored Codex
crates and rebound their inherited package/dependency catalog to Epiphany's
root. The coherent owner is instead the root `epiphany-release-bundle` package.
Its frozen lock resolves the complete shipped graph while vendored Codex keeps
its own workspace authority; its 21 explicit binary targets compile in one
`cargo build --bins` invocation. All targets pass `cargo check --locked` (a
warm check took 1.22s) and all fourteen packaged-release tests pass. The root
lock retains the proven compatible `allocative 0.3.4` and `zune-core 0.5.1`
resolution rather than accepting incompatible current patch drift.
## Next action
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:
Commit and push the release-bundle cut, then package and time that exact commit.
Publish the result only into clean v29. Without overrides, prove:
1. Self derives proposal-bound Modeling and canonical Imagination.
2. Self selects and launches canonical Imagination.

Binary file not shown.

View file

@ -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 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.
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. Exact b86491d8 disproved target-directory sharing by taking 35m46s across three independently resolved Cargo builds. Release assembly now has one root epiphany-release-bundle package, one frozen lock, and exactly 21 binary targets in one Cargo graph without annexing the nested vendored Codex workspace. All 21 targets pass a locked check and all 14 packaged-release tests pass; exact packaging and timing remain to prove. 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: rejected_shared_target_cut
local_worktree: release_bundle_awaiting_exact_package_proof
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. 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.
unresolved_authority: Exact b8c76fd0 packages the worker-terminalization repair but has not been published or replayed. The root release bundle removes the three release-resolution owners in source and passes locked checks, but exact detached packaging must prove one invocation, artifact completeness, and elapsed-time improvement. Persona consequence, restart/closure, retention, long-duration behavior, and Linux/Yggdrasil cognition remain open.
next_action: Commit and push the verified release-bundle cut, package and time that exact commit, then publish only into clean v29. 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.