Add canonical Mind review operator commands
This commit is contained in:
parent
c13820414f
commit
09812bfce7
16 changed files with 1342 additions and 136 deletions
|
|
@ -2123,7 +2123,7 @@ mod tests {
|
|||
schema_version: epiphany_core::REPO_MODEL_ADMISSION_RECEIPT_SCHEMA_VERSION.to_string(),
|
||||
receipt_id: "coordinator-hands-admission-test".to_string(),
|
||||
review_id: "coordinator-hands-model-review-test".to_string(),
|
||||
result_id: "coordinator-hands-model-result-test".to_string(),
|
||||
result_id: Some("coordinator-hands-model-result-test".to_string()),
|
||||
patch_id: "coordinator-hands-model-patch-test".to_string(),
|
||||
patch_sha256: "fixture".to_string(),
|
||||
previous_revision: 0,
|
||||
|
|
@ -2141,6 +2141,10 @@ mod tests {
|
|||
claim_repair_request_id: String::new(),
|
||||
frontier_plan_decision_id: String::new(),
|
||||
repository_body_observation_basis: None,
|
||||
admission_source: Some(epiphany_core::RepoModelAdmissionSource::WorkerResult {
|
||||
result_id: "coordinator-hands-model-result-test".into(),
|
||||
job_id: "coordinator-hands-model-job-test".into(),
|
||||
}),
|
||||
};
|
||||
let mut cache = epiphany_core::runtime_spine_cache(store)?;
|
||||
cache.put(epiphany_core::MEMORY_GRAPH_KEY, &entry)?;
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ fn main() -> Result<()> {
|
|||
command_store: args.command_store.clone(),
|
||||
local_verse_store: args.local_verse_store.clone(),
|
||||
resident_self_store: args.resident_self_store.clone(),
|
||||
runtime_store: args.runtime_store.clone(),
|
||||
policy: OperatorCommandPolicy {
|
||||
runtime_id: args.runtime_id.clone(),
|
||||
discord_guild_id: args.guild_id.clone(),
|
||||
|
|
@ -65,6 +66,7 @@ struct Args {
|
|||
command_store: PathBuf,
|
||||
local_verse_store: PathBuf,
|
||||
resident_self_store: PathBuf,
|
||||
runtime_store: PathBuf,
|
||||
guild_id: String,
|
||||
channel_ids: Vec<String>,
|
||||
actor_capabilities: BTreeMap<String, Vec<OperatorCapability>>,
|
||||
|
|
@ -107,6 +109,7 @@ impl Args {
|
|||
| "--command-store"
|
||||
| "--local-verse-store"
|
||||
| "--resident-self-store"
|
||||
| "--runtime-store"
|
||||
| "--guild-id"
|
||||
| "--max-ttl-seconds" => {
|
||||
let value = values
|
||||
|
|
@ -144,6 +147,7 @@ impl Args {
|
|||
command_store: required("--command-store")?.into(),
|
||||
local_verse_store: required("--local-verse-store")?.into(),
|
||||
resident_self_store: required("--resident-self-store")?.into(),
|
||||
runtime_store: required("--runtime-store")?.into(),
|
||||
guild_id: required("--guild-id")?,
|
||||
channel_ids: channels,
|
||||
actor_capabilities: actors,
|
||||
|
|
@ -159,6 +163,8 @@ fn parse_capability(value: &str) -> Result<OperatorCapability> {
|
|||
"sleep" => Ok(OperatorCapability::Sleep),
|
||||
"wake" => Ok(OperatorCapability::Wake),
|
||||
"directive" => Ok(OperatorCapability::Directive),
|
||||
"reviews" => Ok(OperatorCapability::Reviews),
|
||||
"review" => Ok(OperatorCapability::Review),
|
||||
_ => bail!("unknown operator capability {value}"),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ fn seed_fixture_runtime(store: &Path) -> Result<()> {
|
|||
schema_version: REPO_MODEL_ADMISSION_RECEIPT_SCHEMA_VERSION.into(),
|
||||
receipt_id: "fixture-model-admission".into(),
|
||||
review_id: "fixture-review".into(),
|
||||
result_id: "fixture-result".into(),
|
||||
result_id: Some("fixture-result".into()),
|
||||
patch_id: "fixture-patch".into(),
|
||||
patch_sha256: "sha256-fixture".into(),
|
||||
previous_revision: 0,
|
||||
|
|
@ -231,6 +231,10 @@ fn seed_fixture_runtime(store: &Path) -> Result<()> {
|
|||
claim_repair_request_id: String::new(),
|
||||
frontier_plan_decision_id: String::new(),
|
||||
repository_body_observation_basis: None,
|
||||
admission_source: Some(epiphany_core::RepoModelAdmissionSource::WorkerResult {
|
||||
result_id: "fixture-result".into(),
|
||||
job_id: "fixture-job".into(),
|
||||
}),
|
||||
},
|
||||
)?;
|
||||
Ok(())
|
||||
|
|
|
|||
Reference in a new issue