Package the Idunn semantic projector body

This commit is contained in:
Meta Vens 2026-07-15 09:32:53 +01:00
commit b924fe5b7d
14 changed files with 1687 additions and 155 deletions

View file

@ -1235,17 +1235,64 @@ Eve, and swarm overview remain derived sight and forbidden writers. Initial
execution, retry, repair, and recovered execution share the same claim-
authenticating projector primitive.
Remaining limits: open-obligation discovery is not yet attached to the Idunn
daemon, no single projector owner is packaged, canonical-store/Qdrant placement
between local and Yggdrasil remains undecided, and local Qdrant remains
overexposed. The low-level mint and recovery primitives are crate-private.
Their public local-supervisor ports generate incarnations internally, but are
still a trusted in-process boundary rather than authenticated OS IPC. Keep them
inside one configured Idunn body until durable service identity owns them. Do
not expose those ports to untrusted Verse peers. Do not deploy two projectors.
## Workstation semantic projector service body (2026-07-15)
Next: add a bounded Idunn pulse that discovers authenticated open Mind and
Modeling obligations without creating demand, runs the same acquire/execute
primitive, republishes sight independently, and reports provider readiness only
after its own heartbeat. Then select and package exactly one deployment
topology.
The open-obligation pulse and single process owner are now implemented as one
workstation-local `epiphany-memory-semantic-projector` body managed by Idunn.
Its constructor requires two distinct canonical files--one Mind store and one
Modeling runtime store--and refuses unless their sealed inputs name the exact
partitions and the same immutable swarm. It takes a host OS singleton for that
canonical pair before minting its process-stable provider/executor incarnation.
Mind and Modeling remain separate authorities, claims, collections, and
receipts; they merely share one survival body.
Every pulse reloads both canonical inputs. It stores no open-obligation queue
and allows at most one global action, rotating fairly between actionable
partitions. Ready, foreign-running, succeeded, and stale inputs never execute.
Pending and failed inputs acquire exact Idunn authority before using the one
crate-private executor. A running claim owned by the current provider
incarnation resumes directly without minting a second grant; a foreign running
claim remains pressure until exact recovery. Overlapping pulses return busy,
and the serve cooldown begins only after the bounded pulse completes. A fault
loading one source does not turn the other source into false readiness or hide
its valid action.
The old production mouths are gone: `epiphany-memory-semantic` no longer has an
`index` arm or claim flag, there is no public raw execute function, and the
supervisor no longer exposes general semantic acquisition. Recovery remains a
narrow supervisor action. It authenticates the abandoned claim, exact Idunn
lifecycle intent/receipt, and causally linked replacement-provider heartbeat,
then rotates claim authority only. The running service recognizes that exact
recovered claim as its own and resumes it on a later ordinary pulse.
Idunn owns a specialized reserved service-policy writer for fixed service id
`epiphany-memory-semantic-projector-service`. It derives the packaged sibling
binary, fixed executor identity, both canonical stores, infinite serve shape,
and restart-always policy. The generic managed-service writer refuses that
reserved id; callers cannot substitute a command, service id, restart mode, or
finite child lifetime. Existing Idunn managed-service reconciliation owns
process survival and lifecycle receipts. The OS singleton prevents a service
and an interactive process from simultaneously owning the same canonical pair.
Provider heartbeat and per-partition semantic health remain derived sight.
Heartbeat `ready` means the body owns its singleton, validated the source pair,
and completed a healthy pulse/publication pass; it is not semantic query
readiness. Only the canonical success chain admits query. Pulse JSON, health,
heartbeat, Qdrant, Ollama, Eve, and swarm overview cannot create obligations,
grants, recovery, terminal evidence, or readiness.
Deployment is deliberately not live. The chosen topology is the workstation
beside its canonical stores, with Yggdrasil permitted to supply embedding over
WireGuard. Current local inspection found Docker container `voidbot-qdrant`
stopped with exit code 143. Its name records foreign ownership, so Epiphany did
not restart, adopt, reconfigure, or claim it. No semantic projector service
policy has been published and no restart proof has been claimed. Moving only
the projector to Yggdrasil or starting a second partition/projector body remains
forbidden.
Next: establish explicit Qdrant ownership and a live workstation-reachable
endpoint, confirm collection compatibility and the Yggdrasil Ollama route,
then publish the reserved projector policy. Run one bounded live pulse, prove
both derived health rows and provider heartbeat, kill the body once, and prove
Idunn restart plus causally linked heartbeat/recovery/resumption. This is a
preflight and survival proof, not permission to call deployment complete.

View file

@ -0,0 +1,106 @@
# Semantic Projector Service
## Authority
One workstation-local `epiphany-memory-semantic-projector` process owns semantic
projection execution for both canonical partitions in one Epiphany swarm:
- Mind input: `state/agents.msgpack`
- Modeling input: the configured runtime-spine CultCache store
- Derived index: physically separated Mind and Modeling Qdrant collections
- Derived sight: provider-authored CultMesh health and heartbeat events
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 process must remain beside the canonical stores. Yggdrasil may host Ollama
embedding work over WireGuard, but moving only the projector to Yggdrasil would
split local store authority. Do not install a second projector on Yggdrasil or
one process per partition.
## Build
```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
```
## Required configuration
Set these in the Idunn service environment before launch:
```text
EPIPHANY_QDRANT_URL=http://127.0.0.1:6333
EPIPHANY_OLLAMA_URL=http://<yggdrasil-wireguard-address>:11435
```
Use the embedding model and collection configuration already consumed by
`MemorySemanticIndexConfig::from_env`. Keep credentials in the service
environment or secret store; never place them in policy arguments or logs.
## Preflight
1. Confirm both canonical stores exist and describe the same immutable swarm.
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 store pair. 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.
Current local observation on 2026-07-15: Docker reports `voidbot-qdrant` as
`Exited (143)`. Its name indicates foreign service ownership, so this runbook
does not restart or silently adopt it. Deployment remains blocked until an
explicit Epiphany-owned or intentionally shared Qdrant endpoint is live.
## Publish the typed service policy
```powershell
$supervisor = '.\target\release\epiphany-daemon-supervisor.exe'
& $supervisor semantic-projector-service-policy `
--store .\.epiphany-run\cultmesh\local-verse.ccmp `
--runtime-id epiphany-local `
--agent-store .\state\agents.msgpack `
--runtime-store <runtime-spine-store> `
--loop-interval-seconds 60
```
This command writes the fixed
`epiphany-memory-semantic-projector-service` managed-service policy with
`restartMode=always`. Its generated child command contains both canonical
stores. The projector executable is derived as the packaged sibling of the
running supervisor and must already exist. 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. The
projector publishes its first provider heartbeat only after it holds the OS
singleton and validates both canonical inputs.
## Recovery
Use `semantic-recover` only with the exact abandoned claim, successful Idunn
restart receipt, and causally linked provider heartbeat. 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.
## Proof after launch
- Read the fixed managed-service policy and latest lifecycle receipt.
- Read the projector heartbeat for its current provider incarnation.
- Read both named semantic-health projections.
- Run a Mind and Modeling semantic query and confirm the query gate reports
semantic ranking only when each 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.