komatikai/Trailhead

Release readiness gate for GitHub PRs — waits for CI, scores code risk, checks production health, and blocks merges that are not release-ready.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
github-tokenGitHub token for PR analysis and comments. Defaults to the automatic workflow token.no${{ github.token }}
risk-thresholdBlock the PR if the risk score exceeds this value (0-100).no70
warn-thresholdAdd a warning if the risk score exceeds this value. Defaults to risk-threshold minus 15.no""
health-check-urlsComma-separated URLs to health-check before scoring (omit for risk-only mode).no""
fail-modeError mode when Trailhead fails. Default is env-aware: production=closed, others=open.no""
override-fail-modeGoverned override for fail-mode (open|closed). Requires reason/owner/ticket/expiry inputs.no""
override-risk-thresholdGoverned override for risk-threshold (0-100). Requires reason/owner/ticket/expiry inputs.no""
override-warn-thresholdGoverned override for warn-threshold (0-100). Requires reason/owner/ticket/expiry inputs.no""
override-reasonRequired when any override is set. Human-readable reason for temporary policy override.no""
override-ownerRequired when any override is set. Owner accountable for the override.no""
override-ticketRequired when any override is set. Linked change ticket (Jira/GitHub issue/etc.).no""
override-expires-atRequired when any override is set. ISO-8601 expiry timestamp for the override.no""
self-healAttempt to auto-repair failing tests before blocking (requires TRAILHEAD_TEST_FAILURES env).nofalse
add-risk-labelsAdd risk-level labels (trailhead:low-risk, etc.) to the PR. Requires pull-requests: write.notrue
reviewers-on-riskComma-separated GitHub usernames to request review from when decision is warn or block.no""
webhook-urlURL to POST evaluation results to (Slack, Discord, or custom endpoint). Omit to disable.no""
webhook-eventsComma-separated webhook triggers. Legacy gate decisions: allow, warn, block. Semantic agent events: trailhead.blocked, trailhead.warn_high_risk, trailhead.ready, trailhead.loop_exceeded.nowarn,block
trailhead-api-keyTrailhead Cloud API key — auto-configures evaluation store URL and auth. Replaces evaluation-store-url + evaluation-store-secret for cloud tier.no""
evaluation-store-urlURL to POST evaluations for historical trend analysis. Omit to disable (or use trailhead-api-key for Trailhead Cloud).no""
evaluation-store-secretBearer token for authenticating with the evaluation store endpoint. Not needed when trailhead-api-key is set.no""
evaluation-store-retriesNumber of retry attempts when POST to evaluation-store-url fails with transient errors (default 3).no3
disable-cloud-upsellSuppress the Trailhead Cloud upsell/quota footer line in the check summary (shown by default when no trailhead-api-key is set, or when the Cloud API reports quota/billing state).nofalse
dora-metricsCompute DORA-5 metrics (deployment frequency, change failure rate, lead time, FDRT, rework rate) alongside the gate evaluation.nofalse
dora-environmentSpecific deployment environment to use for DORA metrics (e.g. 'production'). Uses Deployments API when set.no""
environmentTarget deployment environment. Used for per-environment threshold overrides from .trailhead.yml.no""
gate-modeGate mode: release-ready (composite CI+risk), advisory (never blocks), or risk-only (v3 compat). Overrides .trailhead.yml gate.mode when set.no""
wait-for-checksPoll GitHub Checks API until required checks complete or timeout. Defaults to true in release-ready mode when gate-mode input is set.no""
wait-timeout-minutesMaximum minutes to wait for required CI checks when wait-for-checks is enabled.no30
ci-manifest-pathPath to ci-manifest.json from a prior workflow job (path-filter skip semantics). See docs/ci-manifest.md.no""
ci-external-status-urlURL to fetch external CI status JSON (GitLab/CircleCI webhook store). Supports {sha} placeholder.no""
ci-external-status-secretBearer token for ci-external-status-url when the status endpoint requires auth.no""
gitlab-api-urlGitLab API base URL (default https://gitlab.com/api/v4). Used with gitlab-token and gitlab-project-id.no""
gitlab-tokenGitLab private token for polling pipeline job status (E17.1).no""
gitlab-project-idGitLab project ID or URL-encoded path for pipeline status polling.no""
circleci-tokenCircleCI API token for polling workflow job status (E17.2).no""
circleci-project-slugCircleCI project slug (e.g. gh/org/repo) for workflow status polling.no""
check-nameGitHub check run name. Defaults to 'Trailhead — Release Ready' in release-ready mode, 'Trailhead' in risk-only mode.no""
agent-briefAgent remediation brief in PR comments: off, collapsed (default for agent PRs), or expanded. Omit to use .trailhead.yml gate.agent_brief or provenance-based default.no""
submission-gateEnable Gate 1 agent submission checks (mock placeholders, artifact integrity, secrets, etc.). Default off; also enable via .trailhead.yml submission.enabled.nofalse
security-gateEnable GitHub Code Scanning alert integration as a risk factor. Set to 'false' to disable.notrue
canary-webhook-secretHMAC secret for verifying deploy outcome webhooks (Vercel/generic).no""
otel-endpointOTLP HTTP endpoint to export evaluation spans to (e.g. https://otel.example.com:4318/v1/traces). Omit to disable.no""
otel-headersAuth headers for the OTLP endpoint as key=value pairs, comma-separated.no""
api-keyAPI key for remote enrichment via a Trailhead cloud endpoint. Omit for local-only mode.no""
credit-meter-urlKomatik credit-meter-ingest URL for deploy_check billing (e.g. https://<project>.supabase.co/functions/v1/credit-meter-ingest). Also KOMATIK_CREDIT_METER_URL.no""
credit-meter-secretShared secret for credit-meter-ingest (x-komatik-meter-secret header). Prefer KOMATIK_CREDIT_METER_SECRET env/secret.no""
credit-meter-shadowRecord shadow deploy_check credits without debiting balance (default true until credit_apps.enforced for trailhead).notrue
credit-meter-enforceWhen true and credit meter returns allowed:false, emit a blocking warning. Does not block the gate unless paired with strict policy (fail-open default).nofalse
autofixWhen true, commit auto-fixes for autofix-eligible findings (e.g. contract_integrity catalog stubs) to the PR's HEAD branch. Default false = dry-run (plan only, logged). Requires contents:write and a non-fork PR.nofalse
cross-repo-tokenToken with write access to the repos that OWN dangling cross-repo contract APIs. Enables the contract_integrity cross-repo PR opener (ADR-010) to open declaration PRs in the owning repo. The default GITHUB_TOKEN is scoped to the current repo only, so a PAT or GitHub App token is required. Without it the opener stays in dry-run.no""
cross-repo-openerSet to 'false' to disable the cross-repo PR opener even when configured. Default enabled (the opener still requires submission.contract_integrity.cross_repo_opener.enabled, an api_owners map, and a cross-repo-token to actually open PRs).notrue
evaluate-prEvaluate a specific PR by number instead of the triggering event's PR. Enables backfill / on-demand re-evaluation of historical PRs (open, closed, or merged) with the current engine version — driven from workflow_dispatch or a direct `node dist/index.js` run. The diff, author history, age, and provenance are fetched from the GitHub API by PR number, so no checkout of the PR is required. In this mode the gate only scores and persists the evaluation; PR comments, labels, reviewer requests, self-heal, and autofix are skipped. Requires github-token.no""
namedescription
health-scoreInfrastructure health score (0-100). 100 when no health checks are configured.
risk-scoreCode risk score (0-100). Higher means riskier.
gate-decisionGate decision: allow, warn, or block.
release-readyComposite release readiness (true/false). Set when gate mode reads CI checks.
report-urlURL to the full evaluation report (only set when using a remote API).
evaluation-jsonFull gate evaluation as JSON for downstream workflow steps.
cross-repo-opener-jsonCross-repo PR opener result as JSON (ADR-010): opened/dry-run/exists outcomes per owning repo, plus unresolved dangling contract refs.
verdict-jsonVersioned trailhead.verdict.v1 payload (stable collector contract).
rollout-readiness-jsonRollout readiness summary (go/review/hold) derived from the evaluation.
dora-deployment-frequencyDORA deployment frequency (e.g. '4.2 per week'). Only set when dora-metrics is true.
dora-change-failure-rateDORA change failure rate percentage (e.g. '8.3%'). Only set when dora-metrics is true.
dora-lead-timeDORA lead time to change (e.g. '2.1 hours'). Only set when dora-metrics is true.
dora-fdrtDORA failed deployment recovery time. Only set when dora-metrics is true.
dora-rework-rateDORA change rework rate percentage. Only set when dora-metrics is true.
dora-ratingOverall DORA-5 rating: Elite, High, Medium, or Low. Only set when dora-metrics is true.
dora-jsonFull DORA-5 metrics as JSON. Only set when dora-metrics is true.
security-alerts-jsonCode scanning alert summary as JSON. Only set when security-gate is enabled and alerts exist.
environmentThe deployment environment used for this evaluation.