FailTrace is a Go command-line tool for investigating a specific failed GitHub Actions run and attempting to recreate its failure locally. Rather than starting with a workflow file, it takes a run, job, or attempt URL and identifies the commit, job, matrix values, runner, and failed step. It reads the workflow definition from the exact commit and uses the logs to report the command that ran, a focused excerpt around the first error, and a diagnosis. Supported signals include failing tests, build and dependency errors, lint problems, generated-file differences, timeouts, and memory exhaustion. Its reports also flag complications such as missing secrets, service containers, expired logs, or runs that failed before a job started.
The three commands provide progressively more action: inspect explains the failure, plan describes how to reproduce it without running anything, and repro runs the supported reproduction in Docker. Plans account for details that commonly cause local results to differ from CI, including the precise pull-request merge commit, runner image, toolchain versions, shell, environment, and composite-action steps. They also warn when artifacts from another job will be absent or when reproduction is only partial. The project is in early development: repro currently handles Linux jobs whose failed step is a shell script, while inspect and plan cover broader cases. A GitHub token is required even for public repositories because the Actions logs API requires authentication; credentials can come from environment variables or the GitHub CLI.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.