Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/ci-policy-waivers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# CI policy agreement waivers (Phase 2–3 of design #7089).
#
# Format: <workflow-file> <leg> <phase-issue>
# leg is basic | main | nightly
#
# Each waiver names the live phase issue that owns the disagreement.
# The checker requires every issue here to be one of the four Phase 2–3
# issues below and to be open: closing an issue retires its waiver in
# the same change. A waiver for a workflow no longer in disagreement
# fails as stale.
#
# Phase 2:
# #6929 mcpx-fix-test-guard — dispatch-only; basic + main triggers gone
# #6953 opencode-config-guard — PR-only; main trigger gone
# Phase 3:
# #6959 production-line-guard — dispatch-only; basic + main triggers gone
# #6981 go-modules-build, identity-build, map-build, mcpx-nixbuild —
# dispatch-only; basic + main triggers gone

.github/workflows/mcpx-fix-test-guard.yml basic #6929
.github/workflows/mcpx-fix-test-guard.yml main #6929

.github/workflows/opencode-config-guard.yml main #6953

.github/workflows/production-line-guard.yml basic #6959
.github/workflows/production-line-guard.yml main #6959

.github/workflows/go-modules-build.yml basic #6981
.github/workflows/go-modules-build.yml main #6981

.github/workflows/identity-build.yml basic #6981
.github/workflows/identity-build.yml main #6981

.github/workflows/map-build.yml basic #6981
.github/workflows/map-build.yml main #6981

.github/workflows/mcpx-nixbuild.yml basic #6981
.github/workflows/mcpx-nixbuild.yml main #6981
60 changes: 57 additions & 3 deletions .github/ci-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,42 @@ service rehomed as `fleet serve search`) to the same rule, with its
own pinned headers. Intentional changes land in both copies in the same PR;
intentional header changes update the guard script in the same PR.

## Policy-to-trigger agreement contract (#7090)

A tier assignment in the table below is a promise about triggers, not
just a label. The agreement checker
(`.github/scripts/check-ci-policy-agreement.sh`, mounted in
`workflow-lint.yml`) enforces this mapping for every workflow named in
the `workflow` column of the guard/build rows below:

- **basic (PR) tier** — satisfied by `pull_request`, with the same
path filter the check needs (`paths:` in the `pull_request` block).
A path-filtered `pull_request` trigger is the active PR venue in this
repo. `merge_group` is not active: the no-merge-queue ruling above
removed it, and this phase must not re-add it.
- **main tier** — satisfied by `push:` with `branches:` containing
`main`, or by a named main-tier venue that runs the same check.
- **nightly** — satisfied by a `schedule:` trigger.
- `workflow_dispatch:` alone satisfies no tier. It may be present
alongside a tier trigger, but it never substitutes for one.
- A workflow named in the table must exist. A row naming a workflow
that is not on disk is a policy defect, regardless of any waiver.

Known Phase 2–3 disagreements are recorded as explicit waivers in
`.github/ci-policy-waivers.txt`, each naming its live phase issue and
the missing leg it covers. A waiver whose issue is no longer open fails
the checker; a missing or unknown waiver fails it too. The four live
phases are #6929 (`mcpx-fix-test-guard`), #6953
(`opencode-config-guard`), #6959 (`production-line-guard`), and #6981
(the four build workflows). This phase adds the checker only; it does
not re-arm, retire, or re-enable any workflow.

## Workflow and composite-action validation (#5743)

`.github/workflows/workflow-lint.yml` is a **basic-tier** check
(job `basic: workflow lint`): on pull requests touching
`.github/workflows/**` or `.github/actions/**`, and on merge
groups, it runs `.github/scripts/check-workflows.sh`, which lints
`.github/workflows/**` or `.github/actions/**` it runs
`.github/scripts/check-workflows.sh`, which lints
the complete workflow set with actionlint (shellcheck over `run:`
blocks at `-S warning` when shellcheck is available, matching the
mcpx leg) and shape-validates every `.github/actions/*/action.yml`
Expand All @@ -118,7 +148,8 @@ workflow before use.
## OpenCode metered-provider config guard

`.github/workflows/opencode-config-guard.yml` runs the static guard and
its fixtures on pull requests, merge groups, and pushes to `main`. The
its fixtures on pull requests and pushes to `main` (the merge-group leg
is not active under the no-merge-queue ruling). The
guard checks known metered selections (`cloudflare-*` and the direct
PAYG `deepseek` provider) in model-route targets/fallbacks, provider-route
selections, top-level defaults, and agent model/fallback fields. Disabled
Expand Down Expand Up @@ -176,6 +207,29 @@ main-breakage rate (issues labelled `main-broken`) proves out.
| mcpx test (#1998) | init + unit + lint + 6 static e2e shards + ci-ok (PR tier, non-draft PRs) | same full sharded suite on push to main | — (main covers it) |
| mcpx fix-test guard (#1969) | fix PRs touching `pkgs/mcpx/**` must carry a test or a `No test: <reason>` attestation (basic tier) | contract tests for the guard script only | — |

### Agreement-tracked guard/build rows (#7090)

This table is the normative, machine-checked form for the seven
guard/build workflows in Phase 1 of design #7089. Where the summary
table above and this table differ for those workflows, this table
wins. The `workflow` cell is the file ci-policy promises; the checker
reads only this table. `basic`, `main`, and `nightly` are the promised
tiers; `PR gate` names one representative glob that must remain in the
workflow's `pull_request.paths` (a declared path under that glob
satisfies it; `-` means no path gate); `waiver` names the live Phase 2–3
issue that currently covers the disagreement. `workflow_dispatch` is
never a tier.

| workflow | basic | main | nightly | PR gate | waiver |
| --- | --- | --- | --- | --- | --- |
| `.github/workflows/mcpx-fix-test-guard.yml` | yes | yes | no | `pkgs/mcpx/**` | #6929 |
| `.github/workflows/opencode-config-guard.yml` | yes | yes | no | - | #6953 |
| `.github/workflows/production-line-guard.yml` | yes | yes | no | `pkgs/**` | #6959 |
| `.github/workflows/go-modules-build.yml` | yes | yes | no | `pkgs/chat/**` | #6981 |
| `.github/workflows/identity-build.yml` | yes | yes | no | `pkgs/identity/**` | #6981 |
| `.github/workflows/map-build.yml` | yes | yes | no | `pkgs/map/**` | #6981 |
| `.github/workflows/mcpx-nixbuild.yml` | yes | yes | no | `pkgs/mcpx/**` | #6981 |

## Coverage rule

Nothing removed from PRs may vanish: the union of main-tier +
Expand Down
Loading
Loading