fail fast on dimsim lfs pointers - #3577
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #3577 +/- ##
==========================================
+ Coverage 75.73% 76.76% +1.03%
==========================================
Files 1264 1237 -27
Lines 122029 119026 -3003
Branches 10894 10590 -304
==========================================
- Hits 92416 91368 -1048
+ Misses 26545 24598 -1947
+ Partials 3068 3060 -8
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Greptile SummaryThis change adds a startup check for Git LFS pointer files in DimSim assets so users receive an actionable fetch command before the simulator starts. The scene check does not follow the same external-scene precedence as the bridge. A selected scene from Confidence Score: 4/5Not safe to merge until the preflight resolves the active scene source using the bridge's external-directory-first behavior. A focused runtime harness exercised both external and built-in scene shadowing directions through the production preflight helper and the actual bridge resolver. It showed that the two components select different asset sources. Files Needing Attention:
What T-Rex did
|
| def _check_lfs_stubs(scene: str) -> None: | ||
| """Fail fast when DimSim assets are un-fetched Git LFS pointer stubs.""" | ||
| stubs = [] | ||
| for asset_dir in (_DIMSIM_DIR / "scenes" / scene, _DIMSIM_DIR / "public" / "embodiment"): |
There was a problem hiding this comment.
Scene preflight scans the wrong asset source
DIMSIM_SCENES_DIR takes precedence when the bridge resolves /scenes/, but this check always scans the same-named built-in scene directory. An external scene containing a Git LFS pointer can therefore pass preflight and then be served to DimSim, restoring the delayed asset-loading failure this change is intended to avoid. Conversely, a pointer in a shadowed built-in scene prevents startup even when the selected external scene has valid assets. Resolve the effective scene directory with the bridge's DIMSIM_SCENES_DIR-first precedence before scanning it.
Artifacts
Focused DimSim scene preflight validation harness
- This authored Python harness creates same-named built-in and external scene fixtures, invokes the PR helper body, and requests the actual bridge scene asset, proving whether preflight and resolution agree.
Focused DimSim scene preflight execution output
- This captured successful harness run shows the external LFS pointer was allowed and served, while a built-in pointer falsely blocked a real external override.
Problem
If you use
GIT_LFS_SKIP_SMUDGE=1in your environment, git leaves LFS files as pointers. This gives a hard to see 90s timeout error when runningdimos --simulation dimsim --dimsim-scene=apartment run unitree-go2-agentic.Solution
Error faster if the files are LFS pointers.