diff --git a/docs/testing.md b/docs/testing.md index 49e561c..91408ef 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -30,9 +30,9 @@ on any failure — that's the form the GitHub Actions workflow uses. Headline numbers as of this writing — Pester `It`-block counts for the auto lanes (the manifest entries are coarser; each entry is a test *file* that typically contains 3–10 individual assertions): -**373 pure** + **46 distro** = ~419 auto checks. The 4 **manual** entries +**373 pure** + **68 distro** = ~441 auto checks. The 4 **manual** entries in the manifest aren't Pester `It` blocks — they're y/n prompts wired -through `Invoke-ManualTest` — bringing the suite total to ~423 checks. CI runs parse-check + pure on +through `Invoke-ManualTest` — bringing the suite total to ~445 checks. CI runs parse-check + pure on every push to any branch; the distro lane runs on PRs and on `master`. Manual is opt-in (never in CI); diag is on-demand. diff --git a/modules/Prune.psm1 b/modules/Prune.psm1 index 9a99158..3a0a033 100644 --- a/modules/Prune.psm1 +++ b/modules/Prune.psm1 @@ -180,7 +180,7 @@ function Find-StaleWorktrees { } # ---- hostProjects (checkouts on the Windows side) ---- - if ($ProfileSpec -and $ProfileSpec.ContainsKey('projects') -and $ProfileSpec.projects) { + if ($ProfileSpec -and $ProfileSpec.ContainsKey('projects')) { foreach ($p in @($ProfileSpec.projects)) { if (-not ($p -is [hashtable])) { continue } $ptype = 'distro' diff --git a/tests/distro/Prune.Tests.ps1 b/tests/distro/Prune.Tests.ps1 index 7e25ede..548027d 100644 --- a/tests/distro/Prune.Tests.ps1 +++ b/tests/distro/Prune.Tests.ps1 @@ -44,10 +44,11 @@ AfterAll { try { Invoke-Claudearium -DistroName $script:distro -ProfilePath $script:profilePath ` -Args @{ Verb='project'; SubVerb='remove'; Arg=$script:proj; Force=$true } -AllowFail | Out-Null - } catch {} - Invoke-InDistro -Name $script:distro -User 'claude' -AllowFail -CaptureOutput ` - -Command 'rm -rf /tmp/prune-test-remote.git /tmp/prune-test-seed' | Out-Null - Remove-Item -LiteralPath $script:profilePath -ErrorAction SilentlyContinue + } finally { + Invoke-InDistro -Name $script:distro -User 'claude' -AllowFail -CaptureOutput ` + -Command 'rm -rf /tmp/prune-test-remote.git /tmp/prune-test-seed' | Out-Null + Remove-Item -LiteralPath $script:profilePath -ErrorAction SilentlyContinue + } } Describe 'prune detects orphaned sessions when the worktree dir is gone' -Tag 'distro' {