Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(test): enable autonomy policy in test config

Steven Enamakel0adfb87bd28e
diff --git a/crates/openhuman-core/src/flows/ops_approval_manifest_and_catalog_tests.rs b/crates/openhuman-core/src/flows/ops_approval_manifest_and_catalog_tests.rs
index e25b64e9ae..43de43f026 100644
--- a/crates/openhuman-core/src/flows/ops_approval_manifest_and_catalog_tests.rs
+++ b/crates/openhuman-core/src/flows/ops_approval_manifest_and_catalog_tests.rs
@@ -101,9 +101,6 @@ async fn approval_manifest_lists_gated_nodes_and_skips_curated_reads() {
async fn approval_manifest_marks_blocked_classes_under_readonly_tier() {
let tmp = TempDir::new().unwrap();
let mut config = test_config(&tmp);
- // The tier only binds with the policy on; the shipped config default is off,
- // and a disabled policy gates nothing (so nothing would read as `blocked`).
- config.autonomy.enabled = true;
config.autonomy.level = crate::security::AutonomyLevel::ReadOnly;
let entries = compute_approval_manifest(&config, &manifest_graph()).await;
diff --git a/crates/openhuman-core/src/flows/ops_tests.rs b/crates/openhuman-core/src/flows/ops_tests.rs
index 9ce8619747..f722f9a9e2 100644
--- a/crates/openhuman-core/src/flows/ops_tests.rs
+++ b/crates/openhuman-core/src/flows/ops_tests.rs
@@ -4,12 +4,17 @@ use serde_json::json;
use tempfile::TempDir;
fn test_config(tmp: &TempDir) -> Config {
- let config = Config {
+ let mut config = Config {
workspace_dir: tmp.path().join("workspace"),
action_dir: tmp.path().join("workspace"),
config_path: tmp.path().join("config.toml"),
..Config::default()
};
+ // These suites are about the approval gate and the tier, which only bind
+ // with the policy on; the shipped config default is off. Without this the
+ // manifest tests pass vacuously — a disabled policy answers `Allow` for
+ // every class, so nothing is ever `blocked`.
+ config.autonomy.enabled = true;
std::fs::create_dir_all(&config.workspace_dir).unwrap();
config
}