Align projector runbook with Idunn authority
This commit is contained in:
parent
47454e61cf
commit
f0f2c1cbaa
5 changed files with 101 additions and 216 deletions
|
|
@ -1,8 +1,8 @@
|
|||
# Epiphany current algorithmic map
|
||||
|
||||
Updated: 2026-08-23
|
||||
Latest committed implementation cut: `ffe707ff` on `codex/epiphany-shakedown-live`
|
||||
Current worktree cut: canonical map/evidence sync; Ox17 remains paused
|
||||
Latest committed implementation cut: `47454e61` on `codex/epiphany-shakedown-live`
|
||||
Current worktree cut: projector runbook and canonical map/evidence sync; Ox17 remains paused
|
||||
|
||||
This document describes the live machine. Historical cuts, rejected paths, and
|
||||
proof chronology belong in git, `state/ledgers.msgpack`, and bounded smoke
|
||||
|
|
@ -83,6 +83,14 @@ Scheduler argv integrity, all-or-none Idunn signed-health identity, stale child
|
|||
process identity/PID reuse, and heartbeat freshness plus lifecycle correlation.
|
||||
Tests that merely format bytes, call a match arm, round-trip a brake, or preserve
|
||||
a display/history mirror are gone with the production scaffolding they excused.
|
||||
|
||||
Exact `47454e61` splits launch authority into semantic and workspace-coverage
|
||||
families over one small native spawn mechanic. Optional family tuples and the
|
||||
generic launch outcome are gone. The same cut deletes Epiphany's Windows Task
|
||||
Scheduler installer/control plane and its argv test: Idunn on Yggdrasil is the
|
||||
deployment and daemon-survival owner. The supervisor falls from 3,156 to 2,693
|
||||
lines, 463 net lines smaller. Its four surviving tests now guard brake scope,
|
||||
Idunn signed-health binding, stale process identity, and heartbeat correlation.
|
||||
The model-provider boundary explicitly selects a
|
||||
typed provider dialect and internally derives the exact provider request from
|
||||
the canonical native request. OpenRouter/Ox is the current Yggdrasil provider;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Updated: 2026-08-23
|
||||
Branch: `codex/epiphany-shakedown-live`
|
||||
Latest committed implementation cut: `ffe707ff`
|
||||
Latest committed implementation cut: `47454e61`
|
||||
Current worktree: final heartbeat deletion and behavioral-test audit; Ox17 remains paused
|
||||
|
||||
## Orientation
|
||||
|
|
@ -681,6 +681,22 @@ conflicts on concurrent same-service replacement while disjoint services remain
|
|||
independent. The cut subtracts 209 net lines. Focused native checks pass:
|
||||
CultMesh 18/18, workspace process authority 11/11, and supervisor 5/5.
|
||||
|
||||
Exact `47454e61` replaces the branch-filled generic launch function with one
|
||||
semantic launch owner, one workspace-coverage launch owner, and one shared
|
||||
native spawn mechanic. Optional family tuples and generic launch outcomes are
|
||||
gone. The same cut deletes six Windows Task Scheduler commands, PowerShell
|
||||
mutation/readback, survival settings, parser cargo, and the argv test. Idunn on
|
||||
Yggdrasil is the sole deployment and daemon-survival authority. The supervisor
|
||||
drops from 3,156 to 2,693 lines: 463 net lines removed; native check and its
|
||||
four consequence tests pass. The retired command refuses at runtime.
|
||||
|
||||
`notes/semantic-projector-service-runbook.md` now describes the Yggdrasil/Idunn
|
||||
body. Its deployment preflight records one external mismatch: the current
|
||||
`gamecult-ops/systemd/epiphany.service` still supplies retired `--agent-store`
|
||||
and `--daemon-id` flags. The owning infrastructure lane must correct that unit
|
||||
before a fresh Epiphany package is admitted; do not edit or deploy it from this
|
||||
source-subtraction lane.
|
||||
|
||||
Preserve cluster topology while it owns the runtime-bound Body domain and
|
||||
bootstrap evidence. Separately split the remaining daemon supervisor's
|
||||
launch/reconcile authority before claiming sequencing coverage. Do not run a
|
||||
|
|
|
|||
|
|
@ -1,227 +1,88 @@
|
|||
# Semantic Projector Service
|
||||
# Projector service runbook
|
||||
|
||||
## Authority
|
||||
|
||||
One `epiphany-memory-semantic-projector` process owns derived semantic indexing
|
||||
for the Modeling projection of one Epiphany runtime:
|
||||
Idunn on Yggdrasil owns Epiphany package admission, unit installation,
|
||||
deployment mutation, restart, and daemon survival. Epiphany does not install a
|
||||
second scheduler or service manager.
|
||||
|
||||
- Modeling input: the configured runtime Mind CultCache store
|
||||
- Derived index: the Modeling Qdrant collection
|
||||
- Derived sight: provider-authored CultMesh health and heartbeat events
|
||||
Inside the admitted package:
|
||||
|
||||
Canonical CultCache admission owns projection obligations. Idunn owns process
|
||||
survival, executor assignment, and explicit fenced recovery. The projector owns
|
||||
claim-bound Qdrant mutation and terminal evidence. Query admission alone proves
|
||||
semantic readiness. Qdrant, Ollama, health, heartbeat, Eve, and swarm overview
|
||||
are not state authority.
|
||||
- the semantic projector policy owns the exact Modeling projector command;
|
||||
- the semantic launch receipt and correlated heartbeat own observed semantic
|
||||
process readiness;
|
||||
- the workspace-coverage policy owns its exact projector command;
|
||||
- the signed workspace launch, process, heartbeat, termination, and recovery
|
||||
documents own workspace-coverage consequences;
|
||||
- the supervisor owns only exact policy reconciliation and shared native process
|
||||
mechanics;
|
||||
- Qdrant and Ollama are derived indexing dependencies, never Mind authority.
|
||||
|
||||
The process must remain beside its canonical runtime store. Yggdrasil may host
|
||||
Ollama embedding work over WireGuard. Do not install a second projector for the
|
||||
same runtime store.
|
||||
## Deployment shape
|
||||
|
||||
## Package one source generation
|
||||
|
||||
```powershell
|
||||
$env:CARGO_TARGET_DIR='C:\Users\Meta\.cargo-target-codex'
|
||||
cargo build --release --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-release
|
||||
& "$env:CARGO_TARGET_DIR\release\epiphany-release.exe" package `
|
||||
--repo . `
|
||||
--destination .\.epiphany-run\releases `
|
||||
--store .\.epiphany-run\cultmesh\local-verse.ccmp `
|
||||
--runtime-id epiphany-local
|
||||
```
|
||||
|
||||
The packager refuses dirty tracked source and owns a fresh isolated Cargo release
|
||||
build of the supervisor, semantic projector, workspace-coverage projector, and
|
||||
semantic query gate. It copies exactly those four siblings into an immutable
|
||||
commit-addressed directory, verifies every byte, then atomically publishes a
|
||||
typed CultCache release witness and current head. Keep the returned `releaseId`,
|
||||
`witnessSha256`, and `packageRoot`; Task Scheduler and Idunn pin them. A mutable
|
||||
`target\release` directory is build output, not deployment authority.
|
||||
|
||||
## Transport configuration
|
||||
|
||||
The reserved typed service policy binds the non-secret transport coordinates:
|
||||
The Idunn-admitted systemd unit runs two policy commands before starting the
|
||||
reconciler:
|
||||
|
||||
```text
|
||||
--qdrant-url http://127.0.0.1:16333
|
||||
--ollama-base-url http://10.77.0.1:11435
|
||||
--ollama-model qwen3-embedding:0.6b
|
||||
epiphany-daemon-supervisor semantic-projector-service-policy
|
||||
epiphany-daemon-supervisor workspace-coverage-projector-service-policy
|
||||
epiphany-daemon-supervisor managed-service-serve
|
||||
```
|
||||
|
||||
Qdrant REST reaches Yggdrasil loopback through the ops-owned SSH tunnel; Ollama
|
||||
is admitted directly on WireGuard. API keys remain in the service environment
|
||||
or secret store and never enter policy arguments or logs. Collection names and
|
||||
timeouts retain their typed configuration defaults unless deliberately changed.
|
||||
Every command binds the same local Verse path, runtime ID, exact release ID, and
|
||||
release-witness digest. The policy commands additionally bind the canonical
|
||||
runtime store, Qdrant URL, Ollama URL/model, loop interval, and log artifacts.
|
||||
The reconciler binds Resident Self and the complete Idunn signed-health identity
|
||||
tuple.
|
||||
|
||||
## Preflight
|
||||
The source CLI is the contract. Before deployment, compare the reviewed
|
||||
`gamecult-ops/systemd/epiphany.service` argv with the exact candidate binary.
|
||||
The current ops unit still supplies retired `--agent-store` and `--daemon-id`
|
||||
arguments; it must be corrected in its owning infrastructure lane before Idunn
|
||||
admits a new Epiphany release.
|
||||
|
||||
1. Confirm the runtime Mind store exists and carries the admitted runtime/swarm identity.
|
||||
2. Confirm Qdrant is reachable from the workstation and its collection metadata
|
||||
matches the configured embedding dimensions.
|
||||
3. Confirm Ollama is reachable and the configured embedding model is loaded.
|
||||
4. Confirm no projector process already owns the canonical runtime store. The
|
||||
binary also enforces this with a host OS singleton. On Windows this is a
|
||||
`Global\\` named mutex shared by service and interactive sessions; failure to
|
||||
create or open it fails closed before a provider incarnation exists.
|
||||
5. Confirm the local Verse store is bootstrapped and Idunn's managed-service
|
||||
reconciler is running.
|
||||
Do not compile or install this service on Starfire. Do not create a Windows Task
|
||||
Scheduler fallback. The package must arrive through Idunn's source-triggered
|
||||
native Yggdrasil build, test, package, and exact brake-grant transaction.
|
||||
|
||||
Current observation on 2026-07-15: the workstation's retired
|
||||
`voidbot-qdrant` container is intentionally stopped after the VoidBot cutover.
|
||||
The authoritative Yggdrasil Qdrant is physically shared and contains the
|
||||
Epiphany Modeling collection. The ops tunnel exposes its loopback
|
||||
REST/gRPC ports locally as `16333`/`16334`; do not restart the retired node.
|
||||
## Launch admission
|
||||
|
||||
## Publish the typed service policy
|
||||
The semantic family preallocates one lifecycle receipt ID, injects it into the
|
||||
child environment, captures the exact process identity and executable digest,
|
||||
then atomically writes the launch receipt. The child heartbeat must name that
|
||||
receipt and follow launch completion before readiness is projected.
|
||||
|
||||
```powershell
|
||||
$releaseRoot = '<packageRoot returned by epiphany-release>'
|
||||
$releaseId = '<releaseId>'
|
||||
$releaseDigest = '<witnessSha256>'
|
||||
$supervisor = Join-Path $releaseRoot 'epiphany-daemon-supervisor.exe'
|
||||
& $supervisor semantic-projector-service-policy `
|
||||
--store .\.epiphany-run\cultmesh\local-verse.ccmp `
|
||||
--runtime-id epiphany-local `
|
||||
--release-id $releaseId `
|
||||
--release-witness-sha256 $releaseDigest `
|
||||
--runtime-store .\state\runtime-spine.msgpack `
|
||||
--qdrant-url http://127.0.0.1:16333 `
|
||||
--ollama-base-url http://10.77.0.1:11435 `
|
||||
--ollama-model qwen3-embedding:0.6b `
|
||||
--loop-interval-seconds 60
|
||||
```
|
||||
The workspace family creates a host-signed launch document, passes its launch ID
|
||||
and one ephemeral provider seed through the child bootstrap pipe, zeroizes the
|
||||
seed, and records exact boot, process, executable, policy, and replacement
|
||||
evidence. It never lowers this authority into a generic lifecycle receipt.
|
||||
|
||||
This command writes the fixed
|
||||
`epiphany-memory-semantic-projector-service` managed-service policy with
|
||||
`restartMode=always`. Its generated child command contains the canonical
|
||||
runtime store. The projector executable is resolved from the authenticated
|
||||
`semantic-projector` role in the pinned release witness. Caller-supplied executable paths,
|
||||
service IDs, restart modes, arbitrary child arguments, and finite iteration
|
||||
limits do not own this service shape. The generic managed-service writer
|
||||
refuses the reserved service id.
|
||||
|
||||
Idunn's existing `managed-service-serve` loop reconciles that policy and writes
|
||||
the startup lifecycle receipt identifier into the child environment. For each
|
||||
launch it preallocates a fresh UUID, authenticates the exact current reserved
|
||||
policy envelope, spawns the one infinite child, then atomically seals an
|
||||
immutable v1 lifecycle receipt. That receipt binds `action=launch`,
|
||||
`status=launched`, the child PID, spawn completion time, policy id and envelope
|
||||
digest, fixed projector daemon id, and a startup correlation id equal to the
|
||||
receipt id. If sealing fails, Idunn kills and waits for the unowned child.
|
||||
|
||||
The projector resolves that exact receipt from the local Verse and rechecks its
|
||||
binding to the current reserved policy before constructing its service body or
|
||||
publishing a pulse or heartbeat. A launch receipt proves process creation; it
|
||||
does not claim semantic readiness. The first heartbeat comes later, after the
|
||||
projector holds the OS singleton and validates the canonical Modeling input.
|
||||
|
||||
## Install the pinned after-login reconciler
|
||||
|
||||
```powershell
|
||||
& $supervisor managed-service-task-install `
|
||||
--store .\.epiphany-run\cultmesh\local-verse.ccmp `
|
||||
--runtime-id epiphany-local `
|
||||
--release-id $releaseId `
|
||||
--cwd . `
|
||||
--loop-interval-seconds 60
|
||||
```
|
||||
|
||||
Task installation resolves the supervisor path and witness digest from the
|
||||
typed release. The scheduled action pins both `--release-id` and
|
||||
`--release-witness-sha256`; `managed-service-serve` authenticates the complete
|
||||
four-sibling set and its own path before reconciliation, then revalidates the
|
||||
set on every pulse. Reserved projector policies must name the exact witnessed
|
||||
role paths. A task pointing at the right supervisor with a missing/wrong witness
|
||||
argument, or a release directory with one changed sibling, is drift/failure.
|
||||
If either launch cannot seal its owning document, the supervisor kills and
|
||||
waits for the unowned child.
|
||||
|
||||
## Recovery
|
||||
|
||||
Use `semantic-recover` only with the exact abandoned claim, the immutable launch
|
||||
receipt for the current reserved managed policy, and its causally later provider
|
||||
heartbeat. The launch receipt must still authenticate against the current policy
|
||||
envelope; advancing policy invalidates an older launch witness. Ordinary daemon
|
||||
poke intents and receipts cannot authorize semantic recovery.
|
||||
Semantic recovery requires the exact abandoned claim, current policy digest,
|
||||
launch receipt, and causally later correlated heartbeat. It rotates executor
|
||||
authority; it does not mint projection success.
|
||||
|
||||
Recovery always assigns the fixed packaged projector executor identity. It
|
||||
rotates authority; it does not execute projection or mint readiness. The running
|
||||
projector resumes its own recovered claim on the next pulse.
|
||||
Workspace recovery requires the signed terminal/advancement sight, exact
|
||||
termination evidence, a signed replacement launch, replacement heartbeat, and
|
||||
an `ExactAlive` process observation. The recovery directive commits only after
|
||||
that chain authenticates.
|
||||
|
||||
## Proof after launch
|
||||
## Acceptance
|
||||
|
||||
- Read the fixed managed-service policy and latest lifecycle receipt.
|
||||
- Read the projector heartbeat for its current provider incarnation.
|
||||
- Read the Modeling semantic-health projection.
|
||||
- Run a Modeling semantic query and confirm the query gate reports semantic
|
||||
ranking only when the newest exact obligation/success chain is authenticated.
|
||||
- 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.
|
||||
After Idunn deploys an exact package:
|
||||
|
||||
## 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
|
||||
F:\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
|
||||
& $supervisor `
|
||||
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=Join-Path $releaseRoot 'epiphany-memory-semantic.exe'
|
||||
& $semantic context --runtime-store .\state\runtime-spine.msgpack `
|
||||
--text 'current repository architecture and deployment frontier' `
|
||||
--query-id reboot-proof-modeling --budget 8
|
||||
```
|
||||
|
||||
The result 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.
|
||||
1. Verify the deployed source, package release ID, witness digest, and systemd
|
||||
argv against Idunn's sealed receipt.
|
||||
2. Verify one semantic current lifecycle receipt and its correlated fresh
|
||||
heartbeat.
|
||||
3. Verify one signed workspace launch and per-launch heartbeat chain.
|
||||
4. Stop each child in turn and prove Idunn continuity produces a new exact
|
||||
family-owned launch without changing the package or Mind state.
|
||||
5. Run an admitted Modeling semantic query. A running process, open port,
|
||||
Qdrant collection, or heartbeat alone is not semantic readiness.
|
||||
6. Confirm the deployment brake is re-engaged and Idunn remains independent of
|
||||
Epiphany health, credentials, stores, and target brake state.
|
||||
|
|
|
|||
Reference in a new issue