Skip to content

Release v1.4.1: run apm install in a local worktree on a network share - #26

Merged
RobHofmann merged 1 commit into
mainfrom
20-apm-install-on-share
Nov 11, 2026
Merged

RobHofmann merged 1 commit into
mainfrom
20-apm-install-on-share

Conversation

@RobHofmann

@RobHofmann RobHofmann commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Refs #20

#20 made the pre-push gates work on a network share. This takes the same idea to apm install, the other step that breaks there.

What changes

  • New helper Invoke-ApmInstall in AiSdlcSetup.ps1, used by Install-AiSdlc.ps1 and Update-AiSdlc.ps1 instead of a bare apm install.
    • On a local disk nothing changes: apm runs in the repository.
    • On a network share it runs apm in a temporary local git worktree of HEAD, with the working copies of apm.yml, apm.lock.yaml, aisdlc.json, .mcp.json and .claude/settings.json. Then it copies each file of the new lock that differs from the share, and removes each file that only the old lock listed.
    • The share check is the one the pre-push hook uses (//host/share, also for a mapped drive). AISDLC_APM_LOCAL_INSTALL=1 forces the worktree, =0 turns it off.
  • Test-AiSdlcNetworkPath and Get-ApmDeployedFile support it.
  • ai-sdlc-hooks/SKILL.md, CHANGELOG.md, every apm.yml at 1.4.1, the sync manifest and the self-install.

Why

On a network share, APM 0.31.0 reported "Installed 5 APM dependencies" but left the changed skill folders empty. Its lock then listed those folders instead of their files, so a second run skipped them. The same install on a local disk was correct and took 11 seconds instead of about 3 minutes.

Testing

  • Pester: 61 tests pass in AiSdlcSetup, Update-AiSdlc and Install-AiSdlc. The new ones cover the worktree path, a failing apm, the lock reader, and a share whose working copy differs from HEAD.
  • A consumer on a mapped network drive: its private packs moved from v1.0.4 to v1.0.3 and back through the helper. Each time the files matched the tag exactly, in about 20 seconds, and no worktree was left behind. The consumer then matched its main again.
  • That real test found two bugs the first tests missed, both fixed here: git status refused the worktree as dubious ownership (its git folder is on the share), and a comparison with HEAD instead of the share missed a share that was ahead of HEAD. A failed git status now fails the install instead of passing in silence.
  • Pre-flight: gates, tests, issue contract and gitleaks pass.

Notes

On a network share, APM 0.31.0 reported a good install but left the changed
skill folders empty, and its lock listed those folders, so a second run
skipped them. The same install on a local disk was correct.

Install-AiSdlc.ps1 and Update-AiSdlc.ps1 now call Invoke-ApmInstall. On a
share it runs apm in a local git worktree of HEAD, with the working copies
of the files apm reads or merges into. Then it copies each file of the new
lock that differs from the share, and removes each file that only the old
lock listed. The share check is the one the pre-push hook uses, and
AISDLC_APM_LOCAL_INSTALL forces it on or off.

Proven on a consumer on a share: a move of its private packs from v1.0.4 to
v1.0.3 and back gave the exact files of each tag, in 20 seconds instead of
about 3 minutes.
@RobHofmann RobHofmann closed this Nov 11, 2026
@RobHofmann RobHofmann reopened this Nov 11, 2026
@RobHofmann
RobHofmann merged commit 7b1eb0d into main Nov 11, 2026
46 of 48 checks passed
@RobHofmann
RobHofmann deleted the 20-apm-install-on-share branch November 11, 2026 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant