From 681d655ec7c07a00f5b3c18328c6d2258516f118 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 12 Jul 2026 12:38:04 +0100 Subject: [PATCH] Prove preflighted Modeling retry launch --- epiphany-core/src/bin/epiphany-work.rs | 88 ++++++++++++++++++++- notes/epiphany-current-algorithmic-map.md | 9 +++ notes/epiphany-fork-implementation-plan.md | 13 +-- notes/fresh-workspace-handoff.md | 15 ++++ state/ledgers.msgpack | Bin 423324 -> 423755 bytes state/map.yaml | 2 +- 6 files changed, 119 insertions(+), 8 deletions(-) diff --git a/epiphany-core/src/bin/epiphany-work.rs b/epiphany-core/src/bin/epiphany-work.rs index b219fd08..90eaec48 100644 --- a/epiphany-core/src/bin/epiphany-work.rs +++ b/epiphany-core/src/bin/epiphany-work.rs @@ -17296,6 +17296,35 @@ mod authority_tests { .arg(&workspace) .status()?; assert!(git.success()); + for args in [ + ["-C", workspace.to_str().unwrap(), "config", "user.name", "Epiphany Smoke"], + ["-C", workspace.to_str().unwrap(), "config", "user.email", "smoke@epiphany.invalid"], + ] { + assert!(Command::new("git").args(args).status()?.success()); + } + fs::write(workspace.join("README.md"), "# Process retry smoke\n")?; + assert!( + Command::new("git") + .args(["-C", workspace.to_str().unwrap(), "add", "README.md"]) + .status()? + .success() + ); + assert!( + Command::new("git") + .args([ + "-C", + workspace.to_str().unwrap(), + "commit", + "--quiet", + "-m", + "Seed process retry smoke", + ]) + .status()? + .success() + ); + let commit_sha = git_output(&workspace, &["rev-parse", "HEAD"])? + .trim() + .to_string(); let artifact_dir = workspace.join(".epiphany").join("work"); fs::create_dir_all(&artifact_dir)?; let store = workspace.join("runtime.msgpack"); @@ -17314,7 +17343,7 @@ mod authority_tests { source_job_id: "process-retry-job".to_string(), verdict: "passed".to_string(), summary: "Verified consequence.".to_string(), - evidence_ids: vec!["commit-abc".to_string()], + evidence_ids: vec![commit_sha.clone()], risks: Vec::new(), emitted_at: "2026-07-12T00:00:00Z".to_string(), contract: "test".to_string(), @@ -17326,7 +17355,7 @@ mod authority_tests { item: "process-retry".to_string(), requester: "self".to_string(), soul_verdict_receipt_id: soul.receipt_id.clone(), - commit_sha: "abc123".to_string(), + commit_sha, changed_paths: vec!["README.md".to_string()], instruction: "Model generation zero.".to_string(), requested_at: "2026-07-12T00:00:01Z".to_string(), @@ -17427,6 +17456,61 @@ mod authority_tests { .generation, 1 ); + if env::var_os("EPIPHANY_RUN_LIVE_MODELING_LAUNCH").is_some() { + let live_tick = run_tick(TickArgs { + workspace: workspace.clone(), + epiphany_root: env::current_dir()?, + item: Some("process-retry".to_string()), + local_verse_store: Some(workspace.join(".epiphany").join("local-verse.ccmp")), + artifact_dir: Some(workspace.join(".epiphany").join("work")), + runtime_store: Some(store.clone()), + cooldown_seconds: 0, + active_timeout_seconds: 900, + dry_run: false, + })?; + let live_receipt = + read_json(Path::new(live_tick["receiptPath"].as_str().unwrap()))?; + assert_eq!(live_receipt["status"], "modeling-launched"); + assert_eq!(live_receipt["action"], "launch-modeling"); + assert_eq!( + live_receipt["advancedResult"]["requestId"], + tick_receipt["advancedResult"]["requestId"] + ); + assert_eq!( + live_receipt["advancedResult"]["jobId"], + tick_receipt["advancedResult"]["jobId"] + ); + assert_eq!(live_receipt["advancedResult"]["lifecycleOwner"], "Idunn"); + assert_eq!( + live_receipt["advancedResult"]["schemaPreflightPassed"], + true + ); + for field in [ + "lifecycleReceiptId", + "serviceId", + "executableSha256", + "schemaCatalogSha256", + "preflightWitnessId", + ] { + assert!( + live_receipt["advancedResult"][field] + .as_str() + .is_some_and(|value| !value.is_empty()), + "live lifecycle projection omitted {field}" + ); + } + assert_eq!( + live_receipt["advancedResult"]["requiredDocumentTypes"] + .as_array() + .map(Vec::len), + Some(4) + ); + let preserved = temp.keep(); + eprintln!( + "preserved live generation-one fixture at {}", + preserved.display() + ); + } Ok(()) } } diff --git a/notes/epiphany-current-algorithmic-map.md b/notes/epiphany-current-algorithmic-map.md index 7876554b..6f54106b 100644 --- a/notes/epiphany-current-algorithmic-map.md +++ b/notes/epiphany-current-algorithmic-map.md @@ -314,6 +314,15 @@ revision mouth and scheduler and proves generation one is selected. The final process proof must compare this projection with a real preflighted Idunn launch receipt; it must not add a fake production runtime mode. +The physical comparison passes. A real generation-one scheduler pulse matched +the deterministic route/request/job projection, consumer preflight +fingerprinted the executable and compiled schema catalog, Idunn persisted the +launch lifecycle receipt, and the detached model runtime completed a passing +typed finding with empty stderr. A later scheduler dry-run saw that finding as +`admit-modeling`; it did not relaunch generation zero. This closes the +generation-retry authority path. Re-enter through a source-grounded Perfect +Machine audit rather than adding more closure machinery. + ## Current Cut Line Keep: diff --git a/notes/epiphany-fork-implementation-plan.md b/notes/epiphany-fork-implementation-plan.md index 1ef6efec..ce881e41 100644 --- a/notes/epiphany-fork-implementation-plan.md +++ b/notes/epiphany-fork-implementation-plan.md @@ -204,8 +204,11 @@ Delete or demote: ## Immediate Next Action -Add a native end-to-end generation-one repo-work Modeling smoke. Begin with a -non-passing runtime-authored generation-zero finding, exercise the explicit -Mind-reviewed `revise-modeling` mouth, launch generation one through Idunn and -runtime-schema preflight, admit only the generation-one finding, and prove -generation zero cannot close or regain current authority. +Refresh the Perfect Machine audit against current source and live proofs. The +generation-one repo-work Modeling chain is complete from immutable +generation-zero failure through Mind revision, scheduler selection, consumer +schema preflight, Idunn lifecycle ownership, real runtime-authored +generation-one finding, and canonical current-generation admission. Remove +stale roadmap gaps that describe landed work, then select the next missing +organ boundary from authoritative source instead of extending this campaign by +inertia. diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index ae6b91a6..4aa5a440 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -2161,6 +2161,21 @@ typed route remains on generation one. The remaining proof is deliberately physical: run the same fixture non-dry with built consumer/supervisor binaries and verify the Idunn lifecycle receipt carries the projected request plus passing schema preflight fingerprints. +That physical proof passed. Live fixture +`C:\Users\Meta\AppData\Local\Temp\.tmpPoUbKg\repo` launched request +`repo-work-close-process-retry-modeling-request-g1` as generation-scoped job +`repo-work-modeling-process-retry-g1`. Idunn receipt +`daemon-service-lifecycle-receipt-idunn-repo-work-modeling-process-retry-g1-launch` +carried executable SHA-256 +`fe9f186705f8c9afb5b9424f3c38e7a8bc0e2370fdde47f92b8dac1bef63ca7e`, +schema-catalog SHA-256 +`07e0d07bb0b0f2ba5310005cce9ede594c392f461bf1036d28a0b3023a329c31`, +all four required typed document families, and +`schemaPreflightPassed=true`. The real model runtime completed with a passing +typed finding and empty stderr; the next scheduler dry-run returned +`action=admit-modeling`. The generation-one campaign is complete. Next refresh +the Perfect Machine audit against live source and cut stale roadmap claims +before selecting the next organ boundary. ## Immediate Re-entry Instruction diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index ef71a1d30fdbda2d53f656dd1d419d76075cfc02..6b810d1a256d7b6cffa54e2853210513beab2967 100644 GIT binary patch delta 454 zcmYLFJxc^J6m-w?1F;lgy9YKFcgmihTxX}Cl~#7S>g1%lE9H}jV+UJApbsrKOSEK&zfM9>;6I+B!v z_!>d6pm{z1c%EOocgPepsSmiIy=)M$kv>V;tWc_%yabd|i}bpYzK$a6?|{5O=Q^{D q$ywuVZ1Gp$21WQk0%zK2$>WDiG?FOJxejsGI*#CLrellWXj?z`z@p;- delta 56 zcmX^8PIAs`$qkZ>Tt-$V=26EO*h(rlD>D`{GQMq|%G5rUi4llFG&2yh05R+KsZ4C_ F#Q-em5%mB7 diff --git a/state/map.yaml b/state/map.yaml index b73148d5..6152e9b0 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -659,4 +659,4 @@ current_status: - Service lifecycle receipt history is now event-only: `load_epiphany_cultmesh_daemon_service_lifecycle_receipts` filters out the `epiphany-local/daemon-service-lifecycle-receipt/latest` mirror, while `load_latest_epiphany_cultmesh_daemon_service_lifecycle_receipt` remains the latest-state reader. Focused unit test `service_lifecycle_receipt_history_excludes_latest_mirror` proves two per-receipt writes return exactly two history records and latest points at the second. Fresh smoke `verse-query-lifecycle-history-filter-smoke` and live overview/triage `local-20260618-145632-497-efac6f0d` / `local-20260618-145632-321-867947af` prove compact swarm sights still expose service lifecycle attention plus the present elevated runbook artifact without daemon pokes or service mutation. Do not use a broad unscoped cargo test filter for this check on Windows; it fans out across bin harnesses and hit a broken pipe during this pass. - `epiphany-verse-query seed-compact` is the compact seed receipt for wrappers and read-only rites. The older `seed` command still prints the full local Verse context for explicit debugging, but compact wrapper modes now avoid full `seed`/final `query` readback after the combined overview proof exposed Windows debug stack overflow from full-context serialization pressure. last_completed_repo_swarm_cut: Huginn live-fire has crossed the first real repo Body from Persona pressure to branch-local Hands commit and Soul/Mind closure, and now has repeatable closure and redacted-public-proof mouths. On `E:\Projects\Huginn` branch `epiphany/huginn/first-awakening`, `tools/epiphany_local_run.ps1 -Mode repo-persona-intake` accepted item `huginn-inspection-readback-livefire`, Weksa/Persona intake remained sealed, and `epiphany-work derive-plan` lowered it to model-authored safe family `repo.status_section` for `README.md` only. `tools/epiphany_local_run.ps1 -Mode repo-swarm-run` advanced four bounded pulses: run-from-plan, adopt-from-plan, execute-from-plan, and close-from-execute. Huginn commit `e9b07c38fceabbdc89ea35c2156326c80c0393a2` updated only `README.md`; closure receipt `.epiphany\work\work-close-huginn-inspection-readback-livefire.json` records status `closed`, Soul verdict `passed`, Mind state commit `repo-work-close-huginn-inspection-readback-livefire-mind-commit`, safe family `repo.status_section`, path scope `README.md`, Bifrost publication gate, and `privateStateExposed=false`. Verification also ran Huginn's TypeScript compiler through concrete Node path: `C:\Program Files\nodejs\node.exe E:\Projects\Huginn\node_modules\typescript\bin\tsc -p tsconfig.json` passed. Native verifier `epiphany-repo-livefire-closure-smoke --workspace E:\Projects\Huginn --item huginn-inspection-readback-livefire --expected-path README.md --expected-family repo.status_section --expected-gate awaiting-publication --expected-blocker bifrost-publication-missing` checks closure receipt, Mind map entry, overview gate/blocker, authority seals, and `git show` changed paths, returning `status=ok`, `soulVerdict=passed`, `publicationGate=Bifrost`, and `privateStateExposed=false`. Wrapper `tools/epiphany_local_run.ps1 -Mode repo-livefire-closure -Workspace E:\Projects\Huginn -RepoWorkItem huginn-inspection-readback-livefire -SkipBuild` exposes the same read-only proof through the local operator mouth; artifact `local-20260621-190156-803-2f85ba15` printed commit, path, gate, blocker, Soul verdict, Mind commit receipt, and `privateStateExposed=False` without push, merge, publication, or target mutation. New wrapper `tools/epiphany_local_run.ps1 -Mode repo-work-public-proof -Workspace E:\Projects\Huginn -RepoWorkItem huginn-inspection-readback-livefire -SkipBuild` exports the redacted proof bundle and repo-local Verse index without publishing; artifact `local-20260621-190645-345-4555b1dc` wrote `.epiphany\public\proof-bundles\repo-work-public-proof-huginn-inspection-readback-livefire.json`, proof id `repo-work-public-proof-huginn-inspection-readback-livefire`, SHA-256 `857545b199f3e37eb06c2e757e5cfc201958e46667bb1f8403fd333a22620f63`, nine artifact rows, zero publication rows, and `privateStateExposed=False`. Gjallar readback `local-20260621-190701-140-b9519ec6` sees the `REPO-WORK-PUBLIC-PROOF` row and action row from Huginn's repo-local Verse with the same SHA-256 while Bifrost publication remains missing. Launcher compact modes are now named compact operator-context modes instead of read-only modes, and `bifrost-public-proof` summaries print item, target public Verse, room, proof SHA-256, review receipts, and credit receipts so publication receipts are auditable without claiming upstream sync. - next_action: Run and seal the physical half of the native generation-one repo-work Modeling smoke. The deterministic public revise-modeling and scheduler projection now prove route/request/job selection for generation one. Pulse the same disposable fixture non-dry with built consumer and supervisor binaries, verify the Idunn lifecycle receipt carries generation one's request plus passing executable/schema fingerprints, then compare it to the dry-run projection without adding a fake production runtime mode. + next_action: Refresh the Perfect Machine audit against current source and live proofs. The generation-one Modeling authority campaign is complete through real consumer preflight, Idunn launch, runtime-authored finding, and current-generation admission. Remove stale roadmap gaps that describe already-landed Hands, Mind, runtime, or closure work, then select the next missing organ boundary from authoritative evidence rather than extending this campaign by inertia.