Skip to content

docs(ci): explain drift-gate failure semantics and badges - #362

Merged
vibgrate-team merged 2 commits into
mainfrom
cursor/github-actions-drift-gate-docs-6211
Oct 6, 2026
Merged

vibgrate-team merged 2 commits into
mainfrom
cursor/github-actions-drift-gate-docs-6211

Conversation

@vibgrate-team

@vibgrate-team vibgrate-team commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Teams copying a Vibgrate drift gate into CI could see the workflow YAML and still not tell when the job fails, when it only warns, which release to pin, or how a DriftScore badge is added to a README.

examples/github-actions/README.md is now enough to add a basic gate to an empty repository:

  • Copy-paste workflow matching driftscore-ci.yml, installing pinned @vibgrate/cli@2026.1005.1 and running vg scan.
  • Exit table for --fail-on error|warn, --drift-budget, --drift-worsening, and driftBudget.mode warn / enforce / shadow. Exit 2 fails the GitHub Actions job. Warn and shadow print the breach and exit 0.
  • Release pins for the CLI, the composite Action tag vibgrate-action/v2026.1005.1, and the scanner image-tag. Unpinned npx @vibgrate/cli tracks npm latest.
  • Hosted DriftScore badge markdown from the public badge URL scheme, plus the JSON artifact field drift.score for runs that stay credential-free.

The example stays local: contents: read, no VIBGRATE_DSN, no secrets. The report is uploaded with if: always() because the JSON is written before a gate exits.

Related issues

Closes #152

Checklist

  • pnpm test passes
  • pnpm lint is clean
  • pnpm typecheck is clean
  • Docs updated (README / DOCS / ARCHITECTURE) where behavior changed
  • Determinism preserved — identical input still produces identical graph.json / report output (content-hashed IDs, stable sorts; no time, randomness, or filesystem-order dependence)
  • No proprietary or internal references — public, Apache-2.0 content only
  • Commits use Conventional Commits and are signed off (git commit -s, DCO)

Notes for reviewers

Documentation only. Gate behaviour is taken from vg scan and driftBudget as they work today (src/reporting/commands/scan.ts, src/reporting/drift-budget-gate.ts). The badge section uses the public URL scheme at https://vibgrate.com/badges; this workflow does not publish a badge and does not invent one.

Locally this revision passed pnpm typecheck, pnpm lint (0 errors; existing unused-var warnings in src/ only), and pnpm test (5008 passed). CI still runs the same checks.

Open in Web Open in Cursor 

cursoragent and others added 2 commits October 5, 2026 12:27
Document when vg scan exits 2 versus warns, which release to pin in
GitHub Actions, and how to embed the hosted DriftScore badge.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: vibgrate-team <vibgrate-team@users.noreply.github.com>
Keep the CI drift-gate failure semantics, release pins, and DriftScore
badge notes while taking the rest of main.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: vibgrate-team <vibgrate-team@users.noreply.github.com>
@vibgrate-team
vibgrate-team marked this pull request as ready for review October 6, 2026 12:21
@vibgrate-team
vibgrate-team merged commit 55fc603 into main Oct 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GitHub Action: expand CI drift-gate example with failure semantics and badges

2 participants