GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - virling/ciwhy: Why did GitHub Actions fail, and is it flaky? The real error from raw job logs in one command

BranchesTags
Open more actions menu

Latest commit

 

History

35 Commits
35 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
action
action
 
 
bin
bin
 
 
src
src
 
 
test
test
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
action.yml
action.yml
 
 
package.json
package.json
 
 

Repository files navigation

ciwhy

Why did CI fail, and is it flaky? One command for GitHub Actions. Zero dependencies, uses the gh CLI you already have.

  • Finds the real error. Downloads the raw job log, strips ANSI codes and timestamps, and keeps only the error region: ##[error], Error:, FAIL, not ok, tracebacks, panics, exit codes.
  • Reads Node test runner output. Shows the failing TAP subtest and the # ... diagnostic lines the process printed near it, which gh run view --log-failed often hides.
  • Checks every attempt. A job that failed and then passed on re-run is still found.
  • Flaky verdict. flaky if the job passed on a later attempt or on another run of the same commit, new failure if it passed on the previous default branch run, otherwise unknown.
  • Re-run and wait. --rerun re-runs the failed jobs and tells you if they pass this time.

Install

npx @virling/ciwhy

Or npm install -g @virling/ciwhy to get ciwhy on your PATH.

Example

$ ciwhy 45871759993 --repo virling/agentmem
virling/agentmem  test run 45871759993  main 93de02f  2 attempts, success
https://github.com/virling/agentmem/actions/runs/45871759993

FAILED test (macos-latest, 18)  attempt 1  step: Run npm test
  flaky: passed on attempt 2 of this run
  https://github.com/virling/agentmem/actions/runs/45871759993/job/140088664991

    # warning: --depth is ignored in local clones; use file:// instead.
    # agentmem: spawnSync tar ENOTCONN
    --
    not ok 11 - guard-check cannot be bypassed by removing the guard, renaming, or unusual names
      location: 'file:///Users/runner/work/agentmem/agentmem/test/features.test.js:108:1'
      failureType: 'testCodeFailure'
      error: |-
        The input did not match the regular expression /error: src\/gen\/client\.ts/. Input:
        ''
      code: 'ERR_ASSERTION'
      ...
    --
    ##[error]Process completed with exit code 1.

Options

ciwhy                      latest failed run on the current branch
ciwhy <run-id|run-url>     a specific run (every attempt is checked)
ciwhy --pr <number>        latest failed run on the pull request's head commit
ciwhy --branch <name>      latest failed run on a branch

--repo owner/name          repository (default: the repo in the current folder)
--rerun                    re-run the failed jobs, wait, and report if they pass
--timeout <minutes>        how long --rerun waits (default 30)
--json                     machine-readable output
--markdown                 Markdown report, as posted on pull requests by the GitHub Action
--help

Exit code is 0 after a report, even when jobs failed. It is non-zero only for usage errors (2) or gh errors (1).

GitHub Action

When CI fails on a pull request, virling/ciwhy@v0 posts the report as a comment on the PR, and updates the same comment on later failures. The report also goes to the job summary.

For pull requests from branches in the same repository, add a job after your tests:

  ciwhy:
    needs: test
    if: failure() && github.event_name == 'pull_request'
    runs-on: ubuntu-latest
    permissions:
      actions: read
      pull-requests: write
    steps:
      - uses: virling/ciwhy@v0

Pull requests from forks get a read-only token, so they cannot comment. Use a separate workflow that runs after CI instead:

name: ciwhy

on:
  workflow_run:
    workflows: [test]
    types: [completed]

jobs:
  ciwhy:
    if: github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.event == 'pull_request'
    runs-on: ubuntu-latest
    permissions:
      actions: read
      pull-requests: write
    steps:
      - uses: virling/ciwhy@v0

Inputs, all optional:

  • run-id: the run to explain. Default: the run that triggered workflow_run, otherwise the current run.
  • github-token: default ${{ github.token }}.
  • comment: false to only write the job summary. Default true.

Requirements

  • Node.js 20 or newer
  • GitHub CLI (gh), authenticated with gh auth login

More tools from Virling

  • agentmem: project memory for AI coding agents, shared across Claude Code, Cursor, Codex and other MCP clients.
  • ccdoctor: checks your Claude Code setup: hooks, MCP servers and plugins that are registered but not working.
  • npmship: releases an npm package and verifies it landed on npm, in CI and on GitHub.
  • subagents: reviews what Claude Code subagents did in a session and flags repeated or wasted work.

License

PolyForm Noncommercial 1.0.0

About

Why did GitHub Actions fail, and is it flaky? The real error from raw job logs in one command

Resources

Readme
License
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.