You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The terminology for creating Copilot coding agent work items has been updated from "agent task" to "agent session" to better reflect their purpose and avoid confusion with other task concepts.
@@ -455,10 +466,11 @@ Run `gh aw fix` to automatically update your workflow files to use the new termi
455
466
#### Replace removed `app:` with `github-app:`
456
467
457
468
The deprecated `app:` workflow frontmatter field was removed and replaced with
458
-
`github-app:`. Workflows still using `app:` will now fail validation.
469
+
`github-app:`. Workflows still using top-level `app:` or nested `app:` auth
470
+
blocks will now fail validation.
459
471
460
472
**Migration:**
461
-
- Replace `app:` with `github-app:`
473
+
- Replace `app:` with `github-app:` everywhere in workflow frontmatter
462
474
- Run `gh aw fix` to apply the codemod automatically
463
475
464
476
#### Replace `supportsLLMGateway` flag with `llmGatewayPort`
# ADR-42794: Extend `app-to-github-app` Codemod to Cover Top-Level `app:` Key
2
+
3
+
**Date**: 2026-07-01
4
+
**Status**: Draft
5
+
**Deciders**: pelikhan, copilot-swe-agent
6
+
7
+
---
8
+
9
+
### Context
10
+
11
+
The `gh aw fix` command provides automated codemods to help users migrate their workflow frontmatter across breaking changes. A previous breaking change renamed the `app:` frontmatter field to `github-app:`, and a codemod was implemented to automate that rename. However, the codemod only handled `app:` when it appeared nested under `tools.github`, `safe-outputs`, or `checkout` blocks — it did not handle the top-level `app:` key. Users whose workflows used the top-level `app:` auth configuration would run `gh aw fix` and see no changes applied, then encounter validation failures when the field was rejected by the tooling. This gap was surfaced through a daily breaking-change audit.
12
+
13
+
### Decision
14
+
15
+
We will extend the `hasDeprecatedAppField` detection function and the `renameAppToGitHubApp` rewrite function in `pkg/cli/codemod_github_app.go` to also detect and rename a top-level `app:` key in workflow YAML frontmatter. The top-level check uses the existing `isTopLevelKey` helper (shared frontmatter key detection logic) and is evaluated before the nested-section checks to avoid double-processing. This preserves the existing behavior for nested locations while closing the coverage gap.
16
+
17
+
### Alternatives Considered
18
+
19
+
#### Alternative 1: Document-only migration (no codemod for top-level)
20
+
21
+
Rather than extending the codemod, we could have documented the top-level `app:` rename in the migration guide and relied on users to make the change manually. This was rejected because the entire purpose of `gh aw fix` is to automate breaking-change migrations, and leaving one common configuration location uncovered would undermine user trust in the tool and create inconsistent migration outcomes.
22
+
23
+
#### Alternative 2: Generic "rename any `app:` key" approach
24
+
25
+
An alternative was to rename every occurrence of `app:` in any position within the frontmatter, without checking whether it is at the top level or inside a specific section. This was rejected because it would be too broad: it could incorrectly rename `app:` keys that appear inside unrelated nested structures, or inside the workflow body rather than the frontmatter, leading to false positives.
26
+
27
+
### Consequences
28
+
29
+
#### Positive
30
+
-`gh aw fix` now covers all known locations of the deprecated `app:` field, giving users a fully automated migration path for this breaking change.
31
+
- Regression tests (`codemod_github_app_test.go` and `fix_command_test.go`) were added for top-level rename coverage, increasing confidence that this behavior does not regress in future changes.
32
+
33
+
#### Negative
34
+
- The `hasDeprecatedAppField` and `renameAppToGitHubApp` functions are now more complex, with an explicit ordering dependency: top-level checks run before nested-section checks.
35
+
- Future contributors adding new `app:` rename locations must understand this ordering, which is not self-documenting.
36
+
37
+
#### Neutral
38
+
- The top-level check reuses the existing `isTopLevelKey` shared helper, avoiding any new YAML parsing logic.
39
+
- Changeset and CHANGELOG documentation was updated to reflect that both top-level and nested `app:` locations are affected by the breaking change.
40
+
41
+
---
42
+
43
+
*ADR created by [adr-writer agent]. Review and finalize before changing status from Draft to Accepted.*
0 commit comments