GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — refactor: 2 モード e2e の重複 spec を整理 + 振り分け基準を明文化 · Issue #207 · ymnao/scripta

refactor: 2 モード e2e の重複 spec を整理 + 振り分け基準を明文化 #207

New issue
Copy link
New issue
Copy link
Closed
#231
Closed
refactor: 2 モード e2e の重複 spec を整理 + 振り分け基準を明文化#207
#231
Copy link
Labels
enhancementNew feature or request
Milestone
v0.6.0

Description

@ymnao
ymnao
opened on Jun 21, 2026
Issue body actions

背景

セッション 26 の C 軸 (アーキテクチャ) 探索で、renderer-only e2e (e2e/*.spec.ts 約 30 件) と 実 Electron e2e (e2e/electron/*.electron.spec.ts 11 件) の 責務分担が一部 spec で曖昧 になっていることを同定した。

具体的に重複している pair:

  • e2e/smoke.spec.ts ↔ e2e/electron/smoke.electron.spec.ts
  • e2e/settings-persistence.spec.ts ↔ e2e/electron/settings-persistence.electron.spec.ts

renderer-only でも検証している UI flow を 実 Electron 側で再度叩いており、CI 時間と認知コストの両方が増えている。

推奨パターンとの差分

2 モード並行運用 (#33 / #82 C Phase 1 PR-3 で確立) の責務は以下のように分離すべき:

  • renderer-only モード = UI ロジック + mock IPC 返り値の反応性 (高速、~30 件)
  • 実 Electron モード = mock では踏めない main 境界のみ — ディスク I/O / 再起動 / protocol handler / multi-window / Settings migration (safety net、~11 件)

現状この振り分け基準が どこにも明文化されていないため、新規 spec を書く時にどちらに置くか判断できず重複が増えやすい。

改善案

1. CLAUDE.md に振り分け基準を明記

docs/migration-plan.md or CLAUDE.md の test 戦略セクションに以下のルールを追記:

新規 e2e spec の振り分け基準:

  • ディスク I/O / 再起動 / protocol handler / multi-window / Settings migration を含む → e2e/electron/
  • 純粋な UI flow / keyboard 操作 / 状態同期のみ → e2e/

2. 重複 spec の整理

各 pair について判定:

  • smoke.spec.ts ↔ smoke.electron.spec.ts: renderer-only 側は基本起動・主要 UI の visible 確認に絞り、実 Electron 側は「8 領域 safety net」(asset URL / settings / windows / structured error 等) に絞る。
  • settings-persistence.spec.ts ↔ settings-persistence.electron.spec.ts: renderer-only の persistence 検証は in-memory mock なので 実証性なし。実 Electron 側だけ残し、renderer-only 側は削除候補。

3. mock 同期漏れ検出のための audit コメント追記

electron/preload/api.ts 冒頭に「IPC contract 変更時は e2e/helpers/electron-api-mock.ts の対応メソッドも同期が必要」と明記。

完了条件

  • CLAUDE.md に振り分け基準を追記
  • smoke.spec.ts / settings-persistence.spec.ts の整理 (削除 or scope 絞り込み) の判断と実施
  • electron/preload/api.ts 冒頭に mock 同期 audit コメント
  • pnpm test:e2e の所要時間が現状から短縮、または重複削減の根拠を PR 本文に記載

実害度

中 (CI 時間 + spec 増加時の認知負荷)

関連

  • セッション 26 C 軸探索 (HANDOFF.md セッション 26)
  • test: Playwright _electron API ベースの最小 e2e を追加 #33 / refactor: Tauri レガシー完全除去 Phase 1 — インベントリ・safety net・CI ガード・ADR 新設 #82 C Phase 1 PR-3 (2 モード並行運用の確立)

Activity

  1. ymnao
    added this to the v0.6.0 milestone on Jun 21, 2026
  2. ymnao
    added
    enhancementNew feature or request
    on Jun 21, 2026
  3. ymnao
    added a commit that references this issue on Jun 25, 2026

    refactor: 2 モード e2e の重複 spec を整理 + 振り分け基準を ADR-0009 に集約 (#207) (#231)

    6d39441
  4. ymnao
    closed this as completedin #231on Jun 25, 2026
  5. ymnao
    added a commit that references this issue on Jun 26, 2026

    chore: v0.6.0 リリース準備 (#242)

    ce98367
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      • v0.6.0No due date

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.