fix(sync): include sync-tooling files in $script:UpstreamManagedPaths#113
Open
MarkMichaelis wants to merge 1 commit into
Open
fix(sync): include sync-tooling files in $script:UpstreamManagedPaths#113MarkMichaelis wants to merge 1 commit into
MarkMichaelis wants to merge 1 commit into
Conversation
Adds Pull-SDLC.ai.ps1, Pull-SDLC.ai.Tests.ps1, Cleanup-Worktree.ps1, and sync-manifest.json to the upstream-managed path list so the diff-replay sync picks them up. Without this, the script self-updates on every run (via Invoke-SelfRefresh) but the new bytes are never committed by the sync mechanism -- consumers see a persistent `M Pull-SDLC.ai.ps1` in `git status` and must hand-craft a chore(sync) commit each time upstream advances. Same gap surfaced repeatedly in consumer repos (e.g. MarkMichaelis/CodiwomplerSocialMedia#326, #331). sync-manifest.json already listed these paths as the intended managed set; this brings the hardcoded constant in line with the manifest. A full refactor to read sync-manifest.json at runtime (single source of truth) is left for a follow-up. Tests (Pester): - New `Describe 'Test-IsUpstreamManagedPath'` block asserts the four added paths return $true, that always-local README.md still trumps managed, and that unrelated repo files return $false. - Existing 66 tests continue to pass. Closes #112 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds the sync-tooling files themselves (Pull-SDLC.ai.ps1, Pull-SDLC.ai.Tests.ps1, Cleanup-Worktree.ps1, sync-manifest.json) to the hardcoded $script:UpstreamManagedPaths array so the diff-replay sync commits upstream advancements rather than leaving them as uncommitted working-tree changes on consumers.
Changes:
- Extend
$script:UpstreamManagedPathswith the four sync-tooling paths. - Add a Pester
Describeblock with 7 assertions covering the new managed paths and baseline behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Pull-SDLC.ai.ps1 | Adds the four sync-tooling paths to the managed-paths array. |
| Pull-SDLC.ai.Tests.ps1 | Adds Pester coverage for the new managed paths plus baseline preservation tests. |
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.
Summary
Adds
Pull-SDLC.ai.ps1,Pull-SDLC.ai.Tests.ps1,Cleanup-Worktree.ps1, andsync-manifest.jsonto\so the diff-replay sync picks them up.Without this,
Invoke-SelfRefreshwrites new bytes toPull-SDLC.ai.ps1on every run, but the sync mechanism never commits them -- consumers see a persistentM Pull-SDLC.ai.ps1in their working tree and must hand-craft a chore(sync) commit each time the upstream script advances. This gap has recurred on the consumer side (e.g.MarkMichaelis/CodiwomplerSocialMedia#326,#331).sync-manifest.jsonalready lists these paths as the intended managed set, but the script never reads the manifest -- the hardcoded array is the actual source of truth and was out of sync. This PR is the minimal patch to bring them back in sync. A full refactor to loadsync-manifest.jsonat runtime is left for a follow-up.Tests
New
Describe 'Test-IsUpstreamManagedPath -- self-managing sync tooling (#112)'block:CLAUDE.mdstill managed,README.mdstill always-local-trumps-managed, unrelated repo file still\False).All 73 tests pass after the change. Each new assertion was first observed failing on
Should -BeTruewithExpected \True, but got \Falsebefore the constant was updated -- no compile-error collusion.\\powershell
Invoke-Pester -Path .\Pull-SDLC.ai.Tests.ps1
Tests Passed: 73, Failed: 0
\\
Out of scope
sync-manifest.jsonat runtime as single source of truth.\.Closes #112