Skip to content

実装: e2e 実行前に CJK フォント可用性を fail-fast 検査し豆腐 baseline の誤再生成を防ぐ #754

Open

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "e2e 実行前に CJK フォント可用性を fail-fast 検査し、CJK 欠落環境での --update-snapshots による豆腐 baseline の誤再生成・偽陰性 pass を防ぐ"
change_kind: code
status: triage-required

本 Issue は PR #750 レビュー由来の triage-required な inbox 起票である。AC / Verification Commands / Allowed Paths の確定は issue-refinement-loop に委ね、本文では背景とスコープ方針のみを示す。

Outcome

CJK グリフを含む visual baseline(例: timeout overlay の 戦闘終了)を扱う e2e 実行において、実行環境に CJK フォントが無い場合は fail-fast する仕組みを設け、(a) CJK 欠落環境での --update-snapshots による豆腐 baseline の誤再生成、(b) 豆腐同士一致による偽陰性 pass、を防止する。

Background

  • PR 実装: e2e の m2-timeout-overlay-baseline.png を CI レンダリングに合わせて再生成する (#747) #750 の既知副作用として、CJK フォント無しのローカル環境では timeout overlay baseline の e2e が fail する(baseline は CI 正本のため)。
  • より危険なのは、CJK 欠落環境で AI agent / contributor が pnpm test:e2e --update-snapshots を実行すると、戦闘終了 が豆腐 □□□□ に戻った baseline を再コミットしてしまう事故。これは CI で再び visual regression を引き起こす。
  • 現状、package.json の pnpm test:e2e / test:e2e:ci は通常の検証導線として存在するが、フォント前提条件のガードが無い。

In Scope(refinement で確定)

  • e2e 開始前に fc-match 等で CJK fallback フォントの存在を検査し、欠落時は明確なメッセージで fail-fast する仕組み(playwright global setup / npm script の preflight 等、実装方式は refinement で決定)。
  • 検査対象フォントと判定条件の定義(CI が導入する IPA Gothic 等を基準にする)。
  • ローカル開発者向けの導線ドキュメント(CJK-capable font の導入、または CI/container 実行が前提である旨)。

Out of Scope

Acceptance Criteria

初期ドラフト。最終的な合否条件は issue-refinement-loop / issue-contract-review で確定する。

  • AC1: e2e 実行前(playwright global setup または npm preflight)に CJK fallback フォントの可用性を検査する仕組みが存在する。
  • AC2: CJK フォント欠落環境では e2e が明確なメッセージで fail-fast し、豆腐 baseline の誤再生成(--update-snapshots)を防ぐ。
  • AC3: CJK フォント搭載環境では検査を通過し、既存 e2e が pass する。

Verification Commands

# AC1
$ rg -n "fc-match|fontconfig|CJK|font" tests/e2e playwright.config.ts package.json
# AC2
# preflight-scope: pr_review_only
$ rg -n "fc-match|fail-fast|exit" tests/e2e playwright.config.ts
# AC3
$ pnpm test:e2e:ci

Allowed Paths

初期ドラフト。実装方式(global setup / preflight script)に応じて refinement で確定する。

  • playwright.config.ts
  • tests/e2e/
  • package.json

Source(出典・重複判定キー)

source:
  kind: pr_review
  url: "https://github.com/squne121/loop-protocol/pull/750#issuecomment-4641690191"
  note_id: "pr750-author-followup-2"
  dedupe_key: "follow-up:squne121/loop-protocol:pr/750:cjk-font-fail-fast"
  related_issues: ["#747", "#749", "#750"]

Activity

  1. added
    phase/implementation
    agent/implementer
    enhancement
    triage-required
    on Jun 7, 2026
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

    agent/implementerenhancementphase/implementationtriage-required

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions