Skip to content
Merged
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
3 changes: 2 additions & 1 deletion scripts/repin-ci-workflows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ shopt -s inherit_errexit
UPSTREAM=melodic-software/ci-workflows
# The standards sync owns this file's pin.
MANAGED=.github/workflows/pr-check-managed-files-hosted.yml
FORMAL_MODELS='.claude/skills/formal-*/model/**'
DOC=docs/conventions/pr-pipeline/pr-run-activity.md
SHA_RE='^[0-9a-f]{40}$'
TAG_RE='^v[0-9]+\.[0-9]+\.[0-9]+$'
Expand Down Expand Up @@ -96,7 +97,7 @@ apply() {
done <<<"$files"
rm -f "$rewritten"

left="$(git -C "$root" grep -l "$old" -- . ":(exclude)${MANAGED}" || true)"
left="$(git -C "$root" grep -l "$old" -- . ":(exclude)${MANAGED}" ":(exclude,glob)${FORMAL_MODELS}" || true)"
[[ -z "$left" ]] || die "${old} still appears after the rewrite in: $(tr '\n' ' ' <<<"$left")"
outside="$(git -C "$root" status --porcelain | cut -c4- | grep -vxF "$files" || true)"
[[ -z "$outside" ]] || die "paths outside the re-pin set changed: $(tr '\n' ' ' <<<"$outside")"
Expand Down
17 changes: 17 additions & 0 deletions scripts/repin-ci-workflows.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,21 @@ git_test_config "$scratch/left" commit -qm notes
run 1 'apply fails when the old SHA remains outside the set' apply "$OLD" v0.74.0 "$NEW" v0.75.0 --root "$scratch/left"
contains 'the failure names the file' 'still appears after the rewrite in: tests/notes.md'

mk_repo "$scratch/model"
mkdir -p "$scratch/model/.claude/skills/formal-lanes/model"
echo "\\* checked against ${OLD}" >"$scratch/model/.claude/skills/formal-lanes/model/Lanes.tla"
git_test_config "$scratch/model" add .claude
git_test_config "$scratch/model" commit -qm model
run 0 'apply leaves a formal model citing the old SHA' apply "$OLD" v0.74.0 "$NEW" v0.75.0 --root "$scratch/model"
LAST_OUTPUT="$(cat "$scratch/model/.claude/skills/formal-lanes/model/Lanes.tla")"
contains 'the model keeps its checked commit' "$OLD"

mk_repo "$scratch/skilldoc"
mkdir -p "$scratch/skilldoc/.claude/skills/formal-lanes"
echo "pinned at ${OLD}" >"$scratch/skilldoc/.claude/skills/formal-lanes/SKILL.md"
git_test_config "$scratch/skilldoc" add .claude
git_test_config "$scratch/skilldoc" commit -qm skilldoc
run 1 'apply still fails on a formal skill file outside its model' apply "$OLD" v0.74.0 "$NEW" v0.75.0 --root "$scratch/skilldoc"
contains 'the failure names the skill file' 'still appears after the rewrite in: .claude/skills/formal-lanes/SKILL.md'

test_harness::report
Loading