Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions Pull-SDLC.ai.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,36 @@ Describe 'Resolve-AlwaysLocalConflicts (removed)' {
}
}

Describe 'Test-IsUpstreamManagedPath -- self-managing sync tooling (#112)' {
It 'returns $true for Pull-SDLC.ai.ps1' {
Test-IsUpstreamManagedPath -Path 'Pull-SDLC.ai.ps1' | Should -BeTrue
}

It 'returns $true for Pull-SDLC.ai.Tests.ps1' {
Test-IsUpstreamManagedPath -Path 'Pull-SDLC.ai.Tests.ps1' | Should -BeTrue
}

It 'returns $true for Cleanup-Worktree.ps1' {
Test-IsUpstreamManagedPath -Path 'Cleanup-Worktree.ps1' | Should -BeTrue
}

It 'returns $true for sync-manifest.json' {
Test-IsUpstreamManagedPath -Path 'sync-manifest.json' | Should -BeTrue
}

It 'returns $true for CLAUDE.md (existing baseline preserved)' {
Test-IsUpstreamManagedPath -Path 'CLAUDE.md' | Should -BeTrue
}

It 'still returns $false for always-local README.md (always-local trumps managed)' {
Test-IsUpstreamManagedPath -Path 'README.md' | Should -BeFalse
}

It 'returns $false for an unrelated repo file' {
Test-IsUpstreamManagedPath -Path 'src/Foo.cs' | Should -BeFalse
}
}

Describe 'Invoke-TemplateScaffold' {
BeforeEach {
$script:src = Join-Path $TestDrive 'src'
Expand Down
6 changes: 5 additions & 1 deletion Pull-SDLC.ai.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ $script:UpstreamManagedPaths = @(
'.github/copilot-instructions.md',
'.github/agents/',
'.github/skills/',
'.github/instructions/'
'.github/instructions/',
'Pull-SDLC.ai.ps1',
'Pull-SDLC.ai.Tests.ps1',
'Cleanup-Worktree.ps1',
'sync-manifest.json'
)

# Paths that are inherently consumer-owned. Always-local trumps managed-paths
Expand Down
Loading