Skip to content

[q] perf(go-logger): cap turns at 50 and pre-compute candidate file list #31857

Closed

Description

@github-actions

Q Workflow Optimization Report

Issues Found (from live data)

Go Logger Enhancement (run #25778334111)

  • Run Date: 2026-05-13T04:29:21Z
  • Duration: 11.6 minutes | Cost: ~$5.81 | Turns: 92
  • Engine: Claude (claude-opus-4-7)
  • Agentic Assessments (from gh-aw audit):
    • 🔴 HIGH resource_heavy_for_domain: turns=92 tool_types=45 duration=11m36s write_actions=0 → Compare to similar runs and trim unnecessary turns
    • 🟡 LOW partially_reducible: agentic_fraction=0.50 turns=92 → ~50% of turns were data-gathering (find, grep) that can move to deterministic pre-steps
Changes Made

Go Logger Enhancement (.github/workflows/go-logger.md)

  1. Added max-turns: 50 — Changed engine: claude (simple form) to structured form:

    engine:
      id: claude
      max-turns: 50

    Prevents runaway sessions like the 92-turn run. 50 turns is generous for 5 files × ~8 turns each + overhead.

  2. Added deterministic pre-step — New Find candidate Go files step runs find and grep before the agent starts, writing results to /tmp/gh-aw/agent/candidate-files.txt. This eliminates ~46 agent turns previously spent on file discovery.

  3. Updated prompt — Added "Phase 1: Use Pre-Computed File List" section instructing the agent to cat /tmp/gh-aw/agent/candidate-files.txt instead of running find/grep commands itself. Also updated "Task Steps § 1" accordingly.

Expected Improvements

Metric Before Expected After
Turns 92 ~30–40
Cost ~$5.81 ~$2–3
Duration 11.6m ~5–7m

Validation

All modified workflows compiled successfully using the compile tool from gh-aw MCP server:

  • ✅ go-logger — no errors, no warnings

Note: .lock.yml files will be regenerated automatically after merge.

References

🎩 Equipped by Q · ● 16.3M · ◷

  • expires on May 15, 2026, 4:54 AM UTC

Note

This was originally intended as a pull request, but the git push operation failed.

Workflow Run: View run details and download bundle artifact

The bundle file is available in the agent artifact in the workflow run linked above.

To create a pull request with the changes:

# Download the artifact from the workflow run
gh run download 25778857959 -n agent -D /tmp/agent-25778857959

# Fetch the bundle into a local branch
git fetch /tmp/agent-25778857959/aw-q-go-logger-max-turns.bundle refs/heads/q/go-logger-max-turns:refs/heads/q/go-logger-max-turns-9aebfb81ed8f0280
git checkout q/go-logger-max-turns-9aebfb81ed8f0280

# Push the branch to origin
git push origin q/go-logger-max-turns-9aebfb81ed8f0280

# Create the pull request
gh pr create --title '[q] perf(go-logger): cap turns at 50 and pre-compute candidate file list' --base main --head q/go-logger-max-turns-9aebfb81ed8f0280 --repo github/gh-aw

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions