Skip to content

docs: TA sudden-death error contract を fail-closed 実装と一致させる #3877

Description

@azumag

問題

smkc-score-app/docs/ta-sudden-death-error-fallbacks.md が、現在の useTaSuddenDeath 実装・回帰テストと逆の契約を記載しています。

文書は「API が具体的な error を返した場合はその内容を優先」としていますが、現行実装は course change / sudden-death result submit の HTTP non-2xx で response body を UI 用に解析せず、common.networkError のみを表示する fail-closed 契約です。既存テストも raw API detail が表示されないことを直接検証しています。

修正方針

  • 文書を現行 fail-closed 契約へ更新する
  • HTTP non-2xx body の raw error / message を user-facing copy に使わないことを明記する
  • safe diagnostic context(status / tournamentId / phase / suddenDeathRoundId)と transport exception は client logger に限定することを明記する
  • request 前の time validation は既存 validation message を優先する契約を維持する
  • API schema / status、sudden-death rules、payload、retry、DB / Cloudflare は変更しない

完了条件

  • docs が useTaSuddenDeath と既存 component tests の実際の挙動と一致する
  • raw backend prose を優先表示する旧記述が残らない
  • docs-only 変更として CI が成功する

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions