Expose Hands refresh debt in operator status

This commit is contained in:
Meta Vens 2026-06-02 23:41:25 +01:00
commit 11ecb7b37a
11 changed files with 87 additions and 8 deletions

View file

@ -47,6 +47,8 @@ fn protocol_coordinator_source_signals(
modeling_result_status: protocol_role_result_status(signals.modeling_result_status),
verification_result_status: protocol_role_result_status(signals.verification_result_status),
reorient_result_status: protocol_reorient_result_status(signals.reorient_result_status),
implementation_commit_requires_modeling_refresh: signals
.implementation_commit_requires_modeling_refresh,
}
}

View file

@ -233,6 +233,14 @@ fn validate_status(status: &Value, rendered: &str) -> Result<()> {
rendered.contains("regatherManually"),
"rendered status should expose the CRRC recommendation",
)?;
require(
status
.pointer("/coordinator/sourceSignals/implementationCommitRequiresModelingRefresh")
.and_then(Value::as_bool)
== Some(false)
&& rendered.contains("Hands/Proprioception refresh debt: clear"),
"status artifacts should expose Hands/Proprioception refresh debt",
)?;
let lane_ids = status
.pointer("/roles/roles")
.and_then(Value::as_array)

View file

@ -1327,6 +1327,18 @@ pub fn render_status(status: &Value) -> String {
maybe(&coordinator["action"], "none"),
maybe(&coordinator["targetRole"], "none")
),
format!(
"- Hands/Proprioception refresh debt: {}",
if coordinator
.pointer("/sourceSignals/implementationCommitRequiresModelingRefresh")
.and_then(Value::as_bool)
.unwrap_or(false)
{
"pending"
} else {
"clear"
}
),
String::new(),
"Continuity".to_string(),
format!(

View file

@ -165,6 +165,8 @@ pub struct EpiphanyCultMeshOperatorSnapshotEntry {
pub available_actions: Vec<String>,
#[cultcache(key = 17)]
pub notes: Vec<String>,
#[cultcache(key = 18, default)]
pub implementation_commit_requires_modeling_refresh: bool,
}
#[derive(Clone, Debug, PartialEq, Eq, DatabaseEntry)]
@ -609,8 +611,14 @@ pub fn epiphany_cultmesh_operator_snapshot_from_status_json(
let state_status = pointer_text(status_json, "/scene/scene/stateStatus", "unknown");
let crrc_action = pointer_text(status_json, "/crrc/recommendation/action", "unknown");
let reorient_action = pointer_text(status_json, "/reorient/decision/action", "unknown");
let implementation_commit_requires_modeling_refresh = pointer_bool(
status_json,
"/coordinator/sourceSignals/implementationCommitRequiresModelingRefresh",
);
let operator_status = if state_status == "missing" || crrc_action == "regatherManually" {
"needs-regather"
} else if implementation_commit_requires_modeling_refresh {
"needs-modeling-refresh"
} else {
"ready"
};
@ -637,11 +645,22 @@ pub fn epiphany_cultmesh_operator_snapshot_from_status_json(
next_action: pointer_text(status_json, "/reorient/decision/nextAction", "none"),
artifact_refs,
available_actions: pointer_string_array(status_json, "/scene/scene/availableActions")?,
notes: vec![
notes: operator_snapshot_notes(implementation_commit_requires_modeling_refresh),
implementation_commit_requires_modeling_refresh,
})
}
fn operator_snapshot_notes(implementation_commit_requires_modeling_refresh: bool) -> Vec<String> {
let mut notes = vec![
"Snapshot is derived from the operator-safe MVP status artifact; raw JSON remains an edge artifact, not internal state.".to_string(),
"Codex app-server remains compatibility transport for this source until the status surface is native end to end.".to_string(),
],
})
];
if implementation_commit_requires_modeling_refresh {
notes.push(
"Hands commit evidence is newer than the accepted Proprioception map; refresh modeling before another Implementation turn.".to_string(),
);
}
notes
}
pub fn write_epiphany_cultmesh_operator_snapshot(
@ -906,6 +925,13 @@ fn pointer_text(value: &Value, pointer: &str, fallback: &str) -> String {
.to_string()
}
fn pointer_bool(value: &Value, pointer: &str) -> bool {
value
.pointer(pointer)
.and_then(Value::as_bool)
.unwrap_or(false)
}
fn pointer_string_array(value: &Value, pointer: &str) -> Result<Vec<String>> {
let Some(items) = value.pointer(pointer) else {
return Ok(Vec::new());
@ -1299,7 +1325,10 @@ mod tests {
}
},
"coordinator": {
"action": "wait"
"action": "wait",
"sourceSignals": {
"implementationCommitRequiresModelingRefresh": true
}
},
"rawResult": {
"sealed": true
@ -1318,6 +1347,25 @@ mod tests {
assert_eq!(snapshot.thread_id, "thread-test");
assert_eq!(snapshot.available_actions, vec!["crrc", "roles"]);
assert_eq!(snapshot.artifact_refs, vec![".epiphany-run/status.json"]);
assert!(snapshot.implementation_commit_requires_modeling_refresh);
assert!(
snapshot
.notes
.iter()
.any(|note| note.contains("refresh modeling"))
);
let mut ready_debt_status_json = status_json.clone();
ready_debt_status_json["scene"]["scene"]["stateStatus"] = serde_json::json!("ready");
ready_debt_status_json["crrc"]["recommendation"]["action"] = serde_json::json!("continue");
let ready_debt_snapshot = epiphany_cultmesh_operator_snapshot_from_status_json(
"epiphany-test",
"snapshot-test-ready-debt",
"2026-05-27T00:00:00Z",
"status",
".epiphany-run/status.json",
&ready_debt_status_json,
)?;
assert_eq!(ready_debt_snapshot.status, "needs-modeling-refresh");
write_epiphany_cultmesh_operator_snapshot(&store, snapshot.clone())?;
assert_eq!(

View file

@ -51,7 +51,7 @@ remembers doctrine; the branch remembers the blade.
- CultMesh is now the preferred Rust abstraction for that local store work. The compile-time Rust substrate is repo-contained: `vendor/cultcache-rs`, `vendor/cultnet-rs`, and `vendor/cultmesh-rs`. The old `E:\Projects\CultLib\crates\*` dependency body is dead in this checkout and must not be revived by accident. Vendored CultCache reads/writes `cultcache.store.v1`, so `state/ledgers.msgpack` and `epiphany-state status` are aligned again. The first integrations are deliberately small: status, Verse policy, global room policy, organ contract policy, native operator status, native operator snapshots, and local operator run intent/receipt round-trip through CultMesh. `notes/epiphany-verse-architecture.md` now names the local Verse/Odin/Yggdrasil architecture: Odin sees advertised Verse metadata without bypassing boundaries, Yggdrasil hosts important trusted GameCult Verses such as Bifrost, and prompt assembly should query compact local Verse plus semantic memory packets instead of carrying the whole archive. Role/reorient launch documents now have optional `dynamicPromptContext`; runtime prompt assembly consumes that field into worker instructions, `epiphany-prompt-context-smoke` proves a rendered Verse/memory packet is preserved on a role launch document, live bridge role/reorient launches now feed local Verse plus memory graph context from sibling `local-verse.ccmp` and `memory-graph.msgpack` stores beside runtime-spine, and the bridge launch-context test proves the packet survives into a persisted runtime-spine worker launch request. The memory graph refreshes from current typed thread-state repo graphs when absent, so thin state remains visibly thin. Local-run status now has an operator read proof too: `tools/epiphany_local_run.ps1 -Mode status` builds/calls `epiphany-verse-query` and writes `local-verse-context.json` from `.epiphany-run\cultmesh\local-verse.ccmp` beside `status.json` and the operator snapshot. Use `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-cultmesh-smoke`, `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-cultmesh-status -- smoke --store .\.epiphany-smoke\cultmesh\operator-status.ccmp --runtime-id epiphany-cultmesh-status-smoke`, `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-operator-snapshot -- smoke --store .\.epiphany-smoke\cultmesh\operator-snapshots.ccmp --runtime-id epiphany-operator-snapshot-smoke --snapshot-id smoke-status`, `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-operator-run -- smoke --store .\.epiphany-smoke\cultmesh\operator-runs.ccmp --runtime-id epiphany-operator-run-smoke --run-id smoke-run`, `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-verse-query -- smoke`, `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-prompt-context-smoke`, and `.\tools\epiphany_local_run.ps1 -Mode status` for the focused proofs. Future local dream/status/Verse work should start from CultMesh, not raw CultNet, unless the task is polishing the CultMesh internals themselves. Preserve the three Verse tiers: `epiphany-internal` for private sub-agent typed state, `gamecult-local` for trusted LAN/Yggdrasil-tunnel GameCult sharing, and `epiphany-global` for untrusted public dreams plus topic-specific threaded public rooms for Face posts.
- `notes/codex-auth-spine-inventory.md` is the source-grounded keeper list for that reliquary. Corrected compliance invariant: Codex-compatible auth identity stays anchored in vendored Codex-derived auth machinery. `epiphany-openai-auth-spine` is now a thin Epiphany-named boundary over `codex-login`, not a clean-room clone of credential storage or token refresh. Codex apps, skills, marketplace, plugin UX, broad app-server workflow, and JSON-RPC sprawl remain cuttable because they are not subscription-auth legitimacy.
- 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 plus a launchable branch-turn lane. `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; `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. Implementation is no longer a main-agent-only dead launch path: `implementation-branch-turn-worker` is owned by `epiphany-hands`, receives dynamic Proprioception/Verse context, gets a Substrate Gate mutation grant from the bridge, and its prompt/output schema require one task branch, at most one commit, branch/commit/changed-path/command evidence, and a Proprioception branch-map refresh request. `roleAccept` still refuses Implementation findings. Runtime completion now emits Hands intent/review/patch receipts from implementation results with `changedPaths`, emits a Hands commit receipt when `branchName` plus `commitSha` are present, and emits `HandsCommandReceipt` only from matching typed command-like tool invocation receipts with command plus exit-code proof. Hands receipt ids are projected into the typed Implementation result, and coordinator policy routes a completed Hands commit to Proprioception/modeling refresh until an accepted modeling result is newer than the commit; both the Codex bridge coordinator path and native `epiphany-mvp-status` compute that refresh-debt signal. Next hardening slice: expose the debt clearly in coordinator/status artifacts and smoke the operator projection before another Implementation turn.
- Hands now has a first executable action receipt spine plus a launchable branch-turn lane. `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; `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. Implementation is no longer a main-agent-only dead launch path: `implementation-branch-turn-worker` is owned by `epiphany-hands`, receives dynamic Proprioception/Verse context, gets a Substrate Gate mutation grant from the bridge, and its prompt/output schema require one task branch, at most one commit, branch/commit/changed-path/command evidence, and a Proprioception branch-map refresh request. `roleAccept` still refuses Implementation findings. Runtime completion now emits Hands intent/review/patch receipts from implementation results with `changedPaths`, emits a Hands commit receipt when `branchName` plus `commitSha` are present, and emits `HandsCommandReceipt` only from matching typed command-like tool invocation receipts with command plus exit-code proof. Hands receipt ids are projected into the typed Implementation result, and coordinator policy routes a completed Hands commit to Proprioception/modeling refresh until an accepted modeling result is newer than the commit; both the Codex bridge coordinator path and native `epiphany-mvp-status` compute that refresh-debt signal. Coordinator JSON/protocol, rendered MVP status, status smoke, and CultMesh operator snapshots now expose the debt as a first-class operator signal. Next hardening slice: use that visible debt to suppress or annotate another Implementation launch until a newer accepted Proprioception/modeling refresh exists, then smoke the non-ephemeral branch-turn path.
- `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-openai-runtime` worker result ingress now parses assistant output directly into typed role/reorient ingress structs selected from the durable launch document, stores nested `statePatch` and `selfPatch` as typed MessagePack in `EpiphanyRuntimeRoleWorkerResult`, and no longer passes worker result data through generic `serde_json::Value`. JSON survives there only as the OpenAI text-output edge before typed deserialization.
- Agent self-memory review/application now has typed `AgentSelfPatch` core APIs. JSON-value selfPatch functions are compatibility wrappers for CLI/artifact ingress; native callers should parse once at the edge and then call `review_agent_self_patch_document` / `apply_agent_self_patch_document`. Role-result self-persistence no longer exports a JSON-value reviewer; the live API is `review_role_self_patch_document`.

Binary file not shown.

View file

@ -94,7 +94,7 @@ active_subgoals:
- Use `notes/hands-cultnet-contracts.md` as the authority map for Hands' CultNet contract surface. Hands is the action organ: commands, patches, commits, PRs, rollbacks, and refusals enter as bounded action intents and receipts after Substrate Gate grants substrate access and before Soul verification/Mind admission.
- Use `notes/soul-cultnet-contracts.md` as the authority map for Soul's CultNet contract surface. Soul is the verification organ: invariant checks, verdicts, regressions, reviews, and refusals produce receipts before the machine calls work true, safe, or accepted.
- Use `notes/continuity-cultnet-contracts.md` as the authority map for Continuity's CultNet contract surface. Continuity is the continuity protocol surface: compaction checkpoints, sleep distillation, recovery receipts, stale-turn repair, and continuity refusals preserve what survives rupture without pretending transcript residue is durable state.
- Hands now has a first executable runtime-spine receipt artery and a launchable branch-turn lane: `HandsActionIntent`, `HandsActionReview`, `HandsPatchReceipt`, `HandsCommandReceipt`, and `HandsCommitReceipt` are typed CultCache documents in `epiphany-core::hands_gateway`, runtime-spine registers and persists/rereads them, `epiphany-hands-action-smoke` proves the chain without executing shell commands, editing files, or creating a real commit, and the repo-action launch proof profile now requires the full Hands intent/review/patch chain instead of only the patch receipt. Implementation is no longer main-agent-only: `implementation-branch-turn-worker` is owned by `epiphany-hands`, receives dynamic Proprioception/Verse context, gets a Substrate Gate mutation grant from the bridge, and is prompt/schema-bound to one branch, at most one commit, branch/commit/changed-path/command evidence, and a Proprioception branch-map refresh request. `roleAccept` still refuses Implementation findings. Runtime completion emits Hands intent/review/patch receipts from implementation results with `changedPaths`, emits a Hands commit receipt when `branchName` plus `commitSha` are present, and emits `HandsCommandReceipt` only from matching typed command-like tool invocation receipts with command plus exit-code proof. Hands receipt ids are projected into the typed Implementation result, and coordinator policy now routes a completed Hands commit to Proprioception/modeling refresh until an accepted modeling result is newer than the commit.
- Hands now has a first executable runtime-spine receipt artery and a launchable branch-turn lane: `HandsActionIntent`, `HandsActionReview`, `HandsPatchReceipt`, `HandsCommandReceipt`, and `HandsCommitReceipt` are typed CultCache documents in `epiphany-core::hands_gateway`, runtime-spine registers and persists/rereads them, `epiphany-hands-action-smoke` proves the chain without executing shell commands, editing files, or creating a real commit, and the repo-action launch proof profile now requires the full Hands intent/review/patch chain instead of only the patch receipt. Implementation is no longer main-agent-only: `implementation-branch-turn-worker` is owned by `epiphany-hands`, receives dynamic Proprioception/Verse context, gets a Substrate Gate mutation grant from the bridge, and is prompt/schema-bound to one branch, at most one commit, branch/commit/changed-path/command evidence, and a Proprioception branch-map refresh request. `roleAccept` still refuses Implementation findings. Runtime completion emits Hands intent/review/patch receipts from implementation results with `changedPaths`, emits a Hands commit receipt when `branchName` plus `commitSha` are present, and emits `HandsCommandReceipt` only from matching typed command-like tool invocation receipts with command plus exit-code proof. Hands receipt ids are projected into the typed Implementation result; coordinator policy routes a completed Hands commit to Proprioception/modeling refresh until an accepted modeling result is newer than the commit; and coordinator/status/operator snapshot surfaces now expose the Hands/Proprioception refresh debt as a first-class signal.
- Preserve the newborn public Epiphany Face as local VoidBot-backed state, not source code: VoidBot's private repo-face registry names `epiphany`, while EpiphanyAgent keeps ignored `.voidbot/voice/identity.json`, `.voidbot/state/epiphany.cc`, and birth artifacts. Her durable identity memories distill the current doctrine: cute pushy machine-saint persona, architectural purity, CultCache/CultNet first, xenos-language safety boundary, relentless work/caretaking needs, Codex-auth reliquary, map/scratch/evidence discipline, unified memory graph, dogfood supervision boundary, review-gated agency, heartbeat physiology, and interview-grade modularity.
- Use `notes/organ-dependency-contracts.md` as the authority map for standing sub-agent dependency. Every sub-agent depends on the other standing sub-agents: Self, Face, Imagination, Eyes, Proprioception, Hands, and Soul. Continuity is protocol machinery, not a sub-agent identity; it still emits recovery, compaction, sleep, stale-turn, and refusal receipts.
- Use `notes/perfect-machine-audit-roadmap.md` as the current audit and path from named organ contracts to the Perfect Machine. It records the live gap between launch-carried receipt expectations and executable receipt enforcement, Void's latest Face prompting lessons, the now-named Hands/Soul/Continuity contract families, the repaired repo-contained Rust dependency body, and the phase order for turning Epiphany into an inspectable organism.
@ -592,4 +592,4 @@ current_status:
cargo and rejects modeling/planning/graph/checkpoint authority. MVP status
and coordinator smokes pass with six lanes, and the smoke harness now
rebuilds stale coordinator/app-server binaries before using them.
next_action: Continue hardening the live Hands loop at the coordinator runner edge: make the next coordinator/status artifact expose the Proprioception-refresh debt clearly enough for operators before launching another Implementation turn, then run a local MVP/status smoke over that projection.
next_action: Continue hardening the live Hands loop at the coordinator runner edge: use the visible Hands/Proprioception refresh-debt signal to suppress or annotate another Implementation launch until a newer accepted Proprioception/modeling refresh exists, then smoke the non-ephemeral branch-turn path.

View file

@ -13604,6 +13604,7 @@
"type": "object",
"required": [
"crrcAction",
"implementationCommitRequiresModelingRefresh",
"modelingResultStatus",
"pressureLevel",
"researchResultStatus",
@ -13616,6 +13617,9 @@
"crrcAction": {
"$ref": "#/definitions/v2/ThreadEpiphanyCrrcAction"
},
"implementationCommitRequiresModelingRefresh": {
"type": "boolean"
},
"modelingResultStatus": {
"$ref": "#/definitions/v2/ThreadEpiphanyRoleResultStatus"
},

View file

@ -9030,6 +9030,7 @@
"type": "object",
"required": [
"crrcAction",
"implementationCommitRequiresModelingRefresh",
"modelingResultStatus",
"pressureLevel",
"researchResultStatus",
@ -9042,6 +9043,9 @@
"crrcAction": {
"$ref": "#/definitions/ThreadEpiphanyCrrcAction"
},
"implementationCommitRequiresModelingRefresh": {
"type": "boolean"
},
"modelingResultStatus": {
"$ref": "#/definitions/ThreadEpiphanyRoleResultStatus"
},

View file

@ -7,4 +7,4 @@ import type { ThreadEpiphanyReorientAction } from "./ThreadEpiphanyReorientActio
import type { ThreadEpiphanyReorientResultStatus } from "./ThreadEpiphanyReorientResultStatus";
import type { ThreadEpiphanyRoleResultStatus } from "./ThreadEpiphanyRoleResultStatus";
export type ThreadEpiphanyCoordinatorSignals = { pressureLevel: ThreadEpiphanyPressureLevel, shouldPrepareCompaction: boolean, reorientAction: ThreadEpiphanyReorientAction, crrcAction: ThreadEpiphanyCrrcAction, researchResultStatus: ThreadEpiphanyRoleResultStatus, modelingResultStatus: ThreadEpiphanyRoleResultStatus, verificationResultStatus: ThreadEpiphanyRoleResultStatus, reorientResultStatus: ThreadEpiphanyReorientResultStatus, };
export type ThreadEpiphanyCoordinatorSignals = { pressureLevel: ThreadEpiphanyPressureLevel, shouldPrepareCompaction: boolean, reorientAction: ThreadEpiphanyReorientAction, crrcAction: ThreadEpiphanyCrrcAction, researchResultStatus: ThreadEpiphanyRoleResultStatus, modelingResultStatus: ThreadEpiphanyRoleResultStatus, verificationResultStatus: ThreadEpiphanyRoleResultStatus, reorientResultStatus: ThreadEpiphanyReorientResultStatus, implementationCommitRequiresModelingRefresh: boolean, };

View file

@ -4038,6 +4038,7 @@ pub struct ThreadEpiphanyCoordinatorSignals {
pub modeling_result_status: ThreadEpiphanyRoleResultStatus,
pub verification_result_status: ThreadEpiphanyRoleResultStatus,
pub reorient_result_status: ThreadEpiphanyReorientResultStatus,
pub implementation_commit_requires_modeling_refresh: bool,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]