Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 54e2ec6a64
ℹ️ 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".
| --exclude='evo' \ | ||
| --exclude='manager/includes/cli/' \ |
There was a problem hiding this comment.
release.yml の Prepare dist directory(確認対象: .github/workflows/release.yml)で evo と manager/includes/cli/ を除外すると、タグから生成される配布zipにはCLI本体が含まれず、manager/includes/cli/README.md にある php evo ... 系の運用コマンドが本番配布物で実行不能になります。リポジトリにはCLI機能が実装済みなのに、リリース経路だけで機能が欠落するため回帰です。
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
管理画面設定の言語キー解決における言語混在の修正と、インストーラーのアクセス制御の簡素化を行うPR。あわせてリリースワークフローの除外設定を拡充し、Codex/Agent向けの運用ファイルを追加。
Changes:
- 管理画面設定で言語キーをincludeベースからファイル解析ベースへ変更し、
$_lang汚染を回避 - インストーラーのBASIC認証を廃止し、IP制限のみに統一
- インストール完了時に
install-config.phpを自動削除する機能を追加 - リリースパッケージから
.agent/、.codex/、CLI関連ファイルなどを除外
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| manager/actions/tool/mutate_settings/functions.inc.php | 言語キー取得を正規表現ベースに変更し、$_lang汚染を防止 |
| manager/actions/tool/mutate_settings.dynamic.php | 言語キー配列を遅延評価に変更 |
| install/langs/*.inc.php | インストーラー言語ファイルをIP制限のみの運用に合わせて更新 |
| install/instprocessor.php | インストール完了時のinstall-config.php自動削除機能を追加 |
| install/install-config.sample.php | BASIC認証設定を削除 |
| install/functions.php | BASIC認証関連関数を削除 |
| .github/workflows/release.yml | リリース除外パターンを拡充 |
| assets/docs/release-process.md | ドキュメントを簡素化し、SSOTをrelease.ymlに明示 |
| .codex/skills/* | Codex運用スキル定義を追加 |
| .agent/plans/* | 実行計画ドキュメントを追加 |
| .github/codex-pr-rules.md | PRルールを整形 |
| if ($content === false) { | ||
| return []; | ||
| } | ||
| $matched = preg_match_all('/\$_lang\[\s*([\'"])(.*?)\1\s*\]\s*=/', $content, $matches); |
There was a problem hiding this comment.
正規表現パターンで文字列の内側のクォートをエスケープした形で扱っている場合、意図通りにキーを抽出できない可能性がある。
例:
$_lang['test\'key'] = 'value';のようなエスケープされた文字列$_lang["test\"key"] = "value";のようなダブルクォート内のエスケープ
現在のパターン /\$_lang\[\s*([\'"])(.*?)\1\s*\]\s*=/ では、バッククォートでエスケープされたクォートを含むキーを正しく抽出できない。
改善案: より堅牢なパターンを使用するか、コメント行をスキップする処理を追加することを検討してください。
| $matched = preg_match_all('/\$_lang\[\s*([\'"])(.*?)\1\s*\]\s*=/', $content, $matches); | |
| $matched = preg_match_all('/\$_lang\[\s*([\'"])((?:\\\\.|[^\\\\\1])*)\1\s*\]\s*=/', $content, $matches); |
| global $lang_keys; | ||
| $lang_return = []; | ||
| foreach ($lang_keys as $lang => $keys) { | ||
| if (!in_array($key, $keys)) { | ||
| if ($keys === true) { | ||
| $keys = get_lang_keys("{$lang}.inc.php"); | ||
| $lang_keys[$lang] = $keys; |
There was a problem hiding this comment.
遅延評価の仕組みが機能するためには、$lang_keys が get_langs_by_key() 内でグローバル変数として参照される必要がある。しかし、$lang_keys への参照は global $lang_keys; で宣言されているが、この変数が外部スコープで初期化されていることに依存している。
mutate_settings.dynamic.php で初期化した $lang_keys が get_langs_by_key() 内で正しく参照されるかどうかは、この関数の呼び出しコンテキストに依存する。関数がリクエスト全体で一貫したスコープで呼び出されることを確認してください。
… Docker validation - Added minimal CLI entry point and DB commands to Evolution CMS JP Edition. - Implemented core commands: help, db:console, db:query, make:command. - Enhanced CLI with additional commands: cache:clear, config:show, db:tables, db:describe, db:count. - Established Docker environment for CLI functionality verification. - Documented command usage and updated README for CLI. - Prioritized command implementation based on utility and necessity. fix(logging): Resolve undefined array key warning in logging pagination - Added boundary checks in logging.static.php for pagination window. - Applied ceil() in getNumberOfPage() to ensure integer page count. - Conducted static validation to confirm no syntax errors in modified files. - Pending visual verification for pagination across multiple pages. feat(validation): Create CLI-first validation skill with optional browser checks - Standardized AI-driven validation to prioritize CLI execution with optional browser checks. - Developed CLI validation flow and integrated Playwright for browser validation. - Documented validation procedures and usage instructions. fix(language): Correct mixed language display issue in manager settings - Isolated $_lang pollution in get_lang_keys() to prevent language mixing. - Minimized unnecessary loading of all language files during settings display. - Confirmed no mixed language display in the management interface.
概要
管理画面設定の言語キー解決で発生していた言語混在を防止しつつ、インストーラーのアクセス制御と後始末を簡素化しました。あわせて、リリースパッケージ作成ルールを
release.ymlに一本化し、運用ドキュメントとCodex向けスキル/計画ファイルを追加しています。変更内容
manager/actions/tool/mutate_settings.*)の言語キー取得を改善get_lang_keys()をincludeベースからファイル解析ベースへ変更し、$_lang汚染による言語混在を回避$lang_keys[$lang] = true)に変更して必要時のみ解決allowed_ipsベースの制御へ統一install-config.phpの自動削除処理を追加(成功/失敗メッセージとログ出力を追加).agent/,.codex/,.env*,manager/includes/cli/など)assets/docs/release-process.mdを簡潔化し、除外設定のSSOTをrelease.ymlに明示確認手順
install-config.phpを配置してインストールを実行し、IP制御のみで判定されることを確認install-config.phpが自動削除されること(または失敗時に警告表示されること)を確認release.ymlのPrepare dist directory相当のrsyncをローカル実行し、追加除外対象がdist/に含まれないことを確認備考
.agent/・.codex/配下の運用ファイル追加が含まれます。allowed_ips前提へ移行が必要です。