-
Notifications
You must be signed in to change notification settings - Fork 328
Bug: duplicate 'Generate GitHub App token' step in activation job when checkout + tools.github used with top-level github-app #24573
Copy link
Copy link
Closed
Labels
Description
Summary
Workflows that combine all three of the following fail to compile with v0.66.1:
- A top-level
github-app:configuration - A
checkout:entry for a cross-repository checkout tools.github:(e.g.mode: remote)
The error emitted by the compiler is:
error: failed to generate YAML: failed to build and validate jobs: duplicate step validation failed:
compiler bug: duplicate step 'Generate GitHub App token' found in job 'activation' (positions 5 and 20)
The phrase "compiler bug" is part of the error string itself — the compiler's own assertion fires on the output it just generated.
Root Cause
PR #24251 moved GitHub App token minting from the agent job to the activation job. It introduced two independent minting operations that both end up in the activation job:
github-mcp-app-token— minted fortools.githubwhen the top-levelgithub-app:is used as fallbackcheckout-app-token-0— minted for the cross-repocheckout:when the top-levelgithub-app:is used as fallback
Both steps are assigned name: "Generate GitHub App token". The duplicate-name validation then rejects the workflow.
Minimal Reproduction
# workflow.md
github-app:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
repositories: ["side-repo", "target-repo"]
checkout:
- repository: myorg/target-repo
ref: main
tools:
github:
mode: remote
toolsets: [default]
on:
schedule: daily
workflow_dispatch:
engine:
id: claude
network:
allowed:
- defaultsgh aw compile workflow.md
# ✗ workflow.md: compiler bug: duplicate step 'Generate GitHub App token'
# found in job 'activation' (positions 5 and N)
Expected Behavior
The workflow compiles successfully — as it did with v0.65.5. The two token-minting steps in the activation job should either:
- have distinct names (e.g.
"Generate GitHub App token for checkout"), or - be deduplicated when both operations can share a single token.
Additional Notes
- Workflows with only
checkout:or onlytools.github:(but not both) compile fine - Removing the top-level
github-app:and specifying it explicitly undertools.github.github-app:does not help — both steps still share the same display name - All affected workflows continue to run correctly from their v0.65.5 lock files; the issue is compile-only
- Related: Bug:
github_mcp_app_tokenactivation output silently skipped — regression introduced in #24251 #24569 (the masked-token job-output regression also introduced by Move github-app token minting to activation job #24251)
Version
gh aw version v0.66.1
This issue was generated by Claude Code (claude-sonnet-4-6).
Reactions are currently unavailable
Metadata
Metadata
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.