Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4303163489
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex 修正したので確認してください |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex 再度変更が入ったので内容を確認して |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: de77f71fd1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @app.before_request | ||
| def _ensure_env_validated(): # type: ignore[unused-local] | ||
| if app.config.get("ENV_VALIDATED"): | ||
| return None | ||
| _validate_required_env(logger) | ||
| app.config["ENV_VALIDATED"] = True |
There was a problem hiding this comment.
validate_env=False の場合、_ensure_env_validated は必須環境変数の存在チェックだけを行い、app.config に取り込済みの HMAC_KEYS / BEARER_TOKEN を再読み込みしません。アプリ生成後に環境変数を注入する運用(WSGI 設定での secrets 読み込みやテストで os.environ を後から上書きするケース)では検証は通っても認証情報が更新されず、/health 以外のリクエストが常に missing auth で 401 になります。遅延検証を許容するなら、検証成功後に認証設定を再取得して app.config を更新する必要があります。
Useful? React with 👍 / 👎.



概要
--factoryを外し、WSGI アプリを直接参照するように修正した。関連リンク
変更内容
Dockerfileの gunicorn 起動対象をpptx_generator.api.flask_app:appに変更src/pptx_generator/api/flask_app.pyに WSGI app を公開pyproject.toml/uv.lockの gunicorn 依存を 20 系へユーザー影響
--factory未対応で落ちる問題が解消される。docker build -t pptx-backend-test .→docker run --rm -p 8000:8000 -e PPTX_API_BEARER_TOKEN=dev-token-12345 pptx-backend-testhttp://localhost:8000/healthが 200 を返すこと動作確認
チェックリスト
Close #576を PR 本文へ記載したClose #576やdocs/todo/…などのプレースホルダをすべて実際の値に置き換えた