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
CI failure in run #21219621737 caused by ANSI terminal escape sequences accidentally included in YAML workflow files. This issue was self-healing - the problematic commit was quickly superseded by subsequent commits that removed the escape codes.
CI workflow ran and failed at ~17:42:12 (js job failure)
Repository continued with normal development
By commit c4a0b67 (17:41:51), the ANSI codes were gone
Current main branch is clean (no ANSI escape sequences found)
Why it self-healed:
The repository appears to have a rapid commit cycle with multiple PRs being merged. The problematic YAML file was likely regenerated (via make recompile) by a subsequent PR that produced clean YAML without the escape codes.
Failed Jobs and Errors
Job: js (61050540090)
Status: failure
Likely error: YAML syntax validation failed due to unexpected characters
Note: Full job logs were inaccessible (403 permission error), but the diff analysis clearly shows the ANSI escape code injection.
Recommended Actions
Immediate (Already Resolved ✅)
✅ The issue self-resolved - current main branch has no ANSI escape sequences
- name: Check for ANSI escape sequencesrun: | if find .github/workflows -name "*.yml" -o -name "*.yaml" | xargs grep -P '\\x1b\\[[0-9;]*m'; then echo "ERROR: ANSI escape sequences found in YAML files" exit 1 fi
Update compiler to strip ANSI codes
Modify the workflow compiler in pkg/workflow/ to automatically strip ANSI escape sequences
Add test cases that verify ANSI codes are removed during compilation
Editor configuration guidance
Document in CONTRIBUTING.md that editors should not preserve ANSI escape codes
Recommend plaintext-only modes for editing YAML
Prevention Strategies
Root cause: Copy-paste operations from colored terminal output or ANSI-aware editors.
Prevention layers:
Detection: Pre-commit hooks to catch ANSI codes before commit
Validation: CI checks that fail fast on ANSI escape sequences
Sanitization: Compiler automatically strips ANSI codes during workflow generation
Education: Developer documentation about ANSI code hazards
AI Team Self-Improvement
Add to AGENTS.md or developer instructions:
### YAML File Editing - ANSI Escape Code Prevention**CRITICAL**: When editing or generating YAML workflow files (`.github/workflows/*.yml`, `*.lock.yml`):
1.**NEVER copy-paste from colored terminal output** - Always use `--no-color` or `2>&1 | cat` to strip colors
2.**Validate YAML before committing** - Run `python3 -c "import yaml; yaml.safe_load(open('file.yml'))"` to check syntax
3.**Check for invisible characters** - Use `cat -A file.yml | grep '\[m'` to detect ANSI escape sequences
4.**Run make recompile** - Always recompile workflows after editing .md files to regenerate clean .lock.yml files
**Example of safe command usage**:
```bash# ❌ BAD - May include ANSI color codes
npm view @github/copilot | tee output.txt
# ✅ GOOD - Strip colors before saving
npm view @github/copilot --no-color | tee output.txt
# OR
npm view @github/copilot 2>&1| cat | tee output.txt
Detection command:
# Check for ANSI escape sequences in workflow files
find .github/workflows -name "*.yml" -o -name "*.yaml"| xargs grep -P '\\x1b\\[[0-9;]*m'
## Historical Context
This is the **first recorded instance** of ANSI escape sequences breaking CI in this repository. The error pattern has been documented in `/tmp/gh-aw/cache-memory/patterns/ansi-escape-yaml.json` for future reference.
**Similar past failures**: None found in issue search
**Pattern signature**: `[m` characters at end of YAML string values, representing ANSI color reset codes (`\x1b[m`)
**Investigation data**: Full investigation details stored at `/tmp/gh-aw/cache-memory/investigations/2026-01-21-21219621737.json`
## Additional Notes
- This was a **transient failure** with automatic recovery
- No production impact (caught by CI before affecting end users)
- Demonstrates the value of CI validation catching subtle errors
- Highlights need for better ANSI code detection in the toolchain
> AI generated by [CI Failure Doctor](https://github.com/githubnext/gh-aw/actions/runs/21219703333)
>
> To add this workflow in your repository, run `gh aw add githubnext/agentics/workflows/ci-doctor.md@ea350161ad5dcc9624cf510f134c6a9e39a6f94d`. See [usage guide](https://githubnext.github.io/gh-aw/guides/packaging-imports/).
<!-- gh-aw-agentic-workflow: CI Failure Doctor, engine: copilot, run: https://github.com/githubnext/gh-aw/actions/runs/21219703333 -->
Summary
CI failure in run #21219621737 caused by ANSI terminal escape sequences accidentally included in YAML workflow files. This issue was self-healing - the problematic commit was quickly superseded by subsequent commits that removed the escape codes.
Failure Details
js(JavaScript linting/validation)Root Cause Analysis
The commit introduced ANSI escape sequences (
[m- color reset codes) into the compiled workflow YAML file:Affected lines in
.github/workflows/cli-version-checker.lock.yml:2. **REQUIRED**: Run 'make recompile' to update workflows (MUST be run after any constant changes)[m- **SAVE TO CACHE**: Store help outputs (main and all subcommands) and version check results in cache-memory[mThe
[mcharacters are ANSI escape codes (specifically,\x1b[mor ESC[m) used for resetting terminal colors. These were likely:These escape codes are invisible in many editors but break YAML parsing, causing the
jsjob to fail during workflow validation.Investigation Findings
What happened:
Why it self-healed:
The repository appears to have a rapid commit cycle with multiple PRs being merged. The problematic YAML file was likely regenerated (via
make recompile) by a subsequent PR that produced clean YAML without the escape codes.Failed Jobs and Errors
Job:
js(61050540090)Note: Full job logs were inaccessible (403 permission error), but the diff analysis clearly shows the ANSI escape code injection.
Recommended Actions
Immediate (Already Resolved ✅)
Prevention (Future Improvements)
Add YAML validation to pre-commit hooks
Add CI validation step before JS job
Update compiler to strip ANSI codes
pkg/workflow/to automatically strip ANSI escape sequencesEditor configuration guidance
Prevention Strategies
Root cause: Copy-paste operations from colored terminal output or ANSI-aware editors.
Prevention layers:
AI Team Self-Improvement
Add to AGENTS.md or developer instructions:
Detection command: