pre-push-gate-debugging

Diagnose and fix failing pre-push quality gate lanes using gate logs and single-lane runs.

2|Updated Jul 18, 2026
One-click install
npx skills add https://github.com/Arasz/ai-badger --skill pre-push-gate-debugging-arasz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pre-push-gate-debugging
Source: https://github.com/Arasz/ai-badger/tree/main/features/common/skills/pre-push-gate-debugging
Command: npx skills add https://github.com/Arasz/ai-badger --skill pre-push-gate-debugging-arasz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? A blocked git push from a heavy pre-push quality gate (lefthook hook running docs, unit, E2E, infra, and frontend lanes) is slow and opaque to debug: the hook buffers output, failures look like hangs, and re-running the whole gate wastes minutes per iteration. This Skill provides a systematic workflow to reproduce one failing lane, read the gate's own logs, and fix the real cause. ## Core Features & Use Cases - Log-first diagnosis: Read the gate's reproduce: command, per-lane logs, and progress.log timeline instead of diagnosing from buffered push output. - Single-lane iteration: Re-run only the failing lane (e.g. bun <script> api-e2e) for fast feedback, reserving full-gate runs for final verification. - Environment gotcha handling: Covers worktree node_modules and broken .venv shadowing, E2E cross-run state contamination on reused dev stacks, interpreter mismatches, and scoped vs full lane selection. - Use Case: Your push fails on the E2E lane with an orchestration ending failed and an empty error field. The Skill guides you to start the infra as the lane does, drive the flow with curl, and read the host's own logs where the full exception lives. ## Quick Start Ask the agent to debug why the pre-push gate is blocking your git push and reproduce the failing lane from the gate's logs.

Frequently Asked Questions about pre-push-gate-debugging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug a failing pre-push hook that blocks git push?

Read the gate's own logs first: the failure block prints a reproduce command for the failing lane and a log directory with per-lane output and a progress.log timeline. Re-run only that lane for fast iteration instead of the full gate.

How do I run a single lefthook pre-push lane instead of the whole gate?

Use the reproduce command printed in the failure block, typically `bun <script> <lane>` such as the api-e2e lane. Only re-run the full gate once the single lane passes, since whole-gate runs can take five minutes or more.

Why does my git push look hung with no output?

Piping push output buffers everything, so the lefthook banner never appears and the running gate looks like a network stall. Re-run the push unpiped or in the background and check the first lines for the hook banner.

Why do E2E tests pass alone but fail on a full gate run?

Reused dev stacks carry emulator state across runs, so durable orchestration instance IDs taken by a prior run cause 409s or silent dedupes later. Fix it by killing the reused stack so the lane starts fresh ephemeral volumes.

Why do gate lanes fail in a fresh git worktree?

A bare worktree has no node_modules, so tooling lanes fail with missing type definitions, and a broken worktree .venv can shadow the main checkout's good one. Symlink node_modules from the main checkout and delete the stray venv.

When is it acceptable to bypass the pre-push gate?

Use `VERIFY_SKIP=<lane>` when a lane is red due to another task's uncommitted files, after proving your diff is clean. `git push --no-verify` skips every lane and is only appropriate when the user has explicitly waived the gate.