Skip to content

fix(camera): resolve RCE acquisition path against data root for manifest - #28

Draft
larsrollik wants to merge 1 commit into
mainfrom
bug/rce-camera-manifest-relative-path
Draft

fix(camera): resolve RCE acquisition path against data root for manifest#28
larsrollik wants to merge 1 commit into
mainfrom
bug/rce-camera-manifest-relative-path

Conversation

@larsrollik

Copy link
Copy Markdown
Member

Problem

On acquisition machines using the RCE camera backend, every session logged a FileNotFoundError traceback and silently failed to record the camera acquisition in session_manifest.yaml.

The RCE adapter receives acquisition_path relative to the data root (the remote conductor needs it relative), but reused that same relative value to write the local session_manifest.yaml. The write resolved against the process CWD, which on most machines is not the data root, so the directory did not exist and the manifest write raised FileNotFoundError. It was caught as best-effort bookkeeping (logged as a WARNING, acquisition continued), so it surfaced as noise plus a missing camera peer entry.

Only RCE setups were affected: FLIR setups pass an absolute acqdir, and no-camera setups skip registration entirely.

Fix

  • Resolve acquisition_path against output_dir (the data root) before registering and finalizing the camera peer, leaving the relative path untouched for the remote conductor.
  • Backward compatible: joining the data root with an already-absolute path returns the absolute path unchanged.

Tests

  • Added a regression test exercising the real relative-path caller usage.
  • 4 passing in test_camera_peer_registration.

Version bump: patch.

The RCE adapter received acquisition_path relative to the data root (the
remote conductor needs it relative), but reused it to write the local
session_manifest.yaml. That write resolved against the process CWD and
raised FileNotFoundError on machines whose CWD is not the data root, so
RCE camera setups logged a traceback and never recorded the camera peer.

- resolve acquisition_path against output_dir before registering and
  finalizing the camera peer, leaving the relative path to the conductor
- add regression test covering the relative-path caller usage

Tests: +1 (4 passing in test_camera_peer_registration).
Version bump: patch.
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