The serena-tools-to-shared-import codemod (v1.0.0) has two unhandled edge cases that leave workflows in a non-compiling state after gh aw fix --write is applied. Both cases were observed in the 2026-04-23 daily compatibility run against top-starred public repositories.
Found in daily run §24831382557.
Edge Case 1 — engine: block with additional sub-fields alongside tools.serena
Affected repo: microsoft/FluidFramework (~4.5k stars)
File: .github/workflows/duplicate-code-detector.md
The workflow had tools.serena nested inside engine: alongside other engine sub-fields (model:, id:):
# BEFORE fix
engine:
tools:
serena:
languages: ["typescript"]
model: gpt-5.2
id: copilot
After serena-tools-to-shared-import runs, it moves tools.serena to a top-level imports entry but does not preserve the sibling model: and id: fields. They end up at the wrong YAML level:
# AFTER fix (broken)
engine:
imports:
- uses: shared/mcp/serena.md
with:
languages: ["typescript"]
model: gpt-5.2 ← should be under engine:, now sibling of imports
id: copilot ← same problem
Compile error produced:
.../duplicate-code-detector.md:16:3: error: value is not allowed in this context
model: gpt-5.2
Fix: when the codemod removes tools.serena from engine:, it must retain any remaining engine: sub-fields at their correct indentation level. If engine: becomes empty after removing tools, it should be collapsed to engine: copilot (or removed if default).
Edge Case 2 — source:-pinned workflow with old tools.serena + new required languages schema
Affected repo: storybookjs/storybook (~84k stars)
File: .github/workflows/duplicate-code-detector.md
This workflow uses source: to track an upstream gh-aw workflow at a specific commit:
source: github/gh-aw/.github/workflows/duplicate-code-detector.md@852cb06ad52958b402ed982b69957ffc57ca0619
The codemod successfully transforms the local tools.serena: ['typescript'] into:
imports:
- uses: shared/mcp/serena.md
with:
languages: ["typescript"]
However, compile still fails:
error: import 'github/gh-aw/.github/workflows/shared/mcp/serena.md@main':
required 'with' input "languages" is missing (declared in import-schema)
The compiler resolves the source: pin and validates the upstream workflow at commit 852cb06. That commit predates the languages required-field addition to shared/mcp/serena.md. As a result, the compiled import chain includes a serena reference without languages.
Fix options:
- The codemod could also rewrite the
source: pin to a newer commit where the upstream workflow already uses the correct imports syntax.
- Alternatively, the schema validation for
source:-pinned workflows could be lenient about required fields in the pinned commit's import chain (treating missing inputs as warnings rather than errors for old pins).
Reproduction
# Clone either affected repo
git clone --depth 1 https://github.com/microsoft/FluidFramework
cd FluidFramework
gh aw fix --write
gh aw compile # Still fails
Impact
Both repos have high visibility: storybookjs/storybook (~84k stars) and microsoft/FluidFramework (~4.5k stars). Users who run gh aw fix --write will see the codemod claim success but then get compile failures — a confusing experience.
References:
Generated by Daily AW Cross-Repo Compile Check · ● 661.1K · ◷
The
serena-tools-to-shared-importcodemod (v1.0.0) has two unhandled edge cases that leave workflows in a non-compiling state aftergh aw fix --writeis applied. Both cases were observed in the 2026-04-23 daily compatibility run against top-starred public repositories.Found in daily run §24831382557.
Edge Case 1 —
engine:block with additional sub-fields alongsidetools.serenaAffected repo: microsoft/FluidFramework (~4.5k stars)
File:
.github/workflows/duplicate-code-detector.mdThe workflow had
tools.serenanested insideengine:alongside other engine sub-fields (model:,id:):After
serena-tools-to-shared-importruns, it movestools.serenato a top-levelimportsentry but does not preserve the siblingmodel:andid:fields. They end up at the wrong YAML level:Compile error produced:
Fix: when the codemod removes
tools.serenafromengine:, it must retain any remainingengine:sub-fields at their correct indentation level. Ifengine:becomes empty after removingtools, it should be collapsed toengine: copilot(or removed if default).Edge Case 2 —
source:-pinned workflow with oldtools.serena+ new requiredlanguagesschemaAffected repo: storybookjs/storybook (~84k stars)
File:
.github/workflows/duplicate-code-detector.mdThis workflow uses
source:to track an upstream gh-aw workflow at a specific commit:The codemod successfully transforms the local
tools.serena: ['typescript']into:However, compile still fails:
The compiler resolves the
source:pin and validates the upstream workflow at commit852cb06. That commit predates thelanguagesrequired-field addition toshared/mcp/serena.md. As a result, the compiled import chain includes a serena reference withoutlanguages.Fix options:
source:pin to a newer commit where the upstream workflow already uses the correctimportssyntax.source:-pinned workflows could be lenient about required fields in the pinned commit's import chain (treating missing inputs as warnings rather than errors for old pins).Reproduction
Impact
Both repos have high visibility: storybookjs/storybook (~84k stars) and microsoft/FluidFramework (~4.5k stars). Users who run
gh aw fix --writewill see the codemod claim success but then get compile failures — a confusing experience.References:
#28031