Delete constant proposal projection cargo
This commit is contained in:
parent
711127f135
commit
82f4733d92
6 changed files with 9 additions and 46 deletions
|
|
@ -3518,9 +3518,7 @@ fn build_proposal_modeling_context_projection(
|
|||
workspace: request.workspace.clone(),
|
||||
title: proposal.title.clone(),
|
||||
body: proposal.body.clone(),
|
||||
desired_outcome: proposal.desired_outcome.clone(),
|
||||
constraints: proposal.constraints.clone(),
|
||||
scope_hints: proposal.scope_hints.clone(),
|
||||
evidence_refs: proposal.evidence_refs.clone(),
|
||||
model_projection_digest: model.projection_digest.clone(),
|
||||
model_source_documents: model.source_documents.clone(),
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use sha2::{Digest, Sha256};
|
|||
|
||||
use crate::{EpiphanyMindDocumentVersion, runtime_spine_cache};
|
||||
|
||||
pub const MIND_SCHEMA_EPOCH: &str = "epiphany.mind.epoch.v5";
|
||||
pub const MIND_SCHEMA_EPOCH: &str = "epiphany.mind.epoch.v6";
|
||||
pub const MIND_OBJECTIVE_KEY: &str = "objective";
|
||||
pub const MIND_FOCUS_KEY: &str = "focus";
|
||||
pub const MIND_MODE_KEY: &str = "mode";
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ pub const REPO_FRONTIER_MODELING_REQUEST_SCHEMA_VERSION: &str =
|
|||
pub const REPO_FRONTIER_MODELING_REQUEST_CONTRACT: &str =
|
||||
"epiphany.repo_frontier_verdict_modeling_request.v1";
|
||||
pub const REPO_FRONTIER_WORK_PROPOSAL_SCHEMA_VERSION: &str =
|
||||
"epiphany.repo_frontier_work_proposal.v1";
|
||||
"epiphany.repo_frontier_work_proposal.v2";
|
||||
pub const REPO_FRONTIER_PLANNING_REQUEST_SCHEMA_VERSION: &str =
|
||||
"epiphany.self.repo_frontier_planning_request.v4";
|
||||
pub const REPO_FRONTIER_PLAN_CANDIDATE_SCHEMA_VERSION: &str =
|
||||
|
|
@ -60,7 +60,7 @@ pub const REPO_FRONTIER_RESEARCH_REQUEST_SCHEMA_VERSION: &str =
|
|||
pub const REPO_FRONTIER_RESEARCH_REQUEST_CONTRACT: &str =
|
||||
"epiphany.repo_frontier_research_request.v3";
|
||||
pub const REPO_FRONTIER_WORK_PROPOSAL_CONTRACT: &str =
|
||||
"epiphany.repo_frontier_work_proposal.inert.v1";
|
||||
"epiphany.repo_frontier_work_proposal.inert.v2";
|
||||
pub const REPO_FRONTIER_AUTONOMOUS_PROPOSAL_BINDING_SCHEMA_VERSION: &str =
|
||||
"epiphany.self.repo_frontier_autonomous_proposal_binding.v1";
|
||||
pub const REPO_FRONTIER_AUTONOMOUS_PROPOSAL_BINDING_CONTRACT: &str =
|
||||
|
|
@ -168,35 +168,20 @@ pub struct RepoFrontierWorkProposal {
|
|||
#[cultcache(key = 8)]
|
||||
pub body: String,
|
||||
#[cultcache(key = 9)]
|
||||
pub desired_outcome: String,
|
||||
#[cultcache(key = 10)]
|
||||
pub constraints: Vec<String>,
|
||||
#[cultcache(key = 11)]
|
||||
pub scope_hints: Vec<String>,
|
||||
#[cultcache(key = 12)]
|
||||
#[cultcache(key = 10)]
|
||||
pub evidence_refs: Vec<String>,
|
||||
#[cultcache(key = 13)]
|
||||
pub proposed_at: String,
|
||||
#[cultcache(key = 14)]
|
||||
#[cultcache(key = 11)]
|
||||
pub contract: String,
|
||||
}
|
||||
|
||||
pub fn repo_frontier_proposal_payload_sha256(
|
||||
title: &str,
|
||||
body: &str,
|
||||
desired_outcome: &str,
|
||||
constraints: &[String],
|
||||
scope_hints: &[String],
|
||||
evidence_refs: &[String],
|
||||
) -> Result<String> {
|
||||
let content = rmp_serde::to_vec_named(&(
|
||||
title,
|
||||
body,
|
||||
desired_outcome,
|
||||
constraints,
|
||||
scope_hints,
|
||||
evidence_refs,
|
||||
))?;
|
||||
let content = rmp_serde::to_vec_named(&(title, body, constraints, evidence_refs))?;
|
||||
Ok(format!("{:x}", Sha256::digest(content)))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ pub const COORDINATOR_RUN_RECEIPT_TYPE: &str = "epiphany.coordinator_run_receipt
|
|||
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.v1";
|
||||
pub const RUNTIME_SPINE_SCHEMA_VERSION: &str = "epiphany.runtime_spine.v8";
|
||||
pub const RUNTIME_SPINE_SCHEMA_VERSION: &str = "epiphany.runtime_spine.v9";
|
||||
pub const EPIPHANY_RUNTIME_ROOT_SESSION_ID: &str = "epiphany-main";
|
||||
pub const RUNTIME_MODEL_EXECUTION_BINDING_SCHEMA_VERSION: &str =
|
||||
"epiphany.runtime.model_execution_binding.v0";
|
||||
|
|
@ -4863,9 +4863,7 @@ fn validated_proposal_modeling_worker_fulfillment(
|
|||
let proposal_payload_sha256 = crate::repo_frontier_proposal_payload_sha256(
|
||||
&proposal.title,
|
||||
&proposal.body,
|
||||
&proposal.desired_outcome,
|
||||
&proposal.constraints,
|
||||
&proposal.scope_hints,
|
||||
&proposal.evidence_refs,
|
||||
)?;
|
||||
let attempt_ordinal =
|
||||
|
|
@ -4888,9 +4886,7 @@ fn validated_proposal_modeling_worker_fulfillment(
|
|||
workspace: request.workspace.clone(),
|
||||
title: proposal.title.clone(),
|
||||
body: proposal.body.clone(),
|
||||
desired_outcome: proposal.desired_outcome.clone(),
|
||||
constraints: proposal.constraints.clone(),
|
||||
scope_hints: proposal.scope_hints.clone(),
|
||||
evidence_refs: proposal.evidence_refs.clone(),
|
||||
model_projection_digest: projection.model_projection_digest.clone(),
|
||||
model_source_documents: projection.model_source_documents.clone(),
|
||||
|
|
@ -5222,17 +5218,13 @@ pub(crate) fn validate_repo_frontier_work_proposal(
|
|||
|| proposal.runtime_id.trim().is_empty()
|
||||
|| proposal.title.trim().is_empty()
|
||||
|| proposal.body.trim().is_empty()
|
||||
|| proposal.desired_outcome.trim().is_empty()
|
||||
|| chrono::DateTime::parse_from_rfc3339(&proposal.proposed_at).is_err()
|
||||
{
|
||||
return Err(anyhow!("invalid inert repo frontier work proposal"));
|
||||
}
|
||||
let expected_payload_sha256 = crate::repo_frontier_proposal_payload_sha256(
|
||||
&proposal.title,
|
||||
&proposal.body,
|
||||
&proposal.desired_outcome,
|
||||
&proposal.constraints,
|
||||
&proposal.scope_hints,
|
||||
&proposal.evidence_refs,
|
||||
)?;
|
||||
if proposal.payload_sha256 != expected_payload_sha256 {
|
||||
|
|
@ -5646,9 +5638,7 @@ pub fn promote_autonomous_direction_options_for_modeling(
|
|||
let payload_sha256 = crate::repo_frontier_proposal_payload_sha256(
|
||||
&option.title,
|
||||
&option.summary,
|
||||
&option.summary,
|
||||
&result.uncertainties,
|
||||
&[],
|
||||
&evidence_refs,
|
||||
)?;
|
||||
let proposal = RepoFrontierWorkProposal {
|
||||
|
|
@ -5661,11 +5651,8 @@ pub fn promote_autonomous_direction_options_for_modeling(
|
|||
payload_sha256: payload_sha256.clone(),
|
||||
title: option.title.clone(),
|
||||
body: option.summary.clone(),
|
||||
desired_outcome: option.summary.clone(),
|
||||
constraints: result.uncertainties.clone(),
|
||||
scope_hints: Vec::new(),
|
||||
evidence_refs,
|
||||
proposed_at: result.proposed_at.clone(),
|
||||
contract: REPO_FRONTIER_WORK_PROPOSAL_CONTRACT.into(),
|
||||
};
|
||||
validate_repo_frontier_work_proposal(&proposal)?;
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ use serde::Serialize;
|
|||
pub const ROLE_WORKER_OUTPUT_CONTRACT_ID: &str = "epiphany.worker.role_result.v4";
|
||||
pub const REORIENT_WORKER_OUTPUT_CONTRACT_ID: &str = "epiphany.worker.reorient_result.v0";
|
||||
pub const REPO_FRONTIER_PROPOSAL_MODELING_CONTEXT_SCHEMA_VERSION: &str =
|
||||
"epiphany.worker.repo_frontier_proposal_modeling_context.v3";
|
||||
"epiphany.worker.repo_frontier_proposal_modeling_context.v4";
|
||||
pub const REPO_FRONTIER_PROPOSAL_MODELING_CONTEXT_CONTRACT: &str =
|
||||
"epiphany.repo_frontier_proposal_modeling_context.v3";
|
||||
"epiphany.repo_frontier_proposal_modeling_context.v4";
|
||||
pub const REPO_FRONTIER_PLANNING_CONTEXT_SCHEMA_VERSION: &str =
|
||||
"epiphany.worker.repo_frontier_planning_context.v2";
|
||||
pub const REPO_FRONTIER_PLANNING_CONTEXT_CONTRACT: &str =
|
||||
|
|
@ -194,12 +194,9 @@ pub struct RepoFrontierProposalModelingContextProjection {
|
|||
pub workspace: String,
|
||||
pub title: String,
|
||||
pub body: String,
|
||||
pub desired_outcome: String,
|
||||
#[serde(default)]
|
||||
pub constraints: Vec<String>,
|
||||
#[serde(default)]
|
||||
pub scope_hints: Vec<String>,
|
||||
#[serde(default)]
|
||||
pub evidence_refs: Vec<String>,
|
||||
pub model_projection_digest: String,
|
||||
pub model_source_documents: Vec<crate::EpiphanyMindDocumentVersion>,
|
||||
|
|
|
|||
|
|
@ -2724,9 +2724,7 @@ mod tests {
|
|||
workspace: "/workspace".into(),
|
||||
title: "Map lifecycle".into(),
|
||||
body: "Inspect typed state".into(),
|
||||
desired_outcome: "One bounded frontier".into(),
|
||||
constraints: Vec::new(),
|
||||
scope_hints: vec!["epiphany-core/src/resident_self.rs".into()],
|
||||
evidence_refs: vec!["git:source".into()],
|
||||
model_projection_digest: "model-projection-41".into(),
|
||||
model_source_documents: Vec::new(),
|
||||
|
|
@ -2931,9 +2929,7 @@ mod tests {
|
|||
workspace: "/workspace".into(),
|
||||
title: "Map lifecycle".into(),
|
||||
body: "Inspect typed state".into(),
|
||||
desired_outcome: "One bounded frontier".into(),
|
||||
constraints: Vec::new(),
|
||||
scope_hints: vec!["epiphany-core/src/resident_self.rs".into()],
|
||||
evidence_refs: vec!["git:source".into()],
|
||||
model_projection_digest: "model-projection-41".into(),
|
||||
model_source_documents: Vec::new(),
|
||||
|
|
|
|||
Reference in a new issue