Skip to content

fix(schema-consistency-checker): replace max-turns with max-effective-tokens 20M and reduce turn waste#31258

Merged
pelikhan merged 3 commits into
mainfrom
copilot/deep-report-fix-schema-checker
May 9, 2026
Merged

fix(schema-consistency-checker): replace max-turns with max-effective-tokens 20M and reduce turn waste#31258
pelikhan merged 3 commits into
mainfrom
copilot/deep-report-fix-schema-checker

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 9, 2026

The schema-consistency-checker has been failing error_max_turns on 5/7 days. The one successful run (May 6) consumed 101 turns — 68% over the 60-turn cap.

Changes

  • Replaced max-turns with harness.budget.max-effective-tokens: 20000000 — switches from a turn-count budget to a 20 M token budget, giving the workflow reliable headroom without an arbitrary turn ceiling
  • Merged Step 0 + Step 1 into a single bash command — schema-diff and strategy-cache are now read in one tool call instead of two, saving a turn on every run:
    echo "=== SCHEMA DIFF ===" && cat /tmp/gh-aw/agent/schema-diff.json && \
    echo "=== STRATEGIES ===" && \
    ([ -f /tmp/gh-aw/cache-memory/strategies.json ] && cat /tmp/gh-aw/cache-memory/strategies.json || echo "No strategies cached yet")
  • Added "Turn Budget" section — explicit guidance to batch bash calls, stop at 3+ findings, prioritize field_gaps (pre-computed, zero discovery cost), and skip low-signal categories rather than exhaustively covering all four areas every run
  • Recompiled lock file — removes --max-turns CLI flag and GH_AW_MAX_TURNS env var; updates GH_AW_MAX_EFFECTIVE_TOKENS to "20000000"

[!WARNING]

…efficiency guidance

The workflow was hitting the 60-turn limit on 5/7 days; the one
successful run (May 6) used 101 turns. Changes:
- Raise max-turns: 60 → 120 in frontmatter
- Add "Turn Budget" section encouraging batched bash calls
- Merge schema-diff + strategy-cache read into one Step 0 command
- Fix indentation in the combined bash example
- Clarify that for-loop field names are placeholders from field_gaps
- Renumber steps (6 → 5 after merging Step 0/1)
- Recompile lock file

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/1c3adc73-1057-42a0-a18a-053cc476418d

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix max-turns failures in Schema Consistency Checker fix(schema-consistency-checker): raise max-turns 60→120 and reduce turn waste May 9, 2026
Copilot AI requested a review from gh-aw-bot May 9, 2026 18:47
@pelikhan
Copy link
Copy Markdown
Collaborator

pelikhan commented May 9, 2026

@copilot remove max-turns and replace with max-effective-tokens 20M

…-tokens 20M

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 9, 2026

@copilot remove max-turns and replace with max-effective-tokens 20M

Done — max-turns removed and replaced with harness.budget.max-effective-tokens: 20000000 in both the workflow definition and the compiled lock file (commit fix(schema-consistency-checker): replace max-turns with max-effective-tokens 20M).

Copilot AI changed the title fix(schema-consistency-checker): raise max-turns 60→120 and reduce turn waste fix(schema-consistency-checker): replace max-turns with max-effective-tokens 20M and reduce turn waste May 9, 2026
Copilot AI requested a review from pelikhan May 9, 2026 19:08
@pelikhan pelikhan marked this pull request as ready for review May 9, 2026 19:11
Copilot AI review requested due to automatic review settings May 9, 2026 19:11
@pelikhan pelikhan merged commit 147e9d4 into main May 9, 2026
1 check passed
@pelikhan pelikhan deleted the copilot/deep-report-fix-schema-checker branch May 9, 2026 19:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the schema-consistency-checker workflow configuration to reduce failures caused by hitting execution limits, primarily by shifting from a turn-based cap to an effective-token budget and by reducing wasted turns in the prompt instructions.

Changes:

  • Swaps the workflow budgeting approach from engine.max-turns to an effective-token budget and adds guidance to conserve turns/tool calls.
  • Merges the “read pre-computed data” and “load strategies” steps into a single batched bash command in the instructions.
  • Recompiles the workflow lock file to remove --max-turns / GH_AW_MAX_TURNS and update the effective-token budget env var.
Show a summary per file
File Description
.github/workflows/schema-consistency-checker.md Updates workflow frontmatter and prompt instructions to change budgeting strategy and reduce tool-call waste.
.github/workflows/schema-consistency-checker.lock.yml Recompiled lock to remove max-turns wiring and update effective-token budget configuration.

Copilot's findings

Tip

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

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

Comment on lines +13 to +15
harness:
budget:
max-effective-tokens: 20000000
Comment on lines +290 to +292
## Turn Budget

You have a maximum turn budget. **Spend turns wisely**:
Comment on lines 1172 to 1175
GH_AW_MISSING_DATA_REPORT_AS_FAILURE: "true"
GH_AW_TIMEOUT_MINUTES: "30"
GH_AW_MAX_EFFECTIVE_TOKENS: "10000000"
GH_AW_MAX_EFFECTIVE_TOKENS: "20000000"
GH_AW_CACHE_MEMORY_ENABLED: "true"
Sign up for free to 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.

[deep-report] Schema Consistency Checker max-turns failures continuing — no fix shipped after #30960

4 participants