diff --git a/epiphany-core/src/bin/epiphany-daemon-supervisor.rs b/epiphany-core/src/bin/epiphany-daemon-supervisor.rs index 24b28093..70cc7f91 100644 --- a/epiphany-core/src/bin/epiphany-daemon-supervisor.rs +++ b/epiphany-core/src/bin/epiphany-daemon-supervisor.rs @@ -558,14 +558,18 @@ fn semantic_projector_service_status(args: Args) -> Result<()> { "{}", serde_json::to_string_pretty(&json!({ "schemaVersion": "epiphany.memory_semantic_projector_service_status.v0", - "status": if correlation_matches && heartbeat.status == "ready" { "ready" } else { "degraded" }, + "status": semantic_projector_observation_status(correlation_matches, &heartbeat.status), "processId": receipt.process_id, "launchReceiptId": receipt.receipt_id, + "launchStartedAtUtc": receipt.started_at_utc, "executableSha256": receipt.executable_sha256, "heartbeatId": heartbeat.heartbeat_id, + "heartbeatAt": heartbeat.heartbeat_at, "providerIncarnation": heartbeat.provider_incarnation, "heartbeatStatus": heartbeat.status, "startupCorrelationMatches": correlation_matches, + "readinessAuthority": "semantic-query-admission", + "semanticReadiness": "not-asserted-by-this-status", "privateStateExposed": false, "authoritative": false, }))? @@ -573,6 +577,17 @@ fn semantic_projector_service_status(args: Args) -> Result<()> { Ok(()) } +fn semantic_projector_observation_status( + correlation_matches: bool, + heartbeat_status: &str, +) -> &'static str { + if correlation_matches && heartbeat_status == "ready" { + "provider-correlated" + } else { + "provider-degraded" + } +} + fn semantic_projection_input(args: &Args) -> Result<(MemorySemanticProjectionInput, &Path)> { match (&args.agent_store, &args.runtime_store) { (Some(path), None) => Ok((agent_memory_semantic_projection_input(path)?, path)), @@ -2517,6 +2532,22 @@ struct RestartOutput { mod provider_status_ownership_tests { use super::*; + #[test] + fn provider_correlation_never_claims_semantic_readiness() { + assert_eq!( + semantic_projector_observation_status(true, "ready"), + "provider-correlated" + ); + assert_eq!( + semantic_projector_observation_status(false, "ready"), + "provider-degraded" + ); + assert_eq!( + semantic_projector_observation_status(true, "degraded"), + "provider-degraded" + ); + } + #[test] fn successful_command_awaits_provider_heartbeat_instead_of_minting_readiness() { let exit_zero = RestartOutput { diff --git a/notes/epiphany-current-algorithmic-map.md b/notes/epiphany-current-algorithmic-map.md index b24be3a3..09114dc4 100644 --- a/notes/epiphany-current-algorithmic-map.md +++ b/notes/epiphany-current-algorithmic-map.md @@ -644,14 +644,30 @@ authentication, evidence field substitution, lifecycle/heartbeat causal ordering, recovery single use, and the inability of the recovery command to execute projection work itself. -Remaining limits are physical deployment, not permission for another adapter. -There is no open-obligation daemon pulse or packaged single projector owner -yet. The low-level mint and recovery primitives are crate-private. Their public -local-supervisor ports generate incarnations internally, but remain trusted -in-process ports rather than an OS-authenticated Idunn service boundary. -Deployment must keep those ports inside one configured Idunn body until a -durable authenticated service identity owns them. Canonical store and Qdrant -placement must be chosen as one topology; dual projectors are forbidden. +The packaged workstation body now contains the single projector owner, Idunn +supervisor, and semantic query verifier. Task Scheduler owns current-user +after-login presence of the foreground Idunn reconciler; the reserved typed +policy owns the exact projector launch shape; Idunn seals the launch receipt; +and the projector authenticates that receipt before taking the host-wide +canonical-store-pair singleton. `gamecult-ops` separately owns the foreground +Yggdrasil tunnel that exposes Qdrant on workstation loopback. Canonical store +and Qdrant placement remain one topology; dual projectors are forbidden. + +Provider correlation is derived sight. The service-status projection reports +`provider-correlated` or `provider-degraded`, never semantic readiness. Query +admission authenticates the newest exact obligation/current/success chain and +alone owns readiness. Deployment proof uses the packaged verifier with explicit +`EPIPHANY_QDRANT_URL` and `EPIPHANY_OLLAMA_BASE_URL`; both Mind and Modeling +queries have returned semantic ranking under those explicit coordinates. + +Stopping the scheduled reconciler does not kill its detached projector child. +Process ancestry is therefore current observation, not durable ownership, and +a task restart can reuse an already-running child. The missing proof is a real +operator-approved reboot/logon cycle that observes both tasks restored, the +tunnel ports live, a fresh post-boot reconciler -> exactly-one-projector chain, +a new launch-correlated provider heartbeat, and semantic ranking from both +packaged queries. This proves after-login physiology only. Reboot is outside +agent authority until the operator grants that exact host-wide action. This map must change when ownership changes. Historical scars belong in git, evidence, or an explicitly archived note—not in the machine's Modeling state. diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index eb124cf7..7b1beb80 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -1409,12 +1409,34 @@ incarnation `projector-59217a66-e3e2-44c3-b000-36af3d43b043` and the exact startup correlation. Tunnel recurrence killed SSH PID 22652 and observed PID 30444 start at 11:37:44 with Qdrant REST healthy. +The pre-reboot deployment repair then packaged +`epiphany-memory-semantic.exe` beside the release supervisor and projector, +deployed the rebuilt supervisor, and left +`Epiphany-Idunn-Managed-Service-Reconciler` Running. Deployment queries must +receive the real transport coordinates explicitly through +`EPIPHANY_QDRANT_URL` and `EPIPHANY_OLLAMA_BASE_URL`; ambient defaults are not +deployment proof. With those variables set, both packaged Mind and Modeling +queries returned semantic ranking. The provider status command no longer calls +that sight `ready`: it returns `provider-correlated` or `provider-degraded`, is +explicitly non-authoritative, and points to semantic query admission as the +only readiness owner. + +One process-lifecycle scar matters for the reboot audit. Stopping the Task +Scheduler reconciler leaves its already-detached projector child alive. A +current parent PID is therefore derived process sight, not durable custody, and +a stop/start rehearsal can accidentally reuse the old child. The real proof +must observe a fresh post-boot scheduler -> reconciler -> exactly-one-projector +chain, a new launch-correlated provider heartbeat, and successful packaged +Mind and Modeling query admission after the tunnel returns. + The limitation is part of the contract: this is after-login recovery, not pre-login, boot-time, machine-wide, or Windows-service operation. The remaining Soul proof is a real reboot/logon cycle showing both scheduled tasks running, the tunnel ports restored, one Idunn-managed projector child, and a fresh -launch-correlated ready heartbeat. Do not spend another pass polishing the dead -SCM rite. +launch-correlated provider heartbeat followed by semantically ranked packaged +Mind and Modeling queries. Reboot remains a host-wide action requiring exact +live operator permission. Do not spend another pass polishing the dead SCM +rite. ## Isolated semantic abandoned-claim recovery proof (2026-07-15) diff --git a/notes/semantic-projector-service-runbook.md b/notes/semantic-projector-service-runbook.md index b2e82008..f3cb2cce 100644 --- a/notes/semantic-projector-service-runbook.md +++ b/notes/semantic-projector-service-runbook.md @@ -25,7 +25,7 @@ one process per partition. ```powershell $env:CARGO_TARGET_DIR='C:\Users\Meta\.cargo-target-codex' -cargo build --release --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-memory-semantic-projector --bin epiphany-daemon-supervisor +cargo build --release --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-memory-semantic-projector --bin epiphany-memory-semantic --bin epiphany-daemon-supervisor ``` ## Transport configuration @@ -124,3 +124,73 @@ projector resumes its own recovered claim on the next pulse. - Stop the process once, let Idunn restart it, and verify a newer provider heartbeat names the startup lifecycle receipt. Do not use command exit zero as readiness. + +## Reboot and logon proof + +This is an operator-authorized host boundary. Do not reboot Starfire without +explicit live approval. Before reboot, record the current boot time, task +definitions, task process IDs, launch receipt, heartbeat, provider incarnation, +and projector PID. After the operator logs in again, prove the following from +the repository root: + +```powershell +Get-CimInstance Win32_OperatingSystem | Select-Object LastBootUpTime +Get-ScheduledTask -TaskName GameCult-Yggdrasil-Tunnel,Epiphany-Idunn-Managed-Service-Reconciler | + Select-Object TaskName, State +E:\Projects\gamecult-ops\scripts\check-yggdrasil-tunnel.ps1 +curl.exe -fsS http://127.0.0.1:16333/collections +Get-CimInstance Win32_Process | + Where-Object { $_.CommandLine -match 'managed-service-serve|memory-semantic-projector' } | + Select-Object ProcessId, ParentProcessId, CreationDate, CommandLine +C:\Users\Meta\.cargo-target-codex\release\epiphany-daemon-supervisor.exe ` + semantic-projector-service-status ` + --store .\.epiphany-run\cultmesh\local-verse.ccmp ` + --runtime-id epiphany-local +``` + +The status command proves only a provider launch/heartbeat correlation. Its +`status` must be `provider-correlated`, `authoritative` must be `false`, and the +launch receipt, heartbeat, provider incarnation, process creation time, and +receipt timestamps must all belong to the post-boot process chain. The status +projection exposes those typed times as `launchStartedAtUtc` and `heartbeatAt`. +Make the lineage assertion exact: + +```powershell +$idunn = @(Get-CimInstance Win32_Process | Where-Object { + $_.Name -eq 'epiphany-daemon-supervisor.exe' -and + $_.CommandLine -match '\bmanaged-service-serve\b' +}) +$projector = @(Get-CimInstance Win32_Process | Where-Object { + $_.Name -eq 'epiphany-memory-semantic-projector.exe' +}) +if ($idunn.Count -ne 1) { throw "expected exactly one Idunn reconciler" } +if ($projector.Count -ne 1) { throw "expected exactly one semantic projector" } +if ($projector[0].ParentProcessId -ne $idunn[0].ProcessId) { + throw "semantic projector is not a direct child of the post-boot Idunn reconciler" +} +``` + +Task Scheduler +`LastTaskResult=0x800710E0` can be the expected refused duplicate recurrence +while an `IgnoreNew` foreground task is already Running; it is not readiness. + +Finally use the packaged query gate with explicit deployment endpoints. Omitting +these variables selects developer defaults and may legitimately fall back to +BM25, which is a failed deployment proof rather than semantic readiness: + +```powershell +$env:EPIPHANY_QDRANT_URL='http://127.0.0.1:16333' +$env:EPIPHANY_OLLAMA_BASE_URL='http://10.77.0.1:11435' +$semantic='C:\Users\Meta\.cargo-target-codex\release\epiphany-memory-semantic.exe' +& $semantic context --agent-store .\state\agents.msgpack --partition mind ` + --text 'current Epiphany doctrine and memory' --query-id reboot-proof-mind --budget 8 +& $semantic context --runtime-store .\state\runtime-spine.msgpack --partition modeling ` + --text 'current repository architecture and deployment frontier' ` + --query-id reboot-proof-modeling --budget 8 +``` + +Both results must report `semantic projection ranked ... canonical ... +candidates` and must not report `semantic projection unavailable` or BM25 +fallback. That query admission is the readiness proof. A Running task, open TCP +port, Qdrant collection listing, provider heartbeat, or health projection is +only a prerequisite observation. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index a8a9cc17..52e4a9a0 100644 Binary files a/state/ledgers.msgpack and b/state/ledgers.msgpack differ diff --git a/state/map.yaml b/state/map.yaml index d73944a5..f518260e 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -715,9 +715,9 @@ current_status: - `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`. swarm overview 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. - Windows host survival authority is Task Scheduler, not SCM. Tasks `Epiphany-Idunn-Managed-Service-Reconciler` and `GameCult-Yggdrasil-Tunnel` run as current user Meta with `InteractiveToken`/Limited privilege, `AtLogOn` plus a one-minute recurring recovery trigger, `IgnoreNew`, zero execution limit, and restart-on-failure at one-minute intervals (999 attempts). Each task owns only after-login process presence through one exact direct foreground action. Idunn remains sole owner of managed-service reconciliation and projector child lifecycle; Task Scheduler cannot mint projector readiness, claims, grants, recovery, or terminal evidence. `gamecult-ops` owns the Yggdrasil tunnel profile and foreground SSH process; Epiphany only consumes pinned local Qdrant ports. This is explicitly after-login physiology, not pre-login, boot-time, machine-wide, or Windows-service survival. - - Live recurrence proof killed reconciler PID 24152 and observed Task Scheduler start exactly one replacement PID 25428. Killing projector PID 29868 then caused Idunn to launch PID 19888 with launch receipt `4d406060-6582-473a-9322-9f4ccc8b322f`; ready heartbeat `79fe3143-28a8-40fe-9547-0287159082e6` names provider incarnation `projector-59217a66-e3e2-44c3-b000-36af3d43b043` and the exact startup correlation. Tunnel recurrence killed SSH PID 22652 and observed PID 30444 start at 11:37:44 with Qdrant REST healthy. + - Live recurrence proof killed reconciler PID 24152 and observed Task Scheduler start exactly one replacement PID 25428. Killing projector PID 29868 then caused Idunn to launch PID 19888 with launch receipt `4d406060-6582-473a-9322-9f4ccc8b322f`; ready heartbeat `79fe3143-28a8-40fe-9547-0287159082e6` names provider incarnation `projector-59217a66-e3e2-44c3-b000-36af3d43b043` and the exact startup correlation. Tunnel recurrence killed SSH PID 22652 and observed PID 30444 start at 11:37:44 with Qdrant REST healthy. A later pre-reboot repair packaged `epiphany-memory-semantic` beside the supervisor/projector, deployed the rebuilt supervisor release, and left `Epiphany-Idunn-Managed-Service-Reconciler` Running. Deployment query proof requires explicit `EPIPHANY_QDRANT_URL` and `EPIPHANY_OLLAMA_BASE_URL`; with those coordinates both packaged Mind and Modeling queries returned semantic ranking. `semantic-projector-service-status` now reports only `provider-correlated` or `provider-degraded` and explicitly names query admission as the readiness owner. Stopping the Task Scheduler reconciler does not terminate its already-detached projector child, so parent-process ancestry is derived current-session sight and cannot prove post-boot custody. The reboot proof must require a fresh post-boot scheduler -> reconciler -> exactly-one-projector process chain, not merely reuse a surviving child. - Native feature-gated `epiphany-semantic-recovery-smoke` now proves abandoned-claim recovery through production process and authority boundaries without touching canonical state. In GUID-scoped Mind, Modeling, and Verse stores, a real projector acquires epoch 1, stalls against a fixture-local endpoint, and is killed; the supervisor consumes an exact current policy/lifecycle/heartbeat chain to recover epoch 2; a replacement projector consumes that authorization through the common execution path. Typed read-only inspection proves the old attempt failed, the authorization was consumed, epoch 2 is running, and the old owner is fenced; readiness and query eligibility are real. GUID Qdrant collection names are preflighted absent, deleted, and verified absent by exact 404. The fixture has no live/default Mind, Modeling, Verse, or mutation-fixture mouth. Proof `C:\Users\Meta\AppData\Local\Temp\epiphany-semantic-recovery-1152736f-b8a2-4cf0-ab24-c8a3993a0eb7\proof.json` passed. - Historical June proof bullets in this map that report seven Eve surfaces, eighteen/nineteen daemon tools, or provider-backed `connect-eve`/tool/swarm-overview rows describe the now-retired provenance-free v0 projection. They are evidence of the substitution, not current availability. Live Eve and tool directories now return zero from those v0 families, `connect-eve` fails unavailable, and heartbeat cannot recreate them. - The `epiphany.surface.*` Hello fiction is cut. Commit `65445623` remains the completed local Persona projection repair: `epiphany.persona_surface.v0` is a strict, content-free MVP-status projection over typed Persona artifact references, and its schemas remain useful discoverable vocabulary for local projection validation. It is not a CultNet runtime capability. All seventeen unbacked `epiphany.surface.*` mutation contracts and their dead runtime constants are removed; no surface type may appear in Hello until an owning provider can prove `provider publish -> typed CultMesh document -> Snapshot -> schema validation -> Eve lowering`, with a real typed dispatcher and receipt path for every advertised action. Runtime Hello and runtime status derive the current executable contract list. They ignore stale `supported_document_types` persisted in runtime identity, so the live canonical store's historical field cannot decide present wire authority or status. A canonical real hello-frame proved zero `epiphany.surface.*` capabilities. The adjacent generic central Eve substitution is also cut: `epiphany-cluster-daemon` owns liveness only; the central provider publisher and heartbeat call are deleted. Live Odin, Eve, and daemon-tool directories ignore provenance-free v0 rows, and explicit bootstrap retires stale rows of exactly those three families. Topology `eve_surface_id` is stable address/routing metadata only, not availability or composition proof. Provider discovery may return only after an owning provider emits a provenance-bearing typed contract; advertised actions additionally require a real dispatcher and receipt path. This does not displace the reboot/logon deployment proof as the current next action. - Historical Windows SCM material in this map is rejected-path evidence, not live authority. Arbitrary console `sc.exe` installation, elevated service execution runbooks/audits, cluster-service install/start/stop/control, `swarm-online-runbook`, service-manager action queues, and their wrapper routes no longer describe deployable physiology or actionable next work. Their receipts may remain sealed historical evidence, but they cannot decide liveness, readiness, recovery, or operator action. The console binaries never implemented the Windows service-control dispatcher and therefore could not honestly own SCM service state. - next_action: Prove this Task Scheduler boundary across a real reboot and user logon: both tasks must return to Running, the gamecult-ops foreground tunnel must restore `127.0.0.1:16333`/`:16334`, Idunn must reconcile exactly one projector child, and that child must publish a fresh launch-correlated ready heartbeat without operator-shell custody. Record that this proves after-login recovery only; the isolated abandoned-claim recovery proof is complete but does not establish global deployability. Do not resume SCM hardening or resurrect cluster-service/elevated-runbook wrappers. + next_action: With explicit operator permission for the host-wide action, prove this Task Scheduler boundary across a real reboot and user logon: both tasks must return to Running, the gamecult-ops foreground tunnel must restore `127.0.0.1:16333`/`:16334`, the rebuilt Idunn task must establish a fresh post-boot reconciler -> exactly-one-projector chain rather than inherit a pre-boot child, that projector must publish a fresh launch-correlated provider heartbeat, and packaged Mind and Modeling queries must both achieve semantic ranking using explicit `EPIPHANY_QDRANT_URL` and `EPIPHANY_OLLAMA_BASE_URL`. Record that provider correlation is sight and query admission alone owns readiness. This proves after-login recovery only; the isolated abandoned-claim recovery proof is complete but does not establish global deployability. Do not reboot without exact live operator approval, resume SCM hardening, or resurrect cluster-service/elevated-runbook wrappers.