Skip to content

コンテナに登録したページの複製が浅く、コンストラクタで作ったオブジェクトがリクエスト間で共有される #128

Closed

Description

@polidog

症状

#118 で、コンテナに登録したページとレイアウトはリクエストごとに clone するようにした。複製は浅いので、ページがコンストラクタで作った可変オブジェクト(フォームや DTO など)は worker のリクエスト間で共有され、ある訪問者の状態が次の訪問者に残りうる。

自分でページをコンテナに登録した場合だけ起きる。

修正案

  • 状態を持つオブジェクトをリクエストごとに作り直す仕組みを作る。
  • または、ページは登録せずリクエストごとに生成する(既定の動き)と README に書く。

Copilot のレビュー(#118)で指摘された。再現は確認していない。

Activity

  1. added a commit that references this issue on Nov 2, 2026
    26bb6f9
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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions