Lower repo work queue into Eve

This commit is contained in:
Meta Vens 2026-06-20 01:38:31 +01:00
commit a317644eab
6 changed files with 155 additions and 34 deletions

View file

@ -669,6 +669,15 @@ priority 35-39 non-mutating `repo-work-overview` action rows. Proof artifact:
`latestRepoWorkOverview=repo-work-overview-second`, and
`privateStateExposed=false`.
The first Eve/Persona lowering smoke proved peer-readable repo-work queue
projection: Persona's public Eve surface now includes queue counts and compact
`REPO-WORK-PEER` rows, direct `connect-eve` returns the same queue, and the
globally invokable Persona `eve-connect` daemon tool embeds the queue in its
`eveConnectionReadback`. Proof artifact:
`.epiphany-smoke\eve-repo-work-queue-20260620-013322`, which saw two queued
items through `eve-surfaces`, `connect-eve`, and `invoke-tool`, with no
mutation, elevation, or private-state exposure.
## Migration Implication
The next migration plan must treat autonomous branch-local work as a required
@ -748,7 +757,7 @@ temptation wearing clean robes.
| Self scheduling | `tick` and `serve` prove one-step branch-local advancement, brake refusal, active-turn refusal, cooldown, and stale-turn recovery. | Wire the same pulse into a usable repo-swarm run surface and optional Idunn-hosted lifecycle without taking Idunn's authority. |
| Branch-local Hands work | `adopt` and `execute` create approved Hands gates, run planned commands, stage declared paths, commit on `epiphany/*`, and write receipts. | Keep mutation branch-contained and receipt-backed; broaden only through typed plan families, not ad hoc shell freedom. |
| Soul/Modeling/Mind closure | `close` verifies the Hands commit and writes deterministic Soul, Modeling, and Mind receipts. | Add richer model-authored closure where useful, while preserving deterministic local closure for simple mechanical work. |
| Repo work sight | `overview` emits compact proof rows and mirrors typed `epiphany.cultmesh.repo_work_overview.v0` event documents plus a latest key; Gjallar now enumerates the history as queue rows and non-mutating action rows. | Lower the queue into Eve/Persona surfaces so Persona and peers can see current gate, blocker, and next safe action. |
| Repo work sight | `overview` emits compact proof rows and mirrors typed `epiphany.cultmesh.repo_work_overview.v0` event documents plus a latest key; Gjallar enumerates the history as queue rows and non-mutating action rows; Persona's Eve surface and Eve connection readbacks expose peer-readable gate/blocker/next-action rows. | Wire the queue into a usable repo-swarm run surface and richer Persona-to-plan loop without moving action authority out of Hands/Self/Bifrost. |
| Publication | `publish` routes Bifrost/GitHub receipts from closure or explicit Soul/Mind refs. | Keep publication Bifrost-owned; do not let scheduler publish. |
| Upstream main sync | `sync` proves the published commit is contained by upstream main after explicit merge/sync authority. | Treat upstream-main sync as a required final proof for published work. |
| Daemon survival | Idunn service lifecycle receipts and runbooks exist outside repo-work tick authority. | Preserve Idunn as lifecycle owner; repo swarm may request or inspect service state, not impersonate daemon keeping. |
@ -908,8 +917,9 @@ Required organs before MVP:
- Repo work projection: local `epiphany-work overview` proof bundles, typed
`epiphany.cultmesh.repo_work_overview.v0` event history plus latest-key
projection, and Gjallar multi-item `repo-work-overview` action/readback rows
exist. Remaining work is richer Eve presentation of multiple work items for
Personas and peer bodies.
exist. Persona's Eve surface, direct Eve connection, and globally invokable
Persona Eve tool readback now expose peer-readable queue rows. Remaining work
is a usable repo-swarm run surface and richer Persona-to-plan depth.
- Proof bundle depth: maintainers and future agents can inspect local
operator-safe receipt chains, commit refs, verification verdicts, map
admission, Bifrost/GitHub refs, credit refs, and sync state; remaining work is

View file

@ -103,9 +103,9 @@ remembers doctrine; the branch remembers the blade.
- Edge JSON is allowed for schema description, hostile ingress before immediate typed parsing, sealed forensic artifacts, or named quarantine experiments. When both subsystems are ours, runtime data must remain typed CultCache documents and move over CultNet typed contracts. Generic `serde_json::Value` in worker launch/result/selfPatch/runtime flow is contamination until classified and replaced.
- Hands now has a first executable action receipt spine. `epiphany-core::hands_gateway` owns `HandsActionIntent`, `HandsActionReview`, `HandsPatchReceipt`, `HandsCommandReceipt`, and `HandsCommitReceipt`; runtime-spine can persist/reread them; `runtime_spine_persists_mind_gateway_review_receipts` includes the Hands chain beside Mind/Eyes/Substrate/Soul/Continuity proofs and proves the post-timestamp Hands receipt-chain detector; `epiphany-hands-action-smoke` emits intent/review/patch/command/commit receipt ids from `.epiphany-smoke\runtime-spine\hands-action-smoke.msgpack`; and the repo-action launch proof profile now requires action intent, action review, and patch receipt together. `epiphany-mvp-coordinator` now turns `continueImplementation` into a persisted Substrate Gate grant plus Hands intent/review gate and includes the receipt ids in the operator step. `epiphany-hands-action` is the native consequence recorder for that gate: `record-patch`, `record-command`, `record-commit`, and turn-level `record-pass` load the stored intent/review or `finalAction.handsActionGate` from `coordinator-summary.json`, require an approved matching review, enforce allowed operations, and keep patch/commit changed paths inside the requested scope. `epiphany-mvp-coordinator-smoke` includes the deterministic Hands pass proof. The coordinator now treats a complete Hands receipt chain after an accepted Soul result as new implementation evidence, launches Soul again, and routes a passing accepted Soul result to Modeling/modeling before another Hands turn. Work-loop telemetry is now typed internal CultMesh state: Verification role launches write `epiphany.cultmesh.work_loop_telemetry.v0` beside runtime-spine, render that packet for Soul with resolved receipt bodies, commit diff preview, source proof notes, verification assertions, and stdout/stderr previews, and Modeling launches read/enrich the latest packet with Soul acceptance receipt ids before Modeling updates the map. Local Verse prompt context now exposes only a sealed `latest_work_loop_summary` digest with telemetry id, Hands receipt ids, path/source/assertion counts, and Soul receipt ids; receipt payload previews, artifact previews, and commit diff previews remain internal telemetry and are leak-guarded by tests plus `epiphany-verse-query -- smoke`.
- `notes/epiphany-swarm-readiness-plan.md` is the current live-fire direction gate. The local runner proves startup/status/coordinator wiring; it does not authorize unattended swarm operation. Carry VoidBot's lessons forward: one CTB-style initiative scheduler, typed pause/brake, active-turn freeze, cooldown after completion, stale active-turn recovery receipts, parent-side speech eligibility, memory lifecycle phases, and typed operation proposals instead of prompt-owned governance. `epiphany-verse-query swarm-brake --brake-status engaged|released` can now write the local Verse brake document, and `tools/epiphany_local_run.ps1` refuses live `plan`/`run`/`mvp` modes when that brake is engaged while keeping `status` readable. `epiphany-mvp-coordinator` also checks `--local-verse-store` before app-server startup, and `epiphany-heartbeat-store` guards tick/pump/heat/queue-mention/routine when passed `--local-verse-store`. Daemon tool invocation, daemon lifecycle poke, and `epiphany-daemon-supervisor` restart/tick/serve/service-plan/service-launch/service-runbook/windows-service-install/windows-service-status/windows-service-reconcile/windows-service-execution-readiness/start/stop attempts now fail closed under a matching engaged brake; supervisor restart now has durable per-daemon policy with cooldown/backoff, explicit scheduled tick pulses, latest scheduler receipts, typed service lifecycle plan/launch/runbook/install/status/reconcile/readiness/start/stop receipts, and local operator wrapper modes that write runbook/install/status/reconcile/readiness/control-plan/execution artifacts plus operator run receipts. The installed-service read path, read-only service-policy reconciliation path, execution-readiness path, non-mutating start/stop control-plan path, and non-elevated execution refusal path have been proved against real Windows `EventLog` service-manager state or safe missing-service targets through local Verse receipts, including explicit wrapper install/start/stop execution modes. The next cut is actual elevated install/start/stop execution proof under operator authority.
- `notes/epiphany-repo-swarm-mvp-contract.md` is the repo-swarm MVP authority map and migration plan. It states the live thirteen-front-door chain from `epiphany-repo init` through `epiphany-work derive-plan`, `close`, `overview`, `tick`, `publish`, and `sync`, documents the operator-safe proof receipts already proved with `privateStateExposed=false`, and names the remaining MVP organs: model-authored Persona-to-plan depth, richer Gjallar/Eve presentation over repo work overview rows, optional execute-to-close handoff, richer published proof bundles, and richer model-authored closure. Autonomous branch-local work inside the owned repo Body is in scope and desired; Bifrost gates publication/merge/escalation, Idunn owns daemon lifecycle, and `epiphany-work tick` may only advance one safe receipt-backed branch-local step per pulse before stopping at closure or publication gates. `epiphany-work derive-plan` now consumes accepted Persona/Bifrost pressure and writes an Imagination/Self action plan in deterministic `append-worklog` quarantine mode with `operatorAuthoredShellDetails=false`; disposable smoke proved accept -> derive-plan -> run -> adopt -> execute -> close, changed only `EPIPHANY_WORKLOG.md`, ended `closed:passed`, and reported no private-state exposure. `epiphany-work overview` now reads the repo work receipt chain and writes an Eyes/Gjallar-owned sight/proof bundle with current gate, blocker, next safe action, branch, changed paths, commit SHA, Soul verdict, compact rows, and private-state seal; it also mirrors a typed `epiphany.cultmesh.repo_work_overview.v0` document into the repo-local Verse when a local Verse store is known. Disposable smokes proved pre-plan `awaiting-plan`/`plan-receipt-missing`, post-close `awaiting-publication`/`bifrost-publication-missing`, and latest-key CultMesh readback through `epiphany-verse-query smoke` as `latestRepoWorkOverview=repo-work-overview-verse-overview-request`, `latestRepoWorkGate=awaiting-publication`, `latestRepoWorkBlocker=bifrost-publication-missing`, with no private-state exposure. The tick pulse reads the repo-local CultMesh swarm brake and writes `refused-by-swarm-brake` without creating run/adopt/execute receipts when the brake is engaged. It also writes active-turn and last-completed scheduler receipts, refuses live duplicate pulses as `refused-active-turn`, refuses explicit completion-anchored cooldown as `refused-by-cooldown`, clears stale active markers after `--active-timeout-seconds`, and records `physiology.recoveredActiveTurn.recovered=true` when recovery proceeds. `epiphany-work serve` wraps that tick artery in Self-owned cadence: bounded `--max-iterations` proof mode writes `work-scheduler-serve-<item>.json`, unbounded service mode relies on per-pulse tick receipts, and unbounded zero-second polling is refused. `epiphany-work close` consumes branch-local execute receipts, verifies the Hands commit, writes Soul verdict plus Modeling summary plus Mind gateway/state-commit receipts, and seals `work-close-<item>.json` without granting publication, merge, service lifecycle, cross-repo mutation, or private-state exposure. `epiphany-work publish --closure-receipt` can consume the closure's Soul/Mind ids, while tick no-ops once closure exists before Bifrost publication authority.
- `notes/epiphany-repo-swarm-mvp-contract.md` is the repo-swarm MVP authority map and migration plan. It states the live thirteen-front-door chain from `epiphany-repo init` through `epiphany-work derive-plan`, `close`, `overview`, `tick`, `publish`, and `sync`, documents the operator-safe proof receipts already proved with `privateStateExposed=false`, and names the remaining MVP organs: model-authored Persona-to-plan depth, a usable repo-swarm run surface over the now-visible work queue, optional execute-to-close handoff, richer published proof bundles, and richer model-authored closure. Autonomous branch-local work inside the owned repo Body is in scope and desired; Bifrost gates publication/merge/escalation, Idunn owns daemon lifecycle, and `epiphany-work tick` may only advance one safe receipt-backed branch-local step per pulse before stopping at closure or publication gates. `epiphany-work derive-plan` now consumes accepted Persona/Bifrost pressure and writes an Imagination/Self action plan in deterministic `append-worklog` quarantine mode with `operatorAuthoredShellDetails=false`; disposable smoke proved accept -> derive-plan -> run -> adopt -> execute -> close, changed only `EPIPHANY_WORKLOG.md`, ended `closed:passed`, and reported no private-state exposure. `epiphany-work overview` now reads the repo work receipt chain and writes an Eyes/Gjallar-owned sight/proof bundle with current gate, blocker, next safe action, branch, changed paths, commit SHA, Soul verdict, compact rows, and private-state seal; it also mirrors a typed `epiphany.cultmesh.repo_work_overview.v0` document into the repo-local Verse when a local Verse store is known. Disposable smokes proved pre-plan `awaiting-plan`/`plan-receipt-missing`, post-close `awaiting-publication`/`bifrost-publication-missing`, and latest-key CultMesh readback through `epiphany-verse-query smoke` as `latestRepoWorkOverview=repo-work-overview-verse-overview-request`, `latestRepoWorkGate=awaiting-publication`, `latestRepoWorkBlocker=bifrost-publication-missing`, with no private-state exposure. The tick pulse reads the repo-local CultMesh swarm brake and writes `refused-by-swarm-brake` without creating run/adopt/execute receipts when the brake is engaged. It also writes active-turn and last-completed scheduler receipts, refuses live duplicate pulses as `refused-active-turn`, refuses explicit completion-anchored cooldown as `refused-by-cooldown`, clears stale active markers after `--active-timeout-seconds`, and records `physiology.recoveredActiveTurn.recovered=true` when recovery proceeds. `epiphany-work serve` wraps that tick artery in Self-owned cadence: bounded `--max-iterations` proof mode writes `work-scheduler-serve-<item>.json`, unbounded service mode relies on per-pulse tick receipts, and unbounded zero-second polling is refused. `epiphany-work close` consumes branch-local execute receipts, verifies the Hands commit, writes Soul verdict plus Modeling summary plus Mind gateway/state-commit receipts, and seals `work-close-<item>.json` without granting publication, merge, service lifecycle, cross-repo mutation, or private-state exposure. `epiphany-work publish --closure-receipt` can consume the closure's Soul/Mind ids, while tick no-ops once closure exists before Bifrost publication authority.
- 2026-06-20: The same repo-swarm note now carries the explicit migration thesis, MVP status board, authority matrix, local CultMesh tool availability doctrine, and upstream-main sync doctrine. Use that note when answering "are we headed toward a functional swarm?" The answer is yes, but only if the remaining cuts preserve the typed organ ownership: Persona is the mouth, Imagination plans, Self schedules, Hands acts, Soul verifies, Modeling maps, Mind admits, Gjallar sees, Odin discovers, Idunn keeps daemon physiology alive, Bifrost publishes and credits, and Eve/CultUI renders without becoming truth.
- 2026-06-20: Gjallar/swarm-overview now exposes the latest repo-work overview as first-class compact sight. `SwarmOverviewOutput` and `SwarmTriageOutput` include `repoWorkOverviewCount`, `repoWorkOverviewRows`, `repoWorkOverviewTuiRows`, `latestRepoWorkOverview`, `latestRepoWorkGate`, `latestRepoWorkBlocker`, and `latestRepoWorkNextSafeMove`. The shared `swarmActionRows` queue also gets priority 35 `repo-work-overview` rows owned by Gjallar, hosted body `repo-work`, authority gate `repo.work.overview`, effect class `repo-work-readback`, no mutation, no elevation, proof-bundle ref, and private-state seal. Disposable proof `.epiphany-smoke\gjallar-repo-work-overview-20260620-011119` created a fresh repo, ran `init -> online -> accept -> overview -> gjallar`, and read `latestRepoWorkOverview=repo-work-overview-gjallar-request`, gate `awaiting-plan`, blocker `plan-receipt-missing`, one compact `REPO-WORK` row, non-mutating/non-elevated action row, and `privateStateExposed=false`. This completes latest-key presentation, not multiple-work-item queue enumeration; build a typed history/queue loader next.
- 2026-06-20: Gjallar/swarm-overview now exposes repo-work overview history as first-class compact sight, and Persona's public Eve surface lowers the same queue for peer-readable collaboration. `SwarmOverviewOutput` and `SwarmTriageOutput` include `repoWorkOverviewCount`, `repoWorkOverviewRows`, `repoWorkOverviewTuiRows`, `latestRepoWorkOverview`, `latestRepoWorkGate`, `latestRepoWorkBlocker`, and `latestRepoWorkNextSafeMove`; the shared `swarmActionRows` queue gets priority 35 `repo-work-overview` rows owned by Gjallar, hosted body `repo-work`, authority gate `repo.work.overview`, effect class `repo-work-readback`, no mutation, no elevation, proof-bundle ref, and private-state seal. `eve-surfaces`, direct `connect-eve`, and the globally invokable Persona `eve-connect` daemon tool readback now expose public `REPO-WORK-PEER` rows with item, gate, blocker, next safe move, branch, publication, sync, and `private=false`. Disposable proof `.epiphany-smoke\gjallar-repo-work-queue-20260620-012027` proved typed event-history queue enumeration; disposable proof `.epiphany-smoke\eve-repo-work-queue-20260620-013322` proved two accepted items through Persona Eve surface, direct Eve connection, and Persona tool invocation readback with queue count 2 and no private-state exposure. The next cut is not another sight surface: wire this queue into a usable repo-swarm run surface and deepen Persona-to-Imagination plan derivation.
- `service-execution-runbook` makes that next cut repeatable: it generates the exact elevated wrapper command sequence without mutating the service manager, continues after per-step failure to preserve more receipts, runs `service-execution-audit` in `finally`, exits nonzero if any step failed, and seals a typed runbook lifecycle receipt. Run the generated artifact only with explicit operator authority.
- `service-execution-audit` is the non-mutating acceptance proof after the elevated rite: it reports `complete` only when typed lifecycle receipts prove the runbook witness plus expected elevated chain, and otherwise reports the missing/failed sealed checks.
- `service-tick` is the non-elevated scheduler pulse proof: it writes the latest daemon scheduler receipt through durable policy ownership and local wrapper receipts.