From 558270e55bacc7acfdffc53056ebaf9e0b9bb060 Mon Sep 17 00:00:00 2001 From: kjgbot Date: Fri, 9 Oct 2026 08:41:45 -0700 Subject: [PATCH] ci: drop trunk gating and the merge-train snippet (back to per-PR CI) The merge train is cloud-only now. Reverts this repo's rollout commits (5ad77734 ef5ecfc0 a3944f09 edefd7cc): job-level trunk gates, trunk-guard.yml, and the @agent-relay/merge-train-snippet block in AGENTS.md (plus its lock entry). CI runs on every pull request and on pushes to main again. Co-Authored-By: Claude Opus 5.5 (1M context) --- .github/workflows/ci.yml | 8 ----- .github/workflows/contract.yml | 1 - .github/workflows/relayfile-evals.yml | 1 - .github/workflows/trunk-guard.yml | 22 -------------- AGENTS.md | 43 --------------------------- prpm.lock | 19 +----------- 6 files changed, 1 insertion(+), 93 deletions(-) delete mode 100644 .github/workflows/trunk-guard.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b37e2703..bc084767 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,6 @@ env: jobs: go-test: - if: (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main') name: Go Test runs-on: ubuntu-latest timeout-minutes: 15 @@ -37,7 +36,6 @@ jobs: run: go test ./... go-build: - if: (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main') name: Go Build runs-on: ubuntu-latest needs: go-test @@ -68,7 +66,6 @@ jobs: if-no-files-found: error sdk-typecheck: - if: (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main') name: SDK Typecheck runs-on: ubuntu-latest timeout-minutes: 15 @@ -111,7 +108,6 @@ jobs: run: npm run test:bundle:bun --workspace=packages/sdk/typescript client-typecheck: - if: (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main') name: Client Typecheck runs-on: ubuntu-latest timeout-minutes: 15 @@ -144,7 +140,6 @@ jobs: run: npm run test --workspace=@relayfile/client e2e: - if: (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main') name: E2E runs-on: ubuntu-latest needs: go-build @@ -184,7 +179,6 @@ jobs: npx tsx scripts/e2e.ts --ci backend-conformance: - if: (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main') name: Backend Conformance (Go oracle) runs-on: ubuntu-latest timeout-minutes: 25 @@ -225,7 +219,6 @@ jobs: retention-days: 14 release-tooling: - if: (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main') name: Release Tooling runs-on: ubuntu-latest timeout-minutes: 10 @@ -249,7 +242,6 @@ jobs: run: npm run test:release workers-typecheck: - if: (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main') name: Workers Typecheck runs-on: ubuntu-latest timeout-minutes: 15 diff --git a/.github/workflows/contract.yml b/.github/workflows/contract.yml index d1438ea0..04b87ff2 100644 --- a/.github/workflows/contract.yml +++ b/.github/workflows/contract.yml @@ -8,7 +8,6 @@ on: jobs: contract: - if: (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main') runs-on: ubuntu-latest steps: - name: Checkout diff --git a/.github/workflows/relayfile-evals.yml b/.github/workflows/relayfile-evals.yml index 72081f42..2e14f06f 100644 --- a/.github/workflows/relayfile-evals.yml +++ b/.github/workflows/relayfile-evals.yml @@ -52,7 +52,6 @@ env: jobs: evals: - if: (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main') name: Provider-backed evals runs-on: ubuntu-latest diff --git a/.github/workflows/trunk-guard.yml b/.github/workflows/trunk-guard.yml deleted file mode 100644 index fbe379e4..00000000 --- a/.github/workflows/trunk-guard.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Trunk guard - -# Only this repository's `trunk` branch may merge into main. Feature branches -# merge into `trunk`; CI runs only on the trunk -> main PR. -# pull_request_target loads this workflow from the base branch, so a PR cannot -# edit the guard to pass itself. It never checks out PR code. -on: - pull_request_target: - branches: [main] - types: [opened, synchronize, reopened, edited] - -permissions: {} - -jobs: - only-trunk-merges-to-main: - if: github.head_ref != 'trunk' || github.event.pull_request.head.repo.full_name != github.repository - runs-on: ubuntu-latest - timeout-minutes: 1 - steps: - - run: | - echo "::error::Only this repository's 'trunk' branch may merge into main. Retarget this PR to 'trunk'." - exit 1 diff --git a/AGENTS.md b/AGENTS.md index 5250914e..f22a8813 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -202,46 +202,3 @@ Relayfile runtime changes that write provider records must keep ingest behavior. Full rule: `.claude/rules/relayfile-integration-digests.md`. - - -## Merging: `trunk` + the `mergeable` label - -CI suites do **not** run automatically on feature branches. They run only on -this repository's `trunk` → `main` pull request and on pushes to `main`. The -one check that does run on a feature PR into `main` is `Trunk guard`, which -fails it on purpose; manually dispatched workflows (`workflow_dispatch`) still -run on any branch. (Repos whose default branch is not -`main`, e.g. `master`, use that branch wherever this says `main`.) A merge -agent batches ready PRs into `trunk`, gets that one PR green, and merges it. - -**When you open a PR** -1. Branch from `trunk` and open the PR with **base `trunk`**, not `main`. - A PR into `main` from any other branch fails the `Trunk guard` check. -2. No CI runs on your PR, so verify locally before calling it ready: run the - typecheck, tests and lint this repo uses, and list the exact commands and - results in the PR body. - -**When the PR is ready** -3. Add the label **`mergeable`** once all of these are true: - - The change is complete and the local checks above pass. - - Review feedback (human and bot) is addressed or answered. - - It is not a draft and does not depend on an unmerged PR. -4. Remove `mergeable` if the PR stops being ready (new work, a failing check, a - blocking question). The label is read live from GitHub on every sweep. - -**What you must not do** -- Do not merge your own PR, and never merge into or push to `trunk` or `main` - directly. -- Do not re-enable CI for feature branches or edit the `trunk` gates in - `.github/workflows/`. - -**The merge agent** sweeps open `mergeable` PRs with base `trunk` about every -10 minutes. It reads each PR's linked sessions (the `Agent Relay sessions` -block in the PR body, then the session summary) for context, merges them into -`trunk`, opens or updates the `trunk` → `main` PR, fixes CI there, merges when -green, and posts a summary. If your PR conflicts with `trunk`, it may ask you -to rebase on `trunk`; do so and keep the label. - -> Interim: the sweep worker is not deployed yet. Until it is, a human or a -> designated agent performs the merge-agent steps manually. Labelling is unchanged. - diff --git a/prpm.lock b/prpm.lock index 1f88332c..62d9527a 100644 --- a/prpm.lock +++ b/prpm.lock @@ -153,26 +153,9 @@ "sourceFormat": "claude", "sourceSubtype": "skill", "installedPath": ".opencode/skills/running-headless-orchestrator/SKILL.md" - }, - "@agent-relay/merge-train-snippet#agents.md:AGENTS.md": { - "version": "1.0.1", - "resolved": "https://registry.prpm.dev/api/v1/packages/%40agent-relay%2Fmerge-train-snippet/1.0.1.tar.gz", - "integrity": "sha256-b993f4fd7a737b5788f10fca8b02d6eea02c803b1d4483f6536f3cfd3f85126e", - "format": "agents.md", - "subtype": "snippet", - "sourceFormat": "generic", - "sourceSubtype": "snippet", - "installedPath": "AGENTS.md", - "snippetMetadata": { - "targetPath": "AGENTS.md", - "config": { - "target": "AGENTS.md", - "position": "append" - } - } } }, - "generated": "2026-10-08T23:07:22.828Z", + "generated": "2026-05-09T18:19:51.246Z", "collections": { "agent-relay-starter": { "name_slug": "agent-relay-starter",