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
{{ message }}
Repository navigation
cron: CI Health Check sends a false 'CI failing' alert on Windows (cmd.exe quoting, condition ignores exit code) #1921
On native Windows the CI Health Check cron task sends a false alert to the architect every 30 minutes:
CI Alert: currently failing on main: 'map' is not recognized as an internal or external command,
operable program or batch file.. Run `gh run list --limit 5` to investigate.
CI on main is green when these arrive (checked with gh run list --branch main on 2026-11-18).
Cause
.af-cron/ci-health.yaml:
command: gh run list --branch main --limit 10 --json workflowName,conclusion --jq 'group_by(.workflowName) | map(.[0]) | map(select(.conclusion == "failure")) | map(.workflowName) | join(", ")'condition: "output != ''"
Two faults:
Tower cron runs the command with exec, which on Windows is cmd.exe /d /s /c. cmd.exe does not treat single quotes as quotes, so the | inside the jq expression is a pipe to a program named map.
The condition is output != '', and a condition is evaluated on failed runs too, so the command's own error text is reported as the list of failing workflows. Any failure of the check (gh missing, not authenticated, network down) reads as "CI failing" on every platform.
Fix shape
Make the command work under both cmd.exe and a POSIX shell (quoting that both accept, or a small script the task invokes; the builder picks and says why).
Make the condition require a successful run, e.g. exitCode == 0 && output != '', so a broken check never reports as a CI failure. Decide whether a failed check should alert separately with its own wording.
Check the other task in .af-cron/ (team-update.yaml) and any cron example or template under codev-skeleton/ and the afx skill docs for the same single-quote pattern.
Acceptance
On Windows, with CI green on main, the task sends nothing; with a failing workflow it names the workflow.
On macOS/Linux behaviour is unchanged for the green and failing cases.
A failing command (e.g. gh unavailable) does not produce a "CI Alert: currently failing on main" message.
Related: #1919 (hides the cmd.exe window this task opens; does not change the shell).
Activity
amrmelsayed commentedon Nov 18, 2026
On it! Working on a fix now.
[Bugfix #1921] Fix: CI Health Check quoting works under cmd.exe; cond…
[Bugfix #1921] Test: shipped ci-health tasks parse under the platform…
[Bugfix #1921] Fix: regenerate shipped skill hashes for the afx skill…
[Bugfix #1921] Fix: CMAP feedback - cmd.exe inner-quote caveat in cro…
[Bugfix #1921] Thread: fix and PR phase notes
release notes: backfill Windows follow-ups, test-suite Tower guard, C…