Skip to content
Merged
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
16 changes: 9 additions & 7 deletions .github/ci-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ 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
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 @@ -192,7 +192,7 @@ main-breakage rate (issues labelled `main-broken`) proves out.
| mcpx, lab-ops-hub, mod-tidy, research-workflow | unchanged path-gated PR checks (already PR-tier weight) | push to main | — |
| 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 | — |
| production-line guard (#1411) | `basic: production line limit (2500)` on `pull_request` | — | — |
| production-line guard (#1411) | `basic: production line limit (2500)` on `pull_request` | push to main (path-gated: `pkgs/**`, `apps/**`, guard files) — restored 2026-11-11 under Drew's #7089 ruling | — |

## CI-policy agreement contract (#7089, Phase 1)

Expand Down Expand Up @@ -242,9 +242,12 @@ every in-scope workflow, tier, declared triggers, and the recorded
waiver set must agree). Enablement is not visible from the tree:
it is audited from the Actions API on the #6187 recurring cadence,
and a disabled in-scope venue is reported with its disposition.
At Phase 1 landing, the disabled in-scope venues are exactly the
waiver set below (opencode-config-guard and the #6981 build set
are `disabled_manually`).
At Phase 1 landing, the disabled in-scope venues were exactly the
waiver set below. As of the 2026-11-11 re-arm landing under Drew's
#7089 ruling, the waiver set is empty and no in-scope venue is
`disabled_manually` (the #6981 build set reads active again, and
opencode-config-guard was re-enabled via the Actions API in the
same change).

**Waivers — the recorded Phase 2–3 disagreement set.** Each waiver
names its phase issue and awaits Drew's re-arm-vs-dispatch-only
Expand All @@ -255,8 +258,7 @@ stale waiver whose leg now agrees.

| workflow | missing leg(s) | phase issue |
| ------------------------------------------------- | ------------------------------------------------------- | ----------- |
| opencode-config-guard | main tier (`push`); venue `disabled_manually` | Phase 2 — #6953 |
| production-line-guard | PR tier (`pull_request`) | Phase 3 — #6959 |
| _(none — the set landed empty 2026-11-11: #6953's main leg and venue, and #6959's PR leg, were restored in the same PR that deleted these waivers)_ | | |

## Coverage rule

Expand Down
11 changes: 5 additions & 6 deletions .github/scripts/check-ci-policy-agreement.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,11 @@ REGISTRY=(
# phase lands (or is ruled retire), delete the waiver in the same PR
# that changes the triggers or the policy row.
WAIVERS=(
# Phase 2 (#6953): venue disabled_manually; pull_request leg
# restored by the 2026-11-08 sweep fix, main-tier push leg missing.
"opencode-config-guard.yml|main|6953"
# Phase 3 (#6959): dispatch-only; the guard's ci-policy row is new
# in Phase 1 and its PR leg awaits the Phase 3 disposition.
"production-line-guard.yml|pr|6959"
# Empty as of 2026-11-11: Drew ruled re-arm on #7089 and both
# Phase 2-3 disagreements landed in the same PR - the
# opencode-config-guard main leg (#6953, push restored; venue
# re-enabled via the Actions API) and the production-line-guard
# PR leg (#6959, pull_request restored alongside push to main).
)

required_trigger() {
Expand Down
15 changes: 12 additions & 3 deletions .github/scripts/check-production-line-limit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,18 @@ ROOT="${1:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)}"

# path -> removal issue
declare -A GRANDFATHERED=(
# (empty: the last two entries were removed by their splits --
# world_session/mod.rs by its #4717 split on main, web/markdown.rs
# by the #4704 split in this branch.)
# Grandfathered 2026-11-11 in the #7089 re-arm landing: each file
# below was already over the limit when the guard's triggers were
# restored, so it is grandfathered with a linked split issue,
# per this guard's convention. The entry is deleted in the same
# PR that lands the split.
["pkgs/fleet/crates/fleet-queue/src/client.rs"]="#8588"
["pkgs/fleet/crates/fleet-queue/src/turso_queue.rs"]="#8589"
["pkgs/id/src/commands/serve.rs"]="#8590"
["pkgs/id/src/directory.rs"]="#8591"
["pkgs/id/src/world/actor.rs"]="#8592"
["pkgs/id/src/world/core.rs"]="#8593"
["pkgs/id/src/world_session/mod.rs"]="#8594"
)

# Count production lines of one file: every line that is not part of
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/opencode-config-guard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,29 @@ name: opencode-config-guard
# CI tier policy: see .github/ci-policy.md
on:
pull_request:
# Path-gated (#1401): this guard checks exactly one canonical file
# plus its own implementation, so PRs that touch none of these
# paths must not enqueue a queued-then-6s run behind the runner
# backlog. Push to main stays unfiltered, so main is always
# validated. (Gate covers the workflow's current check set: the
# route-rules and provider-catalog fixtures were added after the
# original #1401 gate was written. merge_group omitted - there is
# no merge queue; Drew ruling 2026-11-08, see ci-policy.md.)
paths:
- ".opencode/opencode.jsonc"
- "bin/check-opencode-metered-providers.mjs"
- "bin/check-opencode-metered-providers.test.mjs"
- "bin/check-opencode-go-seating.mjs"
- "bin/check-opencode-go-seating.test.mjs"
- "bin/check-opencode-route-rules.mjs"
- "bin/check-opencode-route-rules.test.mjs"
- "bin/provider-catalog-sync.mjs"
- "bin/provider-catalog-sync.test.mjs"
- "bin/provider-catalog-snapshot.test.mjs"
- "bin/snapshot-provider-catalogs.mjs"
- ".github/workflows/opencode-config-guard.yml"
push:
branches: [main]
workflow_dispatch:

permissions:
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/production-line-guard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ name: production-line-guard
# nix, no toolchain - so this stays a seconds-long basic check.

on:
push:
branches: [main]
paths:
- "pkgs/**"
- "apps/**"
- ".github/scripts/check-production-line-limit.sh"
- ".github/scripts/check-production-line-limit.test.sh"
- ".github/workflows/production-line-guard.yml"
pull_request:
paths:
- "pkgs/**"
- "apps/**"
- ".github/scripts/check-production-line-limit.sh"
- ".github/scripts/check-production-line-limit.test.sh"
- ".github/workflows/production-line-guard.yml"
workflow_dispatch:

permissions:
Expand Down
Loading