Add repo work run gate
This commit is contained in:
parent
20f95c623d
commit
348d147391
5 changed files with 285 additions and 3 deletions
|
|
@ -2,6 +2,16 @@ use anyhow::Context;
|
|||
use anyhow::Result;
|
||||
use anyhow::anyhow;
|
||||
use chrono::Utc;
|
||||
use epiphany_core::HANDS_ACTION_INTENT_SCHEMA_VERSION;
|
||||
use epiphany_core::HandsActionIntent;
|
||||
use epiphany_core::RuntimeSpineInitOptions;
|
||||
use epiphany_core::SUBSTRATE_GATE_REPO_ACCESS_GRANT_RECEIPT_SCHEMA_VERSION;
|
||||
use epiphany_core::SubstrateGateRepoAccessGrantReceipt;
|
||||
use epiphany_core::hands_action_review_for_intent;
|
||||
use epiphany_core::initialize_runtime_spine;
|
||||
use epiphany_core::put_hands_action_intent;
|
||||
use epiphany_core::put_hands_action_review;
|
||||
use epiphany_core::put_substrate_gate_repo_access_grant_receipt;
|
||||
use serde_json::Value;
|
||||
use serde_json::json;
|
||||
use std::env;
|
||||
|
|
@ -18,6 +28,7 @@ fn main() -> Result<()> {
|
|||
};
|
||||
let result = match command.as_str() {
|
||||
"accept" => run_accept(parse_accept_args(args)?),
|
||||
"run" => run_work(parse_run_args(args)?),
|
||||
other => Err(anyhow!("unknown epiphany-work command {other:?}")),
|
||||
}?;
|
||||
println!("{}", serde_json::to_string_pretty(&result)?);
|
||||
|
|
@ -41,6 +52,17 @@ struct AcceptArgs {
|
|||
candidate_action_refs: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
struct RunArgs {
|
||||
workspace: PathBuf,
|
||||
epiphany_root: PathBuf,
|
||||
item: Option<String>,
|
||||
accept_receipt: Option<PathBuf>,
|
||||
runtime_store: Option<PathBuf>,
|
||||
artifact_dir: Option<PathBuf>,
|
||||
requested_paths: Vec<String>,
|
||||
}
|
||||
|
||||
fn parse_accept_args(args: impl Iterator<Item = String>) -> Result<AcceptArgs> {
|
||||
let mut workspace = None;
|
||||
let mut epiphany_root = None;
|
||||
|
|
@ -111,6 +133,42 @@ fn parse_accept_args(args: impl Iterator<Item = String>) -> Result<AcceptArgs> {
|
|||
})
|
||||
}
|
||||
|
||||
fn parse_run_args(args: impl Iterator<Item = String>) -> Result<RunArgs> {
|
||||
let mut workspace = None;
|
||||
let mut epiphany_root = None;
|
||||
let mut item = None;
|
||||
let mut accept_receipt = None;
|
||||
let mut runtime_store = None;
|
||||
let mut artifact_dir = None;
|
||||
let mut requested_paths = Vec::new();
|
||||
|
||||
let mut args = args.peekable();
|
||||
while let Some(arg) = args.next() {
|
||||
match arg.as_str() {
|
||||
"--workspace" => workspace = Some(take_path(&mut args, "--workspace")?),
|
||||
"--epiphany-root" => epiphany_root = Some(take_path(&mut args, "--epiphany-root")?),
|
||||
"--item" => item = Some(take_string(&mut args, "--item")?),
|
||||
"--accept-receipt" => accept_receipt = Some(take_path(&mut args, "--accept-receipt")?),
|
||||
"--runtime-store" => runtime_store = Some(take_path(&mut args, "--runtime-store")?),
|
||||
"--artifact-dir" => artifact_dir = Some(take_path(&mut args, "--artifact-dir")?),
|
||||
"--path" | "--requested-path" => {
|
||||
requested_paths.push(take_string(&mut args, "--requested-path")?);
|
||||
}
|
||||
other => return Err(anyhow!("unexpected run argument {other:?}")),
|
||||
}
|
||||
}
|
||||
Ok(RunArgs {
|
||||
workspace: workspace.context("missing --workspace")?,
|
||||
epiphany_root: epiphany_root
|
||||
.unwrap_or(env::current_dir().context("failed to resolve current directory")?),
|
||||
item,
|
||||
accept_receipt,
|
||||
runtime_store,
|
||||
artifact_dir,
|
||||
requested_paths,
|
||||
})
|
||||
}
|
||||
|
||||
fn run_accept(args: AcceptArgs) -> Result<Value> {
|
||||
let workspace = args
|
||||
.workspace
|
||||
|
|
@ -274,6 +332,197 @@ fn run_accept(args: AcceptArgs) -> Result<Value> {
|
|||
}))
|
||||
}
|
||||
|
||||
fn run_work(args: RunArgs) -> Result<Value> {
|
||||
let workspace = args
|
||||
.workspace
|
||||
.canonicalize()
|
||||
.with_context(|| format!("failed to resolve {}", args.workspace.display()))?;
|
||||
ensure_git_repo(&workspace)?;
|
||||
let _epiphany_root = args
|
||||
.epiphany_root
|
||||
.canonicalize()
|
||||
.with_context(|| format!("failed to resolve {}", args.epiphany_root.display()))?;
|
||||
let accept_receipt_path =
|
||||
resolve_accept_receipt(&workspace, args.item.as_deref(), args.accept_receipt)?;
|
||||
let accept_receipt = read_json(&accept_receipt_path)?;
|
||||
let online_receipt_path = path_from_json(&accept_receipt, &["onlineReceiptPath"])
|
||||
.unwrap_or_else(|| {
|
||||
workspace
|
||||
.join(".epiphany")
|
||||
.join("swarm-online")
|
||||
.join("repo-swarm-online-receipt.json")
|
||||
});
|
||||
let online_receipt = read_json(&online_receipt_path)
|
||||
.with_context(|| "repo swarm online receipt is required before work run")?;
|
||||
let runtime_id = string_from_json(&accept_receipt, &["runtimeId"])
|
||||
.or_else(|| string_from_json(&online_receipt, &["runtimeId"]))
|
||||
.unwrap_or_else(|| "repo-swarm-local".to_string());
|
||||
let state_dir = path_from_json(&online_receipt, &["stateDir"])
|
||||
.unwrap_or_else(|| workspace.join(".epiphany").join("state"));
|
||||
let runtime_store = args
|
||||
.runtime_store
|
||||
.unwrap_or_else(|| state_dir.join("runtime-spine.msgpack"));
|
||||
let artifact_dir = args
|
||||
.artifact_dir
|
||||
.unwrap_or_else(|| workspace.join(".epiphany").join("work"));
|
||||
fs::create_dir_all(&artifact_dir)
|
||||
.with_context(|| format!("failed to create {}", artifact_dir.display()))?;
|
||||
if let Some(parent) = runtime_store.parent() {
|
||||
fs::create_dir_all(parent)?;
|
||||
}
|
||||
let now = Utc::now().to_rfc3339_opts(chrono::SecondsFormat::Secs, true);
|
||||
initialize_runtime_spine(
|
||||
&runtime_store,
|
||||
RuntimeSpineInitOptions {
|
||||
runtime_id: runtime_id.clone(),
|
||||
display_name: format!("Repo swarm runtime for {}", workspace.display()),
|
||||
created_at: now.clone(),
|
||||
},
|
||||
)?;
|
||||
|
||||
let item = accept_receipt
|
||||
.get("item")
|
||||
.and_then(Value::as_str)
|
||||
.unwrap_or("work-item")
|
||||
.to_string();
|
||||
let item_slug = sanitize(&item);
|
||||
let requested_paths = if args.requested_paths.is_empty() {
|
||||
vec![".".to_string()]
|
||||
} else {
|
||||
args.requested_paths
|
||||
};
|
||||
let run_id = format!("repo-work-run-{item_slug}");
|
||||
let runtime_job_id = format!("{run_id}-job");
|
||||
let substrate_grant_id = format!("{run_id}-substrate-grant");
|
||||
let intent_id = format!("{run_id}-hands-intent");
|
||||
let review_id = format!("{run_id}-hands-review");
|
||||
|
||||
let substrate_grant = SubstrateGateRepoAccessGrantReceipt {
|
||||
schema_version: SUBSTRATE_GATE_REPO_ACCESS_GRANT_RECEIPT_SCHEMA_VERSION.to_string(),
|
||||
receipt_id: substrate_grant_id.clone(),
|
||||
runtime_job_id: runtime_job_id.clone(),
|
||||
binding_id: "repo-work-runner".to_string(),
|
||||
role: "epiphany-hands".to_string(),
|
||||
authority_scope: "repo.branch_local_work".to_string(),
|
||||
granted_operations: vec!["read".to_string(), "snapshot".to_string()],
|
||||
granted_paths: requested_paths.clone(),
|
||||
granted_at: now.clone(),
|
||||
contract: "Substrate Gate grants read/snapshot access for work-run planning only; mutation awaits an approved Hands review.".to_string(),
|
||||
};
|
||||
put_substrate_gate_repo_access_grant_receipt(&runtime_store, &substrate_grant)?;
|
||||
|
||||
let intent = HandsActionIntent {
|
||||
schema_version: HANDS_ACTION_INTENT_SCHEMA_VERSION.to_string(),
|
||||
intent_id: intent_id.clone(),
|
||||
runtime_job_id: runtime_job_id.clone(),
|
||||
binding_id: "repo-work-runner".to_string(),
|
||||
role: "epiphany-hands".to_string(),
|
||||
authority_scope: "repo.branch_local_work".to_string(),
|
||||
requested_action: "runAcceptedWorkItem".to_string(),
|
||||
requested_paths: requested_paths.clone(),
|
||||
substrate_gate_grant_receipt_id: substrate_grant_id.clone(),
|
||||
requested_at: now.clone(),
|
||||
contract: "Repo work run intent converts accepted Persona/Bifrost pressure into a bounded Hands gate; this gate is not mutation authority until reviewed as approved.".to_string(),
|
||||
};
|
||||
put_hands_action_intent(&runtime_store, &intent)?;
|
||||
|
||||
let review = hands_action_review_for_intent(
|
||||
review_id.clone(),
|
||||
&intent,
|
||||
"queued-for-adoption".to_string(),
|
||||
vec!["plan".to_string()],
|
||||
vec![
|
||||
"Accepted work item has entered Imagination consensus discovery.".to_string(),
|
||||
"Hands mutation remains blocked until Imagination/Self/Mind adopt a concrete plan and approve this gate.".to_string(),
|
||||
],
|
||||
now.clone(),
|
||||
);
|
||||
put_hands_action_review(&runtime_store, &review)?;
|
||||
|
||||
let gate = json!({
|
||||
"intentId": intent_id,
|
||||
"reviewId": review_id,
|
||||
"runtimeJobId": runtime_job_id,
|
||||
"substrateGateGrantReceiptId": substrate_grant_id,
|
||||
"decision": review.decision,
|
||||
"allowedOperations": review.allowed_operations,
|
||||
"recordPassCommand": format!(
|
||||
"epiphany-hands-action --store {} record-pass --intent-id {} --review-id {} --summary <summary> --changed-path <path> --command <command> --exit-code <code> --commit-sha <sha>",
|
||||
runtime_store.display(),
|
||||
intent.intent_id,
|
||||
review.review_id
|
||||
)
|
||||
});
|
||||
let receipt = json!({
|
||||
"schemaVersion": "epiphany.repo_work_run_receipt.v0",
|
||||
"createdAt": now,
|
||||
"workspace": workspace,
|
||||
"runtimeId": runtime_id,
|
||||
"runtimeStore": runtime_store,
|
||||
"acceptReceiptPath": accept_receipt_path,
|
||||
"onlineReceiptPath": online_receipt_path,
|
||||
"item": item,
|
||||
"status": "queued-for-adoption",
|
||||
"authority": {
|
||||
"handsAuthorityGranted": false,
|
||||
"durableStateAdmitted": false,
|
||||
"publicationAuthorized": false,
|
||||
"mutationBlockedBy": "hands.review.decision != approved",
|
||||
"nextGate": "imagination.self.mind.adoption"
|
||||
},
|
||||
"handsActionGate": gate,
|
||||
"nextSafeMove": "Promote this queued gate only after Imagination/Self/Mind adopt a concrete plan; epiphany-hands-action will refuse record-pass until the Hands review decision is approved."
|
||||
});
|
||||
let receipt_path = artifact_dir.join(format!("work-run-{item_slug}.json"));
|
||||
write_json(&receipt_path, &receipt)?;
|
||||
Ok(json!({
|
||||
"schemaVersion": "epiphany.repo_work_run.v0",
|
||||
"status": "queued-for-adoption",
|
||||
"workspace": receipt["workspace"],
|
||||
"runtimeId": receipt["runtimeId"],
|
||||
"runtimeStore": receipt["runtimeStore"],
|
||||
"receiptPath": receipt_path,
|
||||
"item": receipt["item"],
|
||||
"handsActionGate": receipt["handsActionGate"],
|
||||
"authority": receipt["authority"],
|
||||
"privateStateExposed": false,
|
||||
"nextSafeMove": receipt["nextSafeMove"],
|
||||
}))
|
||||
}
|
||||
|
||||
fn resolve_accept_receipt(
|
||||
workspace: &Path,
|
||||
item: Option<&str>,
|
||||
explicit: Option<PathBuf>,
|
||||
) -> Result<PathBuf> {
|
||||
if let Some(path) = explicit {
|
||||
return Ok(path);
|
||||
}
|
||||
let work_dir = workspace.join(".epiphany").join("work");
|
||||
if let Some(item) = item {
|
||||
return Ok(work_dir.join(format!("work-accept-{}.json", sanitize(item))));
|
||||
}
|
||||
let mut candidates = Vec::new();
|
||||
if work_dir.exists() {
|
||||
for entry in fs::read_dir(&work_dir)? {
|
||||
let entry = entry?;
|
||||
let path = entry.path();
|
||||
let Some(name) = path.file_name().and_then(|name| name.to_str()) else {
|
||||
continue;
|
||||
};
|
||||
if name.starts_with("work-accept-") && name.ends_with(".json") {
|
||||
let modified = entry.metadata()?.modified()?;
|
||||
candidates.push((modified, path));
|
||||
}
|
||||
}
|
||||
}
|
||||
candidates.sort_by_key(|(modified, _path)| *modified);
|
||||
candidates
|
||||
.pop()
|
||||
.map(|(_modified, path)| path)
|
||||
.ok_or_else(|| anyhow!("no work accept receipt found; run epiphany-work accept first or pass --accept-receipt"))
|
||||
}
|
||||
|
||||
fn cargo_json(manifest_path: &Path, bin_name: &str, args: &[String]) -> Result<Value> {
|
||||
let output = Command::new("cargo")
|
||||
.arg("run")
|
||||
|
|
@ -374,6 +623,8 @@ fn sanitize(value: &str) -> String {
|
|||
|
||||
fn print_usage() {
|
||||
eprintln!(
|
||||
"usage: epiphany-work accept --workspace <repo> --from <persona|bifrost|persona-or-bifrost> --item <id> [--summary <text>] [--topic <topic>] [--store <local-verse.ccmp>] [--runtime-id <id>] [--online-receipt <path>] [--public-discussion-ref <ref>] [--candidate-action-ref <ref>]"
|
||||
"usage: epiphany-work <accept|run> ...\n\
|
||||
accept --workspace <repo> --from <persona|bifrost|persona-or-bifrost> --item <id> [--summary <text>] [--topic <topic>] [--store <local-verse.ccmp>] [--runtime-id <id>] [--online-receipt <path>] [--public-discussion-ref <ref>] [--candidate-action-ref <ref>]\n\
|
||||
run --workspace <repo> [--item <id>] [--accept-receipt <path>] [--runtime-store <path>] [--requested-path <path>]"
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -216,6 +216,37 @@ epiphany-work accept --workspace <repo> --from persona --item first-request
|
|||
The accepted item produced an Imagination consensus receipt, candidate action
|
||||
ref, public discussion ref, and `privateStateExposed=false`.
|
||||
|
||||
### Landed Work Run Gate
|
||||
|
||||
The fourth front door exists as native Rust:
|
||||
|
||||
```powershell
|
||||
cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-work -- run --workspace <repo>
|
||||
```
|
||||
|
||||
It reads the latest or named work-accept receipt, opens the repo-local
|
||||
runtime-spine store, persists a Substrate Gate read/snapshot grant, persists a
|
||||
Hands action intent, and persists a Hands review with
|
||||
`decision=queued-for-adoption`. This is the first concrete run packet, but it
|
||||
is still not mutation authority: `epiphany-hands-action record-pass` refuses it
|
||||
because the Hands review is not `approved`.
|
||||
|
||||
The first smoke proved the four-command sequence:
|
||||
|
||||
```powershell
|
||||
epiphany-repo init --workspace <repo>
|
||||
epiphany-swarm online --workspace <repo>
|
||||
epiphany-work accept --workspace <repo> --from persona --item first-request
|
||||
epiphany-work run --workspace <repo> --item first-request
|
||||
```
|
||||
|
||||
The run receipt produced a runtime-spine Substrate Gate grant, Hands intent,
|
||||
Hands review, and operator-safe gate summary with
|
||||
`handsAuthorityGranted=false`, `mutationBlockedBy=hands.review.decision !=
|
||||
approved`, and `privateStateExposed=false`. The next cut is the adoption step
|
||||
that can promote a queued gate to an approved branch-local Hands action after
|
||||
Imagination/Self/Mind evidence exists.
|
||||
|
||||
## Migration Implication
|
||||
|
||||
The next migration plan must treat autonomous branch-local work as a required
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ 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` corrects the repo-swarm MVP authority boundary: autonomous branch-local work inside the owned repo Body is in scope and desired; Bifrost gates publication/merge/escalation, not every local edit. Future migration plans must make that autonomy typed, branch-contained, receipt-backed, interruptible, private-state-sealed, and cross-body-safe rather than turning Epiphany into a human-permission queue. Three native repo-swarm front doors are now live: `epiphany-repo init --workspace <repo>` writes the repo-swarm init receipt and branch workbench plan; `epiphany-swarm online --workspace <repo>` seeds repo-local `.epiphany/local-verse.ccmp`, standing-faculty SoA, topology/liveness/tool/overview proof, and `.epiphany/swarm-online/repo-swarm-online-receipt.json`; `epiphany-work accept --workspace <repo> --from persona-or-bifrost --item <id>` routes a Persona/Bifrost item through CultMesh collaboration feedback into Imagination consensus discovery and writes `.epiphany/work/work-accept-<item>.json` with no Hands, durable-state, or publication authority granted. Fresh-repo smokes proved init, online, and Persona-item accept with `privateStateExposed=false`. Next missing organ: `epiphany-work run --workspace <repo>` after Imagination/Self/Mind gates adopt a concrete plan.
|
||||
- `notes/epiphany-repo-swarm-mvp-contract.md` corrects the repo-swarm MVP authority boundary: autonomous branch-local work inside the owned repo Body is in scope and desired; Bifrost gates publication/merge/escalation, not every local edit. Four native repo-swarm front doors are now live: `epiphany-repo init --workspace <repo>` writes the repo-swarm init receipt and branch workbench plan; `epiphany-swarm online --workspace <repo>` seeds repo-local `.epiphany/local-verse.ccmp`, standing-faculty SoA, topology/liveness/tool/overview proof, and `.epiphany/swarm-online/repo-swarm-online-receipt.json`; `epiphany-work accept --workspace <repo> --from persona-or-bifrost --item <id>` routes a Persona/Bifrost item through CultMesh collaboration feedback into Imagination consensus discovery and writes `.epiphany/work/work-accept-<item>.json` with no Hands, durable-state, or publication authority granted; `epiphany-work run --workspace <repo> [--item <id>]` persists a repo-local runtime-spine Substrate Gate read/snapshot grant, Hands intent, and Hands review with `decision=queued-for-adoption`. Fresh-repo smokes proved init, online, accept, and run with `privateStateExposed=false`, and negative proof showed `epiphany-hands-action record-pass` refuses the queued gate because it is not approved. Next missing organ: adoption/promote of a queued run gate into an approved branch-local Hands action after Imagination/Self/Mind evidence exists.
|
||||
- `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.
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -88,7 +88,7 @@ active_subgoals:
|
|||
- Keep the landed Phase 6 coordinator, limited safe-boundary CRRC automation, and pre-compaction checkpoint intervention ready for the next bridge-equipped dogfood run.
|
||||
- Preserve the Ghostlight-derived heartbeat initiative seam: every lane, including coordinator/Self and Persona, has a organ-state record and competes for heartbeat slots through readiness/reaction timing; initiative heat can raise or cool global, group, arena, role, and agent tempo through typed heartbeat policy; active thinking freezes initiative until completion, so heat never queues a lane already mid-turn; idle winners ruminate instead of inventing project work, and sleep windows distill the accumulated thought pressure into reviewed self-memory or doctrine.
|
||||
- Use `notes/epiphany-swarm-readiness-plan.md` as the live-fire direction gate. The local run path is a compass, not launch clearance: before unattended swarm operation, Epiphany needs typed pause/brake enforcement, one initiative scheduler, completion-gated cooldown, stale active-turn recovery receipts, parent-side Persona speech eligibility, memory lifecycle operations, and CultNet-first operator snapshots/intents/receipts. The local Verse brake document exists, `epiphany-verse-query swarm-brake` can engage/release it, `tools/epiphany_local_run.ps1` refuses live `plan`/`run`/`mvp` modes when the brake is engaged while leaving `status` readable, `epiphany-mvp-coordinator` checks the local Verse brake before app-server startup, and `epiphany-heartbeat-store` guards tick/pump/heat/queue-mention/routine when given `--local-verse-store`. Daemon liveness is now a typed local Verse authority: `epiphany-verse-query daemon-status` writes one daemon status without repainting the table, local Verse seeding preserves existing daemon statuses and swarm brakes, `invoke-tool` refuses when the host daemon is not ready or lacks `submitTypedToolIntent`, and both daemon tool invocation and lifecycle poke fail closed under an engaged matching brake. `epiphany-daemon-supervisor policy` writes durable per-daemon restart policy with command/args/cwd/cooldown/backoff/attempt state plus reconcile cadence and stale-heartbeat threshold; `epiphany-daemon-supervisor reconcile` loads that policy when no override command is supplied, refuses under a matching lifecycle brake, refuses during cooldown/backoff, writes daemon poke intent/receipt, updates daemon status, and updates policy attempt state; `epiphany-daemon-supervisor tick` is an explicit scheduler pulse that scans durable policies, records ready/noop pulses, skips before the configured reconcile interval, marks stale heartbeat status degraded, routes restarts through the same brake/cooldown/poke receipt path, and writes a latest `epiphany.cultmesh.daemon_scheduler_receipt.v0`; `epiphany-daemon-supervisor serve` runs that same pulse on a configurable cadence with bounded `--max-iterations` proof mode or unbounded service mode. `epiphany-daemon-supervisor service-plan`/`install-service` now writes a planned `epiphany.cultmesh.daemon_service_lifecycle_receipt.v0` for the `serve` command, while `service-launch`/`start-service` spawns that `serve` loop through the current executable or `--service-command`, can `--wait-child` for bounded proof, and records command/args/cwd, scheduler id, daemon selector, pid/exit/status, artifact ref, and private-state guard. `service-runbook`, `windows-service-install`/`service-install-plan`, `windows-service-status`, `windows-service-reconcile`, `windows-service-execution-readiness`, and `windows-service-start`/`stop` now record service lifecycle receipts through the same local Verse; the read-only status path has been proved against the real Windows `EventLog` service with receipt `daemon-service-lifecycle-receipt-windows-eventlog-proof-windows-service-status`, status `running`, exit code `0`, and `privateStateExposed=false`; the read-only service-policy reconciliation path has been proved for missing service, real-service drift against `EventLog`, lifecycle-brake refusal, and wrapper/local-Verse receipt `daemon-service-lifecycle-receipt-windows-eventlog-reconcile-proof-windows-service-reconcile`; execution readiness has been proved as a non-mutating `not-elevated` receipt through direct and wrapper paths; start/stop now produce non-mutating `start-planned`/`stop-planned` receipts unless `--execute-control`/`--execute-service-control` is passed, and wrapper `service-start-plan`/`service-stop-plan` proves those receipts against `EventLog`; explicit install/control execution now refuses as `execution-refused-not-elevated` with `executed=false` when the shell lacks Windows administrator authority, and wrapper `service-install-execute`, `service-start-execute`, and `service-stop-execute` prove those refusal receipts without mutation. Service lifecycle actions check the local Verse swarm brake before process launch, artifact writes, service-manager queries, service-policy reconciliation, execution-readiness checks, control planning, elevation-gated execution, or start/stop execution. The local wrapper builds/checks this binary.
|
||||
- Use `notes/epiphany-repo-swarm-mvp-contract.md` as the authority correction for repo-swarm autonomy. Autonomous branch-local work inside an Epiphany-owned Body is in scope and is the desired operating mode; the safety boundary is typed authority, branch containment, interruptibility, receipts, private-state sealing, and Bifrost-gated publication/merge/escalation, not asking a human before every local edit. Three native repo-swarm front doors are live: `epiphany-repo init --workspace <repo>` writes the repo-swarm init receipt and branch workbench plan; `epiphany-swarm online --workspace <repo>` seeds repo-local `.epiphany/local-verse.ccmp`, standing-faculty SoA, topology/liveness/tool/overview proof, and `.epiphany/swarm-online/repo-swarm-online-receipt.json`; `epiphany-work accept --workspace <repo> --from persona-or-bifrost --item <id>` routes a Persona/Bifrost item through CultMesh collaboration feedback into Imagination consensus discovery and writes `.epiphany/work/work-accept-<item>.json` with no Hands, durable-state, or publication authority granted. Fresh-repo smokes proved init, online, and Persona-item accept with `privateStateExposed=false`. Next missing organ is `epiphany-work run --workspace <repo>` after Imagination/Self/Mind gates adopt a concrete plan.
|
||||
- Use `notes/epiphany-repo-swarm-mvp-contract.md` as the authority correction for repo-swarm autonomy. Autonomous branch-local work inside an Epiphany-owned Body is in scope and is the desired operating mode; the safety boundary is typed authority, branch containment, interruptibility, receipts, private-state sealing, and Bifrost-gated publication/merge/escalation, not asking a human before every local edit. Four native repo-swarm front doors are live: `epiphany-repo init --workspace <repo>` writes the repo-swarm init receipt and branch workbench plan; `epiphany-swarm online --workspace <repo>` seeds repo-local `.epiphany/local-verse.ccmp`, standing-faculty SoA, topology/liveness/tool/overview proof, and `.epiphany/swarm-online/repo-swarm-online-receipt.json`; `epiphany-work accept --workspace <repo> --from persona-or-bifrost --item <id>` routes a Persona/Bifrost item through CultMesh collaboration feedback into Imagination consensus discovery and writes `.epiphany/work/work-accept-<item>.json` with no Hands, durable-state, or publication authority granted; `epiphany-work run --workspace <repo> [--item <id>]` persists a repo-local runtime-spine Substrate Gate read/snapshot grant, Hands intent, and Hands review with `decision=queued-for-adoption`. Fresh-repo smokes proved init, online, accept, and run with `privateStateExposed=false`, and negative proof showed `epiphany-hands-action record-pass` refuses the queued gate because it is not approved. Next missing organ is adoption/promote of a queued run gate into an approved branch-local Hands action after Imagination/Self/Mind evidence exists.
|
||||
- Agent memory lifecycle now has a first typed v0 operation surface in `epiphany-core::agent_memory`: `AgentMemoryLifecycleOperation` can revise, retire, crystallize, prune, and merge bounded memory records after role/agent review, and `epiphany-agent-memory-store review-lifecycle|apply-lifecycle` exposes the path at the operator edge. This closes the first explicit lifecycle-operation slice from the swarm-readiness gate; it does not yet make sleep silently mutate identity or project truth.
|
||||
- Persona public speech now has a parent-side eligibility receipt at the Discord/Aquarium mouth edge. `epiphany.persona_speech_audit.v0` records action kind, content fingerprint, opening/topic keys, recent-window counts, repeated opening/topic counts, channel saturation, and allow/block reasons. `epiphany-persona-discord post` blocks repeated public openings before token/webhook work; draft and bubble still emit audit receipts for operator inspection. The compatibility JSON artifact remains for display, but the durable witness is now `epiphany.cultmesh.persona_speech_audit.v0` in CultMesh with latest-key projection through local Verse context. Local MVP Persona bubbles now write that durable witness to `.epiphany-run/cultmesh/local-verse.ccmp`, not a separate mouth-side store. This is posting-edge policy, not a Persona prompt wish.
|
||||
- Grow the VoidBot repo-Persona pattern into Epiphany's product direction: each Epiphany owns one or more repos, has one or more Personas, and exposes project-native conversation through Aquarium, Discord, voice/WebRTC, stream surfaces, CLI, and CultNet clients so humans can talk to projects instead of pre-authoring complete implementation briefs. Persona is special because Imagination acts as Projector, turning typed state into narrative context before the Persona thinks, and Mind acts as Interpreter, turning natural Persona output into reviewed state/side-effect intents after the Persona thinks.
|
||||
|
|
|
|||
Reference in a new issue