Skip to content

fail fast on dimsim lfs pointers - #3577

Open
paul-nechifor wants to merge 1 commit into
mainfrom
paul/fix/faster-dimsim-lfs-error
Open

fail fast on dimsim lfs pointers#3577
paul-nechifor wants to merge 1 commit into
mainfrom
paul/fix/faster-dimsim-lfs-error

Conversation

@paul-nechifor

Copy link
Copy Markdown
Contributor

Problem

If you use GIT_LFS_SKIP_SMUDGE=1 in your environment, git leaves LFS files as pointers. This gives a hard to see 90s timeout error when running dimos --simulation dimsim --dimsim-scene=apartment run unitree-go2-agentic.

Solution

Error faster if the files are LFS pointers.

@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

@@            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     
Flag Coverage Δ
OS-ubuntu-24.04-arm 71.69% <ø> (+0.92%) ⬆️
OS-ubuntu-latest 73.45% <ø> (+0.94%) ⬆️
Py-3.10 73.45% <ø> (+0.95%) ⬆️
Py-3.11 73.45% <ø> (+0.94%) ⬆️
Py-3.12 73.45% <ø> (+0.95%) ⬆️
Py-3.13 73.45% <ø> (+0.94%) ⬆️
Py-3.14 73.45% <ø> (+0.94%) ⬆️
Py-3.14t 73.45% <ø> (+0.95%) ⬆️
SelfHosted-Large 29.98% <ø> (+0.11%) ⬆️
SelfHosted-Linux 35.31% <ø> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 37 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@greptile-apps

greptile-apps Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This 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 DIMSIM_SCENES_DIR can contain an LFS pointer and pass the check, while an unrelated same-named built-in pointer can prevent a valid external scene from starting. The scene directory selected for validation should match the directory that the bridge will serve.

Confidence Score: 4/5

Not 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: dimos/simulation/dimsim/dimsim_process.py needs to select the effective scene directory consistently with misc/DimSim/cli/bridge/server.ts.

T-Rex T-Rex Logs

What T-Rex did

  • T-Rex produced proofs for two posted P1 findings and linked them to the corresponding review comments.
  • Executed the Focused DimSim scene preflight validation harness and captured its execution output.
  • Reviewed the general-contract-validation-proof describing preflight guard resolution and noted potential bypass risk for externally resolved scenes and stale built-ins.

View all artifacts

T-Rex Ran code and verified through T-Rex

Comments Outside Diff (1)

  1. General comment

    P1 DimSim LFS preflight checks a different scene source than the frontend resolves

    • Bug
      • With a same-named external scene containing an LFS-pointer model.glb and a real built-in model.glb, the preflight returned ALLOWED while the actual bridge served the external pointer. Reversing the assets made preflight BLOCKED even though the bridge served the external real asset.
    • Cause
      • _check_lfs_stubs(scene) scans _DIMSIM_DIR/scenes/<scene> only, while startBridgeServer checks DIMSIM_SCENES_DIR before built-in scene directories.
    • Fix
      • Resolve the effective scene directory using the same precedence as startBridgeServer, then scan that selected scene's GLB/GLTF assets. Preserve the embodiment scan as appropriate.

    T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "fail fast on dimsim lfs pointers" | Re-trigger Greptile

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"):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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.

View artifacts

T-Rex Ran code and verified through T-Rex

@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Required CI checks have passed on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant