validateBareModeSupport validates that bare mode is only used with engines that support this feature. Emits a warning and has no effect on engines that do not support bare mode.
(frontmatter map[string]any, engine CodingAgentEngine)
| 234 | // validateBareModeSupport validates that bare mode is only used with engines that support this feature. |
| 235 | // Emits a warning and has no effect on engines that do not support bare mode. |
| 236 | func (c *Compiler) validateBareModeSupport(frontmatter map[string]any, engine CodingAgentEngine) { |
| 237 | _, engineConfig := c.ExtractEngineConfig(frontmatter) |
| 238 | |
| 239 | if engineConfig == nil || !engineConfig.Bare { |
| 240 | // bare mode not requested, no validation needed |
| 241 | return |
| 242 | } |
| 243 | |
| 244 | agentValidationLog.Printf("Validating bare mode support for engine: %s", engine.GetID()) |
| 245 | |
| 246 | if !engine.GetCapabilities().BareMode { |
| 247 | agentValidationLog.Printf("Engine %s does not support bare mode, emitting warning", engine.GetID()) |
| 248 | fmt.Fprintln(os.Stderr, console.FormatWarningMessage(fmt.Sprintf("Engine '%s' does not support bare mode (engine.bare: true). Bare mode is only supported for the 'copilot' and 'claude' engines. The setting will be ignored.", engine.GetID()))) |
| 249 | c.IncrementWarningCount() |
| 250 | } |
| 251 | } |
| 252 | |
| 253 | // validateWorkflowRunBranches validates workflow_run trigger requirements. |
| 254 | // It enforces required workflows and branch restrictions guidance. |
no test coverage detected