Cross-Realm Refactor PR Report#282
Merged
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
backend/app/core/env_keys.pyに正本化し、ollama_client.pyの生リテラル参照をenv_keys経由へ置換(CLAUDE.md / security.md の「生リテラルos.getenv禁止」へ準拠)。SSoT Consolidations
High
backend/app/core/env_keys.py:74-80(# --- LLM ---セクションにOLLAMA_BASE_URL/OLLAMA_MODEL/OLLAMA_TIMEOUTを追加)backend/app/services/intelligence/llm/ollama_client.py:9,22-24(from ....core import env_keysを追加しos.environ.get(env_keys.OLLAMA_*, ...)へ置換)docker-compose.yml:24-27(OLLAMA_* の名前正本が env_keys.py である旨をコメントで明記)OLLAMA_KEEP_ALIVE(docker-compose.yml の ollama サービス側、30m固定)は backend が一切参照しない Ollama サーバ自身の設定のため env_keys.py には追加しない(追加すると未使用定数になる)。レポートの「必要なら」に対し不要と判断し、その旨を env_keys.py のコメントに残した。Medium
schemas/**↔ FEtypes.ts/api/*.ts)のドリフト検知不在docs/adr/0007-openapi-typescript-codegen.md(ステータス: Proposed)を起票。openapi-typescriptでfrontend/src/api/generated.tsを生成、CI でgit diff --exit-codeによりドリフトを検知する案。Phase 0(基盤)→ Phase 1(api/shared.tsパイロット)→ Phase 2/3(github_link / resume / blog / master_data 移行)の段階移行プランを定義。api/client.tsの 401/CSRF/Cookie ロジック、api/paths.ts(API パス SSoT)、errorCodes 型縛りはいずれも対象外として維持。命名差(CareerResumeResponse↔ResumeResponse)は再エクスポートで吸収。Low
infra/modules/cloud_run/main.tfの env 名(18 件)はすべて env_keys.py に存在しドリフト無し。.github/workflows/ci.ymlのPROJECT_ID/REGIONは GCP デプロイ用変数で Python から参照不可、VITE_APP_VERSIONは frontend ビルド変数。いずれも env_keys.py の対象外で問題なし。env_keys.py の「4 箇所同期」手順コメントが SSoT として機能していることを確認。Documentation Consolidations
docs/development.md(初回セットアップ・make ci)README.md「クイックスタート」(make setup / make ci スニペット重複を削除しリンク + 再掲しない理由を明記)docs/deployment.md(OpenTofu 実行手順・GCS backend 認証)docs/data-model.md「OpenTofu で DB を作成」(一般 tofu 手順をリンク参照化し、Turso DB 固有手順のみ残置)、.claude/rules/infra/opentofu.md:14(実行手順は deployment.md を正本参照する旨を追記).claude/rules/infra/test.mdのmake infra-validate系コマンド列。これは「いつ検証を回すか(infra テスト方針)」という別目的であり、変更理由が異なる(偶発的重複)ためduplication.mdの方針に従い抽出しない。Skipped
Validation
make lint-backend: pass(All checks passed!)make test-backend: pass(443 passed, 2 warnings / 30.40s)tests/test_llm_clients.py単体: 14 passedmake lint-frontend/make build-frontend: 未実行(frontend のコード変更なし。変更は markdown=README/ADR のみ)make infra-fmt-check/make infra-validate: 未実行(infra の.tf変更なし。変更は markdown=rules/docs のみ)make dupe-check: before 56 clones → after 56 clones(cross-realm clone 0 件を維持。新規重複なし。env_keys/ollama_client の変更はリテラル重複を削減する方向)Follow-ups
export_openapi.py/openapi-typescript/make codegen-types/ CI ドリフト検知)を構築。response_model付与状況を棚卸し(未設定だと OpenAPI に型が出ないため)。