Skip to content

Add top-level max-cache-misses frontmatter support with env-managed default #40383

@pelikhan

Description

@pelikhan

Summary

Add support for a top-level frontmatter field for the AWF max cache miss guardrail.

Problem

gh-aw already tracks the upstream AWF apiProxy.maxCacheMisses field in the embedded AWF schema, but workflow authors do not appear to have a first-class top-level frontmatter field for configuring it, and there is no environment-manager-controlled default override similar to other compiler-managed guardrails.

Requested behavior

  • Add a top-level frontmatter field named max-cache-misses.
  • Map that field to the AWF guardrail apiProxy.maxCacheMisses in the generated AWF config.
  • Use a built-in default of 5 when the field is not explicitly set.
  • Add an environment variable managed by the environment manager that can override that default with another value.

Expected precedence

  1. max-cache-misses in workflow frontmatter
  2. Environment-manager-controlled default override
  3. Built-in default of 5

Notes

  • This should follow the existing pattern used for other top-level guardrails/defaults such as max AI credits / max turns where applicable.
  • The new default override should be surfaced through the environment manager and related docs so repo/org admins can manage it centrally.
  • The frontmatter field should be documented as mapping to the AWF max cache miss guardrail.

Acceptance criteria

  • Top-level max-cache-misses is accepted by workflow frontmatter/schema.
  • The compiler emits apiProxy.maxCacheMisses in AWF config from that top-level field.
  • When unset, the compiler/runtime path uses a default of 5.
  • An environment-manager-supported variable can override the default.
  • Relevant schema/docs/tests are updated.

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions