From 2fd37afb9e3f04dfe013dc4c1d4ef7566c75eace Mon Sep 17 00:00:00 2001 From: Hare Date: Tue, 9 Jun 2026 21:21:40 +0900 Subject: [PATCH] fix: align pod feature flag naming --- .yoi/profiles/_base.lua | 2 +- .yoi/profiles/coder.lua | 4 ++-- .yoi/profiles/companion.lua | 2 +- .yoi/profiles/intake.lua | 2 +- .yoi/profiles/orchestrator.lua | 2 +- .yoi/profiles/reviewer.lua | 2 +- crates/manifest/src/config.rs | 19 ++++++------------- crates/manifest/src/lib.rs | 4 ++-- crates/manifest/src/profile.rs | 4 ++-- crates/pod/src/controller.rs | 4 ++-- crates/pod/tests/controller_test.rs | 6 +++--- resources/profiles/default.lua | 2 +- 12 files changed, 23 insertions(+), 30 deletions(-) diff --git a/.yoi/profiles/_base.lua b/.yoi/profiles/_base.lua index ca5d3acd..e7cc28c7 100644 --- a/.yoi/profiles/_base.lua +++ b/.yoi/profiles/_base.lua @@ -33,7 +33,7 @@ return function(opts) task = { enabled = true }, memory = { enabled = true }, web = { enabled = true }, - pod_management = { enabled = false }, + pods = { enabled = false }, ticket = { enabled = false, access = "lifecycle" }, ticket_orchestration = { enabled = false }, }, diff --git a/.yoi/profiles/coder.lua b/.yoi/profiles/coder.lua index c2a798be..bee244f9 100644 --- a/.yoi/profiles/coder.lua +++ b/.yoi/profiles/coder.lua @@ -6,10 +6,10 @@ return base { description = "Coder role profile: GPT-5.5 with bundled default behavior", model_ref = "codex-oauth/gpt-5.5", feature = { - task = { enabled = true }, + task = { enabled = false }, memory = { enabled = true }, web = { enabled = true }, - pod_management = { enabled = false }, + pods = { enabled = false }, ticket = { enabled = false, access = "lifecycle" }, ticket_orchestration = { enabled = false }, }, diff --git a/.yoi/profiles/companion.lua b/.yoi/profiles/companion.lua index 77da67d3..9d5f888d 100644 --- a/.yoi/profiles/companion.lua +++ b/.yoi/profiles/companion.lua @@ -8,7 +8,7 @@ return base { task = { enabled = true }, memory = { enabled = true }, web = { enabled = true }, - pod_management = { enabled = false }, + pods = { enabled = false }, ticket = { enabled = false, access = "lifecycle" }, ticket_orchestration = { enabled = false }, }, diff --git a/.yoi/profiles/intake.lua b/.yoi/profiles/intake.lua index 3be88e39..afc82901 100644 --- a/.yoi/profiles/intake.lua +++ b/.yoi/profiles/intake.lua @@ -8,7 +8,7 @@ return base { task = { enabled = true }, memory = { enabled = true }, web = { enabled = true }, - pod_management = { enabled = false }, + pods = { enabled = false }, ticket = { enabled = true, access = "lifecycle" }, ticket_orchestration = { enabled = false }, }, diff --git a/.yoi/profiles/orchestrator.lua b/.yoi/profiles/orchestrator.lua index 4fb03314..83964c38 100644 --- a/.yoi/profiles/orchestrator.lua +++ b/.yoi/profiles/orchestrator.lua @@ -9,7 +9,7 @@ return base { task = { enabled = true }, memory = { enabled = true }, web = { enabled = true }, - pod_management = { enabled = true }, + pods = { enabled = true }, ticket = { enabled = true, access = "lifecycle" }, ticket_orchestration = { enabled = true }, }, diff --git a/.yoi/profiles/reviewer.lua b/.yoi/profiles/reviewer.lua index 8b22a3f3..1e54870c 100644 --- a/.yoi/profiles/reviewer.lua +++ b/.yoi/profiles/reviewer.lua @@ -8,7 +8,7 @@ return base { task = { enabled = true }, memory = { enabled = true }, web = { enabled = true }, - pod_management = { enabled = false }, + pods = { enabled = false }, ticket = { enabled = false, access = "lifecycle" }, ticket_orchestration = { enabled = false }, }, diff --git a/crates/manifest/src/config.rs b/crates/manifest/src/config.rs index fa6e1172..fdef0f71 100644 --- a/crates/manifest/src/config.rs +++ b/crates/manifest/src/config.rs @@ -74,7 +74,7 @@ pub struct FeatureConfigPartial { #[serde(default)] pub web: Option, #[serde(default)] - pub pod_management: Option, + pub pods: Option, #[serde(default)] pub ticket: Option, #[serde(default)] @@ -87,11 +87,7 @@ impl FeatureConfigPartial { task: merge_option(self.task, other.task, FeatureFlagConfigPartial::merge), memory: merge_option(self.memory, other.memory, FeatureFlagConfigPartial::merge), web: merge_option(self.web, other.web, FeatureFlagConfigPartial::merge), - pod_management: merge_option( - self.pod_management, - other.pod_management, - FeatureFlagConfigPartial::merge, - ), + pods: merge_option(self.pods, other.pods, FeatureFlagConfigPartial::merge), ticket: merge_option(self.ticket, other.ticket, TicketFeatureConfigPartial::merge), ticket_orchestration: merge_option( self.ticket_orchestration, @@ -142,10 +138,7 @@ impl From for FeatureConfig { .map(FeatureFlagConfig::from) .unwrap_or_default(), web: value.web.map(FeatureFlagConfig::from).unwrap_or_default(), - pod_management: value - .pod_management - .map(FeatureFlagConfig::from) - .unwrap_or_default(), + pods: value.pods.map(FeatureFlagConfig::from).unwrap_or_default(), ticket: value .ticket .map(TicketFeatureConfig::from) @@ -198,7 +191,7 @@ impl From for FeatureConfigPartial { task: Some(value.task.into()), memory: Some(value.memory.into()), web: Some(value.web.into()), - pod_management: Some(value.pod_management.into()), + pods: Some(value.pods.into()), ticket: Some(value.ticket.into()), ticket_orchestration: Some(value.ticket_orchestration.into()), } @@ -1434,7 +1427,7 @@ worker_max_turns = 7 assert!(!manifest.feature.task.enabled); assert!(!manifest.feature.memory.enabled); assert!(!manifest.feature.web.enabled); - assert!(!manifest.feature.pod_management.enabled); + assert!(!manifest.feature.pods.enabled); assert!(!manifest.feature.ticket.enabled); assert!(!manifest.feature.ticket_orchestration.enabled); } @@ -1544,7 +1537,7 @@ enabled = true TicketFeatureAccessConfig::Lifecycle ); assert!(manifest.feature.web.enabled); - assert!(!manifest.feature.pod_management.enabled); + assert!(!manifest.feature.pods.enabled); } #[test] diff --git a/crates/manifest/src/lib.rs b/crates/manifest/src/lib.rs index 43bf6380..ba673549 100644 --- a/crates/manifest/src/lib.rs +++ b/crates/manifest/src/lib.rs @@ -97,7 +97,7 @@ pub struct FeatureConfig { #[serde(default)] pub web: FeatureFlagConfig, #[serde(default)] - pub pod_management: FeatureFlagConfig, + pub pods: FeatureFlagConfig, #[serde(default)] pub ticket: TicketFeatureConfig, #[serde(default)] @@ -110,7 +110,7 @@ impl Default for FeatureConfig { task: FeatureFlagConfig::disabled(), memory: FeatureFlagConfig::disabled(), web: FeatureFlagConfig::disabled(), - pod_management: FeatureFlagConfig::disabled(), + pods: FeatureFlagConfig::disabled(), ticket: TicketFeatureConfig::default(), ticket_orchestration: FeatureFlagConfig::disabled(), } diff --git a/crates/manifest/src/profile.rs b/crates/manifest/src/profile.rs index 857df5d3..640ec153 100644 --- a/crates/manifest/src/profile.rs +++ b/crates/manifest/src/profile.rs @@ -1480,7 +1480,7 @@ return profile { task = { enabled = true }, memory = { enabled = false }, web = { enabled = true }, - pod_management = { enabled = true }, + pods = { enabled = true }, ticket = { enabled = true, access = "read_only" }, ticket_orchestration = { enabled = false }, }, @@ -1500,7 +1500,7 @@ return profile { assert!(resolved.manifest.feature.task.enabled); assert!(!resolved.manifest.feature.memory.enabled); assert!(resolved.manifest.feature.web.enabled); - assert!(resolved.manifest.feature.pod_management.enabled); + assert!(resolved.manifest.feature.pods.enabled); assert!(resolved.manifest.feature.ticket.enabled); assert_eq!( resolved.manifest.feature.ticket.access, diff --git a/crates/pod/src/controller.rs b/crates/pod/src/controller.rs index 92bdf14d..8d0d7e53 100644 --- a/crates/pod/src/controller.rs +++ b/crates/pod/src/controller.rs @@ -595,11 +595,11 @@ where // loop's `PodEvent` handler). Expose them only behind the explicit // profile feature and require delegation authority up front so enabling // the surface cannot imply broad child scope by accident. - if feature_config.pod_management.enabled { + if feature_config.pods.enabled { if spawner_manifest.delegation_scope.allow.is_empty() { return Err(std::io::Error::new( std::io::ErrorKind::InvalidInput, - "[feature.pod_management].enabled = true requires non-empty [[delegation_scope.allow]]", + "[feature.pods].enabled = true requires non-empty [[delegation_scope.allow]]", )); } worker.register_tool(spawn_pod_tool( diff --git a/crates/pod/tests/controller_test.rs b/crates/pod/tests/controller_test.rs index 080eb785..938462f1 100644 --- a/crates/pod/tests/controller_test.rs +++ b/crates/pod/tests/controller_test.rs @@ -304,7 +304,7 @@ permission = "write" } #[tokio::test] -async fn pod_management_feature_requires_delegation_scope() { +async fn pods_feature_requires_delegation_scope() { let manifest = r#" [pod] name = "pod-management-feature-test" @@ -317,7 +317,7 @@ model_id = "test-model" [worker] max_tokens = 100 -[feature.pod_management] +[feature.pods] enabled = true [[scope.allow]] @@ -331,7 +331,7 @@ permission = "write" assert!(result.is_err()); let message = result.err().unwrap().to_string(); assert!( - message.contains("[feature.pod_management].enabled = true requires non-empty"), + message.contains("[feature.pods].enabled = true requires non-empty"), "unexpected error: {message}" ); } diff --git a/resources/profiles/default.lua b/resources/profiles/default.lua index 4490b79f..bec50dd5 100644 --- a/resources/profiles/default.lua +++ b/resources/profiles/default.lua @@ -30,7 +30,7 @@ return profile { task = { enabled = true }, memory = { enabled = true }, web = { enabled = true }, - pod_management = { enabled = false }, + pods = { enabled = false }, ticket = { enabled = false, access = "lifecycle" }, ticket_orchestration = { enabled = false }, },