Stage releases within exact source generation

This commit is contained in:
Meta Vens 2026-07-19 01:43:15 +01:00
commit 03e1afd245
3 changed files with 31 additions and 14 deletions

View file

@ -151,7 +151,17 @@ pub fn package_epiphany_release(
request.target_triple,
&toolchain.cargo,
)?;
let staging = destination.join(format!(".staging-{}", Uuid::new_v4()));
// Construction authority is scoped to one exact source generation. The
// shared release root remains root-owned while the builder creates only a
// private staging sibling beneath its commit-specific directory.
let commit_root = destination.join(&source_commit_sha);
fs::create_dir_all(&commit_root).with_context(|| {
format!(
"failed to create release commit root {}",
commit_root.display()
)
})?;
let staging = commit_root.join(format!(".staging-{}", Uuid::new_v4()));
fs::create_dir(&staging)
.with_context(|| format!("failed to create release staging {}", staging.display()))?;
let result = (|| {
@ -181,15 +191,7 @@ pub fn package_epiphany_release(
&toolchain.fingerprint,
&binaries,
);
let final_root = destination.join(&source_commit_sha).join(&release_id);
fs::create_dir_all(final_root.parent().expect("release root has parent")).with_context(
|| {
format!(
"failed to create release commit root for {}",
final_root.display()
)
},
)?;
let final_root = commit_root.join(&release_id);
for binary in &mut binaries {
binary.canonical_path = final_root.join(&binary.file_name).display().to_string();
}

View file

@ -2771,9 +2771,22 @@ emits no request, writes nothing, preserves admitted feedback, and retries on a
later pulse. The causal smoke explicitly requires its fixture thread. Focused
Imagination tests, resident-Self tests, and all-bin compilation pass.
Next action: commit and push the second cold-start successor, revoke the failed
`86d70200` authority, then cross the new exact commit through Bifrost and Idunn
while braked. Verify the typed brake, exact
Exact successor `aa3d2330062a34145cb70b527e02fa00215eac1b` was revoked before
deployment because packaging repeated the release-root staging permission
failure with no predecessor alive. This killed the cleanup-race hypothesis.
The real fault was the builder's long-lived write lease over the shared
root-owned release directory.
Packaging is now source-generation scoped. The packager stages beneath the
exact commit directory and atomically renames the final release within that
same directory, so canonical witness paths do not move. Idunn keeps the shared
release root root-owned and grants the builder only that exact commit directory;
cleanup seals it root-owned and removes only its nested staging. Package tests
pass 12/12, all binaries compile, and the actuator passes remote Bash syntax.
Next action: commit and push the generation-scoped Epiphany and ops cuts,
install the exact root-owned actuator, then authorize and cross the new exact
commit through Bifrost and Idunn while braked. Verify the typed brake, exact
release/witness bindings, all three service owners, signed Idunn health, local
Qdrant/Ollama routes, and final deployment witness. Then run the Starfire-offline
rehearsal before 2026-07-22: organization feedback -> persistent Modeling map ->

View file

@ -787,4 +787,6 @@ current_status:
- The candidate faults are cut in source. Heartbeat now forms an owner-filtered typed view over its mixed CultCache store and commits exact owner rows with CAS while preserving readiness rows; CultCache supplies typed `load_envelope` for validated in-memory admission without backing-store publication. A cold resident runtime without thread state yields no direction request yet instead of a fatal error. An engaged `heartbeat.scheduler` brake blocks cognitive scheduling but no longer claims daemon service lifecycle physiology; only `daemon.lifecycle_poke`, `daemon.*`, wildcard, or an empty protected list blocks that owner. Focused shared-store/cold-Self/brake tests pass, and the full core library proves 570 passed, zero failed, one ignored.
- Candidate `86d702002acee8321438f32fb9cf69a29a667d70` built and sealed immutable release `sha256-da19a70a7e8c0229cd59b292bf5867fd1e97fa40643ab772e918c5d49dd7ff22` with witness `sha256-62c65d813837dd4a939e941d798d0842ee5f6c77cddaa645f2c47a18b7c3ec44`. Its first package attempt lost the builder's narrow release-root ownership to a predecessor cleanup race and published nothing; the retry crossed packaging and started all three braked services. Projection and Heartbeat stayed active, but resident Self exposed a second cold-start fatal path in feedback-driven Imagination consideration (`consideration requires thread state`). The Idunn transaction was terminated through rollback; services are inactive and no deployment or active-release witness exists. The package remains immutable evidence only.
- Feedback-driven Imagination consideration now shares the cold-runtime prerequisite semantics of admitted-model direction: absent thread state yields no request yet, preserves admitted feedback for later ingestion, and performs no write. Resident Self skips only that not-yet-constructible request and will retry it on a later pulse. The causal feedback smoke explicitly requires its fixture thread and all binaries compile. This is prerequisite absence, not feedback loss, Mind adoption, or action authority.
next_action: "Commit and push the second cold-start successor, revoke failed 86d70200 authority, authorize the new exact commit through Bifrost, and let Idunn deploy it on Yggdrasil under the engaged sleep brake. Require immutable package inspection, app-owned release publication, three healthy local service owners, signed aggregate health, and the final deployment.env witness. Then run the Starfire-offline rehearsal before 2026-07-22: persistent Modeling map -> autonomous bounded Imagination proposal, with classified organization feedback through Persona as an additional pressure path; explicit Mind adoption -> Hands consequence -> Bifrost release -> Idunn deployment remain separate gates. Prove replay/tamper refusal and that conversation alone grants no Mind, Hands, Persona-speech, release, or deployment authority. No host reboot is authorized."
- Exact successor `aa3d2330062a34145cb70b527e02fa00215eac1b` passed local proof but was revoked before deployment because live packaging repeated `Permission denied` when creating a random staging directory directly under the shared root-owned release directory. This disproved the predecessor-cleanup race hypothesis. The builder's long-lived ownership lease over `/srv/epiphany/app/releases` was the incoherent boundary; no package, service, or witness was published from this attempt.
- Release construction is now generation-scoped. The packager creates its random staging sibling beneath the exact source-commit directory, then atomically renames to the final release id within that same directory, preserving canonical absolute witness paths. Idunn keeps the shared release root root-owned and grants `epiphany-builder` only the exact commit directory during construction; cleanup removes only nested staging and seals that generation root-owned. Focused package proof passes 12/12, every binary compiles, and the corrected deployment script passes remote Bash syntax. The builder no longer needs a write lease over sibling releases.
next_action: "Commit and push the generation-scoped packaging successor and ops actuator, install the exact root-owned actuator on Yggdrasil, authorize the new exact Epiphany commit through Bifrost, and let Idunn deploy it under the engaged sleep brake. Require immutable package inspection, app-owned release publication, three healthy local service owners, signed aggregate health, and the final deployment.env witness. Then run the Starfire-offline rehearsal before 2026-07-22: persistent Modeling map -> autonomous bounded Imagination proposal, with classified organization feedback through Persona as an additional pressure path; explicit Mind adoption -> Hands consequence -> Bifrost release -> Idunn deployment remain separate gates. Prove replay/tamper refusal and that conversation alone grants no Mind, Hands, Persona-speech, release, or deployment authority. No host reboot is authorized."