fix-failing-actions
Skill14 starsChanged 7 months agoMITView on GitHub
Diagnose and fix failing GitHub Actions workflows in the drift repository. Use when a CI run, security hygiene check, release workflow, or any other GitHub Actions job is red. Keywords: GitHub Actions, workflow failure, CI failure, failed run, failing check, red CI, workflow fix, gh run, action logs, pipeline error, failing job.
- Installs packages
In this repository41 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- llms.txtllms.txt
- brainstormingSkill
- drift-adr-workflowSkill
- drift-agent-prompt-authoringSkill
- drift-commit-pushSkill
- drift-dependency-updateSkill
- drift-docs-gap-fixSkill
- drift-evidence-artifact-authoringSkill
- drift-finding-message-authoringSkill
- drift-ground-truth-fixture-developmentSkill
- drift-mcp-repo-ops-usageSkill
- drift-pr-review-loopSkill
- drift-pr-reviewSkill
- drift-releaseSkill
- drift-risk-audit-artifact-updatesSkill
- drift-security-triageSkill
- drift-session-handover-authoringSkill
- drift-signal-development-full-lifecycleSkill
- grill-meSkill
- guard-src-drift-apiSkill
- guard-src-drift-commandsSkill
- guard-src-drift-ingestionSkill
- guard-src-drift-outputSkill
- guard-src-drift-signalsSkill
- guard-src-driftSkill
- improve-codebase-architectureSkill
- prd-to-issuesSkill
- self-improving-agentSkill
- simplify-and-hardenSkill
- skill-creatorSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- tddSkill
- test-driven-developmentSkill
- verification-before-completionSkill
- workspace-automation-orchestratorSkill
- write-a-prdSkill
- writing-plansSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. About 0 are common, 5 are distinctive, and 13 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
All workflows in this repo run on Windows runners (windows-latest) with PowerShell.
- Very specific: line 50
If you have a URL like https://github.com/mick-gsk/drift/actions/runs/12345678, extract the run ID (12345678) and use it below.
- Very specific: line 65
Parse the log output: Look for the first ##[error] or FAILED line — that is the root cause.
- Very specific: line 100
If auto-fix is not enough, inspect the flagged file and fix manually.
- Very specific: line 101
Do not add # noqa without a comment explaining why the rule is suppressed.
- Very specific: line 115
Import not found → add to mypy ignore_missing_imports or install the stub package (types-*)
- Distinctive: line 151
If the value is a real credential → remove it immediately, rotate the credential, and treat this as a security incident
- Very specific: line 152
If the value is a test fixture → add # pragma: allowlist secret on that exact line
- Very specific: line 153
If it was already annotated but the baseline is stale → update baseline: detect-secrets scan > .secrets.baseline
- Distinctive: line 180
If the check fails on a branch:
- Very specific: line 181
Verify the version is a clean SemVer string (no .dev, no extra suffixes unless intentional)
- Very specific: line 182
If pyproject.toml was manually edited → revert the version field
- Distinctive: line 183
If PSR left a malformed version → check the release workflow logs for the error
- Very specific: line 199
If a field was added to a model, ensure it is present in drift.output.schema.json or drift.schema.json.
- Very specific: line 241
No releasable commits since last tag → PSR skips without error.
- Distinctive: line 269
Before committing, run the equivalent of the failing CI step locally:
- Distinctive: line 285
Use the appropriate conventional commit type:
- Very specific: line 289
Update CHANGELOG.md under ### Fixed if this was a user-visible or CI-blocking bug.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Fix Failing GitHub Actions
When to Use
- A CI run on
mainor a PR is red - The release workflow failed
- A security hygiene, repo-guard, or labeler job failed
- You see a failed status check in a pull request
gh run listshows failed runs
Drift-Specific Context
All workflows in this repo run on Windows runners (windows-latest) with PowerShell.
Python is resolved dynamically via $env:PYTHON_BIN (set by a resolver step).
CI steps use make check equivalents split into:
ruff → mypy → pytest → drift analyze.
Key workflows and their failure modes:
| Workflow | File | Common Failures |
| CI | ci.yml | pytest, mypy, ruff, check_version.py, check_model_consistency.py |
| Security Hygiene | security-hygiene.yml | detect-secrets, actionlint, zizmor, pip-audit |
| Release | release.yml | PSR version bump, PyPI publish, tag conflicts |
| Validate Release | validate-release.yml | SemVer format, CHANGELOG missing entry |
| Docs | docs.yml | mkdocs build error, broken links |
| Docker | docker.yml | build error, push credentials |
| Repo Guard | repo-guard.yml | check_repo_hygiene.py blocklist violation |
| Install Smoke | install-smoke.yml | pip install failure, CLI entry point missing |
| Doc Consistency | doc-consistency.yml | version mismatch in docs |
Step 1: Identify the Failing Run
# List recent failed runs
gh run list --repo mick-gsk/drift --status failure --limit 10
# Or watch a specific run
gh run view <run-id> --repo mick-gsk/driftIf you have a URL like https://github.com/mick-gsk/drift/actions/runs/12345678,
extract the run ID (12345678) and use it below.
Step 2: Fetch the Failure Logs
# Show only the failing steps
gh run view <run-id> --repo mick-gsk/drift --log-failed
# Or full log for a specific job
gh run view <run-id> --repo mick-gsk/drift --logParse the log output: Look for the first ##[error] or FAILED line — that is the root cause.
Ignore everything after the first failure unless it looks like a separate independent failure.
Step 3: Classify the Failure
Match the error to one of these categories, then jump to the fix section:
| Pattern in Log | Category | Fix Section |
ruff check / E501, F401, F811 | Lint | §A |
mypy / error: / Incompatible types | Type error | §B |
FAILED tests/ / AssertionError | Test failure | §C |
detect-secrets / Potential secret | Secret scan | §D |
actionlint / yaml: | Workflow lint | §E |
check_version.py / SemVer | Version format | §F |
check_model_consistency.py | Model mismatch | §G |
check_repo_hygiene.py / blocklist | Repo hygiene | §H |
mkdocs / WARNING / 404 | Docs build | §I |
semantic-release / tag / PyPI | Release pipeline | §J |
pip install / No module named | Dependency | §K |
§A — Lint Failure (ruff)
# Reproduce locally
.venv\Scripts\ruff check src/ tests/
# Auto-fix safe issues
.venv\Scripts\ruff check src/ tests/ --fixIf auto-fix is not enough, inspect the flagged file and fix manually.
Do not add # noqa without a comment explaining why the rule is suppressed.
§B — Type Error (mypy)
# Reproduce locally
.venv\Scripts\python -m mypy src/driftTypical fixes:
- Missing return type annotation → add return type
Nonenot handled → addif x is None: returnguard- Import not found → add to
mypyignore_missing_importsor install the stub package (types-*) # type: ignoreis acceptable only when the upstream stub is missing and documented in a comment
§C — Test Failure (pytest)
# Reproduce the failing test locally
.venv\Scripts\python -m pytest tests/<failing_test_file>.py::test_name -v --tb=longChecklist:
- Is the failure a genuine regression introduced by the last commit?
- Is it a flaky test (timing, randomness, git state dependency)?
- Is a fixture broken? Run
tests/fixtures/inspection. - Did a signal or scoring change invalidate expected values?
For signal/scoring regressions: update the expected values in the fixture file or ground-truth fixture (tests/fixtures/ground_truth.py) if the change is intentional, and document in CHANGELOG.md.
For flaky tests: add @pytest.mark.flaky(reruns=2) only as a last resort; prefer fixing the root cause.
§D — Secret Scan Failure (detect-secrets)
This repo carries intentional test-fixture secrets (non-real values used in tests).
Each such literal must have # pragma: allowlist secret on the same line.
# Reproduce locally
pre-commit run --all-files detect-secretsFix:
- Open the flagged file and line
- If the value is a real credential → remove it immediately, rotate the credential, and treat this as a security incident
- If the value is a test fixture → add
# pragma: allowlist secreton that exact line - If it was already annotated but the baseline is stale → update baseline:
detect-secrets scan > .secrets.baseline
See SECURITY.md for incident escalation steps.
§E — Workflow Lint Failure (actionlint/zizmor)
# Reproduce locally (requires actionlint in PATH or pre-commit)
pre-commit run --all-files actionlint
pre-commit run --all-files zizmorCommon issues:
- Unquoted expression
${{ env.VAR }}without quotes in shell run step → wrap in"${{ env.VAR }}" - Using
set-output(deprecated) → replace withecho "name=value" >> $GITHUB_OUTPUT - Missing
permissions:block → add least-privilege permissions continue-on-errormasking real failures → evaluate whether the step should actually fail
§F — Version Format Failure
The version in pyproject.toml must be valid SemVer (MAJOR.MINOR.PATCH).
Do not manually edit pyproject.toml version — it is managed by PSR (python-semantic-release) in CI.
If the check fails on a branch:
- Verify the version is a clean SemVer string (no
.dev, no extra suffixes unless intentional) - If
pyproject.tomlwas manually edited → revert the version field - If PSR left a malformed version → check the release workflow logs for the error
.venv\Scripts\python scripts/check_version.py --check-semver§G — Model Consistency Failure
.venv\Scripts\python scripts/check_model_consistency.pyThis script checks that Pydantic models and CLI/output schemas are in sync.
Fix: update the model, schema, or the consistency script to reflect intentional changes.
If a field was added to a model, ensure it is present in drift.output.schema.json or drift.schema.json.
§H — Repo Hygiene Failure
.venv\Scripts\python scripts/check_repo_hygiene.py --config .github/repo-guard.blocklist --root-allowlist .github/repo-root-allowlistCommon causes:
- A blocked file path was accidentally committed (e.g.,
tagesplanung/, temp files) - A new root-level file was added that is not in the allowlist → add to
.github/repo-root-allowlist - A blocklist pattern now matches a legitimate file → review the blocklist before removing the entry
§I — Docs Build Failure (mkdocs)
.venv\Scripts\python -m mkdocs build --strict 2>&1Common issues:
- Broken internal link → fix the
[text](path)reference - Missing nav entry in
mkdocs.yml→ add the page - Jinja2 template error in
overrides/→ check the template syntax mkdocs-materialversion incompatibility → checkpyproject.tomlconstraint
§J — Release Pipeline Failure
Do not run PSR manually unless CI is unavailable and the maintainer requests it.
CI release is triggered on push to main via .github/workflows/release.yml.
Diagnostic steps:
gh run view <release-run-id> --repo mick-gsk/drift --log-failedCommon issues:
- No releasable commits since last tag → PSR skips without error; verify with
semantic-release version --print - PyPI token expired or missing → secret
PYPI_API_TOKENmust be rotated in repo Settings → Secrets - Tag conflict → a tag already exists for the computed version; check with
git tag -l | sort -V | tail -5 - Merge conflict in PSR's own release commit → rebase and retry the push
Local fallback (only on maintainer request):
python scripts/release_automation.py --full-release§K — Dependency / Install Failure
# Reproduce locally
pip install -e ".[dev]"Common issues:
- New dependency added to
pyproject.tomlbut not yet inuv.lock→ runuv lockand commit the lockfile - Transitive dependency yanked on PyPI → pin to last working version + add comment
No module named 'X'during tests → addXto[project.optional-dependencies.dev]
Step 4: Verify the Fix Locally
Before committing, run the equivalent of the failing CI step locally:
# For most CI failures
make check
# Or targeted:
.venv\Scripts\ruff check src/ tests/ # lint
.venv\Scripts\python -m mypy src/drift # types
make test-fast # tests (schnell, ohne @pytest.mark.slow)Step 5: Commit and Report
Use the appropriate conventional commit type:
fix: resolve <failing-workflow> failure: <root cause summary>
Update CHANGELOG.md under ### Fixed if this was a user-visible or CI-blocking bug.
Do not push autonomously. Present the fix and wait for maintainer approval. See the drift-commit-push skill for the full push gate checklist.
Quick Triage Cheat Sheet
gh run list --status failure --limit 5 → find the run
gh run view <id> --log-failed → read the error
→ classify (§A–§K)
make check → verify fix locally
git add + git commit -m "fix: ..." → stage fixDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

