| 296 | } |
| 297 | |
| 298 | func (c *Compiler) emitExperimentalFeatureWarnings(workflowData *WorkflowData) { |
| 299 | warnings := []struct { |
| 300 | enabled bool |
| 301 | message string |
| 302 | }{ |
| 303 | {enabled: workflowData.RateLimit != nil, message: "Using experimental feature: rate limiting"}, |
| 304 | {enabled: workflowData.SafeOutputs != nil && workflowData.SafeOutputs.DispatchRepository != nil, message: "Using experimental feature: dispatch-repository"}, |
| 305 | {enabled: workflowData.SafeOutputs != nil && workflowData.SafeOutputs.MergePullRequest != nil, message: "Using experimental feature: merge-pull-request"}, |
| 306 | {enabled: workflowData.SafeOutputs != nil && workflowData.SafeOutputs.ReplaceLabel != nil, message: "Using experimental feature: replace-label"}, |
| 307 | {enabled: workflowData.EngineConfig != nil && workflowData.EngineConfig.CopilotSDK, message: "Using experimental feature: engine.copilot-sdk"}, |
| 308 | {enabled: isFeatureEnabled(constants.GHAWDetectionFeatureFlag, workflowData), message: "Using experimental feature: gh-aw-detection"}, |
| 309 | {enabled: len(workflowData.LSP) > 0, message: "Using experimental feature: lsp"}, |
| 310 | } |
| 311 | for _, warning := range warnings { |
| 312 | if warning.enabled { |
| 313 | fmt.Fprintln(os.Stderr, console.FormatWarningMessage(warning.message)) |
| 314 | c.IncrementWarningCount() |
| 315 | } |
| 316 | } |
| 317 | if shouldWarnSparseInteractionCells(workflowData) { |
| 318 | fmt.Fprintln(os.Stderr, console.FormatWarningMessage( |
| 319 | "experiments: potential sparse interaction cells detected (multiple active experiments with weighted traffic). "+ |
| 320 | "Reporting should include factorial K1×K2 cell diagnostics before recommending promotion.")) |
| 321 | c.IncrementWarningCount() |
| 322 | } |
| 323 | } |
| 324 | |
| 325 | func (c *Compiler) validateGitHubToolsAndPermissions(workflowData *WorkflowData, markdownPath string, workflowPermissions *Permissions) error { |
| 326 | workflowLog.Printf("Validating GitHub tools against enabled toolsets") |