effectiveStrictMode computes the effective strict mode for a workflow. Priority: CLI flag (c.strictMode) > frontmatter strict field > default (true). This should be used when emitting metadata/env vars to correctly reflect the workflow's strictness as inferred from the source (frontmatter).
(frontmatter map[string]any)
| 22 | // This should be used when emitting metadata/env vars to correctly reflect the |
| 23 | // workflow's strictness as inferred from the source (frontmatter). |
| 24 | func (c *Compiler) effectiveStrictMode(frontmatter map[string]any) bool { |
| 25 | if c.strictMode { |
| 26 | // CLI flag takes precedence |
| 27 | return true |
| 28 | } |
| 29 | if strictVal, exists := frontmatter["strict"]; exists { |
| 30 | if strictBool, ok := strictVal.(bool); ok { |
| 31 | return strictBool |
| 32 | } |
| 33 | } |
| 34 | // Default: strict mode is on when no explicit setting |
| 35 | return true |
| 36 | } |
| 37 | |
| 38 | // effectiveSafeUpdate returns true when safe update mode should be enforced for |
| 39 | // the given workflow. Safe update mode is equivalent to strict mode: it is |
no outgoing calls