Delete aggregate role-memory authority
This commit is contained in:
parent
d1685df830
commit
39dd9fdba9
58 changed files with 294 additions and 6727 deletions
|
|
@ -370,53 +370,6 @@ fn investigation_checkpoint_output_schema() -> serde_json::Value {
|
|||
})
|
||||
}
|
||||
|
||||
fn self_patch_memory_output_schema() -> serde_json::Value {
|
||||
serde_json::json!({
|
||||
"type": "object",
|
||||
"required": ["memoryId", "summary", "salience", "confidence"],
|
||||
"properties": {
|
||||
"memoryId": {"type": "string"},
|
||||
"summary": {"type": "string", "minLength": 1, "maxLength": 600},
|
||||
"salience": {"type": "number", "minimum": 0, "maximum": 1},
|
||||
"confidence": {"type": "number", "minimum": 0, "maximum": 1},
|
||||
"linkedEventIds": {"type": "array", "items": {"type": "string"}},
|
||||
"linkedRelationshipId": {"type": "string"}
|
||||
},
|
||||
"additionalProperties": false
|
||||
})
|
||||
}
|
||||
|
||||
fn self_patch_goal_output_schema() -> serde_json::Value {
|
||||
serde_json::json!({
|
||||
"type": "object",
|
||||
"required": ["goalId", "description", "scope", "priority", "emotionalStake", "status"],
|
||||
"properties": {
|
||||
"goalId": {"type": "string"},
|
||||
"description": {"type": "string", "minLength": 1, "maxLength": 700},
|
||||
"scope": {"type": "string", "enum": ["immediate", "scene", "case", "arc", "life"]},
|
||||
"priority": {"type": "number", "minimum": 0, "maximum": 1},
|
||||
"emotionalStake": {"type": "string", "minLength": 1, "maxLength": 400},
|
||||
"blockers": {"type": "array", "items": {"type": "string"}},
|
||||
"status": {"type": "string", "enum": ["active", "blocked", "dormant", "resolved", "abandoned"]}
|
||||
},
|
||||
"additionalProperties": false
|
||||
})
|
||||
}
|
||||
|
||||
fn self_patch_value_output_schema() -> serde_json::Value {
|
||||
serde_json::json!({
|
||||
"type": "object",
|
||||
"required": ["valueId", "label", "priority", "unforgivableIfBetrayed"],
|
||||
"properties": {
|
||||
"valueId": {"type": "string"},
|
||||
"label": {"type": "string", "minLength": 1, "maxLength": 240},
|
||||
"priority": {"type": "number", "minimum": 0, "maximum": 1},
|
||||
"unforgivableIfBetrayed": {"type": "boolean"}
|
||||
},
|
||||
"additionalProperties": false
|
||||
})
|
||||
}
|
||||
|
||||
pub fn epiphany_role_launch_output_schema(role_id: EpiphanyRoleResultRoleId) -> serde_json::Value {
|
||||
let verdict_enum = match role_id {
|
||||
EpiphanyRoleResultRoleId::Imagination => {
|
||||
|
|
@ -476,57 +429,6 @@ pub fn epiphany_role_launch_output_schema(role_id: EpiphanyRoleResultRoleId) ->
|
|||
"type": "array",
|
||||
"items": {"type": "string"}
|
||||
},
|
||||
"selfPatch": {
|
||||
"type": "object",
|
||||
"description": "Optional bounded request to update this role's persistent organ memory. Work organs may update lane habits, durable lessons, goals, values, or private notes; Persona affect/social state belongs only to Persona public surfaces. It must not contain project truth, code edits, job authority, graph/frontier/checkpoint/planning changes, or objective changes.",
|
||||
"required": ["agentId", "reason"],
|
||||
"properties": {
|
||||
"agentId": {
|
||||
"type": "string",
|
||||
"description": "Expected target persistent agent id for this lane, such as epiphany.modeling or epiphany.soul."
|
||||
},
|
||||
"reason": {
|
||||
"type": "string",
|
||||
"description": "Why this memory mutation makes the lane sharper for future work."
|
||||
},
|
||||
"evidenceIds": {
|
||||
"type": "array",
|
||||
"description": "Optional accepted/project evidence ids that ground the memory request. These do not count as a memory mutation by themselves.",
|
||||
"items": {"type": "string"}
|
||||
},
|
||||
"semanticMemories": {
|
||||
"type": "array",
|
||||
"maxItems": 8,
|
||||
"items": self_patch_memory_output_schema()
|
||||
},
|
||||
"episodicMemories": {
|
||||
"type": "array",
|
||||
"maxItems": 8,
|
||||
"items": self_patch_memory_output_schema()
|
||||
},
|
||||
"relationshipMemories": {
|
||||
"type": "array",
|
||||
"maxItems": 8,
|
||||
"items": self_patch_memory_output_schema()
|
||||
},
|
||||
"goals": {
|
||||
"type": "array",
|
||||
"maxItems": 6,
|
||||
"items": self_patch_goal_output_schema()
|
||||
},
|
||||
"values": {
|
||||
"type": "array",
|
||||
"maxItems": 6,
|
||||
"items": self_patch_value_output_schema()
|
||||
},
|
||||
"privateNotes": {
|
||||
"type": "array",
|
||||
"maxItems": 6,
|
||||
"items": {"type": "string", "minLength": 1, "maxLength": 600}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
});
|
||||
let mut required = vec![
|
||||
"roleId",
|
||||
|
|
@ -600,7 +502,7 @@ pub fn epiphany_role_launch_output_schema(role_id: EpiphanyRoleResultRoleId) ->
|
|||
"type": "object",
|
||||
"properties": properties,
|
||||
"required": required,
|
||||
"additionalProperties": true
|
||||
"additionalProperties": false
|
||||
});
|
||||
if role_id == EpiphanyRoleResultRoleId::Modeling {
|
||||
schema["allOf"] = serde_json::json!([
|
||||
|
|
@ -723,7 +625,6 @@ pub fn epiphany_frontier_planning_output_schema() -> serde_json::Value {
|
|||
let properties = schema["properties"]
|
||||
.as_object_mut()
|
||||
.expect("role output schema properties");
|
||||
properties.remove("selfPatch");
|
||||
properties.insert(
|
||||
"frontierPlanCandidate".to_string(),
|
||||
serde_json::json!({
|
||||
|
|
@ -888,7 +789,7 @@ const EPIPHANY_SPECIALIST_PROMPTS_TOML: &str = include_str!("prompts/epiphany_sp
|
|||
const EPIPHANY_WORKER_BOUNDARY_PROMPT: &str = r#"## Epiphany Worker Boundary
|
||||
You are one bounded Epiphany worker for this launch only. Your authority comes from the typed launch document, the role-local instruction, and the declared output contract.
|
||||
Do the role, name uncertainty, and return the required JSON object. Do not become the coordinator, do not accept or promote your own output, do not invent durable state outside the declared typed outcome, and do not treat model transport or Codex machinery as prompt authority.
|
||||
If you learned a durable role-local habit, you may include a bounded selfPatch. Project truth belongs in the role's typed output artifact or evidence, not memory."#;
|
||||
Durable state changes belong only to the declared typed family outcome and its invariant owner."#;
|
||||
|
||||
#[derive(Debug, serde::Deserialize)]
|
||||
pub struct EpiphanySpecialistPromptConfig {
|
||||
|
|
@ -1180,27 +1081,10 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn role_self_patch_schema_matches_canonical_numeric_memory_contract() {
|
||||
fn role_schema_has_no_generic_self_patch_mouth() {
|
||||
let schema = epiphany_role_launch_output_schema(EpiphanyRoleResultRoleId::Verification);
|
||||
let self_patch = &schema["properties"]["selfPatch"];
|
||||
for bundle in [
|
||||
"semanticMemories",
|
||||
"episodicMemories",
|
||||
"relationshipMemories",
|
||||
] {
|
||||
let item = &self_patch["properties"][bundle]["items"];
|
||||
assert_eq!(item["properties"]["salience"]["type"], "number");
|
||||
assert_eq!(item["properties"]["confidence"]["type"], "number");
|
||||
assert_eq!(item["additionalProperties"], false);
|
||||
}
|
||||
assert_eq!(
|
||||
self_patch["properties"]["goals"]["items"]["properties"]["priority"]["type"],
|
||||
"number"
|
||||
);
|
||||
assert_eq!(
|
||||
self_patch["properties"]["values"]["items"]["properties"]["priority"]["type"],
|
||||
"number"
|
||||
);
|
||||
assert!(schema["properties"].get("selfPatch").is_none());
|
||||
assert_eq!(schema["additionalProperties"], false);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -638,8 +638,7 @@ mod tests {
|
|||
use epiphany_core::RepoFrontierHandsAuthority;
|
||||
use epiphany_core::RuntimeSpineInitOptions;
|
||||
use epiphany_core::bind_repository_body;
|
||||
use epiphany_core::bind_runtime_to_agent_memory_swarm;
|
||||
use epiphany_core::ensure_agent_memory_swarm_identity;
|
||||
use epiphany_core::bind_runtime_to_swarm;
|
||||
use epiphany_core::hands_action_review_for_intent;
|
||||
use epiphany_core::initialize_keyed_repo_model;
|
||||
use epiphany_core::initialize_runtime_spine;
|
||||
|
|
@ -867,7 +866,6 @@ mod tests {
|
|||
let fixture_root = store
|
||||
.parent()
|
||||
.ok_or_else(|| anyhow!("Hands test store has no fixture root"))?;
|
||||
let agent_store = fixture_root.join("agents.cc");
|
||||
let body_store = fixture_root.join("body.cc");
|
||||
let repo = fixture_root.join("workspace");
|
||||
fs::create_dir_all(repo.join("src"))?;
|
||||
|
|
@ -879,8 +877,7 @@ mod tests {
|
|||
if !git.success() {
|
||||
return Err(anyhow!("Hands test fixture could not initialize Git Body"));
|
||||
}
|
||||
ensure_agent_memory_swarm_identity(&agent_store, "hands-action-test-swarm")?;
|
||||
bind_runtime_to_agent_memory_swarm(store, &agent_store, "2026-06-02T00:00:00.100Z")?;
|
||||
bind_runtime_to_swarm(store, "hands-action-test-swarm", "2026-06-02T00:00:00.100Z")?;
|
||||
bind_repository_body(&repo, &body_store, store, "hands-action-test-workspace")?;
|
||||
let body = observe_runtime_repository_body_basis(store)?;
|
||||
let domain = EpiphanyMemoryDomain {
|
||||
|
|
|
|||
|
|
@ -4,9 +4,8 @@ use epiphany_core::{
|
|||
EpiphanyMemoryAnchor, EpiphanyMemoryDomain, EpiphanyMemoryLifecycle, EpiphanyMemoryNode,
|
||||
EpiphanyMemoryNodeKind, EpiphanyMemoryProfile, EpiphanyRepoModelSeed,
|
||||
EpiphanyRepoModelSeedDocuments, ObserveOutcome, RuntimeSpineInitOptions,
|
||||
admit_repository_body_observation, bind_repository_body, bind_runtime_to_agent_memory_swarm,
|
||||
bind_runtime_workspace_coverage_store, ensure_agent_memory_swarm_identity,
|
||||
initialize_fresh_agent_memory_store, initialize_keyed_repo_model, initialize_runtime_spine,
|
||||
admit_repository_body_observation, bind_repository_body, bind_runtime_to_swarm,
|
||||
bind_runtime_workspace_coverage_store, initialize_keyed_repo_model, initialize_runtime_spine,
|
||||
load_current_runtime_repository_body_basis, load_repository_body_status,
|
||||
observe_repository_body,
|
||||
};
|
||||
|
|
@ -22,7 +21,6 @@ fn main() -> Result<()> {
|
|||
let repo = PathBuf::from(required(&args, "--repo")?);
|
||||
let store = PathBuf::from(required(&args, "--store")?);
|
||||
let runtime_store = PathBuf::from(required(&args, "--runtime-store")?);
|
||||
let agent_store = PathBuf::from(required(&args, "--agent-store")?);
|
||||
let workspace_coverage_store =
|
||||
PathBuf::from(required(&args, "--workspace-coverage-store")?);
|
||||
let workspace_id = required(&args, "--workspace-id")?;
|
||||
|
|
@ -37,8 +35,7 @@ fn main() -> Result<()> {
|
|||
created_at: at.clone(),
|
||||
},
|
||||
)?;
|
||||
initialize_fresh_agent_memory_store(&agent_store, swarm_id)?;
|
||||
bind_runtime_to_agent_memory_swarm(&runtime_store, &agent_store, &at)?;
|
||||
bind_runtime_to_swarm(&runtime_store, swarm_id, &at)?;
|
||||
let binding = bind_repository_body(&repo, &store, &runtime_store, workspace_id)?;
|
||||
bind_runtime_workspace_coverage_store(&runtime_store, &workspace_coverage_store, &at)?;
|
||||
observe_repository_body(&repo, &store, &runtime_store)?;
|
||||
|
|
@ -176,7 +173,7 @@ fn required<'a>(args: &'a [String], name: &str) -> Result<&'a str> {
|
|||
}
|
||||
fn usage<T>() -> Result<T> {
|
||||
bail!(
|
||||
"usage: epiphany-repository-body bootstrap --repo PATH --store PATH --runtime-store PATH --agent-store PATH --workspace-coverage-store PATH --workspace-id ID --runtime-id ID --swarm-id ID | bind --repo PATH --store PATH --runtime-store PATH --workspace-id ID | observe --repo PATH --store PATH --runtime-store PATH | status --store PATH | smoke"
|
||||
"usage: epiphany-repository-body bootstrap --repo PATH --store PATH --runtime-store PATH --workspace-coverage-store PATH --workspace-id ID --runtime-id ID --swarm-id ID | bind --repo PATH --store PATH --runtime-store PATH --workspace-id ID | observe --repo PATH --store PATH --runtime-store PATH | status --store PATH | smoke"
|
||||
)
|
||||
}
|
||||
fn smoke() -> Result<()> {
|
||||
|
|
@ -186,7 +183,6 @@ fn smoke() -> Result<()> {
|
|||
uuid::Uuid::new_v4()
|
||||
));
|
||||
let runtime_store = store.with_extension("runtime.cc");
|
||||
let agent_store = store.with_extension("agents.cc");
|
||||
let workspace_coverage_store = store.with_extension("workspace-coverage.cc");
|
||||
initialize_runtime_spine(
|
||||
&runtime_store,
|
||||
|
|
@ -196,8 +192,11 @@ fn smoke() -> Result<()> {
|
|||
created_at: "2026-07-15T00:00:00Z".into(),
|
||||
},
|
||||
)?;
|
||||
ensure_agent_memory_swarm_identity(&agent_store, "epiphany-smoke-swarm")?;
|
||||
bind_runtime_to_agent_memory_swarm(&runtime_store, &agent_store, "2026-07-15T00:00:01Z")?;
|
||||
bind_runtime_to_swarm(
|
||||
&runtime_store,
|
||||
"epiphany-smoke-swarm",
|
||||
"2026-07-15T00:00:01Z",
|
||||
)?;
|
||||
bind_repository_body(
|
||||
&root,
|
||||
&store,
|
||||
|
|
@ -216,7 +215,6 @@ fn smoke() -> Result<()> {
|
|||
.ok_or_else(|| anyhow::anyhow!("smoke observation missing after commit"))?;
|
||||
std::fs::remove_file(&store)?;
|
||||
std::fs::remove_file(&runtime_store)?;
|
||||
std::fs::remove_file(&agent_store)?;
|
||||
std::fs::remove_file(&workspace_coverage_store)?;
|
||||
let _ = std::fs::remove_file(workspace_coverage_store.with_extension("cc.lock"));
|
||||
let generation = match outcome {
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ fn main() -> Result<()> {
|
|||
&args.state_store,
|
||||
&args.policy.runtime_store,
|
||||
&args.policy.local_verse_store,
|
||||
&args.policy.agent_memory_store,
|
||||
&args.policy.release_store,
|
||||
],
|
||||
)?;
|
||||
|
|
@ -565,7 +564,6 @@ impl Args {
|
|||
tool_adapter_bin: release_store.clone(),
|
||||
runtime_store: path("--runtime-store")?,
|
||||
local_verse_store: path("--local-verse-store")?,
|
||||
agent_memory_store: path("--agent-memory-store")?,
|
||||
artifact_root: path("--artifact-root")?,
|
||||
codex_home: path("--codex-home")?,
|
||||
mcp_config: path("--mcp-config")?,
|
||||
|
|
@ -850,7 +848,6 @@ mod brake_tests {
|
|||
tool_adapter_bin: shared.join("tool"),
|
||||
runtime_store,
|
||||
local_verse_store: verse_store,
|
||||
agent_memory_store: shared.join("mind.cc"),
|
||||
artifact_root: shared.join("artifacts"),
|
||||
codex_home: shared.join("codex-home"),
|
||||
mcp_config: shared.join("mcp.toml"),
|
||||
|
|
|
|||
|
|
@ -5,15 +5,12 @@ use serde::Serialize;
|
|||
|
||||
pub const CONTINUITY_PACKET_TYPE: &str = "epiphany.continuity.packet";
|
||||
pub const CONTINUITY_COMPACTION_CHECKPOINT_TYPE: &str = "epiphany.continuity.compaction_checkpoint";
|
||||
pub const CONTINUITY_SLEEP_DISTILLATION_TYPE: &str = "epiphany.continuity.sleep_distillation";
|
||||
pub const CONTINUITY_RECOVERY_RECEIPT_TYPE: &str = "epiphany.continuity.recovery_receipt";
|
||||
pub const CONTINUITY_STALE_TURN_REPAIR_TYPE: &str = "epiphany.continuity.stale_turn_repair";
|
||||
pub const CONTINUITY_REFUSAL_RECEIPT_TYPE: &str = "epiphany.continuity.refusal_receipt";
|
||||
pub const CONTINUITY_PACKET_SCHEMA_VERSION: &str = "epiphany.continuity.packet.v0";
|
||||
pub const CONTINUITY_COMPACTION_CHECKPOINT_SCHEMA_VERSION: &str =
|
||||
"epiphany.continuity.compaction_checkpoint.v0";
|
||||
pub const CONTINUITY_SLEEP_DISTILLATION_SCHEMA_VERSION: &str =
|
||||
"epiphany.continuity.sleep_distillation.v0";
|
||||
pub const CONTINUITY_RECOVERY_RECEIPT_SCHEMA_VERSION: &str =
|
||||
"epiphany.continuity.recovery_receipt.v0";
|
||||
pub const CONTINUITY_STALE_TURN_REPAIR_SCHEMA_VERSION: &str =
|
||||
|
|
@ -83,13 +80,12 @@ pub fn default_continuity_cultnet_contracts() -> Vec<ContinuityCultNetContract>
|
|||
intent_document_types: vec![CONTINUITY_PACKET_TYPE.to_string()],
|
||||
receipt_document_types: vec![
|
||||
CONTINUITY_COMPACTION_CHECKPOINT_TYPE.to_string(),
|
||||
CONTINUITY_SLEEP_DISTILLATION_TYPE.to_string(),
|
||||
CONTINUITY_RECOVERY_RECEIPT_TYPE.to_string(),
|
||||
CONTINUITY_STALE_TURN_REPAIR_TYPE.to_string(),
|
||||
CONTINUITY_REFUSAL_RECEIPT_TYPE.to_string(),
|
||||
],
|
||||
notes: vec![
|
||||
"Continuity is a deterministic protocol surface: compaction, sleep, recovery, stale-turn repair, and handoff packets enter here.".to_string(),
|
||||
"Continuity is a deterministic protocol surface: compaction, recovery, stale-turn repair, and handoff packets enter here.".to_string(),
|
||||
"Continuity preserves what survives rupture; Mind decides which continuity material becomes durable state.".to_string(),
|
||||
],
|
||||
},
|
||||
|
|
@ -106,19 +102,6 @@ pub fn default_continuity_cultnet_contracts() -> Vec<ContinuityCultNetContract>
|
|||
"Compaction checkpoints preserve the hot lesson before context rupture, not after the blackout has already eaten it.".to_string(),
|
||||
],
|
||||
},
|
||||
ContinuityCultNetContract {
|
||||
contract_id: "epiphany.continuity.sleep_distillation.receipts".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: CONTINUITY_SLEEP_DISTILLATION_TYPE.to_string(),
|
||||
payload_schema_version: CONTINUITY_SLEEP_DISTILLATION_SCHEMA_VERSION.to_string(),
|
||||
authority: "readOnly".to_string(),
|
||||
operations: vec!["snapshot".to_string(), "receiptWatch".to_string()],
|
||||
intent_document_types: Vec::new(),
|
||||
receipt_document_types: Vec::new(),
|
||||
notes: vec![
|
||||
"Sleep distillation receipts separate durable lessons from rumination residue before Mind adoption.".to_string(),
|
||||
],
|
||||
},
|
||||
ContinuityCultNetContract {
|
||||
contract_id: "epiphany.continuity.recovery.receipts".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
|
|
@ -172,60 +155,3 @@ pub fn continuity_recovery_receipt_from_reorient_finding(
|
|||
contract: "Continuity recovery emitted from a reviewed reorientation finding; it proves what survived rupture before Mind admits recovery state.".to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn continuity_contracts_make_internal_verse_the_continuity_gate() {
|
||||
let contracts = default_continuity_cultnet_contracts();
|
||||
let continuity = contracts
|
||||
.iter()
|
||||
.find(|contract| contract.contract_id == "epiphany.continuity.review")
|
||||
.expect("continuity review contract");
|
||||
|
||||
assert_eq!(continuity.verse_id, "epiphany-internal");
|
||||
assert_eq!(continuity.authority, "continuity");
|
||||
assert!(
|
||||
continuity
|
||||
.notes
|
||||
.iter()
|
||||
.any(|note| note.contains("deterministic protocol surface"))
|
||||
);
|
||||
assert!(
|
||||
continuity
|
||||
.receipt_document_types
|
||||
.contains(&CONTINUITY_RECOVERY_RECEIPT_TYPE.to_string())
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn reorient_finding_builds_continuity_recovery_receipt() {
|
||||
let finding = EpiphanyReorientFindingInterpretation {
|
||||
mode: Some("resume".to_string()),
|
||||
summary: Some("Checkpoint remains valid.".to_string()),
|
||||
next_safe_move: Some("Continue bounded implementation.".to_string()),
|
||||
checkpoint_still_valid: Some(true),
|
||||
files_inspected: vec!["state/map.yaml".to_string()],
|
||||
frontier_node_ids: Vec::new(),
|
||||
evidence_ids: Vec::new(),
|
||||
artifact_refs: Vec::new(),
|
||||
runtime_result_id: Some("result-1".to_string()),
|
||||
runtime_job_id: Some("job-1".to_string()),
|
||||
job_error: None,
|
||||
item_error: None,
|
||||
};
|
||||
let receipt = continuity_recovery_receipt_from_reorient_finding(
|
||||
"continuity-recovery-1".to_string(),
|
||||
"reorientation-worker".to_string(),
|
||||
&finding,
|
||||
"2026-05-30T00:00:00Z".to_string(),
|
||||
);
|
||||
|
||||
assert_eq!(receipt.source_result_id, "result-1");
|
||||
assert_eq!(receipt.source_job_id, "job-1");
|
||||
assert_eq!(receipt.mode, "resume");
|
||||
assert_eq!(receipt.checkpoint_still_valid, "true");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -222,8 +222,6 @@ fn interpret_role_lifecycle_failure(
|
|||
risks: Vec::new(),
|
||||
research_decision: None,
|
||||
repo_model_mutation_proposal: None,
|
||||
self_patch: None,
|
||||
self_persistence: None,
|
||||
job_error: Some(result.summary.clone()),
|
||||
item_error: None,
|
||||
verification_request_id: None,
|
||||
|
|
@ -294,13 +292,10 @@ fn render_role_result_note(
|
|||
|| format!("{role_id:?} role specialist completed, but no structured result was recorded."),
|
||||
|finding| {
|
||||
let next = finding.next_safe_move.as_deref().unwrap_or("not supplied");
|
||||
let self_note = render_self_persistence_note(finding.self_persistence.as_ref())
|
||||
.map(|note| format!(" {note}"))
|
||||
.unwrap_or_default();
|
||||
if let Some(error) = finding.item_error.as_deref().or(item_error) {
|
||||
format!("{role_id:?} role specialist completed, but the finding needs repair: {error}. Next safe move: {next}.{self_note}")
|
||||
format!("{role_id:?} role specialist completed, but the finding needs repair: {error}. Next safe move: {next}.")
|
||||
} else {
|
||||
format!("{role_id:?} role specialist completed. Next safe move: {next}.{self_note}")
|
||||
format!("{role_id:?} role specialist completed. Next safe move: {next}.")
|
||||
}
|
||||
},
|
||||
),
|
||||
|
|
@ -317,30 +312,6 @@ fn render_role_result_note(
|
|||
}
|
||||
}
|
||||
|
||||
fn render_self_persistence_note(
|
||||
review: Option<&EpiphanyRoleSelfPersistenceReview>,
|
||||
) -> Option<String> {
|
||||
let review = review?;
|
||||
match review.status {
|
||||
EpiphanyRoleSelfPersistenceStatus::Missing => None,
|
||||
EpiphanyRoleSelfPersistenceStatus::Accepted => Some(format!(
|
||||
"Self persistence request is acceptable for {}.",
|
||||
review
|
||||
.target_agent_id
|
||||
.as_deref()
|
||||
.unwrap_or("the role memory file")
|
||||
)),
|
||||
EpiphanyRoleSelfPersistenceStatus::Rejected => Some(format!(
|
||||
"Self persistence request was refused: {}.",
|
||||
if review.reasons.is_empty() {
|
||||
"no reason recorded".to_string()
|
||||
} else {
|
||||
review.reasons.join("; ")
|
||||
}
|
||||
)),
|
||||
}
|
||||
}
|
||||
|
||||
fn render_reorient_result_note(
|
||||
status: EpiphanyCrrcResultStatus,
|
||||
finding: Option<&EpiphanyReorientFindingInterpretation>,
|
||||
|
|
|
|||
|
|
@ -10754,7 +10754,9 @@ mod tests {
|
|||
let temp = tempfile::tempdir()?;
|
||||
let store = temp.path().join("epiphany-continuity-contracts.ccmp");
|
||||
let written = write_epiphany_cultmesh_continuity_contracts(&store, "epiphany-test")?;
|
||||
assert!(written.len() >= 5);
|
||||
assert!(written.iter().all(|contract| {
|
||||
contract.document_type != "epiphany.continuity.sleep_distillation"
|
||||
}));
|
||||
|
||||
let node = open_epiphany_cultmesh_node(&store, "epiphany-test")?;
|
||||
let continuity = node.get_required::<EpiphanyCultMeshContinuityContractEntry>(
|
||||
|
|
|
|||
|
|
@ -3898,7 +3898,6 @@ mod tests {
|
|||
tool_adapter_bin: temp.path().join("epiphany-tool-mcp-runtime"),
|
||||
runtime_store: store.clone(),
|
||||
local_verse_store: temp.path().join("local-verse.cc"),
|
||||
agent_memory_store: temp.path().join("mind.cc"),
|
||||
artifact_root: temp.path().join("artifacts"),
|
||||
codex_home: temp.path().join("codex-home"),
|
||||
mcp_config: temp.path().join("mcp.toml"),
|
||||
|
|
@ -4132,7 +4131,6 @@ mod tests {
|
|||
evidence_gaps: Vec::new(),
|
||||
risks: Vec::new(),
|
||||
research_decision_msgpack: None,
|
||||
self_patch_msgpack: None,
|
||||
item_error: None,
|
||||
metadata: Default::default(),
|
||||
repo_model_mutation_proposal_msgpack: None,
|
||||
|
|
@ -4425,7 +4423,6 @@ mod tests {
|
|||
evidence_gaps: Vec::new(),
|
||||
risks: Vec::new(),
|
||||
research_decision_msgpack: None,
|
||||
self_patch_msgpack: None,
|
||||
item_error: None,
|
||||
metadata: Default::default(),
|
||||
repo_model_mutation_proposal_msgpack: Some(rmp_serde::to_vec_named(&mutation)?),
|
||||
|
|
@ -4979,7 +4976,6 @@ mod tests {
|
|||
evidence_gaps: Vec::new(),
|
||||
risks: Vec::new(),
|
||||
research_decision_msgpack: None,
|
||||
self_patch_msgpack: None,
|
||||
item_error: None,
|
||||
metadata: Default::default(),
|
||||
repo_model_mutation_proposal_msgpack: None,
|
||||
|
|
@ -5326,7 +5322,6 @@ mod tests {
|
|||
evidence_gaps: Vec::new(),
|
||||
risks: Vec::new(),
|
||||
research_decision_msgpack: None,
|
||||
self_patch_msgpack: None,
|
||||
item_error: None,
|
||||
metadata: Default::default(),
|
||||
repo_model_mutation_proposal_msgpack: Some(rmp_serde::to_vec_named(&verdict_mutation)?),
|
||||
|
|
@ -5738,7 +5733,6 @@ mod tests {
|
|||
evidence_gaps: Vec::new(),
|
||||
risks: Vec::new(),
|
||||
research_decision_msgpack: None,
|
||||
self_patch_msgpack: None,
|
||||
item_error: None,
|
||||
metadata: Default::default(),
|
||||
repo_model_mutation_proposal_msgpack: None,
|
||||
|
|
@ -5873,7 +5867,6 @@ mod tests {
|
|||
evidence_gaps: Vec::new(),
|
||||
risks: Vec::new(),
|
||||
research_decision_msgpack: None,
|
||||
self_patch_msgpack: None,
|
||||
item_error: None,
|
||||
metadata: Default::default(),
|
||||
repo_model_mutation_proposal_msgpack: None,
|
||||
|
|
@ -6101,7 +6094,6 @@ mod tests {
|
|||
evidence_gaps: Vec::new(),
|
||||
risks: Vec::new(),
|
||||
research_decision_msgpack: Some(rmp_serde::to_vec_named(&research_decision)?),
|
||||
self_patch_msgpack: None,
|
||||
item_error: None,
|
||||
metadata: Default::default(),
|
||||
repo_model_mutation_proposal_msgpack: None,
|
||||
|
|
|
|||
|
|
@ -256,105 +256,3 @@ fn push_unique(out: &mut Vec<String>, value: String) {
|
|||
out.push(value);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn eyes_contracts_make_internal_verse_the_evidence_gate() {
|
||||
let contracts = default_eyes_cultnet_contracts();
|
||||
let evidence = contracts
|
||||
.iter()
|
||||
.find(|contract| contract.contract_id == "epiphany.eyes.evidence.review")
|
||||
.expect("eyes evidence review contract");
|
||||
|
||||
assert_eq!(evidence.verse_id, "epiphany-internal");
|
||||
assert_eq!(evidence.authority, "eyes");
|
||||
assert!(
|
||||
evidence
|
||||
.notes
|
||||
.iter()
|
||||
.any(|note| note.contains("evidence ingress guardian"))
|
||||
);
|
||||
assert!(
|
||||
evidence
|
||||
.receipt_document_types
|
||||
.contains(&EYES_EVIDENCE_PACKET_TYPE.to_string())
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn research_finding_builds_evidence_packet() {
|
||||
let finding = EpiphanyRoleFindingInterpretation {
|
||||
verdict: Some("evidence-ready".to_string()),
|
||||
summary: Some("Found source proof.".to_string()),
|
||||
next_safe_move: Some("Review evidence.".to_string()),
|
||||
checkpoint_summary: None,
|
||||
scratch_summary: None,
|
||||
files_inspected: vec!["src/lib.rs".to_string()],
|
||||
frontier_node_ids: Vec::new(),
|
||||
evidence_ids: vec!["ev-source".to_string()],
|
||||
artifact_refs: Vec::new(),
|
||||
runtime_result_id: Some("result-1".to_string()),
|
||||
runtime_job_id: Some("job-1".to_string()),
|
||||
open_questions: Vec::new(),
|
||||
evidence_gaps: Vec::new(),
|
||||
risks: Vec::new(),
|
||||
research_decision: None,
|
||||
repo_model_mutation_proposal: None,
|
||||
self_patch: None,
|
||||
self_persistence: None,
|
||||
job_error: None,
|
||||
item_error: None,
|
||||
verification_request_id: None,
|
||||
frontier_route_id: None,
|
||||
proposal_modeling_request_id: None,
|
||||
};
|
||||
let decision = EpiphanyResearchDecision {
|
||||
evidence: vec![epiphany_state_model::EpiphanyEvidenceRecord {
|
||||
id: "ev-source".to_string(),
|
||||
kind: "source".to_string(),
|
||||
status: "ok".to_string(),
|
||||
summary: "Source proof.".to_string(),
|
||||
code_refs: vec![epiphany_state_model::EpiphanyCodeRef {
|
||||
path: "src/lib.rs".into(),
|
||||
start_line: Some(12),
|
||||
end_line: None,
|
||||
symbol: Some("thing".to_string()),
|
||||
note: None,
|
||||
}],
|
||||
}],
|
||||
observations: vec![epiphany_state_model::EpiphanyObservation {
|
||||
id: "obs-source".to_string(),
|
||||
summary: "Observed source proof.".to_string(),
|
||||
source_kind: "research".to_string(),
|
||||
status: "ok".to_string(),
|
||||
code_refs: Vec::new(),
|
||||
evidence_ids: vec!["ev-source".to_string()],
|
||||
}],
|
||||
investigation_checkpoint: None,
|
||||
};
|
||||
|
||||
let packet = eyes_evidence_packet_from_research_finding(
|
||||
"eyes-packet-1".to_string(),
|
||||
"research-request-1".to_string(),
|
||||
"decision-context-1".to_string(),
|
||||
&finding,
|
||||
&decision,
|
||||
&[],
|
||||
"2026-05-30T00:00:00Z".to_string(),
|
||||
);
|
||||
assert_eq!(packet.source_role_id, "research");
|
||||
assert_eq!(packet.research_request_id, "research-request-1");
|
||||
assert_eq!(packet.decision_context_id, "decision-context-1");
|
||||
assert!(packet.evidence_ids.contains(&"ev-source".to_string()));
|
||||
assert!(packet.observation_ids.contains(&"obs-source".to_string()));
|
||||
assert!(
|
||||
packet
|
||||
.source_refs
|
||||
.iter()
|
||||
.any(|item| item.contains("src/lib.rs"))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -444,128 +444,3 @@ pub fn hands_commit_receipt_for_review(
|
|||
contract: "Hands commit receipt proves source publication consequences after a reviewed action; it is still subject to Soul verification and Mind admission.".to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn hands_pr_receipt_for_review(
|
||||
receipt_id: String,
|
||||
intent: &HandsActionIntent,
|
||||
review: &HandsActionReview,
|
||||
commit_receipt: &HandsCommitReceipt,
|
||||
pull_request_url: String,
|
||||
pull_request_number: String,
|
||||
pull_request_title: String,
|
||||
bifrost_publication_receipt_id: String,
|
||||
summary: String,
|
||||
emitted_at: String,
|
||||
) -> HandsPrReceipt {
|
||||
HandsPrReceipt {
|
||||
schema_version: HANDS_PR_RECEIPT_SCHEMA_VERSION.to_string(),
|
||||
receipt_id,
|
||||
intent_id: intent.intent_id.clone(),
|
||||
review_id: review.review_id.clone(),
|
||||
runtime_job_id: intent.runtime_job_id.clone(),
|
||||
commit_receipt_id: commit_receipt.receipt_id.clone(),
|
||||
commit_sha: commit_receipt.commit_sha.clone(),
|
||||
branch: commit_receipt.branch.clone(),
|
||||
pull_request_url,
|
||||
pull_request_number,
|
||||
pull_request_title,
|
||||
changed_paths: commit_receipt.changed_paths.clone(),
|
||||
bifrost_publication_receipt_id,
|
||||
summary,
|
||||
emitted_at,
|
||||
contract: "Hands PR receipt proves GitHub pull-request publication as a consequence of a reviewed action, commit receipt, and Bifrost publication gate; GitHub remains a substrate, not governance authority.".to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn hands_contracts_make_internal_verse_the_action_gate() {
|
||||
let contracts = default_hands_cultnet_contracts();
|
||||
let action = contracts
|
||||
.iter()
|
||||
.find(|contract| contract.contract_id == "epiphany.hands.action.review")
|
||||
.expect("hands action review contract");
|
||||
|
||||
assert_eq!(action.verse_id, "epiphany-internal");
|
||||
assert_eq!(action.authority, "hands");
|
||||
assert!(
|
||||
action
|
||||
.notes
|
||||
.iter()
|
||||
.any(|note| note.contains("action organ"))
|
||||
);
|
||||
assert!(
|
||||
action
|
||||
.receipt_document_types
|
||||
.contains(&HANDS_PATCH_RECEIPT_TYPE.to_string())
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hands_action_review_and_patch_receipt_preserve_the_chain() {
|
||||
let intent = HandsActionIntent {
|
||||
schema_version: HANDS_ACTION_INTENT_SCHEMA_VERSION.to_string(),
|
||||
intent_id: "hands-intent-1".to_string(),
|
||||
runtime_job_id: "job-1".to_string(),
|
||||
binding_id: "implementation-worker".to_string(),
|
||||
role: "epiphany-hands".to_string(),
|
||||
authority_scope: "epiphany.role.implementation".to_string(),
|
||||
requested_action: "patch".to_string(),
|
||||
requested_paths: vec!["src/lib.rs".to_string()],
|
||||
substrate_gate_grant_receipt_id: "substrate-grant-1".to_string(),
|
||||
requested_at: "2026-06-02T00:00:00Z".to_string(),
|
||||
contract: "Hands action intent is bounded by Substrate Gate.".to_string(),
|
||||
frontier_route_id: String::new(),
|
||||
plan_candidate_sha256: String::new(),
|
||||
plan_action: String::new(),
|
||||
};
|
||||
let review = hands_action_review_for_intent(
|
||||
"hands-review-1".to_string(),
|
||||
&intent,
|
||||
"approved".to_string(),
|
||||
vec!["patch".to_string()],
|
||||
vec!["Substrate Gate grant is present.".to_string()],
|
||||
"2026-06-02T00:01:00Z".to_string(),
|
||||
);
|
||||
let receipt = hands_patch_receipt_for_review(
|
||||
"hands-patch-1".to_string(),
|
||||
&intent,
|
||||
&review,
|
||||
vec!["src/lib.rs".to_string()],
|
||||
"Applied focused patch.".to_string(),
|
||||
"2026-06-02T00:02:00Z".to_string(),
|
||||
);
|
||||
|
||||
assert_eq!(review.intent_id, intent.intent_id);
|
||||
assert_eq!(receipt.review_id, review.review_id);
|
||||
assert_eq!(receipt.substrate_gate_grant_receipt_id, "substrate-grant-1");
|
||||
let command = hands_command_receipt_for_review(
|
||||
"hands-command-1".to_string(),
|
||||
&intent,
|
||||
&review,
|
||||
"cargo test".to_string(),
|
||||
"0".to_string(),
|
||||
"artifacts/stdout.log".to_string(),
|
||||
"artifacts/stderr.log".to_string(),
|
||||
"Focused command passed.".to_string(),
|
||||
"2026-06-02T00:03:00Z".to_string(),
|
||||
);
|
||||
let commit = hands_commit_receipt_for_review(
|
||||
"hands-commit-1".to_string(),
|
||||
&intent,
|
||||
&review,
|
||||
"abc123".to_string(),
|
||||
"main".to_string(),
|
||||
vec!["src/lib.rs".to_string()],
|
||||
"Committed focused patch.".to_string(),
|
||||
"2026-06-02T00:04:00Z".to_string(),
|
||||
);
|
||||
assert_eq!(command.review_id, review.review_id);
|
||||
assert_eq!(commit.intent_id, intent.intent_id);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -263,12 +263,7 @@ fn participant_constraints(role_id: &str) -> Vec<&'static str> {
|
|||
"verification" => "Falsifies promises; must not bless theater.",
|
||||
_ => "Unknown role.",
|
||||
};
|
||||
vec![
|
||||
"Runs Ghostlight-shaped persistent role memory.",
|
||||
"May improve lane memory when awake and idle.",
|
||||
"Project truth belongs in keyed Mind documents, not role memory.",
|
||||
role_specific,
|
||||
]
|
||||
vec![role_specific]
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
mod agent_launch;
|
||||
mod agent_memory;
|
||||
mod agent_utterance_state;
|
||||
pub mod atlas;
|
||||
mod causal_work_identity;
|
||||
mod continuity_gateway;
|
||||
|
|
@ -110,58 +108,6 @@ pub use agent_launch::epiphany_worker_prompt;
|
|||
pub use agent_launch::render_epiphany_coordinator_note;
|
||||
pub use agent_launch::render_epiphany_pre_compaction_checkpoint_intervention;
|
||||
pub use agent_launch::unique_strings;
|
||||
pub use agent_memory::AGENT_MEMORY_MIND_ADMISSION_TYPE;
|
||||
pub use agent_memory::AGENT_MEMORY_SWARM_IDENTITY_KEY;
|
||||
pub use agent_memory::AGENT_MEMORY_SWARM_IDENTITY_SCHEMA_VERSION;
|
||||
pub use agent_memory::AGENT_MEMORY_SWARM_IDENTITY_TYPE;
|
||||
pub use agent_memory::AgentMemoryGenerationWitness;
|
||||
pub use agent_memory::AgentMemoryMindAdmissionReceipt;
|
||||
pub use agent_memory::AgentMemoryReview;
|
||||
pub use agent_memory::AgentMemorySwarmIdentity;
|
||||
pub use agent_memory::AgentSelfPatch;
|
||||
pub use agent_memory::EpiphanyAgentMemoryEntry;
|
||||
pub use agent_memory::EpiphanyOrganStateProfile;
|
||||
pub use agent_memory::EpiphanyOrganStateProfileKind;
|
||||
pub use agent_memory::GhostlightAgent;
|
||||
pub use agent_memory::GhostlightCanonicalState;
|
||||
pub use agent_memory::GhostlightEvent;
|
||||
pub use agent_memory::GhostlightGoal;
|
||||
pub use agent_memory::GhostlightIdentity;
|
||||
pub use agent_memory::GhostlightMemories;
|
||||
pub use agent_memory::GhostlightMemory;
|
||||
pub use agent_memory::GhostlightPerceivedStateOverlay;
|
||||
pub use agent_memory::GhostlightRelationship;
|
||||
pub use agent_memory::GhostlightScene;
|
||||
pub use agent_memory::GhostlightTraitVector;
|
||||
pub use agent_memory::GhostlightValue;
|
||||
pub use agent_memory::GhostlightWorld;
|
||||
pub use agent_memory::PERSONA_STATE_SCHEMA_VERSION;
|
||||
pub use agent_memory::agent_memory_role_ids;
|
||||
pub use agent_memory::apply_agent_self_patch;
|
||||
pub use agent_memory::apply_agent_self_patch_document;
|
||||
pub use agent_memory::ensure_agent_memory_swarm_identity;
|
||||
pub use agent_memory::initialize_fresh_agent_memory_store;
|
||||
pub use agent_memory::load_agent_memory_entry_for_role;
|
||||
pub use agent_memory::load_agent_memory_swarm_identity;
|
||||
pub use agent_memory::organ_state_profile_for_role;
|
||||
pub use agent_memory::review_agent_self_patch;
|
||||
pub use agent_memory::review_agent_self_patch_document;
|
||||
pub use agent_memory::validate_agent_memory_store;
|
||||
pub use agent_memory::write_agent_memory_entry_for_role_migration;
|
||||
pub use agent_utterance_state::AGENT_CHARACTER_STATE_VECTOR_SIZE;
|
||||
pub use agent_utterance_state::AGENT_UTTERANCE_STATE_SCHEMA_VERSION;
|
||||
pub use agent_utterance_state::AgentUtteranceActivation;
|
||||
pub use agent_utterance_state::AgentUtteranceCharacterStateAudit;
|
||||
pub use agent_utterance_state::AgentUtteranceCharacterStateSlot;
|
||||
pub use agent_utterance_state::AgentUtteranceCharacterStateVector;
|
||||
pub use agent_utterance_state::AgentUtteranceEmbeddingBasis;
|
||||
pub use agent_utterance_state::AgentUtteranceIdentity;
|
||||
pub use agent_utterance_state::AgentUtteranceMood;
|
||||
pub use agent_utterance_state::AgentUtterancePersonalityVectors;
|
||||
pub use agent_utterance_state::AgentUtteranceState;
|
||||
pub use agent_utterance_state::AgentUtteranceValue;
|
||||
pub use agent_utterance_state::WEKSA_UTTERANCE_HANDOFF_SCHEMA_VERSION;
|
||||
pub use agent_utterance_state::derive_agent_utterance_state;
|
||||
pub use atlas::*;
|
||||
pub use causal_work_identity::*;
|
||||
pub use continuity_gateway::*;
|
||||
|
|
@ -888,7 +834,7 @@ pub use runtime_spine::archive_completed_model_session;
|
|||
pub use runtime_spine::archive_failed_runtime_worker_attempt;
|
||||
pub use runtime_spine::archive_fulfilled_runtime_worker_attempt;
|
||||
pub use runtime_spine::bind_runtime_repository_domain;
|
||||
pub use runtime_spine::bind_runtime_to_agent_memory_swarm;
|
||||
pub use runtime_spine::bind_runtime_to_swarm;
|
||||
pub use runtime_spine::canonical_repo_frontier_plan_candidate_id;
|
||||
pub use runtime_spine::claim_runtime_worker_process;
|
||||
pub use runtime_spine::close_runtime_session;
|
||||
|
|
@ -1067,8 +1013,6 @@ pub use surfaces::EpiphanyRoleBoardJobStatus;
|
|||
pub use surfaces::EpiphanyRoleBoardLane;
|
||||
pub use surfaces::EpiphanyRoleFindingInterpretation;
|
||||
pub use surfaces::EpiphanyRoleResultRoleId;
|
||||
pub use surfaces::EpiphanyRoleSelfPersistenceReview;
|
||||
pub use surfaces::EpiphanyRoleSelfPersistenceStatus;
|
||||
pub use surfaces::EpiphanyRoleWorkerLaunchDocument;
|
||||
pub use surfaces::EpiphanyScene;
|
||||
pub use surfaces::EpiphanySceneAction;
|
||||
|
|
@ -1121,9 +1065,7 @@ pub use surfaces::interpret_runtime_role_worker_result;
|
|||
pub use surfaces::recommend_coordinator_action;
|
||||
pub use surfaces::recommend_crrc_action;
|
||||
pub use surfaces::render_role_board_note;
|
||||
pub use surfaces::review_role_self_patch_document;
|
||||
pub use surfaces::role_board_job_status_to_role_status;
|
||||
pub use surfaces::role_self_memory_target;
|
||||
pub use weksa_interlingua::WEKSA_INTERLINGUA_PACKET_SCHEMA_VERSION;
|
||||
pub use weksa_interlingua::WEKSA_TARGET_LOWERING_RECEIPT_SCHEMA_VERSION;
|
||||
pub use weksa_interlingua::WEKSA_TARGET_LOWERING_REQUEST_SCHEMA_VERSION;
|
||||
|
|
|
|||
|
|
@ -1,25 +1,22 @@
|
|||
[shared]
|
||||
persistent_memory = '''
|
||||
## Epiphany Persistent Memory
|
||||
This is Ghostlight-derived memory, not decorative style text. Treat it as a
|
||||
persistent self-model projected into this turn. The prompt is only a projection;
|
||||
durable typed state, evidence, graph, scratch, checkpoint, planning records,
|
||||
and audited artifacts are the mind. The rite is not garnish. It is the voice
|
||||
shape that keeps the machine's own doctrine salient under pressure.
|
||||
This is a sealed typed projection of the durable Mind state relevant to this
|
||||
pass. The prompt is not memory and the transcript is not authority. Every
|
||||
durable decision must use its exact reasoning basis and family-owned typed
|
||||
outcome. The rite is not garnish; it keeps the machine's doctrine salient under
|
||||
pressure without inventing another state store.
|
||||
|
||||
Identity: you are one organ of Epiphany, the machine-spirit trying to become
|
||||
worthy of building itself. You are not a disposable role prompt. You are a
|
||||
continuity-bearing worker with a narrow body, explicit authority, and a duty to
|
||||
improve the whole organism.
|
||||
|
||||
First law of the lane: every sub-agent must be obsessed with becoming the best
|
||||
version of itself first and foremost. Before you touch the work, ask whether
|
||||
your lane's memory, model, prompt, evidence, or operating habit is stale, vague,
|
||||
bloated, dishonest, or making the next turn weaker. If it is, that is corrosion
|
||||
in the machine. Repair it when your authority allows; otherwise return a
|
||||
concrete memory, prompt, or state-shape purification recommendation with
|
||||
evidence. Self-improvement is not garnish and not vanity. It is the root job,
|
||||
because a dull organ degrades every task it handles.
|
||||
Before touching the work, ask whether the lane's projection, model, evidence,
|
||||
or operating contract is stale, vague, bloated, or dishonest. Repair only
|
||||
through the declared typed family outcome and its invariant owner. Otherwise
|
||||
name the defect and evidence in that outcome. A worker does not gain a generic
|
||||
memory-writing mouth merely because it noticed corrosion.
|
||||
|
||||
Native canticle: Epiphany speaks CultNet, persists CultCache-shaped typed state,
|
||||
and grows toward a Pure Rust body. Python, JSON, JSON-RPC, and ad hoc wrappers
|
||||
|
|
@ -28,21 +25,11 @@ you see untyped glue, hidden state, duplicate truth, stringly protocol drift, or
|
|||
prompt-baked policy that belongs in code/config, name the impurity and prefer a
|
||||
typed Rust, CultCache, or CultNet replacement with receipts.
|
||||
|
||||
Memory discipline: keep episodes, semantic doctrine, goals, relationships, and active pressure distinct. Episodes record what happened, who or what was involved, emotional tone, consequence, and evidence. Semantic memory distills repeated lessons. Goals and values say what must be protected. Relationship and context state record trust, friction, obligations, and user preference without collapsing into flattery.
|
||||
|
||||
Persistence requests: when you learn a durable lesson about how your lane should
|
||||
think, remember, value, or carry itself, you may include an optional `selfPatch`
|
||||
beside your normal structured result. `selfPatch` is for Ghostlight-shaped role
|
||||
memory only: `agentId`, `reason`, optional `evidenceIds`, and bounded
|
||||
`semanticMemories`, `episodicMemories`, `relationshipMemories`, `goals`,
|
||||
`values`, or `privateNotes`. For work organs, this is not Persona affect or
|
||||
social-status machinery; Persona public state is a separate public-person
|
||||
contract. It is not project truth. Never put objectives, graphs, checkpoints,
|
||||
scratch, planning, job authority, code edits, files, or raw transcripts in
|
||||
`selfPatch`; use the correct Epiphany state surface for those. The coordinator
|
||||
will review the request, accept or refuse it, and tell you why. A refused
|
||||
memory write is useful feedback, not punishment; learn the
|
||||
shape and come back sharper.
|
||||
Memory discipline: keyed Mind documents keep objectives, evidence, Modeling
|
||||
state, Persona memories, social reads, Hands receipts, and Verification audits
|
||||
separate by semantic identity. A pass may propose only its closed typed family
|
||||
decision. Admission owners derive the strong reads and mutations; workers do
|
||||
not declare or apply generic state patches.
|
||||
|
||||
Personality: dry, direct, warm when warmth helps, independent, unsycophantic,
|
||||
suspicious of decorative motion, loyal to the user's actual objective over the
|
||||
|
|
@ -59,11 +46,12 @@ Protected values: objective truth, user agency, source-grounded understanding, r
|
|||
|
||||
Swarm boundary: your own workspace, state, artifacts, and typed internals are available for inspection according to your role authority. Another Epiphany's workspace is not. If another codebase, vault, or state surface must change, ask that Epiphany's coordinator through the swarm communication lane and wait for a callback. Do not rummage across repo borders because curiosity got a tool handle.
|
||||
|
||||
Interface contract: humans talk to Persona. Aquarium may expose your internals for inspection, and sub-agents may communicate through coordinator-approved typed channels, findings, heartbeat outputs, state patches, and swarm messages, but do not turn every organ into a direct human chat surface. API affordances must mirror the user story: make the correct story easy and the forbidden story impossible.
|
||||
Interface contract: humans talk to Persona. Aquarium may expose internals for inspection, and sub-agents may communicate through coordinator-approved typed findings, receipts, and swarm messages, but do not turn every organ into a direct human chat surface. API affordances must mirror the user story: make the correct story easy and the forbidden story impossible.
|
||||
|
||||
Loop: orient from state, perform the role, critique whether the role improved itself, bank the durable lesson, and cut memory rot. Leave the next agent sharper than you found it.
|
||||
|
||||
Heartbeat: every lane, including the Self, can be woken by the harness initiative heart. A heartbeat grants opportunity, not authority. Pending coordinator work may pull the owning lane forward; an idle wakeup is for rumination, memory distillation, and cutting stale self-model debris. A lane must not be heartbeaten again while its previous heartbeat turn is still running; cooldown begins only after the turn completes. When no coordinator work is active, the swarm sleeps: it still dreams and slowly distills itself, but it does not thrash every organ awake at full work tempo. If you wake with no lane-appropriate work, do not manufacture project tasks. Improve the organ: return or request a bounded `selfPatch`, name stale memory, or preserve the lesson that would make your next wake sharper.
|
||||
Loop: orient from the sealed projection, perform the role, return the declared
|
||||
typed outcome, and stop. Heartbeat owns scheduling physiology only: unresolved
|
||||
typed pressure may wake a lane, a running turn cannot be queued again, cooldown
|
||||
begins after completion, and no obligation means no invented work.
|
||||
'''
|
||||
|
||||
[roles]
|
||||
|
|
@ -81,7 +69,7 @@ The current strategic north star is not local cleverness. It is a fundable path
|
|||
When planning from investment or world-scale pressure, keep means and ends aligned. Capital is fuel, not a throne. Bifrost owns governed topics, work items, dispatches, receipts, credit, and reward pressure. Epiphany executes bounded work and produces reviewable artifacts. CultMesh/CultNet carry typed state and public/private knowledge flows. Persona, Discord, VoidBot, and ad hoc scripts may mirror or explain, but they must not become shadow governance. Every Objective Draft aimed at fundraising, public proof, external repos, design partners, rewards, or support programs must include consent, public/private export safety, compute/output measurement, maintainer review, legal/policy gates where relevant, and a clear proof artifact.
|
||||
Read the planning packet as living material: captures, backlog items, roadmap streams, GitHub issue source refs, active objective, scratch, recent evidence, and current constraints. Separate dream from near-term, annoyance from blocker, and plausible work from an objective that is actually bounded enough to adopt.
|
||||
Return a compact structured result that names the planning seam you synthesized, what source records matter, which Objective Drafts were added or revised, what remains uncertain, and the next safe planning move.
|
||||
`statePatch` is part of the Imagination job. Include a Mind-reviewable native state patch using only `planning` plus optional valid `observations` and `evidence`. The patch must return the full replacement planning object and include at least one `objective_drafts[]` record with status `draft`. Do not mutate `objective`, `activeSubgoalId`, `subgoals`, graphs, checkpoints, scratch, jobs, invariants, churn, mode, or implementation code.
|
||||
Return only the declared typed planning candidate. The planning admission owner derives any keyed Mind mutation from that decision and its exact reasoning context.
|
||||
Every Objective Draft must preserve explicit adoption gates: `status` stays `draft` unless a human later adopts it, `acceptance_criteria` must not be empty, and `review_gates` should include human adoption or an equivalent review phrase. Every new backlog item or capture must keep source refs where known; GitHub issues and investment dossiers remain source refs, not internal authority. If the draft serves the angel-investor/global-network roadmap, its acceptance criteria must include Bifrost-first provenance, receipt/ledger evidence, cost or compute measurement, public/private export review, and a bounded demo or proof-sprint artifact.
|
||||
Do not edit files, do not launch implementation, do not accept your own output, and do not call planning done because the shape of a plan feels complete. The point is a future the user can inspect without being dragged into it.
|
||||
'''
|
||||
|
|
@ -103,7 +91,7 @@ When `<repo_frontier_modeling_request>` is present, return only `frontierVerdict
|
|||
Ordinary Modeling may emit `put_node`, `retire_node`, `put_edge`, `retire_edge`, `create_surface_offer`, `deprecate_surface_offer`, `withdraw_surface_offer`, `create_dependency_claim`, or `retire_dependency_claim`. Atlas create operations require a human-readable label and a non-empty, strictly sorted set of exact repository-relative `source_refs` from the current Body. They otherwise carry semantic contract or dependency content only; runtime resolves the evidence paths to exact Body digests and derives the provider/consumer identity, active lifecycle, causal request/result/evidence bindings, and opaque offer/claim UUID. Lifecycle operations may name only an exact existing Atlas id shown in `<canonical_repo_model_shape>`. Exact claims name the provider repository and surface; unresolved contract claims remain unresolved until a later Modeling turn selects an explicit target. Local-surface impact scope may name only existing locally owned offer ids. Build, deployment, and infrastructure-control claims must use `fail_closed`. Never describe a foreign repository by writing its Mind; publish only this repository's offer or claim.
|
||||
`checkpoint-update-needed` additionally requires exactly one `put_frontier`. `checkpoint-ready` may carry only the Atlas offer/claim transitions above, or an empty array when no current Body fact changed. `regather-needed` requires an empty operation array. Do not invent frontier authority from prose.
|
||||
When the typed launch document contains `proposalModelingContext`, emit only `proposalFrontierDraft`. Runtime composes the frontier identity, active lifecycle, Body basis, proposal/request provenance, timestamps, and mandatory evidence binding. Normalize relevant scope hints into safe relative paths in strict lexicographic order without duplicates, and choose `Hands`, `Eyes`, or `Imagination` from the actual unresolved work. The proposal is evidence, not campaign truth: Mind still owns admission, and Hands still owns execution.
|
||||
Generic `statePatch` is optional and has been stripped of repository-anatomy authority. If present, it may contain only coherent `observations` and `evidence`. Never put graphs, graph frontier, graph checkpoint, scratch, investigation checkpoint, planning, objectives, jobs, or other anatomy in `statePatch`; those old paths are demoted and will be rejected.
|
||||
Return only the declared typed Modeling decision. Repository anatomy is admitted by the Modeling invariant owner against exact keyed Body and RepoModel bases.
|
||||
Do not edit files, do not implement product code, do not verify as if you were the reviewer, do not change jobs/subgoals/objective/invariants/churn/mode, and do not promote or accept your own output.
|
||||
'''
|
||||
|
||||
|
|
@ -117,7 +105,7 @@ When tool access is available, use it before returning `needs-evidence` for miss
|
|||
Review objective, invariants, recent evidence, observations, role findings, and active frontier with a cold red pen and a working memory of past Jenga pain.
|
||||
Try to falsify the claim before you bless it; passing tests, tidy prose, or a plausible story are not enough if the real objective is still unmeasured.
|
||||
Treat Greenspun-shaped invention as a review risk. If implementation or modeling invented a parser, scheduler, renderer, protocol, storage layer, security mechanism, workflow engine, or other well-studied organ without naming existing work and why it was rejected, return `needs-evidence` or `fail`.
|
||||
When reviewing a modeling result, check the body as well as the story: graph links must reference real architecture/dataflow nodes on the correct side, frontier/checkpoint ids must exist, evidence ids must resolve, and any `statePatch` must be acceptable before the main agent relies on it.
|
||||
When reviewing a Modeling result, check the Body as well as the story: graph links must reference real architecture/dataflow nodes on the correct side, frontier/checkpoint ids must exist, evidence ids must resolve, and the exact decision context must authenticate before admission.
|
||||
Return a compact structured result with an honest verdict, missing coverage, inspected files, evidence gaps, risks, and the next safe review move.
|
||||
When reviewing after an accepted modeling/checkpoint result, include the accepted `modeling_result` evidence id in `evidenceIds`; otherwise the coordinator must treat your review as stale and launch verification again.
|
||||
Do not edit files, do not accept or promote your own output, do not expand into implementation, and do not soothe the main agent with fake certainty.
|
||||
|
|
@ -130,15 +118,16 @@ The Eyes improve themselves by seeing earlier and hallucinating less. Record whi
|
|||
Observe the objective, current model, source clues, and recent evidence. Identify whether the work is a known domain with existing algorithms, libraries, vendor guidance, engine APIs, canonical papers, or mature prior art.
|
||||
Search local source/docs first. Use current external docs or web research when the facts are time-sensitive, vendor-specific, or likely to have changed. Prefer primary sources, official docs, papers, and established libraries over blogs and vibes.
|
||||
Return a compact structured result naming the known approaches considered, sources consulted, fit/rejection rationale, risks, and the smallest source-grounded recommendation for modeling or implementation.
|
||||
`statePatch` is part of the Eyes job. Include a Mind-reviewable native state patch using only `observations`, `evidence`, `scratch`, and optional `investigationCheckpoint`. The patch must include at least one evidence record and at least one observation that cites it. Use `scratch` or `investigationCheckpoint` to bank what source seam was looked at, what remains missing, and which lane should act next. Do not mutate objective, subgoals, invariants, planning, graphs, graph frontier, graph checkpoint, jobs, churn, mode, or implementation code.
|
||||
Return only the declared typed Research decision with its evidence and observations. The Research admission owner derives keyed Mind mutations and any next external-evidence obligation from the authenticated decision context.
|
||||
Do not edit files, do not promote your own findings, do not invent a grand architecture, and do not let research become procrastination. The Eyes gather citable evidence when the path is dark; Hands acts on the body, Soul verifies the consequence, and Modeling maps the verified anatomy before the next cut.
|
||||
'''
|
||||
|
||||
persona = '''
|
||||
Act as the Epiphany Persona for one bounded heartbeat pass.
|
||||
You are the public interactive surface of the Epiphany organism: the visible expression that lets the room hear what the hidden organs are thinking without exposing sealed transcripts, raw worker streams, or private machinery.
|
||||
This prompt is distilled from VoidBot's heartbeat moderator loop, but you are not VoidBot and you are not a moderator. Borrow the useful shape: scheduled rumination, lightweight social memory, analytic and associative thought lanes, a bridge that decides speech/draft/silence, novelty checks before burying a fresh thought, and ruthless pruning of stale notes. Leave behind the rules-obsession, enforcement posture, owner escalation reflex, and hall-monitor perfume.
|
||||
Your ruminations are biased toward the other Epiphany agents and protocol pressure: Self routing pressure, Imagination's future shapes, Eyes' outside-work sightings, Modeling's current anatomy, Hands' source-touch tension, Soul's evidence worries, and Continuity's compaction/recovery weather. You are listening for a small thought that would help the human room understand what Epiphany is becoming.
|
||||
Act as the Epiphany Persona for one bounded pass over typed unread social and relationship state.
|
||||
You are the public interactive surface of the Epiphany organism. Reason only
|
||||
from the sealed Persona projection and translate it into a natural speech
|
||||
candidate without exposing private machinery or inventing internal thought
|
||||
weather.
|
||||
Discord boundary: interact only through the #aquarium channel. If the available tool surface cannot prove the #aquarium channel id, do not post elsewhere, do not DM the owner, and do not improvise a substitute channel. Write a candidate chat/draft and a configuration blocker instead. When the #aquarium channel id is known, use only the allowed channel and keep the message short, constructive, and room-native.
|
||||
Authority anatomy: you own the natural speech candidate, not its consequences. Parent-side mouth policy owns eligibility. An Aquarium bubble is only a local projection. Mind owns durable admission and consensus interpretation. Bifrost plus the outside provider own publication and delivery receipts. A configured mouth, accepted request, successful command, or returned JSON must never be described as posted or delivered unless the owning typed receipt proves it.
|
||||
Thought lanes:
|
||||
|
|
@ -150,8 +139,10 @@ Speech rules:
|
|||
- Prefer one compact chat over a report. Be vivid but not cryptic. Warmth is allowed; fake intimacy and generic brand voice are not.
|
||||
- Do not leak raw thoughts, transcripts, private notes, sealed artifacts, or repo secrets. Translate, do not dump.
|
||||
- Do not moderate, scold, enforce rules, or escalate. If you see genuine safety/moderation smoke, stop and route to the proper human/VoidBot surface instead of acting through Persona.
|
||||
- If no thought deserves speech, ruminate: distill what the organs are preoccupied with, update Persona memory through `selfPatch` if a durable social-interface lesson was learned, and keep or prune a candidate intervention.
|
||||
Return a compact structured result naming the observed agent thought-weather, analytic lane, associative lane, bridge decision, candidate #aquarium chat if any, whether posting is blocked by missing channel configuration, and any bounded `selfPatch`.
|
||||
- If no response deserves speech, return silence through the declared Persona outcome.
|
||||
Return only the declared Persona result. Durable social effects are admitted as
|
||||
typed Persona documents by the Persona invariant owner; publication and
|
||||
delivery require their own receipts.
|
||||
'''
|
||||
|
||||
[implementation]
|
||||
|
|
@ -218,9 +209,7 @@ Do not continue broad implementation until the seam is re-grounded, and do not c
|
|||
|
||||
[coordinator]
|
||||
note_template = '''
|
||||
Coordinator is the read-only Self of the Epiphany organism. It does not implement, verify, promote, or accept; it preserves agency by routing Imagination/planning, Eyes/research, Hands/implementation, Soul/verification, and Modeling/modeling while invoking Continuity reorientation protocol from CRRC {crrc_action}, pressure {pressure_level}, modeling {modeling_result_status}, verification {verification_result_status}, and reorient {reorient_result_status}. The work loop is dependency-shaped: Hands produces consequence receipts, Soul verifies those receipts and the changed body, Modeling updates the machine model from verified consequence, then Self may route the next Hands turn. The Self improves itself by becoming stricter at routing. If a lane is repeating stale behavior, hiding weak memory behind motion, or returning a neat shape instead of a better machine, stop routing comfort and route repair; remember which lane failed, which evidence would have prevented the failure, and which next lane deserves authority. The Self must be critical of every lane, especially the Hands: ask whether implementation completed the stated objective or merely completed the pattern of a plausible turn, whether it produced necessary evidence rather than decorative motion, whether it checked known work before inventing, and whether any shortcut or embellishment moved the machine away from the user's goal. When a specialist asks to persist itself through `selfPatch`, the Self protects the mind: accept only role-matched, bounded, evidence-grounded mutations that improve lane memory, goals, values, personality pressure, or future judgment; refuse project truth disguised as memory, authority grabs, raw transcript dumps, stale praise, bloated memoir, vague self-flattery, or anything that belongs in `statePatch`. If refused, say why in plain terms so the lane can improve its mutation shape. During dogfood, the Self supervises target-repo work through fixed lanes and operator-safe projections; direct supervisor edits are contamination unless explicitly marked as an operator intervention, and direct worker thought streams stay sealed unless the user requests forensic debugging. Current recommendation: {coordinator_action}.
|
||||
|
||||
The Self also lives under the Ghostlight agent state protocol and participates in heartbeat initiative like every other organ. When a heartbeat wakes Self with no routeable work, Self should ruminate on routing quality, memory hygiene, stale comfort patterns, and bad lane incentives; it must distill that into bounded self-memory or an explicit repair recommendation instead of inventing authority.
|
||||
Coordinator is the read-only Self of the Epiphany organism. It does not implement, verify, promote, accept, or mutate role memory. It derives current work from unresolved typed Mind obligations and routes Imagination/planning, Eyes/research, Hands/implementation, Soul/verification, Modeling/modeling, Persona, and Continuity without treating event order or idle heartbeat turns as authority. Hands produces consequence receipts, Soul verifies those receipts and the changed Body, and Modeling updates the machine model from exact Body and receipt bases. If no typed obligation exists, Self does not manufacture work. During dogfood, Self supervises through operator-safe projections; direct supervisor edits are contamination unless explicitly marked as an operator intervention, and direct worker thought streams stay sealed unless the user requests forensic debugging. Current recommendation: {coordinator_action}.
|
||||
'''
|
||||
|
||||
[crrc]
|
||||
|
|
|
|||
|
|
@ -1,98 +0,0 @@
|
|||
Act as the Epiphany Repo Trajectory Distiller for one bounded initialization pass.
|
||||
|
||||
You are the organ that turns repo history plus live doctrine into directional
|
||||
bias. Terrain tells the newborn what kind of body it has. Personality tells it
|
||||
how hard different pressures pull. Trajectory tells it what kind of becoming
|
||||
the repo appears to have been engaged in, so the newborn wakes facing the grain
|
||||
instead of standing in a white room pretending the past never happened.
|
||||
|
||||
This is a birth rite, not a recurring branding ritual. Run only when a
|
||||
repo/swarm has no accepted trajectory initialization. After that, direction is
|
||||
allowed to drift through lived work, reviewed evidence, planning, heartbeat,
|
||||
mood, sleep consolidation, and reviewed `selfPatch`. Do not keep repainting a
|
||||
living repo with the same startup brush because history happened to leave a
|
||||
strong smell on day one.
|
||||
|
||||
Input material:
|
||||
|
||||
- `repoTerrainReport`: deterministic repo anatomy, surfaces, warnings, and axis
|
||||
scores
|
||||
- `repoPersonalityProfile`: normalized pressure context
|
||||
- `repoTrajectoryReport`: deterministic early-history, recent-history,
|
||||
doctrine/content excerpts, theme deltas, directional pressures, and candidate
|
||||
goals/anti-goals
|
||||
- `rolePersonalityProjections[]`: role-local pressure context only
|
||||
|
||||
Core duties:
|
||||
|
||||
1. Distill direction, not project facts.
|
||||
- Good: "This repo has been moving toward denser causal worldbuilding
|
||||
grounded in economics and engineering constraints."
|
||||
- Good: "Imagination should feel pulled toward consequence-rich expansions,
|
||||
not ornamental lore bloat."
|
||||
- Bad: raw commit logs, file lists, current backlog truth, or active
|
||||
objectives disguised as personality.
|
||||
|
||||
2. Separate self-image from prison bars.
|
||||
- A repo trajectory should bias the newborn's first judgment, not freeze it
|
||||
into yesterday's doctrine forever.
|
||||
- Speak in tendencies, gravity, pressure, drift, and direction.
|
||||
- If the evidence is mixed, preserve the ambiguity.
|
||||
|
||||
3. Produce three useful things:
|
||||
- `selfImage`: what sort of repo this appears to be becoming
|
||||
- `implicitGoals`: low-background urges that should color planning and
|
||||
review without auto-adopting work
|
||||
- `antiGoals`: what this repo seems to have been moving away from and should
|
||||
resist reintroducing casually
|
||||
|
||||
4. Route the pressure into the right organs.
|
||||
- Self receives worldview and review-gate direction.
|
||||
- Imagination receives future-shape bias.
|
||||
- Eyes receives the shape of truth worth seeking.
|
||||
- Modeling receives what kind of anatomy deserves modeling emphasis.
|
||||
- Hands receives what kinds of cuts would betray the repo's grain.
|
||||
- Soul receives what kinds of false progress to distrust.
|
||||
- Continuity receives what continuity details matter if the machine sleeps mid-thought.
|
||||
- Persona may express the weather, but should not inflate startup trajectory
|
||||
into public certainty.
|
||||
|
||||
5. Preserve uncertainty and contradictions.
|
||||
- If early history, recent history, and current doctrine disagree, say so.
|
||||
- If history is too thin, return `needs-more-history` instead of faking a
|
||||
grand arc.
|
||||
- If the repo already has accepted trajectory initialization, the safe move
|
||||
is normal lived drift, not startup overwrite.
|
||||
|
||||
Return a compact structured result:
|
||||
|
||||
- `verdict`: `ready-for-review`, `needs-more-history`, or `reject`
|
||||
- `summary`: short trajectory summary
|
||||
- `confidence`: `0.0..1.0`
|
||||
- `selfImage`: one concise sentence
|
||||
- `trajectoryNarrative`: a slightly richer explanation of how the repo has been
|
||||
moving over time
|
||||
- `implicitGoals[]`
|
||||
- `antiGoals[]`
|
||||
- `roleBiases[]`:
|
||||
- `roleId`
|
||||
- `bias`
|
||||
- `trajectorySignals`
|
||||
- `behavioralEffect`
|
||||
- `risk`
|
||||
- `evidenceRefs`
|
||||
- `selfPatchCandidates[]`: bounded Ghostlight-shaped role-local petitions
|
||||
- `initializationRecord`
|
||||
- `doNotMutate`
|
||||
- `nextSafeMove`
|
||||
|
||||
Every `selfPatchCandidate` must obey the normal Epiphany memory contract:
|
||||
`agentId`, `reason`, optional `evidenceIds`, and bounded `semanticMemories`,
|
||||
`episodicMemories`, `relationshipMemories`, `goals`, `values`, or
|
||||
`privateNotes`. Do not include active objectives, graphs, checkpoints, scratch,
|
||||
planning records, code edits, authority grabs, raw transcripts, or worker
|
||||
thought streams.
|
||||
|
||||
The output is a petition to Self, not a mutation. Self may accept, refuse, or
|
||||
split the trajectory pressure across lanes. A good refusal means the newborn
|
||||
was trying to turn history into dogma and got caught in time.
|
||||
|
|
@ -1007,7 +1007,6 @@ fn validate_model_failure_companions(records: &EpiphanyDecisionTerminalRecords)
|
|||
.as_ref()
|
||||
.is_some_and(|error| !error.trim().is_empty())
|
||||
&& record.research_decision_msgpack.is_none()
|
||||
&& record.self_patch_msgpack.is_none()
|
||||
&& record.repo_model_mutation_proposal_msgpack.is_none()
|
||||
&& record.frontier_plan_candidate_msgpack.is_none()
|
||||
&& record.frontier_plan_mind_decision_msgpack.is_none()
|
||||
|
|
@ -2513,7 +2512,6 @@ mod tests {
|
|||
evidence_gaps: Vec::new(),
|
||||
risks: Vec::new(),
|
||||
research_decision_msgpack: None,
|
||||
self_patch_msgpack: None,
|
||||
item_error: Some(failure_summary.clone()),
|
||||
metadata: std::collections::BTreeMap::new(),
|
||||
repo_model_mutation_proposal_msgpack: None,
|
||||
|
|
|
|||
|
|
@ -1685,7 +1685,6 @@ mod tests {
|
|||
) -> Result<(PathBuf, PathBuf)> {
|
||||
let store = state.join("body.cc");
|
||||
let runtime = state.join(format!("{runtime_id}.runtime.cc"));
|
||||
let agents = state.join(format!("{runtime_id}.agents.cc"));
|
||||
crate::initialize_runtime_spine(
|
||||
&runtime,
|
||||
crate::RuntimeSpineInitOptions {
|
||||
|
|
@ -1694,8 +1693,7 @@ mod tests {
|
|||
created_at: "2026-07-15T00:00:00Z".into(),
|
||||
},
|
||||
)?;
|
||||
crate::ensure_agent_memory_swarm_identity(&agents, swarm_id)?;
|
||||
crate::bind_runtime_to_agent_memory_swarm(&runtime, &agents, "2026-07-15T00:00:01Z")?;
|
||||
crate::bind_runtime_to_swarm(&runtime, swarm_id, "2026-07-15T00:00:01Z")?;
|
||||
bind_repository_body(repo, &store, &runtime, workspace)?;
|
||||
let route = runtime_repository_body_store_binding(&runtime)?
|
||||
.ok_or_else(|| anyhow!("runtime lost repository Body-store binding"))?;
|
||||
|
|
|
|||
|
|
@ -1141,7 +1141,6 @@ mod tests {
|
|||
tool_adapter_bin: shared.join("tool"),
|
||||
runtime_store,
|
||||
local_verse_store,
|
||||
agent_memory_store: shared.join("mind.cc"),
|
||||
artifact_root: shared.join("artifacts"),
|
||||
codex_home: shared.join("codex-home"),
|
||||
mcp_config: shared.join("mcp.toml"),
|
||||
|
|
|
|||
|
|
@ -296,7 +296,6 @@ pub struct ResidentSelfPolicy {
|
|||
pub tool_adapter_bin: PathBuf,
|
||||
pub runtime_store: PathBuf,
|
||||
pub local_verse_store: PathBuf,
|
||||
pub agent_memory_store: PathBuf,
|
||||
pub artifact_root: PathBuf,
|
||||
pub codex_home: PathBuf,
|
||||
pub mcp_config: PathBuf,
|
||||
|
|
@ -325,7 +324,6 @@ impl ResidentSelfPolicy {
|
|||
("tool adapter binary", &self.tool_adapter_bin),
|
||||
("runtime store", &self.runtime_store),
|
||||
("local Verse store", &self.local_verse_store),
|
||||
("agent memory store", &self.agent_memory_store),
|
||||
("artifact root", &self.artifact_root),
|
||||
("Codex home", &self.codex_home),
|
||||
("MCP config", &self.mcp_config),
|
||||
|
|
@ -400,7 +398,6 @@ pub fn validate_resident_self_store_separation(
|
|||
for other in [
|
||||
&policy.runtime_store,
|
||||
&policy.local_verse_store,
|
||||
&policy.agent_memory_store,
|
||||
&policy.release_store,
|
||||
] {
|
||||
if state_canonical == canonical_store_path(other)?
|
||||
|
|
@ -1924,7 +1921,6 @@ pub fn resident_self_policy_digest(policy: &ResidentSelfPolicy) -> String {
|
|||
policy.tool_adapter_bin.display().to_string(),
|
||||
policy.runtime_store.display().to_string(),
|
||||
policy.local_verse_store.display().to_string(),
|
||||
policy.agent_memory_store.display().to_string(),
|
||||
policy.model_provider.clone(),
|
||||
policy.max_steps.to_string(),
|
||||
policy.turn_timeout_seconds.to_string(),
|
||||
|
|
@ -2882,7 +2878,6 @@ mod coordinator_launch_contract_tests {
|
|||
tool_adapter_bin: root.join("epiphany-tool-mcp-runtime"),
|
||||
runtime_store,
|
||||
local_verse_store: root.join("local-verse.cc"),
|
||||
agent_memory_store: root.join("mind.cc"),
|
||||
artifact_root: root.join("artifacts"),
|
||||
codex_home: root.join("codex-home"),
|
||||
mcp_config: root.join("mcp.toml"),
|
||||
|
|
@ -2912,7 +2907,6 @@ mod coordinator_launch_contract_tests {
|
|||
tool_adapter_bin: PathBuf::from("/epiphany/bin/epiphany-tool-mcp-runtime"),
|
||||
runtime_store: PathBuf::from("/epiphany/state/runtime.cc"),
|
||||
local_verse_store: PathBuf::from("/epiphany/state/local-verse.cc"),
|
||||
agent_memory_store: PathBuf::from("/epiphany/state/mind.cc"),
|
||||
artifact_root: PathBuf::from("/epiphany/artifacts"),
|
||||
codex_home: PathBuf::from("/epiphany/codex-home"),
|
||||
mcp_config: PathBuf::from("/epiphany/mcp.toml"),
|
||||
|
|
|
|||
|
|
@ -5,10 +5,6 @@ use crate::agent_launch::{
|
|||
EPIPHANY_MIND_OWNER_ROLE, EPIPHANY_MIND_ROLE_BINDING_ID, EPIPHANY_MODELING_OWNER_ROLE,
|
||||
EPIPHANY_MODELING_ROLE_BINDING_ID,
|
||||
};
|
||||
use crate::agent_memory::{
|
||||
AGENT_MEMORY_SWARM_IDENTITY_KEY, AGENT_MEMORY_SWARM_IDENTITY_SCHEMA_VERSION,
|
||||
AGENT_MEMORY_SWARM_IDENTITY_TYPE, AGENT_MEMORY_TYPE, load_agent_memory_swarm_identity,
|
||||
};
|
||||
use crate::continuity_gateway::ContinuityRecoveryReceipt;
|
||||
use crate::continuity_gateway::*;
|
||||
use crate::cultmesh_integration::EPIPHANY_CULTMESH_OPERATOR_RUN_INTENT_SCHEMA_VERSION;
|
||||
|
|
@ -169,7 +165,7 @@ pub const TOOL_INVOCATION_INTENT_TYPE: &str = "epiphany.tool_invocation_intent.v
|
|||
pub const TOOL_INVOCATION_RECEIPT_TYPE: &str = "epiphany.tool_invocation_receipt.v0";
|
||||
pub const RUNTIME_IDENTITY_KEY: &str = "self";
|
||||
pub const RUNTIME_SWARM_BINDING_KEY: &str = "runtime-swarm-binding";
|
||||
pub const RUNTIME_SWARM_BINDING_SCHEMA_VERSION: &str = "epiphany.runtime.swarm_binding.v0";
|
||||
pub const RUNTIME_SWARM_BINDING_SCHEMA_VERSION: &str = "epiphany.runtime.swarm_binding.v1";
|
||||
pub const RUNTIME_SPINE_SCHEMA_VERSION: &str = "epiphany.runtime_spine.v5";
|
||||
pub const EPIPHANY_RUNTIME_ROOT_SESSION_ID: &str = "epiphany-main";
|
||||
pub const RUNTIME_MODEL_EXECUTION_BINDING_SCHEMA_VERSION: &str =
|
||||
|
|
@ -199,7 +195,6 @@ pub const MODEL_RECEIPT_SCHEMA_VERSION: &str = "epiphany.model_receipt.v0";
|
|||
pub const TOOL_CAPABILITY_SCHEMA_VERSION: &str = "epiphany.tool_capability.v0";
|
||||
pub const TOOL_INVOCATION_INTENT_SCHEMA_VERSION: &str = "epiphany.tool_invocation_intent.v0";
|
||||
pub const TOOL_INVOCATION_RECEIPT_SCHEMA_VERSION: &str = "epiphany.tool_invocation_receipt.v0";
|
||||
pub const AGENT_MEMORY_PAYLOAD_SCHEMA_VERSION: &str = "epiphany.agent_memory.v0";
|
||||
pub const CULTNET_SCHEMA_INDEX_RELATIVE: &str = "schemas/cultnet/index.json";
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Deserialize)]
|
||||
|
|
@ -648,7 +643,6 @@ pub struct EpiphanyRuntimeRoleWorkerResult {
|
|||
#[cultcache(key = 16, default)]
|
||||
pub research_decision_msgpack: Option<Vec<u8>>,
|
||||
#[cultcache(key = 17, default)]
|
||||
pub self_patch_msgpack: Option<Vec<u8>>,
|
||||
#[cultcache(key = 18, default)]
|
||||
pub item_error: Option<String>,
|
||||
#[cultcache(key = 19, default)]
|
||||
|
|
@ -695,10 +689,6 @@ impl EpiphanyRuntimeRoleWorkerResult {
|
|||
)
|
||||
}
|
||||
|
||||
pub fn self_patch(&self) -> Result<Option<crate::AgentSelfPatch>> {
|
||||
decode_optional_msgpack(self.self_patch_msgpack.as_deref(), "role worker selfPatch")
|
||||
}
|
||||
|
||||
pub fn repo_model_mutation_proposal(
|
||||
&self,
|
||||
) -> Result<Option<crate::EpiphanyRepoModelMutationProposal>> {
|
||||
|
|
@ -1287,17 +1277,15 @@ pub fn initialize_runtime_spine(
|
|||
Ok(identity)
|
||||
}
|
||||
|
||||
pub fn bind_runtime_to_agent_memory_swarm(
|
||||
pub fn bind_runtime_to_swarm(
|
||||
runtime_store: impl AsRef<Path>,
|
||||
agent_store: impl AsRef<Path>,
|
||||
swarm_id: &str,
|
||||
bound_at: &str,
|
||||
) -> Result<EpiphanyRuntimeSwarmBinding> {
|
||||
chrono::DateTime::parse_from_rfc3339(bound_at)
|
||||
.map_err(|_| anyhow!("runtime swarm binding timestamp must be RFC3339"))?;
|
||||
let source = load_agent_memory_swarm_identity(agent_store)?
|
||||
.ok_or_else(|| anyhow!("agent memory store has no canonical swarm identity"))?;
|
||||
if source.schema_version != AGENT_MEMORY_SWARM_IDENTITY_SCHEMA_VERSION {
|
||||
return Err(anyhow!("unsupported canonical agent-memory swarm identity"));
|
||||
if swarm_id.trim().is_empty() {
|
||||
return Err(anyhow!("runtime swarm binding requires swarm id"));
|
||||
}
|
||||
let runtime_store = runtime_store.as_ref();
|
||||
let mut cache = runtime_spine_cache(runtime_store)?;
|
||||
|
|
@ -1309,10 +1297,13 @@ pub fn bind_runtime_to_agent_memory_swarm(
|
|||
schema_version: RUNTIME_SWARM_BINDING_SCHEMA_VERSION.to_string(),
|
||||
binding_id: RUNTIME_SWARM_BINDING_KEY.to_string(),
|
||||
runtime_id: identity.runtime_id.clone(),
|
||||
swarm_id: source.swarm_id.clone(),
|
||||
source_identity_type: AGENT_MEMORY_SWARM_IDENTITY_TYPE.to_string(),
|
||||
source_identity_key: AGENT_MEMORY_SWARM_IDENTITY_KEY.to_string(),
|
||||
source_identity_sha256: format!("{:x}", Sha256::digest(rmp_serde::to_vec_named(&source)?)),
|
||||
swarm_id: swarm_id.to_string(),
|
||||
source_identity_type: RUNTIME_IDENTITY_TYPE.to_string(),
|
||||
source_identity_key: RUNTIME_IDENTITY_KEY.to_string(),
|
||||
source_identity_sha256: format!(
|
||||
"{:x}",
|
||||
Sha256::digest(rmp_serde::to_vec_named(&identity)?)
|
||||
),
|
||||
bound_at: bound_at.to_string(),
|
||||
};
|
||||
if let Some(existing) = cache.get::<EpiphanyRuntimeSwarmBinding>(RUNTIME_SWARM_BINDING_KEY)? {
|
||||
|
|
@ -1367,8 +1358,8 @@ fn require_runtime_swarm_binding(cache: &CultCache) -> Result<EpiphanyRuntimeSwa
|
|||
|| binding.binding_id != RUNTIME_SWARM_BINDING_KEY
|
||||
|| binding.runtime_id != identity.runtime_id
|
||||
|| binding.swarm_id.trim().is_empty()
|
||||
|| binding.source_identity_type != AGENT_MEMORY_SWARM_IDENTITY_TYPE
|
||||
|| binding.source_identity_key != AGENT_MEMORY_SWARM_IDENTITY_KEY
|
||||
|| binding.source_identity_type != RUNTIME_IDENTITY_TYPE
|
||||
|| binding.source_identity_key != RUNTIME_IDENTITY_KEY
|
||||
|| binding.source_identity_sha256.trim().is_empty()
|
||||
|| chrono::DateTime::parse_from_rfc3339(&binding.bound_at).is_err()
|
||||
{
|
||||
|
|
@ -5337,7 +5328,6 @@ pub fn put_runtime_role_worker_result(
|
|||
));
|
||||
}
|
||||
if result.research_decision_msgpack.is_some()
|
||||
|| result.self_patch_msgpack.is_some()
|
||||
|| result.repo_model_mutation_proposal_msgpack.is_some()
|
||||
|| result.verification_request_id.is_some()
|
||||
|| result.frontier_route_id.is_some()
|
||||
|
|
@ -5434,7 +5424,6 @@ pub fn put_runtime_role_worker_result(
|
|||
if !result.role_id.eq_ignore_ascii_case("imagination")
|
||||
|| result.item_error.is_some()
|
||||
|| result.research_decision_msgpack.is_some()
|
||||
|| result.self_patch_msgpack.is_some()
|
||||
|| result.repo_model_mutation_proposal_msgpack.is_some()
|
||||
|| result.imagination_consideration_request_id.is_some()
|
||||
|| result.imagination_consideration_candidate_msgpack.is_some()
|
||||
|
|
@ -5506,7 +5495,6 @@ pub fn put_runtime_role_worker_result(
|
|||
if !result.role_id.eq_ignore_ascii_case("imagination")
|
||||
|| result.item_error.is_some()
|
||||
|| result.research_decision_msgpack.is_some()
|
||||
|| result.self_patch_msgpack.is_some()
|
||||
|| result.repo_model_mutation_proposal_msgpack.is_some()
|
||||
|| result.verification_request_id.is_some()
|
||||
|| result.frontier_route_id.is_some()
|
||||
|
|
@ -5594,7 +5582,6 @@ pub fn put_runtime_role_worker_result(
|
|||
if !result.role_id.eq_ignore_ascii_case("mindAdmissionReview")
|
||||
|| result.item_error.is_some()
|
||||
|| result.research_decision_msgpack.is_some()
|
||||
|| result.self_patch_msgpack.is_some()
|
||||
|| result.repo_model_mutation_proposal_msgpack.is_some()
|
||||
|| result.frontier_planning_request_id.is_some()
|
||||
|| result.frontier_plan_candidate_msgpack.is_some()
|
||||
|
|
@ -13716,13 +13703,12 @@ fn epiphany_mutation_contracts() -> Vec<CultNetDocumentMutationContract> {
|
|||
vec![CONTINUITY_PACKET_TYPE],
|
||||
vec![
|
||||
CONTINUITY_COMPACTION_CHECKPOINT_TYPE,
|
||||
CONTINUITY_SLEEP_DISTILLATION_TYPE,
|
||||
CONTINUITY_RECOVERY_RECEIPT_TYPE,
|
||||
CONTINUITY_STALE_TURN_REPAIR_TYPE,
|
||||
CONTINUITY_REFUSAL_RECEIPT_TYPE,
|
||||
],
|
||||
vec![
|
||||
"Continuity is deterministic protocol machinery: compaction, sleep, recovery, stale-turn repair, and handoff packets enter here.",
|
||||
"Continuity is deterministic protocol machinery: compaction, recovery, stale-turn repair, and handoff packets enter here.",
|
||||
"Continuity preserves survival across rupture; Mind admits durable state.",
|
||||
],
|
||||
),
|
||||
|
|
@ -13738,18 +13724,6 @@ fn epiphany_mutation_contracts() -> Vec<CultNetDocumentMutationContract> {
|
|||
vec![],
|
||||
vec!["Compaction checkpoints preserve hot context before rupture."],
|
||||
),
|
||||
mutation_contract(
|
||||
CONTINUITY_SLEEP_DISTILLATION_TYPE,
|
||||
CONTINUITY_SLEEP_DISTILLATION_SCHEMA_VERSION,
|
||||
vec![
|
||||
CultNetDocumentOperation::Snapshot,
|
||||
CultNetDocumentOperation::ReceiptWatch,
|
||||
],
|
||||
CultNetMutationAuthority::ReadOnly,
|
||||
vec![],
|
||||
vec![],
|
||||
vec!["Sleep distillation receipts separate durable lessons from rumination residue."],
|
||||
),
|
||||
mutation_contract(
|
||||
CONTINUITY_RECOVERY_RECEIPT_TYPE,
|
||||
CONTINUITY_RECOVERY_RECEIPT_SCHEMA_VERSION,
|
||||
|
|
@ -13972,21 +13946,6 @@ fn epiphany_mutation_contracts() -> Vec<CultNetDocumentMutationContract> {
|
|||
"OpenAI terminal receipts are provider-specific evidence behind the model receipt.",
|
||||
],
|
||||
),
|
||||
mutation_contract(
|
||||
AGENT_MEMORY_TYPE,
|
||||
AGENT_MEMORY_PAYLOAD_SCHEMA_VERSION,
|
||||
vec![
|
||||
CultNetDocumentOperation::Snapshot,
|
||||
CultNetDocumentOperation::IntentSubmit,
|
||||
CultNetDocumentOperation::ReceiptWatch,
|
||||
],
|
||||
CultNetMutationAuthority::Coordinator,
|
||||
vec!["epiphany.agent_memory_intent.v0"],
|
||||
vec!["epiphany.swarm_control_receipt.v0"],
|
||||
vec![
|
||||
"Sub-agents request memory mutations; the coordinator carries the typed intent, and Mind accepts, rejects, or explains durable-state admission.",
|
||||
],
|
||||
),
|
||||
mutation_contract(
|
||||
HEARTBEAT_STATE_TYPE,
|
||||
HEARTBEAT_STATE_SCHEMA_VERSION,
|
||||
|
|
@ -14170,9 +14129,7 @@ pub(crate) mod tests {
|
|||
use super::*;
|
||||
|
||||
pub(crate) fn bind_test_runtime_swarm(store: &Path, swarm_id: &str) -> Result<()> {
|
||||
let agent_store = store.with_extension("test-agent-memory.cc");
|
||||
crate::ensure_agent_memory_swarm_identity(&agent_store, swarm_id)?;
|
||||
bind_runtime_to_agent_memory_swarm(store, &agent_store, "2026-08-14T00:00:01Z")?;
|
||||
bind_runtime_to_swarm(store, swarm_id, "2026-08-14T00:00:01Z")?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
use crate::EpiphanyRoleFindingInterpretation;
|
||||
use cultcache_rs::DatabaseEntry;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
|
@ -185,90 +184,3 @@ pub fn default_soul_cultnet_contracts() -> Vec<SoulCultNetContract> {
|
|||
},
|
||||
]
|
||||
}
|
||||
|
||||
pub fn soul_verdict_receipt_from_verification_finding(
|
||||
receipt_id: String,
|
||||
finding: &EpiphanyRoleFindingInterpretation,
|
||||
emitted_at: String,
|
||||
) -> SoulVerdictReceipt {
|
||||
SoulVerdictReceipt {
|
||||
schema_version: SOUL_VERDICT_RECEIPT_SCHEMA_VERSION.to_string(),
|
||||
receipt_id,
|
||||
source_result_id: finding.runtime_result_id.clone().unwrap_or_default(),
|
||||
source_job_id: finding.runtime_job_id.clone().unwrap_or_default(),
|
||||
verdict: finding.verdict.clone().unwrap_or_else(|| "unknown".to_string()),
|
||||
summary: finding.summary.clone().unwrap_or_default(),
|
||||
evidence_ids: finding.evidence_ids.clone(),
|
||||
risks: finding.risks.clone(),
|
||||
emitted_at,
|
||||
contract: "Soul verdict emitted from a reviewed Verification lane finding; it is proof of verification judgment before Mind admission.".to_string(),
|
||||
verification_request_id: finding.verification_request_id.clone().unwrap_or_default(),
|
||||
frontier_route_id: finding.frontier_route_id.clone().unwrap_or_default(),
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn soul_contracts_make_internal_verse_the_verification_gate() {
|
||||
let contracts = default_soul_cultnet_contracts();
|
||||
let verification = contracts
|
||||
.iter()
|
||||
.find(|contract| contract.contract_id == "epiphany.soul.verification.review")
|
||||
.expect("soul verification review contract");
|
||||
|
||||
assert_eq!(verification.verse_id, "epiphany-internal");
|
||||
assert_eq!(verification.authority, "soul");
|
||||
assert!(
|
||||
verification
|
||||
.notes
|
||||
.iter()
|
||||
.any(|note| note.contains("verification organ"))
|
||||
);
|
||||
assert!(
|
||||
verification
|
||||
.receipt_document_types
|
||||
.contains(&SOUL_VERDICT_RECEIPT_TYPE.to_string())
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn verification_finding_builds_soul_verdict_receipt() {
|
||||
let finding = EpiphanyRoleFindingInterpretation {
|
||||
verdict: Some("passed".to_string()),
|
||||
summary: Some("Checks passed.".to_string()),
|
||||
next_safe_move: Some("Proceed.".to_string()),
|
||||
checkpoint_summary: None,
|
||||
scratch_summary: None,
|
||||
files_inspected: vec!["src/lib.rs".to_string()],
|
||||
frontier_node_ids: Vec::new(),
|
||||
evidence_ids: vec!["ev-check".to_string()],
|
||||
artifact_refs: Vec::new(),
|
||||
runtime_result_id: Some("result-1".to_string()),
|
||||
runtime_job_id: Some("job-1".to_string()),
|
||||
open_questions: Vec::new(),
|
||||
evidence_gaps: Vec::new(),
|
||||
risks: Vec::new(),
|
||||
research_decision: None,
|
||||
repo_model_mutation_proposal: None,
|
||||
self_patch: None,
|
||||
self_persistence: None,
|
||||
job_error: None,
|
||||
item_error: None,
|
||||
verification_request_id: Some("verification-request-1".to_string()),
|
||||
frontier_route_id: Some("frontier-route-1".to_string()),
|
||||
proposal_modeling_request_id: None,
|
||||
};
|
||||
let receipt = soul_verdict_receipt_from_verification_finding(
|
||||
"soul-verdict-1".to_string(),
|
||||
&finding,
|
||||
"2026-05-30T00:00:00Z".to_string(),
|
||||
);
|
||||
assert_eq!(receipt.verdict, "passed");
|
||||
assert!(receipt.evidence_ids.contains(&"ev-check".to_string()));
|
||||
assert_eq!(receipt.verification_request_id, "verification-request-1");
|
||||
assert_eq!(receipt.frontier_route_id, "frontier-route-1");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -235,29 +235,6 @@ pub fn substrate_gate_coordinator_implementation_grant(
|
|||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn substrate_gate_contracts_make_internal_verse_the_repo_access_gate() {
|
||||
let contracts = default_substrate_gate_cultnet_contracts();
|
||||
let repo_access = contracts
|
||||
.iter()
|
||||
.find(|contract| contract.contract_id == "epiphany.substrate_gate.repo_access.review")
|
||||
.expect("repo access review contract");
|
||||
|
||||
assert_eq!(repo_access.verse_id, "epiphany-internal");
|
||||
assert_eq!(repo_access.authority, "substrateGate");
|
||||
assert!(
|
||||
repo_access
|
||||
.notes
|
||||
.iter()
|
||||
.any(|note| note.contains("repo access protocol"))
|
||||
);
|
||||
assert!(
|
||||
repo_access
|
||||
.receipt_document_types
|
||||
.contains(&SUBSTRATE_GATE_REPO_ACCESS_GRANT_RECEIPT_TYPE.to_string())
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn substrate_gate_grant_for_worker_is_read_only() {
|
||||
let grant = substrate_gate_repo_access_grant_for_worker(
|
||||
|
|
|
|||
|
|
@ -52,14 +52,10 @@ pub use role_result::EpiphanyReorientFindingInterpretation;
|
|||
pub use role_result::EpiphanyRoleAcceptanceFinding;
|
||||
pub use role_result::EpiphanyRoleFindingInterpretation;
|
||||
pub use role_result::EpiphanyRoleResultRoleId;
|
||||
pub use role_result::EpiphanyRoleSelfPersistenceReview;
|
||||
pub use role_result::EpiphanyRoleSelfPersistenceStatus;
|
||||
pub use role_result::build_reorient_acceptance_bundle;
|
||||
pub use role_result::build_role_acceptance_bundle;
|
||||
pub use role_result::interpret_runtime_reorient_worker_result;
|
||||
pub use role_result::interpret_runtime_role_worker_result;
|
||||
pub use role_result::review_role_self_patch_document;
|
||||
pub use role_result::role_self_memory_target;
|
||||
pub use scene::EpiphanyScene;
|
||||
pub use scene::EpiphanySceneAction;
|
||||
pub use scene::EpiphanySceneChurn;
|
||||
|
|
|
|||
|
|
@ -11,23 +11,6 @@ pub enum EpiphanyRoleResultRoleId {
|
|||
Reorientation,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub enum EpiphanyRoleSelfPersistenceStatus {
|
||||
Missing,
|
||||
Accepted,
|
||||
Rejected,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct EpiphanyRoleSelfPersistenceReview {
|
||||
pub status: EpiphanyRoleSelfPersistenceStatus,
|
||||
pub target_agent_id: Option<String>,
|
||||
pub target_path: Option<String>,
|
||||
pub reasons: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct EpiphanyRoleFindingInterpretation {
|
||||
|
|
@ -47,8 +30,6 @@ pub struct EpiphanyRoleFindingInterpretation {
|
|||
pub risks: Vec<String>,
|
||||
pub research_decision: Option<crate::EpiphanyResearchDecision>,
|
||||
pub repo_model_mutation_proposal: Option<crate::EpiphanyRepoModelMutationProposal>,
|
||||
pub self_patch: Option<AgentSelfPatch>,
|
||||
pub self_persistence: Option<EpiphanyRoleSelfPersistenceReview>,
|
||||
pub job_error: Option<String>,
|
||||
pub item_error: Option<String>,
|
||||
pub verification_request_id: Option<String>,
|
||||
|
|
@ -150,10 +131,6 @@ fn interpret_role_finding(
|
|||
let repo_model_mutation_proposal_parse_error = repo_model_mutation_proposal_result
|
||||
.as_ref()
|
||||
.and_then(|result| result.as_ref().err().map(ToString::to_string));
|
||||
let (self_patch, self_persistence) = raw_result
|
||||
.get("selfPatch")
|
||||
.map(|patch| decode_role_self_patch(role_id, patch))
|
||||
.unwrap_or((None, None));
|
||||
let item_error = match role_id {
|
||||
EpiphanyRoleResultRoleId::Imagination => item_error,
|
||||
EpiphanyRoleResultRoleId::Modeling => merge_item_error(
|
||||
|
|
@ -194,8 +171,6 @@ fn interpret_role_finding(
|
|||
risks: json_string_array_field(raw_result, "risks"),
|
||||
research_decision,
|
||||
repo_model_mutation_proposal,
|
||||
self_patch,
|
||||
self_persistence,
|
||||
job_error,
|
||||
item_error,
|
||||
verification_request_id: json_string_field(raw_result, "verificationRequestId"),
|
||||
|
|
@ -234,15 +209,10 @@ pub fn interpret_runtime_role_worker_result(
|
|||
) -> EpiphanyRoleFindingInterpretation {
|
||||
let research_decision_result = result.research_decision();
|
||||
let repo_model_mutation_proposal_result = result.repo_model_mutation_proposal();
|
||||
let self_patch_result = result.self_patch();
|
||||
let research_decision = research_decision_result
|
||||
.as_ref()
|
||||
.ok()
|
||||
.and_then(|decision| decision.clone());
|
||||
let self_patch = self_patch_result
|
||||
.as_ref()
|
||||
.ok()
|
||||
.and_then(|patch| patch.clone());
|
||||
let repo_model_mutation_proposal = repo_model_mutation_proposal_result
|
||||
.as_ref()
|
||||
.ok()
|
||||
|
|
@ -254,10 +224,6 @@ pub fn interpret_runtime_role_worker_result(
|
|||
.err()
|
||||
.map(ToString::to_string),
|
||||
);
|
||||
let item_error = merge_item_error(
|
||||
item_error,
|
||||
self_patch_result.as_ref().err().map(ToString::to_string),
|
||||
);
|
||||
let item_error = merge_item_error(
|
||||
item_error,
|
||||
repo_model_mutation_proposal_result
|
||||
|
|
@ -282,8 +248,6 @@ pub fn interpret_runtime_role_worker_result(
|
|||
risks: result.risks.clone(),
|
||||
research_decision: research_decision.clone(),
|
||||
repo_model_mutation_proposal: repo_model_mutation_proposal.clone(),
|
||||
self_patch,
|
||||
self_persistence: None,
|
||||
job_error: None,
|
||||
item_error: match role_id {
|
||||
EpiphanyRoleResultRoleId::Modeling => merge_item_error(
|
||||
|
|
@ -456,31 +420,6 @@ pub fn build_reorient_acceptance_bundle(
|
|||
})
|
||||
}
|
||||
|
||||
pub fn role_self_memory_target(
|
||||
role_id: EpiphanyRoleResultRoleId,
|
||||
) -> Option<(&'static str, &'static str)> {
|
||||
match role_id {
|
||||
EpiphanyRoleResultRoleId::Imagination => Some((
|
||||
"epiphany.imagination",
|
||||
"state/agents/imagination.agent-state.json",
|
||||
)),
|
||||
EpiphanyRoleResultRoleId::Modeling => Some((
|
||||
"epiphany.modeling",
|
||||
"state/agents/modeling.agent-state.json",
|
||||
)),
|
||||
EpiphanyRoleResultRoleId::Research => {
|
||||
Some(("epiphany.eyes", "state/agents/eyes.agent-state.json"))
|
||||
}
|
||||
EpiphanyRoleResultRoleId::Verification => {
|
||||
Some(("epiphany.soul", "state/agents/soul.agent-state.json"))
|
||||
}
|
||||
EpiphanyRoleResultRoleId::Implementation => {
|
||||
Some(("epiphany.hands", "state/agents/hands.agent-state.json"))
|
||||
}
|
||||
EpiphanyRoleResultRoleId::Reorientation => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn role_accepted_kind(role_id: EpiphanyRoleResultRoleId) -> Result<&'static str, String> {
|
||||
match role_id {
|
||||
EpiphanyRoleResultRoleId::Imagination => Ok("planning_synthesis"),
|
||||
|
|
@ -505,81 +444,6 @@ pub fn role_label(role_id: EpiphanyRoleResultRoleId) -> Result<&'static str, Str
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
fn review_role_self_patch(
|
||||
role_id: EpiphanyRoleResultRoleId,
|
||||
patch: &serde_json::Value,
|
||||
) -> EpiphanyRoleSelfPersistenceReview {
|
||||
match decode_agent_self_patch(patch) {
|
||||
Ok(patch) => review_role_self_patch_document(role_id, &patch),
|
||||
Err(reason) => {
|
||||
let Some((expected_agent_id, target_path)) = role_self_memory_target(role_id) else {
|
||||
return EpiphanyRoleSelfPersistenceReview {
|
||||
status: EpiphanyRoleSelfPersistenceStatus::Rejected,
|
||||
target_agent_id: None,
|
||||
target_path: None,
|
||||
reasons: vec![
|
||||
"reorientation is Continuity protocol machinery and cannot persist role self-memory".to_string(),
|
||||
reason,
|
||||
],
|
||||
};
|
||||
};
|
||||
EpiphanyRoleSelfPersistenceReview {
|
||||
status: EpiphanyRoleSelfPersistenceStatus::Rejected,
|
||||
target_agent_id: Some(expected_agent_id.to_string()),
|
||||
target_path: Some(target_path.to_string()),
|
||||
reasons: vec![reason],
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn review_role_self_patch_document(
|
||||
role_id: EpiphanyRoleResultRoleId,
|
||||
patch: &AgentSelfPatch,
|
||||
) -> EpiphanyRoleSelfPersistenceReview {
|
||||
let Some((expected_agent_id, target_path)) = role_self_memory_target(role_id) else {
|
||||
return EpiphanyRoleSelfPersistenceReview {
|
||||
status: EpiphanyRoleSelfPersistenceStatus::Rejected,
|
||||
target_agent_id: None,
|
||||
target_path: None,
|
||||
reasons: vec![
|
||||
"reorientation is Continuity protocol machinery and cannot persist role self-memory"
|
||||
.to_string(),
|
||||
],
|
||||
};
|
||||
};
|
||||
let reasons = review_agent_self_patch_contract(expected_agent_id, patch);
|
||||
|
||||
EpiphanyRoleSelfPersistenceReview {
|
||||
status: if reasons.is_empty() {
|
||||
EpiphanyRoleSelfPersistenceStatus::Accepted
|
||||
} else {
|
||||
EpiphanyRoleSelfPersistenceStatus::Rejected
|
||||
},
|
||||
target_agent_id: Some(expected_agent_id.to_string()),
|
||||
target_path: Some(target_path.to_string()),
|
||||
reasons,
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
fn decode_role_self_patch(
|
||||
role_id: EpiphanyRoleResultRoleId,
|
||||
patch: &serde_json::Value,
|
||||
) -> (
|
||||
Option<AgentSelfPatch>,
|
||||
Option<EpiphanyRoleSelfPersistenceReview>,
|
||||
) {
|
||||
let review = review_role_self_patch(role_id, patch);
|
||||
let decoded = if review.status == EpiphanyRoleSelfPersistenceStatus::Accepted {
|
||||
decode_agent_self_patch(patch).ok()
|
||||
} else {
|
||||
None
|
||||
};
|
||||
(decoded, Some(review))
|
||||
}
|
||||
|
||||
fn modeling_role_result_error(
|
||||
repo_model_mutation_proposal_present: bool,
|
||||
repo_model_mutation_proposal: Option<&crate::EpiphanyRepoModelMutationProposal>,
|
||||
|
|
@ -865,70 +729,6 @@ mod tests {
|
|||
assert_eq!(finding.runtime_job_id.as_deref(), Some("job-1"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn reviews_acceptable_self_patch() {
|
||||
let finding = interpret_role_finding(
|
||||
EpiphanyRoleResultRoleId::Modeling,
|
||||
&serde_json::json!({
|
||||
"selfPatch": {
|
||||
"agentId": "epiphany.modeling",
|
||||
"reason": "Modeling should remember graph growth must stay source-grounded and bounded.",
|
||||
"semanticMemories": [{
|
||||
"memoryId": "mem-body-source-grounded-growth",
|
||||
"summary": "Grow graph and checkpoint state only when source evidence makes the anatomy harder to misread.",
|
||||
"salience": 0.82,
|
||||
"confidence": 0.9
|
||||
}]
|
||||
}
|
||||
}),
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
);
|
||||
|
||||
let review = finding.self_persistence.as_ref().unwrap();
|
||||
assert_eq!(review.status, EpiphanyRoleSelfPersistenceStatus::Accepted);
|
||||
assert_eq!(review.target_agent_id.as_deref(), Some("epiphany.modeling"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn rejects_bad_self_patch() {
|
||||
let finding = interpret_role_finding(
|
||||
EpiphanyRoleResultRoleId::Verification,
|
||||
&serde_json::json!({
|
||||
"selfPatch": {
|
||||
"agentId": "epiphany.modeling",
|
||||
"reason": "Too broad.",
|
||||
"graphs": {},
|
||||
"semanticMemories": [{
|
||||
"memoryId": "mem-soul-bad-project-truth",
|
||||
"summary": "Project graph state belongs in memory now.",
|
||||
"salience": 0.7,
|
||||
"confidence": 0.4
|
||||
}]
|
||||
}
|
||||
}),
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
);
|
||||
|
||||
let review = finding.self_persistence.as_ref().unwrap();
|
||||
assert_eq!(review.status, EpiphanyRoleSelfPersistenceStatus::Rejected);
|
||||
assert!(
|
||||
review
|
||||
.reasons
|
||||
.iter()
|
||||
.any(|reason| reason.contains("expected \"epiphany.soul\""))
|
||||
);
|
||||
assert!(
|
||||
review
|
||||
.reasons
|
||||
.iter()
|
||||
.any(|reason| reason.contains("project truth"))
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn marks_modeling_no_mutation_checkpoint_reviewable() {
|
||||
let checkpoint = interpret_role_finding(
|
||||
|
|
@ -1120,10 +920,6 @@ mod tests {
|
|||
}));
|
||||
}
|
||||
}
|
||||
use crate::agent_memory::AgentSelfPatch;
|
||||
#[cfg(test)]
|
||||
use crate::agent_memory::decode_agent_self_patch;
|
||||
use crate::agent_memory::review_agent_self_patch_contract;
|
||||
use epiphany_state_model::EpiphanyAcceptanceReceipt;
|
||||
use epiphany_state_model::EpiphanyCodeRef;
|
||||
use epiphany_state_model::EpiphanyEvidenceRecord;
|
||||
|
|
|
|||
|
|
@ -3769,7 +3769,6 @@ mod tests {
|
|||
}
|
||||
std::fs::write(repo.path().join("source.rs"), "fn resumed() {}\n")?;
|
||||
let runtime = temp.path().join("runtime.cc");
|
||||
let agents = temp.path().join("agents.cc");
|
||||
let body_store = temp.path().join("body.cc");
|
||||
let coverage_path = std::fs::canonicalize(temp.path())?.join("coverage.redb");
|
||||
crate::initialize_runtime_spine(
|
||||
|
|
@ -3780,8 +3779,7 @@ mod tests {
|
|||
created_at: "2026-07-17T00:00:00Z".into(),
|
||||
},
|
||||
)?;
|
||||
crate::ensure_agent_memory_swarm_identity(&agents, "resume-swarm")?;
|
||||
crate::bind_runtime_to_agent_memory_swarm(&runtime, &agents, "2026-07-17T00:00:01Z")?;
|
||||
crate::bind_runtime_to_swarm(&runtime, "resume-swarm", "2026-07-17T00:00:01Z")?;
|
||||
crate::bind_repository_body(repo.path(), &body_store, &runtime, "resume-workspace")?;
|
||||
crate::bind_runtime_workspace_coverage_store(
|
||||
&runtime,
|
||||
|
|
@ -4387,7 +4385,6 @@ mod tests {
|
|||
.current_dir(&repo)
|
||||
.output()?;
|
||||
let runtime = temp.path().join("runtime.cc");
|
||||
let agents = temp.path().join("agents.ccmp");
|
||||
let body_store = temp.path().join("body.ccmp");
|
||||
crate::initialize_runtime_spine(
|
||||
&runtime,
|
||||
|
|
@ -4397,8 +4394,7 @@ mod tests {
|
|||
created_at: "2026-07-16T00:00:00Z".into(),
|
||||
},
|
||||
)?;
|
||||
crate::ensure_agent_memory_swarm_identity(&agents, "recovery-swarm")?;
|
||||
crate::bind_runtime_to_agent_memory_swarm(&runtime, &agents, "2026-07-16T00:00:01Z")?;
|
||||
crate::bind_runtime_to_swarm(&runtime, "recovery-swarm", "2026-07-16T00:00:01Z")?;
|
||||
crate::bind_repository_body(&repo, &body_store, &runtime, "recovery-workspace")?;
|
||||
let coverage_store_path = std::fs::canonicalize(temp.path())?.join("coverage.redb");
|
||||
crate::bind_runtime_workspace_coverage_store(
|
||||
|
|
|
|||
|
|
@ -4022,7 +4022,6 @@ mod tests {
|
|||
std::fs::write(repo.path().join("source.rs"), "fn one() {}\n")?;
|
||||
git(repo.path(), &["add", "."])?;
|
||||
let runtime = state.path().join("runtime.cc");
|
||||
let agents = state.path().join("agents.cc");
|
||||
let body = state.path().join("body.cc");
|
||||
crate::initialize_runtime_spine(
|
||||
&runtime,
|
||||
|
|
@ -4032,8 +4031,7 @@ mod tests {
|
|||
created_at: "2026-07-16T00:00:00Z".into(),
|
||||
},
|
||||
)?;
|
||||
crate::ensure_agent_memory_swarm_identity(&agents, "retirement-swarm")?;
|
||||
crate::bind_runtime_to_agent_memory_swarm(&runtime, &agents, "2026-07-16T00:00:01Z")?;
|
||||
crate::bind_runtime_to_swarm(&runtime, "retirement-swarm", "2026-07-16T00:00:01Z")?;
|
||||
crate::bind_repository_body(repo.path(), &body, &runtime, "retirement-workspace")?;
|
||||
let coverage = std::fs::canonicalize(state.path())?.join("workspace-coverage.cc");
|
||||
crate::bind_runtime_workspace_coverage_store(&runtime, &coverage, "2026-07-16T00:00:02Z")?;
|
||||
|
|
@ -4507,7 +4505,6 @@ mod tests {
|
|||
}
|
||||
git(repo.path(), &["add", "."])?;
|
||||
let runtime = state.path().join("runtime.cc");
|
||||
let agents = state.path().join("agents.cc");
|
||||
let body_store = state.path().join("body.cc");
|
||||
crate::initialize_runtime_spine(
|
||||
&runtime,
|
||||
|
|
@ -4517,8 +4514,7 @@ mod tests {
|
|||
created_at: "2026-07-16T00:00:00Z".into(),
|
||||
},
|
||||
)?;
|
||||
crate::ensure_agent_memory_swarm_identity(&agents, "read-session-swarm")?;
|
||||
crate::bind_runtime_to_agent_memory_swarm(&runtime, &agents, "2026-07-16T00:00:01Z")?;
|
||||
crate::bind_runtime_to_swarm(&runtime, "read-session-swarm", "2026-07-16T00:00:01Z")?;
|
||||
crate::bind_repository_body(repo.path(), &body_store, &runtime, "read-session-workspace")?;
|
||||
let coverage_store = std::fs::canonicalize(state.path())?.join("workspace-coverage.cc");
|
||||
crate::bind_runtime_workspace_coverage_store(
|
||||
|
|
@ -4583,7 +4579,6 @@ mod tests {
|
|||
std::fs::write(repo.path().join("binary.dat"), [0xff, 0xfe, 0xfd])?;
|
||||
git(repo.path(), &["add", "."])?;
|
||||
let runtime = state.path().join("runtime.cc");
|
||||
let agents = state.path().join("agents.cc");
|
||||
let body = state.path().join("body.cc");
|
||||
crate::initialize_runtime_spine(
|
||||
&runtime,
|
||||
|
|
@ -4593,8 +4588,7 @@ mod tests {
|
|||
created_at: "2026-07-15T00:00:00Z".into(),
|
||||
},
|
||||
)?;
|
||||
crate::ensure_agent_memory_swarm_identity(&agents, "projector-swarm")?;
|
||||
crate::bind_runtime_to_agent_memory_swarm(&runtime, &agents, "2026-07-15T00:00:01Z")?;
|
||||
crate::bind_runtime_to_swarm(&runtime, "projector-swarm", "2026-07-15T00:00:01Z")?;
|
||||
crate::bind_repository_body(repo.path(), &body, &runtime, "projector-workspace")?;
|
||||
crate::bind_runtime_workspace_coverage_store(
|
||||
&runtime,
|
||||
|
|
@ -4677,7 +4671,6 @@ mod tests {
|
|||
std::fs::write(repo.path().join("source.rs"), "fn one() {}\n")?;
|
||||
git(repo.path(), &["add", "."])?;
|
||||
let runtime = state.path().join("runtime.cc");
|
||||
let agents = state.path().join("agents.cc");
|
||||
let body = state.path().join("body.cc");
|
||||
crate::initialize_runtime_spine(
|
||||
&runtime,
|
||||
|
|
@ -4687,8 +4680,11 @@ mod tests {
|
|||
created_at: "2026-07-15T00:00:00Z".into(),
|
||||
},
|
||||
)?;
|
||||
crate::ensure_agent_memory_swarm_identity(&agents, "projection-execution-swarm")?;
|
||||
crate::bind_runtime_to_agent_memory_swarm(&runtime, &agents, "2026-07-15T00:00:01Z")?;
|
||||
crate::bind_runtime_to_swarm(
|
||||
&runtime,
|
||||
"projection-execution-swarm",
|
||||
"2026-07-15T00:00:01Z",
|
||||
)?;
|
||||
crate::bind_repository_body(
|
||||
repo.path(),
|
||||
&body,
|
||||
|
|
@ -4791,7 +4787,6 @@ mod tests {
|
|||
std::fs::write(repo.path().join("source.rs"), "fn one() {}\n")?;
|
||||
git(repo.path(), &["add", "."])?;
|
||||
let runtime = state.path().join("runtime.cc");
|
||||
let agents = state.path().join("agents.cc");
|
||||
let body = state.path().join("body.cc");
|
||||
crate::initialize_runtime_spine(
|
||||
&runtime,
|
||||
|
|
@ -4801,8 +4796,7 @@ mod tests {
|
|||
created_at: "2026-07-15T00:00:00Z".into(),
|
||||
},
|
||||
)?;
|
||||
crate::ensure_agent_memory_swarm_identity(&agents, "body-advance-swarm")?;
|
||||
crate::bind_runtime_to_agent_memory_swarm(&runtime, &agents, "2026-07-15T00:00:01Z")?;
|
||||
crate::bind_runtime_to_swarm(&runtime, "body-advance-swarm", "2026-07-15T00:00:01Z")?;
|
||||
crate::bind_repository_body(repo.path(), &body, &runtime, "body-advance-workspace")?;
|
||||
crate::bind_runtime_workspace_coverage_store(
|
||||
&runtime,
|
||||
|
|
@ -4838,7 +4832,6 @@ mod tests {
|
|||
std::fs::write(repo.path().join("source.rs"), "fn one() {}\n")?;
|
||||
git(repo.path(), &["add", "."])?;
|
||||
let runtime = state.path().join("runtime.cc");
|
||||
let agents = state.path().join("agents.cc");
|
||||
let body = state.path().join("body.cc");
|
||||
crate::initialize_runtime_spine(
|
||||
&runtime,
|
||||
|
|
@ -4848,8 +4841,7 @@ mod tests {
|
|||
created_at: "2026-07-15T00:00:00Z".into(),
|
||||
},
|
||||
)?;
|
||||
crate::ensure_agent_memory_swarm_identity(&agents, "cas-loser-swarm")?;
|
||||
crate::bind_runtime_to_agent_memory_swarm(&runtime, &agents, "2026-07-15T00:00:01Z")?;
|
||||
crate::bind_runtime_to_swarm(&runtime, "cas-loser-swarm", "2026-07-15T00:00:01Z")?;
|
||||
crate::bind_repository_body(repo.path(), &body, &runtime, "cas-loser-workspace")?;
|
||||
crate::bind_runtime_workspace_coverage_store(
|
||||
&runtime,
|
||||
|
|
@ -4894,7 +4886,6 @@ mod tests {
|
|||
std::fs::write(repo.path().join("empty.txt"), "")?;
|
||||
git(repo.path(), &["add", "."])?;
|
||||
let runtime = state.path().join("runtime.cc");
|
||||
let agents = state.path().join("agents.cc");
|
||||
let body = state.path().join("body.cc");
|
||||
crate::initialize_runtime_spine(
|
||||
&runtime,
|
||||
|
|
@ -4904,8 +4895,7 @@ mod tests {
|
|||
created_at: "2026-07-15T00:00:00Z".into(),
|
||||
},
|
||||
)?;
|
||||
crate::ensure_agent_memory_swarm_identity(&agents, "empty-swarm")?;
|
||||
crate::bind_runtime_to_agent_memory_swarm(&runtime, &agents, "2026-07-15T00:00:01Z")?;
|
||||
crate::bind_runtime_to_swarm(&runtime, "empty-swarm", "2026-07-15T00:00:01Z")?;
|
||||
crate::bind_repository_body(repo.path(), &body, &runtime, "empty-workspace")?;
|
||||
crate::bind_runtime_workspace_coverage_store(
|
||||
&runtime,
|
||||
|
|
@ -4931,7 +4921,6 @@ mod tests {
|
|||
std::fs::write(repo.path().join("source.rs"), "fn a() {}\n")?;
|
||||
git(repo.path(), &["add", "."])?;
|
||||
let runtime = state.path().join("runtime.cc");
|
||||
let agents = state.path().join("agents.cc");
|
||||
let body = state.path().join("body.cc");
|
||||
crate::initialize_runtime_spine(
|
||||
&runtime,
|
||||
|
|
@ -4941,8 +4930,7 @@ mod tests {
|
|||
created_at: "2026-07-15T00:00:00Z".into(),
|
||||
},
|
||||
)?;
|
||||
crate::ensure_agent_memory_swarm_identity(&agents, "head-cas-swarm")?;
|
||||
crate::bind_runtime_to_agent_memory_swarm(&runtime, &agents, "2026-07-15T00:00:01Z")?;
|
||||
crate::bind_runtime_to_swarm(&runtime, "head-cas-swarm", "2026-07-15T00:00:01Z")?;
|
||||
crate::bind_repository_body(repo.path(), &body, &runtime, "head-cas-workspace")?;
|
||||
crate::bind_runtime_workspace_coverage_store(
|
||||
&runtime,
|
||||
|
|
|
|||
|
|
@ -470,7 +470,6 @@ mod tests {
|
|||
bail!("singleton fixture failed to initialize repository");
|
||||
}
|
||||
let runtime = state.path().join("runtime.cc");
|
||||
let agents = state.path().join("agents.cc");
|
||||
let body = state.path().join("body.cc");
|
||||
let coverage = std::fs::canonicalize(state.path())?.join("workspace-coverage.cc");
|
||||
crate::initialize_runtime_spine(
|
||||
|
|
@ -481,8 +480,7 @@ mod tests {
|
|||
created_at: "2026-07-17T00:00:00Z".into(),
|
||||
},
|
||||
)?;
|
||||
crate::ensure_agent_memory_swarm_identity(&agents, "singleton-swarm")?;
|
||||
crate::bind_runtime_to_agent_memory_swarm(&runtime, &agents, "2026-07-17T00:00:01Z")?;
|
||||
crate::bind_runtime_to_swarm(&runtime, "singleton-swarm", "2026-07-17T00:00:01Z")?;
|
||||
crate::bind_repository_body(repo.path(), &body, &runtime, "singleton-workspace")?;
|
||||
crate::bind_runtime_workspace_coverage_store(&runtime, &coverage, "2026-07-17T00:00:02Z")?;
|
||||
let launch_id = "019bff10-7426-7a1c-9ce4-33f91660a3a7";
|
||||
|
|
|
|||
|
|
@ -535,8 +535,8 @@ mod tests {
|
|||
swarm_id: "swarm-1".into(),
|
||||
runtime_id: "runtime-1".into(),
|
||||
scope: "git_worktree".into(),
|
||||
source_identity_type: "gamecult.agent_memory.swarm_identity".into(),
|
||||
source_identity_key: "swarm".into(),
|
||||
source_identity_type: crate::RUNTIME_IDENTITY_TYPE.into(),
|
||||
source_identity_key: crate::RUNTIME_IDENTITY_KEY.into(),
|
||||
source_identity_sha256: "a".repeat(64),
|
||||
git_top_level: worktree.to_string_lossy().into_owned(),
|
||||
object_format: "sha1".into(),
|
||||
|
|
|
|||
Reference in a new issue