Skip to content

[aw-compat] fix regression: empty features: block left after mcp-cli removal #30124

@github-actions

Description

@github-actions

Problem

The gh aw fix --write codemod that renames tools.mount-as-clistools.cli-proxy and removes features.mcp-cli leaves an empty features: key (null value) when mcp-cli was the only child.

This causes the post-fix recompile to fail with:

error: got null, want object. Expected format: {}

Reproduction

A workflow frontmatter before fix:

---
tools:
  mount-as-clis:
    - gh
features:
  mcp-cli: true
---

After gh aw fix --write:

---
tools:
  cli-proxy:
    - gh
features:
# null — mcp-cli was removed but parent key was not cleaned up
---

The compiler then fails on:

error: got null, want object. Expected format: {}

Observed in the wild

Medal-Social/Pilot went from 1 compile error → 3 compile errors after running fix --write. The 3 affected workflows:

  • changeset-ai-fallback.md
  • plan.md
  • pr-triage-agent.md

Expected behavior

When the mcp-cli removal codemod empties the features: block, it should either:

  1. Remove the features: key entirely, or
  2. Keep features: {} (empty object, which is valid)

Suggested fix

In the codemod that removes features.mcp-cli, after removal check if features is now empty and remove the parent key:

// After removing features.mcp-cli
if len(frontmatter.Features) == 0 {
    // Remove features key from YAML
    delete(node, "features")
}

References: §25311389054

Generated by Daily AW Cross-Repo Compile Check · ● 642.2K ·

  • expires on May 11, 2026, 9:44 AM UTC

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions