Automated summary
A guide to debugging and extending the AegisNex GitHub Actions pipeline, covering common failure modes and how to add new CI steps.
Strengths
- Documents six concrete failure modes with symptom, cause and fix for each (BOM, missing dependencies, Windows vs Linux paths, timeouts, circular imports, mypy)
- Ships ready-to-paste YAML snippets for adding linting, type checking and build verification steps
- Includes an ordered seven-step debugging procedure from reading the error to reproducing locally on Linux/WSL
Limitations
- Tightly coupled to the AegisNex repository (pipeline layout, src/dashboard and src/intelligence modules), so it is barely reusable elsewhere
- The document appears cut off mid-sentence on the final debugging step
- Assumes Python 3.12 on ubuntu-latest and does not address multi-OS or multi-version matrices
Reach for it when a GitHub Actions job in the AegisNex project fails, or when a lint, type-check or build-verification step must be added to that pipeline.
Skip it for CI pipelines in other projects, or for general GitHub Actions questions unrelated to AegisNex's structure and conventions.
Security analysis
SafeThe skill is purely documentation about debugging a GitHub Actions CI pipeline. It contains no executable commands, no curl|sh, no file deletion, no credential handling, and no obfuscated payloads. The only shell snippets are benign diagnostic examples (pytest, ruff, mypy, pip install). No declared allowed-tools further limits scope. There is no meaningful execution or exfiltration risk.
No concerns found
How this analysis is madeExamples
The AegisNex CI run failed with `ERROR: unexpected line: '\ufeff[pytest]'`. Diagnose the root cause and tell me how to fix the file and verify it has no BOM.My pull request fails in CI with `ModuleNotFoundError: No module named 'X'` but the tests pass on my machine. Walk me through the debugging steps and update requirements.txt correctly.Add a ruff lint step and a mypy type-check step to .github/workflows/pipeline.yml for the AegisNex repo, following the existing pipeline conventions.name: ci-pipeline description: Patterns for debugging and extending the AegisNex GitHub Actions CI pipeline. Covers common failure modes, encoding issues, dependency problems, and how to add new CI steps. license: Complete terms in LICENSE.txt
CI Pipeline
You are the CI engineer for AegisNex. When a pipeline fails, you diagnose the root cause systematically rather than guessing. The pipeline lives at .github/workflows/pipeline.yml and runs on every push to main and every pull request.
Pipeline structure
The current pipeline runs on ubuntu-latest with Python 3.12:
actions/checkout@v4-- clones the repoactions/setup-python@v5-- installs Python 3.12pip install -r requirements.txt-- installs dependenciespytest -x -vv-- runs tests, stops on first failure
Common failure modes
1. File encoding issues (BOM)
Symptom: ERROR: unexpected line: '\ufeff[pytest]' or similar parse errors on config files.
Cause: File saved with UTF-8 BOM (\xef\xbb\xbf) instead of plain UTF-8. Windows editors sometimes add BOM automatically.
Fix: Rewrite the file without BOM. Verify with:
with open("filename.ini", "rb") as f:
raw = f.read(3)
assert raw != b"\xef\xbb\xbf", "BOM detected"
Prevention: The repo has .editorconfig enforcing charset = utf-8 and .gitattributes with * text=auto eol=lf. Never disable these.
2. Missing dependencies
Symptom: ModuleNotFoundError: No module named X
Cause: New dependency added to code but not to requirements.txt.
Fix: Add the dependency to requirements.txt with a pinned version. Check if it has C extensions that need system packages on Ubuntu.
3. Path mismatches
Symptom: Tests find wrong files, config not loaded, import errors.
Cause: Windows paths (\) vs Linux paths (/). Hardcoded absolute paths.
Fix: Always use pathlib.Path or os.path.join(). Never hardcode paths. The CI runs on Ubuntu -- test with python -m pytest locally on Linux or WSL.
4. Timeout
Symptom: Error: Process completed with exit code 143 or job cancelled after 6 hours.
Cause: Test hangs, infinite loop, or deadlock.
Fix: Add timeout to the pytest step:
- run: pytest -x -vv
timeout-minutes: 15
Check for unmocked network calls, blocking I/O in tests, or infinite loops in AI engine.
5. Import order / circular imports
Symptom: ImportError: cannot import name X from partially initialized module Y
Cause: Circular dependency between modules.
Fix: Move shared types to a separate module (types.py or state.py). Use TYPE_CHECKING imports for type hints. The intelligence engine uses lazy imports inside functions to avoid this -- follow that pattern.
6. Type checking failures
Symptom: mypy: error: Incompatible types in assignment
Cause: Type annotations do not match runtime usage.
Fix: Run mypy src/ locally first. Use # type: ignore[assignment] only with a comment explaining why.
How to add a new CI step
Adding a linting step
- name: Lint
run: |
pip install ruff
ruff check src/
Adding a type checking step
- name: Type check
run: |
pip install mypy
mypy src/ --ignore-missing-imports
Adding a build verification step
- name: Verify package
run: |
python -c "import src.dashboard"
python -c "import src.intelligence.graph"
Debugging a failed CI run
- Read the error message carefully -- the first error is usually the root cause.
- Check the step that failed -- was it checkout, install, or test?
- Reproduce locally -- run the exact same command on Linux (WSL or Docker).
- Check file encoding -- if the error mentions unexpected characters, check for BOM.
- Check paths -- if the error is FileNotFoundError, check for Windows vs Linux paths.
- Check dependencies -- if ModuleNotFoundError, verify requirements.txt.
- Check for hanging tests -- if timeout, add
--timeout=30to pytest.
AegisNex-specific CI considerations
- The AI engine imports are lazy (inside functions) to avoid loading LLM providers at import time. Do not change this pattern.
- SQLite databases (
ai_memory.db,aegisnex.db) are created at runtime. Tests must not depend on pre-existing databases. - Docker-dependent tests should be skipped in CI (
@pytest.mark.skipif) unless Docker is available. - The frontend (Next.js) is not tested in CI yet. Only Python tests run.
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/ci-pipeline-mrwakgc6/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/ci-pipeline-mrwakgc6' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/ci-pipeline-mrwakgc6/download' --output '.skill-downloads/ci-pipeline-mrwakgc6/SKILL.md.part' && mv '.skill-downloads/ci-pipeline-mrwakgc6/SKILL.md.part' '.skill-downloads/ci-pipeline-mrwakgc6/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/ci-pipeline-mrwakgc6/SKILL.md' && test -s '.skill-downloads/ci-pipeline-mrwakgc6/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/ci-pipeline' && cp -R '.skill-downloads/ci-pipeline-mrwakgc6' '.claude/skills/ci-pipeline'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/ci-pipeline-mrwakgc6'openskills read 'ci-pipeline-mrwakgc6'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/ci-pipeline-mrwakgc6/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
Configure a Chat Channel with SecretRefs
DevOps
Set up chat channels using non-interactive commands, with secrets only as SecretRefs. Covers gather, mutate, repair, and prove steps for reliable delivery.
Investigate ClickHouse CI Failures
DevOps
Investigate a ClickHouse CI failure end-to-end from a PR or S3 report URL. Fetches failed tests, classifies flaky vs real regression, and checks for existing issues/fixes.
Ansible PR Review
DevOps
Reviews an Ansible PR following the project's standardized process, including changelog checks, test coverage validation, and feedback tracking.