Skip to content

Fix LFS cache bug causing all binary test failures and multi-hour hangs - #12

Merged
Kkuntal990 merged 1 commit into
sccn:masterfrom
Kkuntal990:fix/lfs-checkout-and-job-timeout
Mar 3, 2026
Merged

Kkuntal990 merged 1 commit into
sccn:masterfrom
Kkuntal990:fix/lfs-checkout-and-job-timeout

Conversation

@Kkuntal990

Copy link
Copy Markdown
Contributor

Summary

  • Add git lfs checkout step that always runs after LFS cache restore, fixing the root cause of all 12 binary test failures and the multi-hour hang on binary_pop_snapread_wrapperTest
  • Add timeout-minutes: 120 to the job as a safety net against future hangs

Root Cause

The CI workflow caches .git/lfs and conditionally runs git lfs pull only on cache miss. However, git lfs pull = git lfs fetch + git lfs checkout. On cache hit:

  1. .git/lfs/objects are restored from cache (fetch is unnecessary — good)
  2. But git lfs checkout (which replaces LFS pointer files in the working tree with actual binary content) never runs
  3. Working tree files remain as ~130-byte LFS pointer text
  4. MATLAB tries to read these as binary → errors (notBinaryFile, nonLogicalConditional, etc.) or hangs (SMA file reader loops on pointer text)

This caused the identical 12 test failures in both R2021b and R2025a jobs, and the hang on binary_pop_snapread_wrapperTest that inflated CI runtime from ~1 hour to 4+ hours.

Test plan

  • Trigger a manual workflow run and verify all 12 previously failing binary tests now pass
  • Verify binary_pop_snapread_wrapperTest completes normally instead of hanging
  • Verify total CI runtime returns to ~1 hour range

🤖 Generated with Claude Code

On cache hit, `git lfs pull` was skipped entirely. Since `git lfs pull`
performs both `git lfs fetch` (download objects) and `git lfs checkout`
(replace pointer files with actual content), skipping it on cache hit
meant LFS pointer files were never replaced in the working tree. MATLAB
then tried to read ~130-byte pointer text as binary data, causing 12
test failures and a multi-hour hang on binary_pop_snapread_wrapperTest.

Fix: add an always-run `git lfs checkout` step after cache restore.
Also add timeout-minutes: 120 as a safety net against future hangs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Kkuntal990
Kkuntal990 merged commit 3f148c4 into sccn:master Mar 3, 2026
0 of 2 checks passed
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