Skip to content

perf(e2e): PoSW full 検証を happy-path の 1 本に限定し 2 並列化で CI を高速化#192

Merged
shinyaoguri merged 4 commits into
mainfrom
perf/e2e-fast-mode-parallel
Jul 19, 2026
Merged

perf(e2e): PoSW full 検証を happy-path の 1 本に限定し 2 並列化で CI を高速化#192
shinyaoguri merged 4 commits into
mainfrom
perf/e2e-fast-mode-parallel

Conversation

@shinyaoguri

Copy link
Copy Markdown
Owner

背景

e2e job が毎 PR ~15-18 分かかっており、merge ゲート (required check) として重い。直近 green run の実測分解: ジョブオーバーヘッドは ~35s のみで、843s が「17 テストを workers:1 で完全直列」実行の本体。

原因と変更

  1. e2e/CLAUDE.md 不変条件 4 からのドリフト: 「PoSW 無関係なシナリオは --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 も不変。
  2. 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

shinyaoguri and others added 2 commits July 8, 2026 08:53
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>
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

🚀 Preview Deployment

Name URL
Preview https://96452be3.typedcode.pages.dev

Deployed from commit 29d3d00
API: staging Workers

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation pkg:repo リポジトリ横断 (docs/CI/依存) pkg:e2e packages/e2e labels Jul 9, 2026
@shinyaoguri
shinyaoguri merged commit 8c6e9fb into main Jul 19, 2026
7 checks passed
@shinyaoguri
shinyaoguri deleted the perf/e2e-fast-mode-parallel branch July 19, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pkg:e2e packages/e2e pkg:repo リポジトリ横断 (docs/CI/依存)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant