AGENT SKILL

merge-queue-readiness

Pre-queue merge-group CI simulation. Triggered before adding a PR to a GitHub merge queue. Prevents merge-queue kick-outs from integration test failures.

License 许可
MIT
所属仓库
djimit/djimitflo
最近更新
2026-11-15
Stars
★ 2
Forks
0

01 前言 Front Matter

name
merge-queue-readiness
description
Pre-queue merge-group CI simulation. Triggered before adding a PR to a GitHub merge queue. Prevents merge-queue kick-outs from integration test failures.

03 SKILL.md 正文

Merge Queue Readiness

Trigger

Before adding the PR to the merge queue (or before the final push if the repo uses a merge queue).

Protocol

  1. Fetch latest main: git fetch origin main
  2. Create a temporary simulation worktree (do NOT mutate the PR branch). Use a project-relative path UNDER the swarm worktree base so the path is portable across OSes and its later removal is permitted by the worktree guardrail (paths outside .swarm-worktrees/ are blocked). Do NOT hardcode /tmp — it does not exist on Windows.
    git worktree add .swarm-worktrees/merge-sim origin/main
    cd .swarm-worktrees/merge-sim
    git merge <pr-branch> --no-edit
    
  3. Run integration + unit tests against the merged result:
    bun test tests/integration --timeout 120000
    bun test tests/unit --timeout 120000
    
    (Use per-file loops for hot modules per AGENTS.md invariant 6)
  4. If failures: Fix on the PR branch, re-push, re-simulate. Always run the cleanup step (5) before re-simulating or on any exit path — do not leave the simulation worktree behind.
  5. Cleanup (run on EVERY exit path, including failure): git worktree remove --force .swarm-worktrees/merge-sim. If the remove is guardrail-blocked or fails, delete the directory directly and run git worktree prune.
  6. Only after simulation passes, add PR to the merge queue.

Why this matters

PR-branch CI and merge-group CI test DIFFERENT things:

  • PR-branch: tests the PR head commit in isolation
  • Merge-group: tests a temporary merge of PR head + latest main

Integration tests that pass on the PR branch may fail in merge-group context due to test interactions exposed by the merged result.

Root cause

A swarm ci-simulate command would automate this (issue #1746 item 5). This playbook is the manual protocol.

04 同仓库更多 Skills

djimit
djimit/djimitflo

provider-step-usage-v1-0-0

Sum measured OpenCode step_finish token totals with replay deduplication and fail-closed validation.

★ 2
djimit
djimit/djimitflo

writing-tests

Guidelines for writing, organizing, and maintaining tests in the opencode-swarm repository. Covers framework rules (bun:test), mock isolation, CI pipeline structure, file placement, and anti-patterns that break cross-platform CI. Load this skill before writing or modifying any test file.

★ 2
djimit
djimit/djimitflo

worktree-retry-cleanup

Protocol for cleaning parallel-coder worktree lanes before retry. Triggered before re-dispatching any task that already has a lane (completed, denied, cancelled, or failed).

★ 2
djimit
djimit/djimitflo

swarm

Cross-agent swarm-mode behavior model — a higher-rigor workflow using parallel investigation, independent reviewer validation, and critic challenge, plus the mandatory implementation closeout gate. Runtime adapters (.claude, .agents) add execution-specific notes and command wiring.

★ 2
djimit
djimit/djimitflo

swarm-pr-subscribe

Monitor a pull request after creation and act autonomously on pushed PR activity. Use when subscribing to a PR after opening it, when asked to watch, babysit, or autofix a PR until merge, or when a <pr-activity> wake message or [pr-monitor:...] advisory arrives for a subscribed PR. Owns event triage (fix / ask / skip), bounded-retry escalation, and terminal-state cleanup.

★ 2
djimit
djimit/djimitflo

swarm-pr-review

Run a graph-guided, tool-augmented Swarm PR review using context packing, parallel exploration, triggered plugin micro-lanes, independent reviewer validation, critic challenge, and metrics writeback. Use for deep pull request review with low false-positive tolerance and high recall.

★ 2