A gauntlet lap takes a batch of work from "approved idea" to "proven end to end on a real running copy of the shop", without pushing anything until you say so. Agents build in parallel, reviewers check them, then the whole thing gets deployed to kali and hammered by the purchase matrix until it passes twice in a row.
Red dashed: a product bug goes back to its implementer, then a new wave. Grey: a test-setup or harness problem only needs the matrix run again. Green: two clean runs in a row end the lap.
controller
tools/lap1/the lap's test server
browser + test box
pwremote) against kalinight only
You say GO and pick the options. I write every decision into one binding file, lapN-constraints-and-rulings.md,
as numbered rulings (R4-SESSION, R4-READONLY, ...). Every agent reads it before it starts.
Tag today's master as the lap base (lap4/base). Every branch starts there and the lap never rebases,
so a master change mid-lap can't break a run halfway.
test/lap4-matrix), T2 login backend, T3 confirmation-mail link,
T4 storefront. All four were dispatched at once at about 21:00.Each implementer works alone on its branch and has to prove its work before it reports back:
lap-pytest.sh (macv2 if free, else kali).codex review against the base. Fix P1, and P2 on money, security, privacy or a broken flow. Anything else is a follow-up.A separate reviewer reads the branch against the rulings and either approves it or lists problems by severity.
R4-READONLY), sent to every task it touches.wave.sh: merge everything, deploy to kaliOne script builds a throwaway integration branch (base + every lap branch merged) and puts it on kali:
alembic upgrade heads), admin and storefront.The matrix is our Playwright suite of real purchases and flows (Stripe card, SCORE, Amazon Pay, coupons, MyPage),
run from macv2's browser against kali, on desktop Chrome and a Pixel 7 profile. run-matrix.sh reads kali's
settings first and warns if something would make a cell lie.
Running alongside:
| Kind of red | What happens | Lap 4 example |
|---|---|---|
| Product bug | Fix round to the implementer, then a new wave. | Codex caught a race in the duplicate e-mail check, fixed with a lock. |
| Harness | Fix the test helper, rerun. No redeploy. | A buy hit the 10-a-minute submit limit, so the helper now waits it out. |
| Setup / data | Fix kali's env or data, rerun. | The new 10-codes-a-day cap would block BL-10, so kali gets 1000. |
| Load | Find the cause, rerun on a quiet box. | BL-1 mobile missed while a CI job ran on kali, then passed. |
| Pre-existing | Same red on the base too: noted, not ours. | 13 order-pack unit tests already fail on master. |
Every slip becomes a rule so it can't happen twice: R4-RESEED (re-seed is always followed by the MIG convert),
R4-DETACH (long runs are detached with a "done" file so a timeout can't orphan a test).
The lap ends only when the whole matrix passes twice in a row on the same served build, with a fresh re-seed before each run. A red is allowed only if it has its own ticket.
docs/gauntlet/lapN-handoff.mdIf your answers ask for changes, that's round 2: back to step 3 with new rulings, same loop, same exit bar.
kali proves the code; the test server proves it with the real services (Stripe, SCORE, Amazon sandbox, SES, the WAF).
:latest), migrate, switch the services, card payments to 仮売上, seed, arm the night.| Rail | Why |
|---|---|
| Nothing pushed during the lap | Master and the devs never see half-done work. |
| No rebase mid-lap | A run that starts on one build finishes on it. |
| Tests only on kali / macv2 | This Mac stays free for the controller. |
| Disk guard (8 GB) | A full Pi breaks the DB and CI. |
| Rail | Why |
|---|---|
| Ledger line for every step | Anyone can see what ran, when, on which build. |
| Detached long runs + done files | A tool timeout can't leave a test half-running. |
| Passwords stay in your Keychain | The night job reads them; I never do. |
| Questions batched, not pinged | You answer once, in the handoff. |
赤い点線: 製品の不具合は担当のエージェントに戻して、新しいウェーブにします。グレー: テストの準備やテスト側の問題なら、 マトリクスをもう一度流すだけです。緑: 2回続けてきれいに通ったら、ラップは終わりです。
司令塔
tools/lap1/ のスクリプトラップ用のテストサーバー
ブラウザ+テスト用
pwremote)でkaliを相手にテスト夜だけ
サトルがGOを出して、選択肢を選びます。Claudeはその決定をすべて1つのファイル lapN-constraints-and-rulings.md に、
番号付きの決めごと(R4-SESSION、R4-READONLY など)として書きます。どのエージェントも作業の前にこれを読みます。
今日のmasterにラップのベースとしてタグを付けます(lap4/base)。どのブランチもそこから始めて、ラップ中はリベースしません。
なので、途中でmasterが動いてもランが壊れることはありません。
test/lap4-matrix)、T2 ログインのバックエンド、T3 注文確認メールのリンク、
T4 ストアフロント。4つとも21時ごろに一斉に送り出しました。実装担当はそれぞれ自分のブランチで1人で作業し、報告の前に動くことを証明します:
lap-pytest.sh で(macv2が空いていればそちら、なければkali)。codex review を1回。P1は直し、P2はお金・セキュリティ・プライバシー・流れが壊れるものだけ直します。それ以外は後回しの項目へ。別のレビュー担当が、決めごとと照らし合わせてブランチを読み、承認するか、問題を重さの順に並べて返します。
R4-READONLY)、関係するタスク全部に伝えます。wave.sh: 全部をマージしてkaliへデプロイスクリプト1本で、使い捨ての統合ブランチ(ベース+ラップの全ブランチをマージ)を作り、kaliに載せます:
alembic upgrade heads 付き)、管理画面、ストアフロントをデプロイします。購入マトリクスは、本物の購入や流れ(Stripeのカード、SCORE、Amazon Pay、クーポン、MyPage)を試すPlaywrightのテスト一式です。
macv2のブラウザからkaliに向けて、デスクトップのChromeとPixel 7の両方で流します。run-matrix.sh は最初にkaliの
設定を読み、セルが正しく判定できない設定があれば警告します。
同時に回すもの:
| 赤の種類 | どうするか | ラップ4での例 |
|---|---|---|
| 製品の不具合 | 実装担当に修正ラウンド、そのあと新しいウェーブ。 | メールアドレスの重複チェックの競合をCodexが見つけ、ロックで直しました。 |
| テスト側の問題 | テストの補助を直して、流し直し。デプロイし直しはなし。 | 購入が1分10件の送信上限に当たったので、補助が待つようにしました。 |
| 準備・データ | kaliの設定やデータを直して、流し直し。 | 新しい「1日10コード」の上限がBL-10を止めてしまうので、kaliは1000にしました。 |
| 負荷 | 原因を見つけて、静かなマシンで流し直し。 | kaliでCIが動いている間にBL-1のモバイルが外れ、そのあと通りました。 |
| もとからある赤 | ベースでも同じ赤: 記録だけして、ラップの問題ではないとします。 | 注文パックの単体テスト13件は、masterでもともと失敗しています。 |
つまずきはどれも、二度と起きないようにルールにします: R4-RESEED(テストデータを入れ直したら、必ず移行フォームの変換もする)、
R4-DETACH(長いランは「完了」ファイル付きで切り離して動かし、タイムアウトでテストが置き去りにならないようにする)。
ラップが終わるのは、マトリクス全体が同じ配信中のビルドで2回続けて通ったときだけです。毎回、流す前にテストデータを入れ直します。 赤が残ってよいのは、その赤に専用のチケットがある場合だけです。
docs/gauntlet/lapN-handoff.md答えで変更が必要になったら、それがラウンド2です。新しい決めごとを持ってステップ3に戻り、同じループ、同じ出口の基準で回します。
kaliはコードを証明し、テスト環境は本物のサービス(Stripe、SCORE、Amazonのサンドボックス、SES、WAF)でそれを証明します。
:latest は使わない)、マイグレーション、サービスの切り替え、カードの売上方式を仮売上に、テストデータ投入、夜の準備完了。| ルール | 理由 |
|---|---|
| ラップ中は何もプッシュしない | masterにも開発メンバーにも、作りかけを見せないため。 |
| ラップ中はリベースしない | あるビルドで始めたランは、そのビルドのまま終えるため。 |
| テストはkali / macv2だけ | このMacは司令塔の仕事に空けておくため。 |
| ディスクの見張り(8GB) | Piがいっぱいになると、DBもCIも壊れるため。 |
| ルール | 理由 |
|---|---|
| どのステップも記録に1行残す | 何が、いつ、どのビルドで動いたか、だれでも分かるように。 |
| 長いランは切り離し+完了ファイル | ツールのタイムアウトで、テストが途中のまま残らないように。 |
| パスワードはサトルのキーチェーンに | 読むのは夜のジョブだけで、Claudeは読みません。 |
| 質問はまとめて、1つずつ聞かない | サトルは引き継ぎメモで1回答えるだけで済みます。 |