perf(e2e): PoSW full 検証を happy-path の 1 本に限定し 2 並列化で CI を高速化#192
Merged
Conversation
CLAUDE.md 不変条件 4「PoSW 無関係なシナリオは --mode fast」からドリフトし、 17 テスト中 9 spec (11 呼び出し) が既定 full (全イベント x 10,000 iter の PoSW 再計算) を回していた。full の positive control を happy-path 1 本に集約し、 残りを fast に整合。あわせて workers を 1→2 に (テスト時間の大半は打鍵/sync 待ちの wall-clock で、4 vCPU ランナーなら 2 並列は安全域。flake 再発時は 1 に 戻す)。直列 843s の実測内訳から半分以下を見込む。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
workers: 2 では PoSW Web Worker 2 本が CPU を分け合い、同期完了が 30s を 超えて proof-forgery が flake した (pending⇄syncing 往復のまま timeout)。 expect ポーリングなので健全時の所要時間は変わらない。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
🚀 Preview Deployment
Deployed from commit 29d3d00 |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
e2e job が毎 PR ~15-18 分かかっており、merge ゲート (required check) として重い。直近 green run の実測分解: ジョブオーバーヘッドは ~35s のみで、843s が「17 テストを workers:1 で完全直列」実行の本体。
原因と変更
--mode fast」と定めているのに、fast は 2 spec のみで 9 spec (11 呼び出し) が既定 full (全イベント × 10,000 iter PoSW 再計算) を実行していた。full を happy-path 1 本 (完全検証の positive control) に集約し、残りを fast に整合。tamper-detection の負のオラクル (改ざん拒否) はハッシュチェーン不整合検出なので fast で成立。analysis JSON は mode と独立に生成されるため ai-bulk 等の Pure Typing assert も不変。workers: 1 → 2: テスト時間の大半は打鍵・sync 待ちの wall-clock。4 vCPU ランナーで 2 並列は安全域と判断 (flake 再発時は 1 に戻す。その場合も fast 整合は維持)。CLAUDE.md 不変条件 4 も「新 spec は既定 fast・full は happy-path のみ」に更新。
期待効果
直列 843s → 半分以下 (本 PR の e2e job 実測で確認する)。
🤖 Generated with Claude Code