Skip to content

Remove firewall.effective-token-steering frontmatter key - #32161

Merged
pelikhan merged 2 commits into
mainfrom
copilot/remove-frontmatter-firewall-effective-token-steeri
May 14, 2026
Merged

Remove firewall.effective-token-steering frontmatter key#32161
pelikhan merged 2 commits into
mainfrom
copilot/remove-frontmatter-firewall-effective-token-steeri

Conversation

CopilotAI commented May 14, 2026

Copy link
Copy Markdown
Contributor

✨ Enhancement

Token steering is now on by default — the opt-in firewall.effective-token-steering key is removed. To disable budget enforcement and token steering together, set max-effective-tokens to any negative value.

# Before: explicit opt-in requiredfirewall:
effective-token-steering: truemax-effective-tokens: 5000000# After: steering on by default; use negative to disable bothmax-effective-tokens: -1# disables budget enforcement AND token steering

What does this improve?
Eliminates a redundant knob — steering behaviour was already tied to the ET budget, so a separate boolean was unnecessary friction.

Implementation approach:

  • Schema — removed the firewall top-level key entirely; max-effective-tokens now accepts negative integers (previously minimum: 1)
  • Compiler — removed EnableTokenSteering from EngineConfig, parseEffectiveTokenSteering, and extractEffectiveTokenSteering; awf_config.go now derives enableTokenSteering from maxEffectiveTokens >= 0
  • Negative sentinelparseMaxEffectiveTokensValue passes negatives through; GetMaxEffectiveTokens uses == 0 (not <= 0) as the "not configured" sentinel; a negative value zeroes the AWF budget field (omitted via omitempty) and suppresses steering
  • Workflow files — stripped firewall.effective-token-steering: true from 32 workflow files; refreshed all corresponding .lock.yml frontmatter hashes
  • Tests & docs — updated schema, engine-config, AWF-config, and orchestrator tests; updated reference/network.md and reference/frontmatter.md

… by default, negative max-effective-tokens to disable
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
CopilotAI requested a review from pelikhanMay 14, 2026 15:03
@pelikhanpelikhan reopened this May 14, 2026
@pelikhan
pelikhan marked this pull request as ready for review May 14, 2026 15:27
CopilotAI review requested due to automatic review settings May 14, 2026 15:27

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the firewall.effective-token-steering opt-in and makes token steering default behavior, using negative max-effective-tokens values as the disable sentinel.

Changes:

  • Removed EnableTokenSteering parsing/storage and derives AWF token steering from the effective token budget.
  • Updated schema/tests/docs for negative max-effective-tokens and removed the top-level firewall schema key.
  • Removed the old frontmatter key from workflow files and refreshed corresponding lock metadata.
Show a summary per file
FileDescription
pkg/workflow/engine.goRemoves token-steering config field and updates ET parsing/default behavior.
pkg/workflow/engine_config_test.goUpdates engine config tests for negative ET sentinel.
pkg/workflow/compiler_orchestrator_engine.goPreserves negative ET values through engine/import setup.
pkg/workflow/compiler_orchestrator_engine_test.goUpdates preservation test for negative ET values.
pkg/workflow/awf_config.goEnables token steering by default and omits budget when disabled.
pkg/workflow/awf_config_test.goUpdates AWF config tests for default steering and negative disable.
pkg/parser/schemas/main_workflow_schema.jsonAllows negative ET values and removes top-level firewall.
pkg/parser/schema_test.goUpdates schema validation test for negative ET values.
docs/src/content/docs/reference/network.mdDocuments default token steering and disable sentinel.
docs/src/content/docs/reference/frontmatter.mdDocuments negative max-effective-tokens.
.github/workflows/daily-mcp-concurrency-analysis.mdRemoves old steering opt-in frontmatter.
.github/workflows/daily-mcp-concurrency-analysis.lock.ymlRefreshes lock metadata hash.
.github/workflows/daily-malicious-code-scan.mdRemoves old steering opt-in frontmatter.
.github/workflows/daily-malicious-code-scan.lock.ymlRefreshes lock metadata hash.
.github/workflows/daily-issues-report.mdRemoves old steering opt-in frontmatter.
.github/workflows/daily-issues-report.lock.ymlRefreshes lock metadata hash.
.github/workflows/daily-hippo-learn.mdRemoves old steering opt-in frontmatter.
.github/workflows/daily-hippo-learn.lock.ymlRefreshes lock metadata hash.
.github/workflows/daily-grafana-otel-instrumentation-advisor.mdRemoves old steering opt-in frontmatter.
.github/workflows/daily-grafana-otel-instrumentation-advisor.lock.ymlRefreshes lock metadata hash.
.github/workflows/daily-geo-optimizer.mdRemoves old steering opt-in frontmatter.
.github/workflows/daily-geo-optimizer.lock.ymlRefreshes lock metadata hash.
.github/workflows/daily-function-namer.mdRemoves old steering opt-in frontmatter.
.github/workflows/daily-function-namer.lock.ymlRefreshes lock metadata hash.
.github/workflows/daily-firewall-report.mdRemoves old steering opt-in frontmatter.
.github/workflows/daily-firewall-report.lock.ymlRefreshes lock metadata hash.
.github/workflows/daily-file-diet.mdRemoves old steering opt-in frontmatter.
.github/workflows/daily-file-diet.lock.ymlRefreshes lock metadata hash.
.github/workflows/daily-fact.mdRemoves old steering opt-in frontmatter.
.github/workflows/daily-fact.lock.ymlRefreshes lock metadata hash.
.github/workflows/daily-experiment-report.mdRemoves old steering opt-in frontmatter.
.github/workflows/daily-experiment-report.lock.ymlRefreshes lock metadata hash.
.github/workflows/daily-doc-updater.mdRemoves old steering opt-in frontmatter.
.github/workflows/daily-doc-updater.lock.ymlRefreshes lock metadata hash.
.github/workflows/daily-doc-healer.mdRemoves old steering opt-in frontmatter.
.github/workflows/daily-doc-healer.lock.ymlRefreshes lock metadata hash.
.github/workflows/daily-compiler-threat-spec-optimizer.mdRemoves old steering opt-in frontmatter.
.github/workflows/daily-compiler-threat-spec-optimizer.lock.ymlRefreshes lock metadata hash.
.github/workflows/daily-compiler-quality.mdRemoves old steering opt-in frontmatter.
.github/workflows/daily-compiler-quality.lock.ymlRefreshes lock metadata hash.
.github/workflows/daily-community-attribution.mdRemoves old steering opt-in frontmatter.
.github/workflows/daily-community-attribution.lock.ymlRefreshes lock metadata hash.
.github/workflows/daily-code-metrics.mdRemoves old steering opt-in frontmatter.
.github/workflows/daily-code-metrics.lock.ymlRefreshes lock metadata hash.
.github/workflows/daily-cli-tools-tester.mdRemoves old steering opt-in frontmatter.
.github/workflows/daily-cli-tools-tester.lock.ymlRefreshes lock metadata hash.
.github/workflows/daily-cli-performance.mdRemoves old steering opt-in frontmatter.
.github/workflows/daily-cli-performance.lock.ymlRefreshes lock metadata hash.
.github/workflows/daily-choice-test.mdRemoves old steering opt-in frontmatter.
.github/workflows/daily-choice-test.lock.ymlRefreshes lock metadata hash.
.github/workflows/daily-caveman-optimizer.mdRemoves old steering opt-in frontmatter.
.github/workflows/daily-caveman-optimizer.lock.ymlRefreshes lock metadata hash.
.github/workflows/daily-cache-strategy-analyzer.mdRemoves old steering opt-in frontmatter.
.github/workflows/daily-cache-strategy-analyzer.lock.ymlRefreshes lock metadata hash.
.github/workflows/daily-aw-cross-repo-compile-check.mdRemoves old steering opt-in frontmatter.
.github/workflows/daily-aw-cross-repo-compile-check.lock.ymlRefreshes lock metadata hash.
.github/workflows/daily-astrostylelite-markdown-spellcheck.mdRemoves old steering opt-in frontmatter.
.github/workflows/daily-astrostylelite-markdown-spellcheck.lock.ymlRefreshes lock metadata hash.
.github/workflows/daily-assign-issue-to-user.mdRemoves old steering opt-in frontmatter.
.github/workflows/daily-assign-issue-to-user.lock.ymlRefreshes lock metadata hash.
.github/workflows/daily-architecture-diagram.mdRemoves old steering opt-in frontmatter.
.github/workflows/daily-architecture-diagram.lock.ymlRefreshes lock metadata hash.
.github/workflows/daily-agentrx-trace-optimizer.mdRemoves old steering opt-in frontmatter.
.github/workflows/daily-agentrx-trace-optimizer.lock.ymlRefreshes lock metadata hash.
.github/workflows/cloclo.mdRemoves old steering opt-in frontmatter.
.github/workflows/cloclo.lock.ymlRefreshes lock metadata hash.
.github/workflows/brave.mdRemoves old steering opt-in frontmatter.
.github/workflows/brave.lock.ymlRefreshes lock metadata hash.
.github/workflows/archie.mdRemoves old steering opt-in frontmatter.
.github/workflows/archie.lock.ymlRefreshes lock metadata hash.
.github/workflows/approach-validator.mdRemoves old steering opt-in frontmatter.
.github/workflows/approach-validator.lock.ymlRefreshes lock metadata hash.
.github/workflows/ace-editor.mdRemoves old steering opt-in frontmatter.
.github/workflows/ace-editor.lock.ymlRefreshes lock metadata hash.
.changeset/patch-bump-awf-v0-25-44.mdUpdates release note text for token steering change.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 75/75 changed files
  • Comments generated: 3

Comment on lines 309 to 312
if engineConfig.MaxEffectiveTokens == 0 && importsResult.MergedMaxEffectiveTokens != "" {
var importedMaxTokens any
if err := json.Unmarshal([]byte(importsResult.MergedMaxEffectiveTokens), &importedMaxTokens); err == nil {
if parsed := parseMaxEffectiveTokensValue(importedMaxTokens); parsed > 0 {
---

Bump default `gh-aw-firewall` to `v0.25.44` and add compiler/frontmatter support for `firewall.effective-token-steering` mapped to AWF `apiProxy.enableTokenSteering`.
Bump default `gh-aw-firewall` to `v0.25.44`. Token steering (`apiProxy.enableTokenSteering`) is now enabled by default; the `firewall.effective-token-steering` frontmatter key has been removed. Set `max-effective-tokens` to a negative value to disable both budget enforcement and token steering.
"type": "integer",
"minimum": 1,
"description": "Maximum effective-token (ET) budget for AWF API proxy enforcement."
"not": {"enum": [0]},
@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot review all comments and pull request review comments. Handle the boundary max-effective-tokens: 0, or negative should turn off the feature.

…ero schema test; fix changeset
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

CopilotAI commented May 14, 2026

Copy link
Copy Markdown
ContributorAuthor

@copilot review all comments and pull request review comments. Handle the boundary max-effective-tokens: 0, or negative should turn off the feature.

Addressed all three review points in commit fix: import path handles negative max-effective-tokens; add integer-zero schema test; fix changeset:

  1. Import path (compiler_orchestrator_engine.go:312): Changed parsed > 0parsed != 0 so a negative value (the disable sentinel) from an imported shared workflow is correctly propagated — zero stays as the "not configured" indicator and is never applied from imports.

  2. Schema regression test (pkg/parser/schema_test.go): Added TestValidateMainWorkflowFrontmatterWithSchemaAndLocation_MaxEffectiveTokensIntegerZeroInvalid to confirm that integer 0 is rejected at the schema level (separate from the existing string "0" test).

  3. Changeset (.changeset/patch-bump-awf-v0-25-44.md): Removed the stale "Bump default gh-aw-firewall to v0.25.44" claim — the current default is already v0.25.46.

@pelikhan
pelikhan merged commit 0e1696f into mainMay 14, 2026
@pelikhan
pelikhan deleted the copilot/remove-frontmatter-firewall-effective-token-steeri branch May 14, 2026 17:05
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@pelikhan