Skip to content

refactor: add realsense to root flake - #3767

Open
aclauer wants to merge 9 commits into
mainfrom
andrew/refactor/realsense-workspace
Open

refactor: add realsense to root flake#3767
aclauer wants to merge 9 commits into
mainfrom
andrew/refactor/realsense-workspace

Conversation

@aclauer

@aclauer aclauer commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Contribution path

  • Small, safe change that does not need a tracking issue
  • Linked issue or discussion: DIM-XXX / #XXX / URL

Problem

realsense module was in a separate workspace so it could have it's own flake for librealsense. This also caused precommit to fail.

Solution

Consolidates the realsense module to the root crate and fixes the precommit

How to Test

AI assistance

Checklist

  • I have read and approved the CLA.

@codecov

codecov Bot commented Aug 29, 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    #3767      +/-   ##
==========================================
- Coverage   77.83%   77.83%   -0.01%     
==========================================
  Files        1329     1329              
  Lines      126864   126865       +1     
  Branches    11034    11034              
==========================================
- Hits        98750    98745       -5     
- Misses      24962    24968       +6     
  Partials     3152     3152              
Flag Coverage Δ
OS-ubuntu-24.04-arm 74.54% <100.00%> (-0.01%) ⬇️
OS-ubuntu-latest 75.08% <100.00%> (-0.01%) ⬇️
Py-3.10 75.07% <100.00%> (-0.01%) ⬇️
Py-3.11 75.07% <100.00%> (-0.01%) ⬇️
Py-3.12 75.07% <100.00%> (-0.01%) ⬇️
Py-3.13 75.07% <100.00%> (-0.01%) ⬇️
Py-3.14 75.08% <100.00%> (-0.01%) ⬇️
Py-3.14t 75.07% <100.00%> (-0.01%) ⬇️
SelfHosted-Linux 34.64% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
dimos/hardware/sensors/camera/realsense/camera.py 100.00% <100.00%> (ø)

... and 2 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.

@aclauer
aclauer marked this pull request as ready for review August 31, 2026 06:36
@aclauer
aclauer marked this pull request as draft August 31, 2026 06:36
@greptile-apps

greptile-apps Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The RealSense Rust module is now included in the root workspace and its Linux native dependencies are declared in the Nix environment. On Darwin, the development environment still omits Librealsense and its pkg-config metadata, so workspace-wide Cargo checks fail when building the newly included RealSense crate.

Confidence Score: 4/5

The change is not ready to merge for Darwin developers because root workspace Rust commands cannot resolve the newly required RealSense native dependency.

One actionable non-security failure remains: the Darwin Nix shell excludes both the Librealsense library and its development metadata required by realsense-sys.

Files Needing Attention: flake.nix

T-Rex T-Rex Logs

What T-Rex did

  • T-Rex produced proofs for two posted P1 findings and linked them to their respective review comments.
  • T-Rex validated the contract changes by reviewing the base-commit delta and the cargo/build outputs, confirming the addition of dimos-realsense and that cargo check failed due to a missing realsense2.pc.

View all artifacts

T-Rex Ran code and verified through T-Rex

Comments Outside Diff (1)

  1. General comment

    P1 Darwin flake omits the native dependency required by the new workspace member

    • Bug
      • Cargo.toml:10 adds dimos/hardware/sensors/camera/realsense/rust to the root workspace, but flake.nix:85 and flake.nix:86 gate pkgs.librealsense and pkgs.librealsense.dev with onlyIf=pkgs.stdenv.isLinux. On Darwin neither package is selected. The member directly depends on realsense-sys = "2.56" (dimos/hardware/sensors/camera/realsense/rust/Cargo.toml:37), whose executed build script invokes pkg-config --libs --cflags realsense2 and fails when realsense2.pc is absent.
    • Cause
      • The workspace expansion makes native RealSense linkage part of every root workspace build, while the Nix development shell provisions its required library and pkg-config metadata only for Linux.
    • Fix
      • Either make dimos-realsense conditional/excluded for unsupported Darwin workspace builds, or provide a supported Darwin Librealsense package plus its realsense2.pc path in the Darwin flake environment. If RealSense is intentionally Linux-only, ensure root CI/developer Cargo workspace commands do not select it on Darwin.

    T-Rex Ran code and verified through T-Rex

Reviews (2): Last reviewed commit: "Sharing is caring" | Re-trigger Greptile

Comment thread flake.nix Outdated
@aclauer
aclauer marked this pull request as ready for review August 31, 2026 20:41
Comment thread flake.nix Outdated
@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Sep 1, 2026
@github-actions github-actions Bot removed the ready-to-merge Required CI checks have passed on this PR label Sep 1, 2026
@aclauer aclauer changed the title Add realsense to root flake fix: add realsense to root flake Sep 1, 2026
@aclauer aclauer changed the title fix: add realsense to root flake refactor: add realsense to root flake Sep 1, 2026
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