Skip to content

CI Failure Doctor🏥 CI Failure Investigation - Run #5341 #1174

@github-actions

Description

@github-actions

Summary

The CI workflow failed due to two distinct linting errors across the ls-lint and pre-commit jobs.

  1. ls-lint failed because newly added .md files in .github/workflows/ do not conform to the globally enforced SCREAMING_SNAKE_CASE rule.
  2. pre-commit failed because yamlfix received an invalid regular expression (**/*.lock.yml) for its --exclude argument, causing a Python re.error.

Failure Details

Root Cause Analysis

1. Lint / pre-commit Job Failure
In commit bd8e942c1d80aac90df4113f7982c7fa4a7d2911, the .pre-commit-config.yaml file was modified to add -e '**/*.lock.yml' arguments to the yamlfix hook. However, yamlfix relies on Python's re module for exclusion patterns. The **/*.lock.yml pattern is a glob, not a valid regular expression. Evaluating it throws re.error: nothing to repeat at position 0.

2. Lint / ls-lint Job Failure
The project's .github/lint/.ls-lint.yaml configuration enforces SCREAMING_SNAKE_CASE for all .md files globally. Recent PRs introduced Markdown files in the .github/workflows/ directory (e.g., ci-doctor.md, agents-md-maintenance.md) that use kebab-case, directly violating the ls-lint rules.

Failed Jobs and Errors

  • Lint / pre-commit: yamlfix hook fails during pre-commit run --all-files execution due to an invalid regex **/*.lock.yml failing regex compilation (re.error: nothing to repeat at position 0).
  • Lint / ls-lint: File name linting fails on multiple .md files located under .github/workflows/ and .github/workflows/shared/ for not adhering to SCREAMING_SNAKE_CASE.

Investigation Findings

  • Running Python's re.compile('**/*.lock.yml') validates the crash in yamlfix.
  • ls-lint fails over 10 Markdown files newly created/moved into the workflow directories without matching the global SCREAMING_SNAKE_CASE requirement originally intended for README.md, AGENTS.md, etc.

Recommended Actions

  • Fix the yamlfix hook in .pre-commit-config.yaml by replacing the args array exclusions with the native pre-commit hook exclude parameter (which uses PCRE/Python regex under the hood safely) or by converting the globs to valid python regexes (e.g. .*\.lock\.yml$).
  • Update .github/lint/.ls-lint.yaml to either allow kebab-case for .md files, or specify a directory-specific rule allowing kebab-case for .md inside .github/workflows/.

Prevention Strategies

  • Regex vs Glob Confusion: Ensure that tools expecting regular expressions are not supplied with bash-style glob patterns.
  • Lint Rule Scoping: When adding new directories that follow different naming conventions (e.g., GitHub Actions workflows), ensure that global lint rules (like ls-lint) are updated to ignore them or accept their specific naming convention.

AI Team Self-Improvement

When adding exclusion patterns to python-based tools (like yamlfix, ruff, etc.), verify whether the tool expects a glob pattern or a regular expression. **/*.xyz is a glob; the regex equivalent is .*\.xyz$.
When creating new Markdown files within scoped directories (like .github/workflows/), check existing naming conventions or configurations (.ls-lint.yaml) to ensure compatibility. If a file-naming rule restricts files to SCREAMING_SNAKE_CASE, either update the rule's scope or match the convention.

Historical Context

Similar failures often occur when glob patterns are incorrectly supplied to Python-based tools expecting regex, or when newly introduced file types/locations conflict with rigid legacy linting rules.

Note

🔒 Integrity filtering filtered 1 item

Integrity filtering activated and filtered the following item during workflow execution.
This happens when a tool call accesses a resource that does not meet the required integrity or secrecy level of the workflow.

  • issue:#unknown (search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)

Generated by CI Failure Doctor ·

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/ci-doctor.md@main

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