Skip to content

Commit a6840ff

Browse files
mac-bridge: force LFS materialization + pointer guard
checkout@v4 lfs:true is not sufficient on a reused self-hosted workspace: a prior non-LFS checkout leaves pointer-content files that git does not re-smudge (blob unchanged), observed live as torch.load 'Unsupported operand 118'. git lfs pull + a pointer scan make k3 checkpoint loading deterministic. Co-authored-by: FluffyAIcode <FluffyAIcode@users.noreply.github.com>
1 parent a16650d commit a6840ff

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/mac-bridge.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,30 @@ jobs:
6868
echo "=== .mac-bridge/request.json ==="
6969
cat .mac-bridge/request.json
7070
71+
- name: Materialize LFS objects (deterministic)
72+
# checkout@v4's lfs:true proved insufficient on a reused
73+
# self-hosted workspace: a previous non-LFS checkout left
74+
# pointer-content files in the worktree, the blob is unchanged
75+
# on the new branch, so git skips re-smudging and the stale
76+
# pointer survives (observed live: torch.load failing with
77+
# "Unsupported operand 118" = ASCII 'v' of an LFS pointer).
78+
# `git lfs pull` force-materializes; the guard fails fast if
79+
# any tracked LFS file is still a pointer.
80+
run: |
81+
git lfs install --local
82+
git lfs pull
83+
bad=""
84+
while IFS= read -r f; do
85+
if [ -f "$f" ] && head -c 40 "$f" | grep -q "git-lfs"; then
86+
bad="$bad $f"
87+
fi
88+
done < <(git lfs ls-files -n)
89+
if [ -n "$bad" ]; then
90+
echo "::error::LFS pointers not materialized:$bad"
91+
exit 1
92+
fi
93+
echo "all LFS objects materialized"
94+
7195
- name: Run preset (allowlist-validated executor)
7296
env:
7397
PYTHONPATH: .:sdks/python

0 commit comments

Comments
 (0)