Skip to content

Failure Patterns

Pipeline Doctor ships with 88 regex-based failure patterns across 9 categories. When analyze_failure or suggest_fix is called, logs are matched against these patterns to classify the root cause and generate fix suggestions.

Categories

Dependency (20 patterns)

Package installation and resolution failures.

PatternConfidenceDescription
npm-eresolve95%npm peer dependency conflict
npm-missing-package90%npm package not found in registry
npm-engine-mismatch90%npm engine version mismatch
npm-lockfile-outdated85%npm lockfile out of sync
npm-audit-critical70%npm audit found critical vulnerabilities
yarn-resolution90%Yarn dependency resolution failure
yarn-integrity85%Yarn integrity check failed
pip-resolution90%pip version resolution failure
pip-missing-package90%Python package not found
pip-build-deps85%Missing build dependencies for Python package
go-module-resolution90%Go module resolution failure
go-checksum-mismatch90%Go module checksum mismatch
cargo-resolution90%Cargo/Rust dependency resolution failure
maven-dependency85%Maven dependency resolution failure
gradle-dependency85%Gradle dependency resolution failure
composer-dependency85%Composer/PHP dependency failure
nuget-dependency85%NuGet/.NET dependency failure
gem-dependency85%Ruby gem dependency failure
apt-package80%apt/dpkg package installation failure
brew-dependency80%Homebrew package installation failure

Environment (14 patterns)

Runtime environment and toolchain issues.

PatternConfidenceDescription
node-version-mismatch90%Node.js version mismatch
python-version-mismatch90%Python version mismatch
java-version-mismatch90%Java/JDK version mismatch
docker-not-running95%Docker daemon not running
docker-pull-failed85%Docker image pull failed
command-not-found90%Required command/tool not found
path-not-found85%PATH or binary not found
missing-system-lib80%Missing system library (ld/linker)
env-var-missing85%Required environment variable not set
xcode-select80%Xcode command line tools not installed
wasm-runtime75%WASM runtime not available
shell-syntax85%Shell script syntax error
git-not-configured80%Git identity not configured
locale-error70%Locale/encoding misconfiguration

Test (13 patterns)

Test execution and assertion failures.

PatternConfidenceDescription
jest-assertion90%Jest test assertion failure
jest-snapshot90%Jest snapshot mismatch
pytest-assertion90%pytest assertion failure
test-suite-failed85%Test suite failed to run
test-timeout85%Test timed out
db-connection-test80%Database connection failure in tests
test-fixture-missing80%Test fixture/factory missing
coverage-threshold75%Code coverage below threshold
mocha-failure85%Mocha test failure
rspec-failure85%RSpec test failure
junit-failure85%JUnit test failure
go-test-failure85%Go test failure
test-exit-code80%Non-zero exit code from test runner

Timeout (7 patterns)

Job, step, and operation timeout failures.

PatternConfidenceDescription
job-timeout95%Job exceeded maximum execution time
step-timeout90%Step timed out
operation-timeout85%Generic operation timeout
download-timeout80%Download/fetch operation timed out
api-timeout80%API call timed out
build-timeout85%Build process timed out
deploy-timeout85%Deployment timed out

Permission (8 patterns)

Authentication and authorization failures.

PatternConfidenceDescription
http-40390%HTTP 403 Forbidden
http-40190%HTTP 401 Unauthorized
token-scope85%Token lacks required scopes
npm-publish-auth90%npm publish authentication failure
docker-push-denied85%Docker push permission denied
ssh-key-denied90%SSH key authentication failed
github-token-permission85%GITHUB_TOKEN insufficient permissions
eacces-permission85%File system EACCES permission denied

Config (11 patterns)

Workflow configuration and syntax errors.

PatternConfidenceDescription
invalid-workflow-yaml95%Invalid workflow YAML file
unknown-action90%Referenced action not found
action-input-missing85%Required action input not provided
deprecated-set-output80%Deprecated ::set-output command
deprecated-save-state80%Deprecated ::save-state command
invalid-runs-on85%Invalid runner label
empty-matrix80%Empty matrix strategy
invalid-cron85%Invalid cron expression
workflow-syntax90%General workflow syntax error
action-version-missing75%Action missing version tag
env-context-error80%Expression/context syntax error

Resource (7 patterns)

Runner resource exhaustion.

PatternConfidenceDescription
oom-kill95%Out of memory (JavaScript heap)
exit-13790%Process killed (exit code 137 / OOM)
disk-full90%Disk space full
container-oom90%Container OOM killed
file-descriptor-limit80%File descriptor limit exceeded
inode-exhaustion75%Inode exhaustion
process-limit80%Process/thread limit exceeded

Network (8 patterns)

Network connectivity and external service failures.

PatternConfidenceDescription
dns-resolution90%DNS resolution failed
connection-refused85%Connection refused
ssl-certificate90%SSL/TLS certificate error
fetch-failed80%HTTP fetch/download failed
registry-timeout85%Package registry timeout
rate-limit85%API rate limit exceeded
proxy-error80%Proxy connection error
socket-hangup80%Socket hang up / connection reset

Unknown

When logs contain error indicators (e.g., error, failed, exit codes) but no pattern matches, the unknown category is returned with confidence 10%. The matched error lines are included so the AI assistant can still provide context-aware guidance.

Dynamic Fix Suggestions

Five patterns use dynamic suggestFix functions that extract context from the matched lines to generate more specific fixes. For example, the npm-eresolve pattern parses the conflicting package name from the While resolving: line and includes it in the fix suggestion.

This is why patterns are stored as TypeScript rather than JSON — dynamic functions can't be serialized as data.

Released under the MIT License.