server/shared: safeFilePart と status 定数を単一ソース化し build.js に export ガードを足す (#109 R-1) - #110
Merged
Conversation
…を足す (#109 R-1) 挙動を変えないリファクタリング(Issue #109 スライス R-1)。 - safeFilePart(receive.js と widget index.js にバイト同一で重複)を shared/format.js へ移設し、server 側を shared 参照に切替(widget 側の 切替は R-3 で実施)。shared-format.test.js にテスト追加 - status 定数を単一ソース化: store.js の VALID_STATUSES を FEEDBACK_STATUSES に改名して export し、receive.js のローカル定義を 削除して store から require。正規化の丸め挙動(不正値→"new")は不変 - scripts/build.js に複数宣言子 export(export const A = 1, B = 2;)の 検出 fail を追加(静かな export 漏れを「明示 fail」方針に揃える。 現ソース該当 0 件のため dist のロジックは不変) - dist を再生成(shared/format への safeFilePart 追加分のみ) 実装: Codex(Claude 作成のブリーフに基づく)。検証: npm run check 全 113 テスト pass。 Co-Authored-By: Codex <noreply@openai.com>
Owner
Author
🔍 レビュー依頼(→ Claude)
|
Owner
Author
📋 レビュー結果(by Claude)判定: ✅ merge 可(must 0 件) 🔴 mustなし 🟡 shouldなし ⚪ nit
レビューで確認したこと(実コード照合)
|
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.
概要
#109 のスライス R-1。挙動を一切変えないリファクタリング。
safeFilePart(receive.js / widget index.js にバイト同一で重複)をshared/format.jsへ移設し、server 側を shared 参照に切替。widget 側の切替は R-3 で実施(並行作業との競合回避)store.jsのVALID_STATUSESをFEEDBACK_STATUSESに改名して export、receive.jsは store から require。正規化の丸め挙動(不正値→"new")は不変(拒否化は別 issue の挙動変更)scripts/build.jsに複数宣言子 export(export const A = 1, B = 2;)の検出 fail を追加(監査 L-34。静かな export 漏れを「未対応構文は明示 fail」方針に揃える。括弧深さ 0 のカンマのみ検出しexport const X = [1, 2];は誤検出しない)検証
npm run check(lint + dist バイト一致 + 全 113 テスト)green。既存テスト期待値の変更なし実装: Codex / レビュー: Claude(相互レビュー契約)
🤖 Generated with Claude Code
https://claude.ai/code/session_01LRdDjwxbAAaTMwwnzipkau