Skip to content

CI: XAML style / sync-gen drift comment is skipped when diff exceeds 400 lines #23187

Closed

Description

@MartinZikmund

Current behavior

The XAML Style Check and WinAppSDK Sync Generator Check workflows are supposed to post a PR comment when drift is detected, with instructions to apply the fix. However, when the drift exceeds ~400 lines, the Detect drift step itself fails with exit code 141, which causes the subsequent Post drift comment, Upload patch artifact, and Fail if drift detected steps to be skipped (their if: steps.drift.outputs.drift == 'true' condition is never satisfied because the step did not complete).

Example: https://github.com/unoplatform/uno/actions/runs/25309801791/job/74193786071?pr=23180 — drift was detected but no PR comment was posted.

Root cause

The Detect drift step runs under bash --noprofile --norc -e -o pipefail and contains:

git -c color.ui=always diff --cached | head -n 400

When the diff is larger than 400 lines, head closes its stdin after reading 400 lines. git diff continues writing, gets SIGPIPE on the next write, and exits 141. With pipefail the pipeline returns 141, and set -e aborts the step.

The same line exists in winappsdk-sync-check.yml and is just as vulnerable; it has not tripped yet because past drifts have stayed under 400 lines.

Fix

Append || true to the truncated-diff pipeline so SIGPIPE from head closing early does not abort the step.

Files

  • .github/workflows/xaml-style-check.yml
  • .github/workflows/winappsdk-sync-check.yml

Activity

  1. added a commit that references this issue on May 5, 2026
    7fab414
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions