Chore/lint env keys#427
Merged
Merged
Conversation
env_keys.py(正本)の定数が docker-compose.yml に全注入されているか、 errors.py の ErrorCode と errorCodes.ts の ERROR_CODES が一致するかを scripts/lint-env-keys.sh で機械検証する。言語境界上リテラル複製は消せ ないため「複製が正本と一致するか」を検証する方針。 - scripts/lint-env-keys.sh 新設(rg/comm のみ依存) - make lint-env-keys ターゲット + lint 集約に追加 - CI(test.yml の test-backend ジョブ)に fail-fast ステップ配線 - env_keys.py / errors.py の docstring に自動 drift 検知への参照を追記 起動時内部フラグ APP_BOOTSTRAPPED は COMPOSE_ALLOWLIST で除外。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
GitHub ランナー(ubuntu-latest)と flake.nix の devshell に ripgrep が 入っておらず、test-backend の Lint SSoT ステップが rg コマンド不在で 落ちていた。抽出を grep -E + sed -E に置き換え PCRE / rg 依存を除去。 ローカル(macOS)・CI(GNU)の両方で動く。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PR #424 のレビュー指摘 2 件を反映: - env_keys.py は symbol 名ではなく文字列値(NAME = "VALUE" の VALUE)を 比較対象にする。symbol だけ rename しても誤検知せず、値だけ変えた drift も 取りこぼさない - docker-compose.yml の env 名抽出を api サービスの environment ブロックに 限定する。全 YAML の大文字キーを拾うと他サービス(libsql の SQLD_NODE 等)の 名前で検知漏れが起きるため ネガティブテスト: (a) 他サービスのみに存在する名前, (b) 値のみの drift, いずれも exit 1 で検知することを確認。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ore/lint-env-keys
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.
変更概要
セルフレビューチェックリスト
必須確認
make ciが pass している(lint + test + build-web)条件付き確認(該当する場合のみ N/A と記入)
app/schemas/またはapp/routers/を変更した場合:make codegen-typesを実行しweb/src/api/generated.tsの差分をコミットしたnix develop --command bash -c "cd web && npm run test:e2e")env_keys.py/docs/api.md/infra/modules/cloud_run/main.tf/docker-compose.ymlの 4 箇所を同期したweb/src/で日本語メッセージをweb/src/constants/messages.tsの定数経由で参照した(リテラル直書きなし)破壊的変更
ADR(設計判断を伴う変更の場合のみ)
PR タイトル形式:
<type>: <内容>(日本語)type:
feat/fix/docs/refactor/test/chore/infra