fix(grid-agent): move setup into YAML preferences (#135)
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
use metacrate_grid_agent::{
|
||||
ACCEPTANCE_SCHEMA_VERSION, ACCEPTANCE_SECRET_CANARY, AcceptanceBudgets,
|
||||
AcceptanceEvidenceWriter, AcceptanceRecord, AcceptanceStatus, LiveGridOptIns,
|
||||
run_deterministic_acceptance,
|
||||
AcceptanceEvidenceWriter, AcceptanceRecord, AcceptanceStatus, run_deterministic_acceptance,
|
||||
};
|
||||
use std::collections::BTreeMap;
|
||||
use std::fs;
|
||||
use std::path::PathBuf;
|
||||
use std::time::{SystemTime, UNIX_EPOCH};
|
||||
@@ -62,23 +60,6 @@ async fn deterministic_gate_writes_ordered_redacted_evidence_and_drains() {
|
||||
fs::remove_file(path).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn live_actions_require_exact_independent_confirmations() {
|
||||
let mut values = BTreeMap::new();
|
||||
values.insert("METACRATE_AGENT_LIVE_CHAT_IM", "CHAT-IM");
|
||||
let action_without_login =
|
||||
LiveGridOptIns::from_environment(|name| values.get(name).map(ToString::to_string));
|
||||
assert!(action_without_login.validate().is_err());
|
||||
values.insert("METACRATE_AGENT_LIVE_LOGIN", "LOGIN");
|
||||
values.insert("METACRATE_AGENT_LIVE_BUILD", "wrong");
|
||||
let confirmed =
|
||||
LiveGridOptIns::from_environment(|name| values.get(name).map(ToString::to_string))
|
||||
.validate()
|
||||
.unwrap();
|
||||
assert!(confirmed.login && confirmed.chat_and_im);
|
||||
assert!(!confirmed.reversible_build);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn evidence_writer_rejects_secret_markers_and_schema_is_committed() {
|
||||
let path = temporary("unsafe.jsonl");
|
||||
|
||||
Reference in New Issue
Block a user