Troubleshooting¶
Docs index · Getting started · Configuration
Webhooks and local setup¶
- 401
invalid signature:GITHUB_WEBHOOK_SECRETdiffers from the App's webhook secret (or from the onepnpm webhook:sendreads from.env). - Duplicate deliveries: GitHub redelivers on timeouts; the second delivery with the same
X-GitHub-Deliveryreturns200 {"status":"duplicate"}and enqueues nothing. A delivery that failed with 500 is rolled back, so redelivering it is processed normally. - Port 55432 already in use: another process holds it; stop it or change the host port in
docker-compose.ymlandDATABASE_URL/TEST_DATABASE_URL. run pnpm db:migrateon startup: the schema is behind; run the migration.Postgres not reachable ... run pnpm db:upfrom the integration tests: start the container.Invalid configuration:at startup: the message lists each bad variable by name with its rule (values are never printed). Common ones:GITHUB_APP_PRIVATE_KEY / GITHUB_APP_PRIVATE_KEY_PATH: set exactly one of them(ornot both),GITHUB_APP_PRIVATE_KEY_PATH: file cannot be read(runopenssl genrsa -out dev.pem 2048for a local run),GITHUB_WEBHOOK_SECRET: must be at least 16 characters.GITHUB_WEBHOOK_SECRET: is the .env.example placeholder: withNODE_ENV=productionthe shipped placeholder is refused. Generate a secret withopenssl rand -hex 32and set the same value on the App.- Nothing arrives from GitHub:
gh webhook forwarddoes not work for GitHub App webhooks. Usepnpm tunnel(smee, withSMEE_URLset), or ngrok / cloudflared pointed athttp://localhost:3000/webhooks/github. See github-app.md. - The server is unreachable from a container or another host:
.env.examplesetsHOST=127.0.0.1(loopback). UseHOST=0.0.0.0only inside a container. The config default whenHOSTis unset is0.0.0.0. /readyzanswers 503: the body says which ofdbandqueueiserror; check that Postgres is up (pnpm db:up) and thatDATABASE_URLpoints at it.
Cards, policy and crons¶
- Every card says unavailable: no credential is set (
ANTHROPIC_API_KEY,ANTHROPIC_AUTH_TOKENor federation), the federation token exchange is rejected (llm_auth: check the authentication history in the Claude Console, and that the token file rotates), the gateway atANTHROPIC_BASE_URLrejects the credential or the model ID (llm_auth,llm_bad_request), the model call failed or timed out, or the repository's daily token budget (GRAFT_LLM_DAILY_TOKEN_BUDGET) is used up. The card states the reason and the risk is at leastlogic. - The worker stops at startup after a cron change:
GRAFT_FEEDBACK_POLL_CRONandGRAFT_METRICS_ROLLUP_CRONare checked for shape only (5 fields of digits,*,/,,,-); pg-boss validates the expression itself atschedule()time. Useoffto disable a cron. - A startup error names a glob position:
GRAFT_INTENT_SENSITIVE_PATHSis validated with the same checks asgraft.yaml; the error gives the glob's 1-based position and the reason, never the value. See graft-yaml.md. - The
graft/policycheck is neutral even for "Would block": expected in Phase 0. Nothing is enforced.
Pilot and gate commands¶
run pnpm db:migratefrom anypnpm graftcommand: the schema is behind.- Exit code 2: usage or configuration error (a bad value names the variable only). 3: aborted (rate-limit wait above
--max-wait,--max-requests, a refused purge). 4:gate report --checkwith INSUFFICIENT DATA. See features/pilots-and-gate.md. pilot doctorwarns about 403s in thefeedbackcheck: the reviewer permission check was refused; does the App haveMetadata: read? Requested reviewers are then not eligible (fail closed).- Votes dropped as
not_reviewerafter deploying migration 0007: rows stored before it are unverified; runpnpm graft pilot sync-reviewers --installation <id> --since <date>.
Live e2e¶
The runbook has one section per failure code (preflight, guard_refusal, no_delivery, signature, card_timeout, llm_failure, neutral_violation, comment_ownership, sentinel_leak, doctor, permission_403, rate_limit, model_mismatch, budget): docs/e2e/runbook.md.