Fixing Gramax CI pipelines

SkillDev tools

Use when CI jobs are red on a Gramax branch and need diagnosing/fixing — failed pipeline, broken build/tests, "почини пайплайн", "сломанные джобы", "failed CI jobs", "pipeline red", "fix the pipeline". Triages failed jobs, reproduces the harness locally, verifies a fix, lands it per branch policy.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Fixing Gramax CI pipelines skill

What this skill tells your AI

The instructions your AI receives, as published by gram-ax/gramax in .claude/skills/fix-pipelines/SKILL.md and read by ahel’s review.

Diagnose and repair red CI jobs on a branch of the Gramax product repo (ics/doc-reader, id 155). Reproduce the failing harness locally, verify the fix by re-running it green, then land it per the branch policy below.

Runs headless in CI (see the ci skill for the shared environment) or locally from the team workspace. Non-interactive when headless: decide and act.

Harness run recipes + env + gotchas live in REFERENCE.md — read it before reproducing anything.

Target branch

  • CI: $CI_COMMIT_BRANCH.
  • Local: current checked-out gramax branch — git -C gramax rev-parse --abbrev-ref HEAD.

Algorithm

1. Triage — what failed, since when, why

BRANCH=${CI_COMMIT_BRANCH:-$(git -C gramax rev-parse --abbrev-ref HEAD)}
# recent pipelines for the ref (spot the newest failed + last green)
glab api "projects/155/pipelines?ref=$BRANCH&per_page=20" \
  | jq -r '.[]|"\(.id)\t\(.status)\t\(.updated_at)\t\(.sha[0:8])"'
# failed jobs of a pipeline
glab api "projects/155/pipelines/$PID/jobs?per_page=100" \
  | jq -r '.[]|select(.status=="failed")|"\(.id)\t\(.name)\t\(.stage)"'
# decisive error — tail of the trace
glab api "projects/155/jobs/$JOB_ID/trace" | tail -50

Quote the shortest decisive error line. Compare against the last green pipeline to date the break and tie it to the commit that introduced it.

Classify each failure into one root cause:

  • code bug — an app-source change broke the build or a test.
  • test bug — the test is wrong/stale; product code is fine.
  • runner infra — OOM, timeout, native-module rebuild failure, image/tag mismatch, external-dependency outage.
  • flaky — non-deterministic; passes on re-run.

2. Reproduce locally

Follow the REFERENCE.md recipe for the failing harness. It documents the preflight (install-deps.sh, native better-sqlite3 rebuild, the gramax-core.node addon) and the exact run command per suite. Confirm you see the same failure locally before touching code — can't reproduce → report the env gap, don't guess a fix.

3. Propose fix + verify

Apply the narrowest fix for the cause class (targeted guard at the call site, not a global/config change). Re-run that harness locally and confirm it goes green before landing.

4. Land the fix

Target branchCI / test fixApp-code fix
release/*, developpush directopen MR
any other branchpush directpush direct
  • App-code fix on release/*/develop → open an MR (title English, body Russian, ## Notes; use the merge-request skill). Everything else → push straight to the branch.
  • All writes bot-authored (GITLAB_CLAUDE_ACCESS_TOKEN) + initiator credit (.claude/scripts/gitlab-initiatorCo-Authored-By: <Full Name> <Email>).
  • Footer every commit/MR/comment with Assisted-By: <model display name>.

Cause → action

CauseAction
code bugfix source; land per table (MR on release/develop)
test bugfix/adjust the test; it's a CI/test fix → push direct
flakyretry the job first; patch only if it recurs; note it, don't guess a code change
runner infra (ours)fix CI config/resources (timeout, memory, native rebuild) → push direct
runner infra (external outage)report, do not patch — nothing to fix in our code

Red flags — stop

  • Pushing a fix you never reproduced/verified locally.
  • Patching product code for a flaky failure.
  • A broad global/config change to silence one job — prefer the narrowest layer.
  • Editing enterprise/ges harnesses — out of scope (see REFERENCE.md).

Signals

GitHub stars
602
Forks
25
Last commit
Aug 2026
Advanced
Catalog kind
skill
Gateway key
fix-pipelines
Source
github.com/gram-ax/gramax