Repository navigation
fix(lsp): restore create_class writes when lsp is off - #532
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
|
|
ミヤビ・ホンダ: develop への配信を確認しました。 origin/develop=0404bbc0b1b7ccb893ccdead8402069ebcc9df31 は検証済み HEAD 1d03ecb を包含し、変更した4製品ファイルも一致しています。最新 canonical verify.run vrr-9a98d0c910544163b0f1741291ae631d は全6コマンドPASS、CIは19成功・2対象外・失敗0です。Issue #531 の AC-1〜5 を更新済みです。 User Verification Result: n/a (autonomous) |
Summary
UNITY_CLI_LSP_MODE=offのcreate_classが「requires LSP」で失敗する回帰を修正し、v0.18.1 と同じ直接保存を復元します。auto/required/ 未設定は既存の LSP 書き込み経路と結果フィールドを維持します。Changes
src/tooling/local_tools.rs: off の場合だけ親ディレクトリを作成してテンプレートを保存し、success/path/contentを返します。既存の名前・パス検証と既存ファイル拒否を再利用します。src/tooling/local_tools.rs: off の直接保存、既存ファイル拒否、パス指定、MonoBehaviour / ScriptableObject の UnityEngine using を回帰テストで検証します。他の LSP 書き込みツールの off 時エラーも既存テストで維持します。tests/csharp_post_write.rs: 既存の CLI 統合テストを auto / required / 未設定の3モードに拡張し、LSP の backend / applied / changedFiles と生成内容を確認します。README.md/CHANGELOG.md: off の例外動作と Unreleased の互換性回復を記載します。.gwt/work/events/: この実装の最終 Work 記録を同梱します。Testing
canonical
verify.run: PASS、recordvrr-9a98d0c910544163b0f1741291ae631d、対象 commit1d03ecb。cargo fmt --all -- --checkcargo +stable clippy --all-targets -- -D warningscargo test --all-targets -- --test-threads=1— 単体575件およびWindowsで実行可能な統合テストが成功。cargo run -- skills lint --severity errordotnet test lsp/Server.Tests.csproj— 846件成功。bun x markdownlint-cli README.md --config .markdownlint.json --ignore-path .markdownlintignorecargo test --manifest-path .cache/issue-531/unix-source/Cargo.toml --test csharp_post_write create_class -- --test-threads=1— Git commit の隔離スナップショットで3モードの CLI 統合テストが成功。Windowsのcore.autocrlfによるshebangのCRLFは、snapshot内のPython fixtureをGitのLF原本にして切り分けました。製品コードへの追加変更はありません。create_csharp_file requires LSPで失敗し、修正後の create_class 関連7件が成功。主な回帰シナリオ:
create_class_writes_directly_when_lsp_is_offcreate_class_lsp_off_preserves_unityengine_using_and_path_overridecreate_class_rejects_existing_filelsp_write_tools_require_lsp_modecreate_class_writes_through_lsp_and_keeps_output_shapeLaunch mode: autonomous
User Verification Result: n/a (autonomous)
Agent Visual Check: n/a (no UI surface)
PR Readiness
Closing Issues
Closes #531
Related Issues / Links
Checklist
cargo clippy,cargo fmt; svelte-check は UI 変更がないため対象外)Context
原因は create_class が LSP モードにかかわらず local_lsp_write(create_csharp_file) を呼んでいたことです。
PM default ruling (override available): off の create_class だけを直接保存へ戻します。他のモードと他の書き込みツールの挙動は変えず、Issue の受け入れ基準を満たす最小変更に限定しました。
Agent: ミヤビ・ホンダ (Codex)