fix: section-12 drift checks work under the copy-deploy model#192
Merged
Conversation
FAIL 1 (harness/skill drift): compile-harness.sh required a git repo (git rev-parse), but the healthcheck runs --check from the non-git deploy copy ~/.dotfiles (ADR-012) -> '[ERROR] not in a git repo' false-fail. Now resolve the repo/deploy root from the script's own location (CWD- and deploy-model-independent); removed the vestigial 'cd DOTFILES_DIR'; --check/--deploy/--refresh now fail loudly on a missing manifest. FAIL 2 (deployed skill is a symlink): the check correctly caught a real dangling find-skills symlink (-> a removed ~/.agents leftover); kept the check strict (all deployed skills must be hard copies, BUG-100), report all offenders with an ours/foreign fix hint. Regression test: compile-harness --check from a non-git copy.
…tion The copy-deploy fix switched compile-harness.sh from git-toplevel (CWD-based) to SCRIPT_DIR-based root resolution, so the real script under test resolved to the live repo instead of each test's throwaway fixture — 26 pipeline tests then ran --refresh/--deploy against the wrong tree and failed. Add a HARNESS_REPO_ROOT override (same explicit-override idiom as VAULT_PATH): the fixture tests export it in setup() to pin the root; production keeps the SCRIPT_DIR default untouched. Realign the symlink-free guard grep to the current healthcheck message wording.
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.
Fixes the two section-12 "Repo <-> Deploy-Dir Drift" healthcheck FAILs from
setup-linux. Both were exposed by the copy-deploy model (ADR-012 made~/.dotfilesa plain non-git copy).FAIL 1 - harness/skill drift
compile-harness.sh --checkrequired a git repo (git rev-parse), but the healthcheck runs it from the non-git~/.dotfiles->[ERROR] not in a git repo-> false-fail.Fix: resolve the root from the script's own location (CWD- and deploy-model-independent) - works in a checkout, a linked worktree, and the non-git copy alike. Removed the vestigial
cd "$DOTFILES_DIR".--check/--deploy/--refreshnow fail loudly on a missing manifest (was a silent pass).FAIL 2 - deployed skill is a symlink (
~/.claude/skills/find-skills)A REAL issue, correctly caught:
find-skillswas a dangling symlink (-> a removed 3-Feb~/.agentsleftover). Resolved by removing the broken symlink (runtime). The check stays strict - all deployed skill paths must be hard copies (BUG-100); now reports every offender with an ours/foreign fix hint. (An attempt to scope the check to "our" skills was reverted - it would have hidden the real dangling symlink, contradicting the all-hard-copies invariant.)Verification
bats tests/compile-harness-rootresolve.bats: --check works from a non-git copy + fails gracefully without a manifest.skills-pipeline.bats+claude-settings-template.batsgreen;shellcheck+bash -nclean.