๐ ๏ธ Troubleshooting & Known Issues
A practical guide to diagnose and fix common issues with Ship Guard. Use this to quickly restore expected behavior during setup and operation.
๐ Quick Triage Checklistโ
- Is
.github/ship-guard.ymlpresent on the default branch? - Is the GitHub App installed on this repository with required scopes?
- Did you open/update a Pull Request (not a direct push to default branch)?
- Are branch protection rules configured if merges should be blocked?
- Are your rule
paths/excludePathstargeting the right files? - For AI rules, is
settings.enableAIReviewsenabled (if required)?
โ Common Symptoms โ Likely Causes โ Fixesโ
1) Review doesnโt run on PRsโ
- Likely causes:
- App not installed on the repo or missing permissions
- Missing/invalid
.github/ship-guard.yml - PR opened from a fork with restricted permissions
- Event not triggered (no new commits after config changes)
- Diagnostics:
- GitHub โ Repo โ Settings โ Installed GitHub Apps โ Confirm Ship Guard installed
- Check PR โ Checks tab โ See if the check is present/queued
- Validate YAML using an online linter
- Quick fixes:
- Install/enable the app for the repository
- Commit a valid
.github/ship-guard.ymlto the default branch - Push a new commit to retrigger checks
2) Checks show as passed, but rules didnโt runโ
- Likely causes:
paths/excludePathsfiltering everything out- Rules disabled via
enabled: false - Severity all set to
warning(and branch protection isnโt requiring checks)
- Diagnostics:
- Inspect
.github/ship-guard.ymlscoping - Temporarily remove
pathsfilters to test
- Inspect
- Quick fixes:
- Adjust glob patterns (start simple:
src/**) - Set severity to
errorfor blocking rules and configure branch protection
- Adjust glob patterns (start simple:
3) AI findings never appearโ
- Likely causes:
settings.enableAIReviews: false- AI safety limits too strict (
maxFilesPerReview,maxFileSizeKB,maxTokens) - Prompt too vague or out-of-scope
- Diagnostics:
- Check
settingsblock and AI rule parameters - Narrow the
pathsfor AI rules to the changed files
- Check
- Quick fixes:
- Enable AI reviews globally
- Lower strict limits temporarily; verify behavior; then tighten again
- Improve prompts; ask for structured JSON output
4) Too many comments/noisy outputโ
- Likely causes:
- Excessive rules or broad globs
maxFindingsormaxFindingsInCommentnot set
- Diagnostics:
- Review rule count and scope
- Quick fixes:
- Set
settings.maxFindingsandsettings.maxFindingsInComment - Consolidate findings into Check Run only by setting
disableComments: true
- Set
5) False positives (deterministic rules)โ
- Likely causes:
- Overbroad
termsor missingexcludePaths
- Overbroad
- Diagnostics:
- Check which files triggered findings and why
- Quick fixes:
- Add
excludePathsfor test/docs - Set
caseSensitive: falseoruseRegex: falseappropriately - Downgrade severity to
warningwhile tuning
- Add
6) RAG seems irrelevant (AI quotes wrong docs)โ
- Likely causes:
- Low-quality or outdated docs; poor weighting
rag_sourcesincludes noisy paths
- Diagnostics:
- Inspect RAG source list and weights
- Quick fixes:
- Prioritize ADRs/security docs with higher weights (
0.8โ1.0) - Remove broad patterns; prefer curated paths
- Keep docs current and concise
- Prioritize ADRs/security docs with higher weights (
7) Merges arenโt blocked despite errorsโ
- Likely causes:
- Branch protection is not configured
- Diagnostics:
- Repo โ Settings โ Branches โ Branch protection rules
- Quick fixes:
- Enable โRequire status checks to pass before mergingโ and select โShip Guardโ
- Require branches to be up to date before merging (recommended)
๐ Diagnostics & Loggingโ
-
GitHub PR โ Checks tab View Ship Guard check details, including summaries and any error traces.
-
GitHub PR โ Conversation tab Look for the Ship Guard bot comment with structured findings.
-
Configuration validation Use a YAML validator and compare against samples in
configuring-rules.mdandadvanced-configuration.md. -
Rule scoping test Temporarily restrict to a single file pattern known to change, e.g.:
paths:
- 'src/**/*.ts'
excludePaths: []
๐งฉ Self-Check: Minimal Working Configโ
version: 1
default_severity: error
rules:
- name: 'No TODOs'
condition: 'banned-terms'
severity: error
parameters:
terms: ['TODO', 'FIXME']
- name: 'AI: Basic error handling'
condition: 'ai-review'
severity: warning
paths: ['src/**']
parameters:
prompt: |
Check changed code for missing try/catch around async calls.
Return JSON items: { file, line, severity, summary, fix }
settings:
enableAIReviews: true
maxFindings: 25
maxFindingsInComment: 15
Commit this to the default branch and open a PR with a // TODO to confirm both deterministic and AI checks are active.
๐งฏ Quick Fix Recipesโ
-
Silence noisy paths:
excludePaths:
- '**/*.md'
- 'docs/**'
- '**/*.test.*' -
Reduce comment volume:
settings:
maxFindings: 20
maxFindingsInComment: 10
disableComments: false -
Tighten AI safety:
parameters:
maxTokens: 500
ragContext:
maxDocs: 3
similarityThreshold: 0.8
security:
allowSensitiveFiles: false
maxFilesPerReview: 10
enableContentFiltering: true
๐ Need Help?โ
- ๐ Full Getting Started Guide
- ๐ฌ Ask the Community
- ๐ง Email Support
- ๐ Bug Reports