Remove global thread state model

This commit is contained in:
Meta Vens 2026-08-18 04:51:18 +02:00
commit ec1431fff8
23 changed files with 139 additions and 4547 deletions

View file

@ -1538,39 +1538,13 @@ mod tests {
store: &Path,
launch: &epiphany_core::EpiphanyRuntimeWorkerLaunchRequest,
) -> Result<()> {
let request = epiphany_core::EpiphanyJobLaunchRequest {
expected_revision: None,
binding_id: launch.binding_id.clone(),
kind: epiphany_state_model::EpiphanyJobKind::Specialist,
scope: launch.authority_scope.clone(),
owner_role: launch.role.clone(),
authority_scope: launch.authority_scope.clone(),
linked_subgoal_ids: Vec::new(),
linked_graph_node_ids: Vec::new(),
instruction: launch.instruction.clone(),
launch_document: launch.launch_document()?,
output_contract_id: launch.output_contract_id.clone(),
organ_launch_contract: launch.organ_launch_contract.clone(),
max_runtime_seconds: None,
proposal_modeling_request_id: launch.proposal_modeling_request_id.clone(),
frontier_planning_request_id: launch.frontier_planning_request_id.clone(),
frontier_plan_mind_request_id: launch.frontier_plan_mind_request_id.clone(),
imagination_consideration_request_id: launch
.imagination_consideration_request_id
.clone(),
admitted_model_direction_consideration_request_id: launch
.admitted_model_direction_consideration_request_id
.clone(),
repo_frontier_modeling_request_id: launch.repo_frontier_modeling_request_id.clone(),
repo_frontier_research_request_id: launch.repo_frontier_research_request_id.clone(),
repo_frontier_verification_request_id: launch
.repo_frontier_verification_request_id
.clone(),
};
let grant = epiphany_core::substrate_gate_repo_access_grant_for_launch(
let grant = epiphany_core::substrate_gate_repo_access_grant_for_worker(
format!("substrate-grant-{}", launch.job_id),
launch.job_id.clone(),
&request,
launch.binding_id.clone(),
launch.role.clone(),
launch.authority_scope.clone(),
launch.binding_id == epiphany_core::EPIPHANY_RESEARCH_ROLE_BINDING_ID,
now(),
);
epiphany_core::put_substrate_gate_repo_access_grant_receipt(store, &grant)?;
@ -1598,7 +1572,6 @@ mod tests {
epiphany_core::EpiphanyRoleWorkerLaunchDocument {
thread_id: "thread-1".to_string(),
role_id: "verification".to_string(),
state_revision: 1,
objective: Some("Verify the worker loop.".to_string()),
dynamic_prompt_context: None,
repository_body_observation_basis: None,
@ -1711,7 +1684,6 @@ mod tests {
epiphany_core::EpiphanyRoleWorkerLaunchDocument {
thread_id: "thread-1".to_string(),
role_id: "verification".to_string(),
state_revision: 1,
objective: Some("Verify runtime error sealing.".to_string()),
dynamic_prompt_context: None,
repository_body_observation_basis: None,
@ -1848,7 +1820,6 @@ mod tests {
epiphany_core::EpiphanyRoleWorkerLaunchDocument {
thread_id: "thread-1".to_string(),
role_id: "verification".to_string(),
state_revision: 1,
objective: Some("Verify the worker loop ceiling.".to_string()),
dynamic_prompt_context: None,
repository_body_observation_basis: None,

View file

@ -3008,7 +3008,6 @@ mod tests {
EpiphanyWorkerLaunchDocument::Role(epiphany_core::EpiphanyRoleWorkerLaunchDocument {
thread_id: "thread-1".into(),
role_id: "modeling".into(),
state_revision: 1,
objective: Some("obsolete aggregate objective must not cross inference".into()),
dynamic_prompt_context: None,
repository_body_observation_basis: None,
@ -3418,7 +3417,6 @@ mod tests {
EpiphanyWorkerLaunchDocument::Role(epiphany_core::EpiphanyRoleWorkerLaunchDocument {
thread_id: "thread-1".into(),
role_id: "imagination".into(),
state_revision: 1,
objective: Some("Plan one frontier.".into()),
dynamic_prompt_context: None,
repository_body_observation_basis: None,
@ -3913,7 +3911,6 @@ mod tests {
epiphany_core::EpiphanyRoleWorkerLaunchDocument {
thread_id: "thread-1".to_string(),
role_id: "modeling".to_string(),
state_revision: 1,
objective: Some("Map the machine.".to_string()),
dynamic_prompt_context: None,
repository_body_observation_basis: Some(body_basis.clone()),
@ -4203,7 +4200,6 @@ mod tests {
epiphany_core::EpiphanyRoleWorkerLaunchDocument {
thread_id: "thread-1".to_string(),
role_id: "verification".to_string(),
state_revision: 1,
objective: Some("Verify Hands receipts.".to_string()),
dynamic_prompt_context: Some(
"<verification_work_loop_telemetry>hands receipts</verification_work_loop_telemetry>"