Repository navigation
test(v3.2.66): WorktreeManager.psm1 テストカバレッジ拡充 — Get-WorktreeSummary / edge cases - #229
Conversation
…/ edge cases (#228) Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughWorktreeManager.psm1 のユニットテストカバレッジを拡充し、Get-WorktreeSummary の 9 件と Get-WorktreeBasePath のエッジケース 2 件を追加。テスト総数を 14 件に増加させ、ドキュメント・リリースノートを v3.2.66 へ更新。 Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
WorktreeManager.psm1 のうち未テストだった Get-WorktreeSummary(および Get-WorktreeBasePath の edge cases)を、Mock -ModuleName WorktreeManager Get-Worktree により git コマンド非依存で検証できるようにして、ユニットテストカバレッジを拡充する PR です。あわせて v3.2.66 のドキュメント/タスク更新が入っています。
Changes:
tests/unit/WorktreeManager.Tests.ps1にGet-WorktreeSummaryの変換ロジック検証などテストケースを追加(計 14 件)CHANGELOG.md/README.md/TASKS.mdに v3.2.66 の記録を追加・更新
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/unit/WorktreeManager.Tests.ps1 | Get-WorktreeSummary と Get-WorktreeBasePath の unit test を追加して edge case を検証 |
| CHANGELOG.md | v3.2.66 の変更履歴エントリを追加 |
| README.md | バージョン表記とテスト総数を v3.2.66 に更新 |
| TASKS.md | GitHub#228 対応の完了タスク (#81) を追加 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@CHANGELOG.md`:
- Line 5: Update the release date on the CHANGELOG entry for v3.2.66 — locate
the header line containing "## [v3.2.66] - 2026-04-22 — WorktreeManager.psm1
テストカバレッジ拡充" and change the date portion to the actual publication date (e.g.,
2026-04-21) so the recorded release date is not in the future.
In `@README.md`:
- Around line 30-31: README の複数箇所でテスト件数が不一致(例: テーブル行の「バージョン/テスト」行で **714件**
に更新されている一方、別箇所に「680件」「433件」が残っている)ため、ファイル全体の外向けテスト件数表記を一括同期してください。具体的には README
内のすべてのテキスト/テーブルセルで「テスト」「件数」「714件」に言及している箇所を検索して値を 714
件に統一し、関連する表見出しや注釈(テーブルの「バージョン」「テスト」行、その他の概要セクションやサマリー)も合わせて更新して整合性を確保してください。
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 621ce34d-6bd7-4f63-b38c-148ac1492431
📒 Files selected for processing (4)
CHANGELOG.mdREADME.mdTASKS.mdtests/unit/WorktreeManager.Tests.ps1
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Agent
- GitHub Check: test-and-validate
- GitHub Check: PSScriptAnalyzer
🧰 Additional context used
📓 Path-based instructions (1)
**/*.md
📄 CodeRabbit inference engine (CLAUDE.md)
Update README.md whenever: utilizable user-facing features change, setup procedures change, architecture changes, or quality gates change; maintain README as external-facing truth with clear organization, extensive use of tables and icons, and include architecture diagrams
Files:
TASKS.mdCHANGELOG.mdREADME.md
🧠 Learnings (1)
📚 Learning: 2026-04-21T11:54:33.792Z
Learnt from: CR
Repo: Kensan196948G/ClaudeCode-StartUpTools-New PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-21T11:54:33.792Z
Learning: Execute Cloud Schedule registration in the following order at session start: ClaudeOS Monitor hourly, Development every 2 hours, Verify hourly, Improvement hourly (Monday-Saturday only, 5-hour maximum per session)
Applied to files:
README.md
🔇 Additional comments (4)
TASKS.md (1)
90-90: タスク記録の更新内容は適切です。Issue 番号、対象機能、テスト拡充数、品質ゲート結果まで一行で追跡できており、運用上の可読性が高いです。
tests/unit/WorktreeManager.Tests.ps1 (2)
33-42:Get-WorktreeBasePathの追加エッジケースは妥当です。スペース含みパスと深いネストを押さえており、結合ロジックの回帰検知に有効です。
48-126:Get-WorktreeSummaryのテスト拡充は十分に実用的です。
Mock -ModuleName WorktreeManagerを使って外部依存を切り離しつつ、表示変換の主要分岐を網羅できています。README.md (1)
10-11: v3.2.66 の概要更新は適切です。今回のテスト拡充ポイントが簡潔に伝わる記述になっています。
|
|
||
| # CHANGELOG | ||
|
|
||
| ## [v3.2.66] - 2026-04-22 — WorktreeManager.psm1 テストカバレッジ拡充 |
There was a problem hiding this comment.
未来日付のリリース日を実日付に合わせてください。
Line 5 の 2026-04-22 は現在時点(2026-04-21)より未来です。履歴として確定済みの記録なら、実際の公開日に揃えた方が混乱を避けられます。
🛠 修正例
-## [v3.2.66] - 2026-04-22 — WorktreeManager.psm1 テストカバレッジ拡充
+## [v3.2.66] - 2026-04-21 — WorktreeManager.psm1 テストカバレッジ拡充📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ## [v3.2.66] - 2026-04-22 — WorktreeManager.psm1 テストカバレッジ拡充 | |
| ## [v3.2.66] - 2026-04-21 — WorktreeManager.psm1 テストカバレッジ拡充 |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@CHANGELOG.md` at line 5, Update the release date on the CHANGELOG entry for
v3.2.66 — locate the header line containing "## [v3.2.66] - 2026-04-22 —
WorktreeManager.psm1 テストカバレッジ拡充" and change the date portion to the actual
publication date (e.g., 2026-04-21) so the recorded release date is not in the
future.
| | バージョン | **v3.2.66** (WorktreeManager.psm1 テストカバレッジ拡充 14件) — 旧: v3.2.65 (New-CloudSchedule.ps1 ユニットテスト 23件追加) | | ||
| | テスト | **714件** — Pester (Unit 18 / Integration 11 / Smoke 1) | |
There was a problem hiding this comment.
README内のテスト件数表記を全セクションで統一してください。
Line 31 で 714件 に更新されていますが、同一ファイル内に 680件 や 433件 の記載が残っており、外部向け情報として不整合です。今回更新に合わせて関連箇所を一括同期した方が安全です。
As per coding guidelines **/*.md: maintain README as external-facing truth with clear organization, extensive use of tables and icons, and include architecture diagrams.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@README.md` around lines 30 - 31, README の複数箇所でテスト件数が不一致(例:
テーブル行の「バージョン/テスト」行で **714件**
に更新されている一方、別箇所に「680件」「433件」が残っている)ため、ファイル全体の外向けテスト件数表記を一括同期してください。具体的には README
内のすべてのテキスト/テーブルセルで「テスト」「件数」「714件」に言及している箇所を検索して値を 714
件に統一し、関連する表見出しや注釈(テーブルの「バージョン」「テスト」行、その他の概要セクションやサマリー)も合わせて更新して整合性を確保してください。
概要
scripts/lib/WorktreeManager.psm1(375行・7関数)のテストがGet-WorktreeBasePath3件のみだった問題を解消します(Issue #228)。Mock -ModuleName WorktreeManager Get-Worktreeを使い、git コマンドに依存せずGet-WorktreeSummaryの変換ロジックを純粋に検証。変更内容
tests/unit/WorktreeManager.Tests.ps1拡充(3 → 14 テストケース)Get-WorktreeBasePath: edge cases +2件(スペース入りパス / 深いネスト)Get-WorktreeSummary: 9件新規([MAIN]ラベル / コミット7文字切り詰め /(detached)フォールバック /unknownコミット / Path 保持 / 空配列 / プロパティ検証)CHANGELOG.md: v3.2.66 エントリ追加README.md: バージョン v3.2.66、テスト件数 714 件に更新TASKS.md: タスク feat(boot): Issue #70 — Step 3 Memory Restore を McpHealthCheck.psm1 でワイヤリング #81 追加テスト結果
影響範囲
テストファイル更新のみ。既存スクリプトへの変更なし。
Closes
Closes #228
🤖 Generated with Claude Code
Summary by CodeRabbit
v3.2.66 リリースノート
Tests
Documentation