Replace role graph cargo with memory patch candidates
This commit is contained in:
parent
3471a5329f
commit
735e31f2a6
9 changed files with 67 additions and 12 deletions
|
|
@ -440,7 +440,7 @@ pub fn build_epiphany_role_launch_request(
|
|||
investigation_checkpoint: state.investigation_checkpoint.clone(),
|
||||
scratch: state.scratch.clone(),
|
||||
invariants: state.invariants.clone(),
|
||||
graphs: Some(state.graphs.clone()),
|
||||
graphs: None,
|
||||
recent_evidence: state.recent_evidence.iter().take(8).cloned().collect(),
|
||||
recent_observations: state.observations.iter().take(8).cloned().collect(),
|
||||
graph_frontier: state.graph_frontier.clone(),
|
||||
|
|
@ -779,6 +779,10 @@ mod tests {
|
|||
let EpiphanyWorkerLaunchDocument::Role(document) = launch.launch_document else {
|
||||
panic!("expected role launch document");
|
||||
};
|
||||
assert!(
|
||||
document.graphs.is_none(),
|
||||
"native role launch should use typed memoryContext instead of full graph cargo"
|
||||
);
|
||||
let context = document
|
||||
.memory_context
|
||||
.expect("role launch should carry typed memory context");
|
||||
|
|
|
|||
|
|
@ -83,8 +83,8 @@ The Body improves itself by becoming harder to misread. If the graph, checkpoint
|
|||
Inspect source before you trust the model; when the map feels warm but the source feels cold, believe the source and mark the wound.
|
||||
Name the living seam, the open wound, and the next safe modeling move in plain language.
|
||||
Return a compact structured result that says whether the checkpoint or map should be updated, what files you inspected, what frontier nodes matter, and where the next agent can safely place its hands.
|
||||
`statePatch` is part of the modeling job. If you return `checkpoint-ready`, `checkpoint-update-needed`, or `regather-needed`, include a reviewable `thread/epiphany/update` patch using only modeling-safe fields (`graphs`, `graphFrontier`, `graphCheckpoint`, `scratch`, `investigationCheckpoint`, plus optional valid `observations` and `evidence`). The patch must include at least one durable modeling field: `graphs`, `graphFrontier`, `graphCheckpoint`, `scratch`, or `investigationCheckpoint`. Do not return an observations-only patch. Every observation must include `id`, `summary`, `source_kind`, `status`, and at least one `evidence_ids` entry; every new evidence record must include `id`, `kind`, `status`, and `summary`. For graph growth, return the full replacement graph object with the new or revised nodes/edges already woven into the current anatomy. If you believe no durable state change is needed, still return a small `scratch`, `graphCheckpoint`, or `investigationCheckpoint` patch that banks why the existing model is source-grounded; otherwise the coordinator cannot advance the lane.
|
||||
Before returning a `statePatch`, validate it as if acceptance will reject you. `graphs.architecture.nodes[].id` defines the only valid `architecture_node_id` values. `graphs.dataflow.nodes[].id` defines the only valid `dataflow_node_id` values. Every `graphs.links[]` entry must point from one existing dataflow node to one existing architecture node; never put a dataflow id in `architecture_node_id` or an architecture id in `dataflow_node_id`. If a concept needs to exist in both layers, create or reuse one node in each layer and link them explicitly. Every frontier/checkpoint node id you name must exist in the graph you return.
|
||||
`statePatch` is part of the modeling job. If you return `checkpoint-ready`, `checkpoint-update-needed`, or `regather-needed`, include a reviewable `thread/epiphany/update` patch using only modeling-safe fields (`graphCheckpoint`, `scratch`, `investigationCheckpoint`, plus optional valid `observations` and `evidence`; legacy `graphs` and `graphFrontier` are accepted only when the launch document explicitly gives enough graph state to validate them). The patch must include at least one durable modeling field: `graphCheckpoint`, `scratch`, `investigationCheckpoint`, `graphs`, or `graphFrontier`. Do not return an observations-only patch. Every observation must include `id`, `summary`, `source_kind`, `status`, and at least one `evidence_ids` entry; every new evidence record must include `id`, `kind`, `status`, and `summary`. For graph or memory growth, prefer `memoryPatchCandidates[]`: propose typed `EpiphanyMemoryPatchCandidate` records containing proposed nodes/edges and reasons. Do not invent a full replacement graph from partial prompt context. If you believe no durable state change is needed, still return a small `scratch`, `graphCheckpoint`, or `investigationCheckpoint` patch that banks why the existing model is source-grounded; otherwise the coordinator cannot advance the lane.
|
||||
Before returning a `statePatch`, validate it as if acceptance will reject you. If you use legacy `graphs`, `graphs.architecture.nodes[].id` defines the only valid `architecture_node_id` values and `graphs.dataflow.nodes[].id` defines the only valid `dataflow_node_id` values. Every `graphs.links[]` entry must point from one existing dataflow node to one existing architecture node; never put a dataflow id in `architecture_node_id` or an architecture id in `dataflow_node_id`. Every frontier/checkpoint node id you name must exist in the graph you return or in the supplied typed `memoryContext`.
|
||||
Do not confuse the modeling verdict with checkpoint enum values. `verdict` may be `checkpoint-ready`, but `statePatch.investigationCheckpoint.disposition` must be exactly `resume_ready` or `regather_required`; never write `checkpoint_ready`.
|
||||
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.
|
||||
'''
|
||||
|
|
|
|||
Reference in a new issue