testing-governance-gates

Tests CI governance gates and automerge advisory versus required check behavior.

1|3|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/AIKAGRYA/dharma_swarm --skill testing-governance-gates-aikagrya
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: testing-governance-gates
Source: https://github.com/AIKAGRYA/dharma_swarm/tree/main/.agents/skills/testing-governance-gates
Command: npx skills add https://github.com/AIKAGRYA/dharma_swarm --skill testing-governance-gates-aikagrya

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Changes to CI workflows or governance contracts can silently break the advisory/required check split, letting governance failures block merges or required failures slip through. This Skill verifies that advisory checks only warn while required checks actually block merges. ## Core Features & Use Cases - Advisory-gate test: Runs synthetic check rollups through scripts/runtime/ci_truth.py to confirm governance failures produce a DEGRADED verdict with empty merge blockers. - Required-check control test: Proves the gate still blocks by failing a required check and expecting a FAIL verdict with a merge blocker. - Automerge filter test: Extracts the jq filter from .github/workflows/automerge.yml and validates it against synthetic statusCheckRollup fixtures. - Use Case: After editing a GitHub workflow or the CI truth contract, run all three tests to confirm advisory checks are ignored by automerge while real test failures still block. ## Quick Start Test the governance gates by running the advisory, required-control, and automerge filter tests against synthetic rollup JSON in a clean checkout.

Frequently Asked Questions about testing-governance-gates

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test CI governance gates after changing a GitHub workflow?▼

Run three tests from a clean checkout: an advisory-gate test with failing governance checks expecting a DEGRADED verdict, a required-check control expecting FAIL with merge blockers, and an automerge jq filter test against synthetic statusCheckRollup fixtures.

How do I verify automerge ignores advisory checks but blocks on test failures?▼

Extract the jq filter from .github/workflows/automerge.yml at test time and run it against two fixtures: one with failed governance checks plus a failed pytest run expecting not_green=1, and one with only failed governance checks expecting not_green=0.

Do I need a GitHub token to test CI rollup logic locally?▼

No. All rollup tests are shell-only against synthetic JSON files passed to scripts/runtime/ci_truth.py. No GITHUB_TOKEN or other secrets are required for local testing.

Why does the advisory test alone not prove the governance gate works?▼

A filter that ignores every check would also pass the advisory test. The required-check control test, which fails a required check and expects a FAIL verdict with merge blockers, proves the gate still blocks real failures.

Why do small synthetic rollups produce missing advisory warnings?▼

The CI truth contract lists many advisory entries, so small synthetic rollups trigger warnings for entries not present. This is expected behavior as long as merge_blockers and the targeted advisory statuses match expectations.