Skip to content

feat(BA-6041): honor MountOption.mount_destination on session creation#11610

Draft
jopemachine wants to merge 1 commit into
mainfrom
refactor/deprecate-mount-destination-session-BA-6041
Draft

feat(BA-6041): honor MountOption.mount_destination on session creation#11610
jopemachine wants to merge 1 commit into
mainfrom
refactor/deprecate-mount-destination-session-BA-6041

Conversation

@jopemachine
Copy link
Copy Markdown
Member

@jopemachine jopemachine commented May 14, 2026

Summary

Follow-up to #11608 / BA-6040. The unified MountOption declared mount_destination, but the session-creation runtime (AgentRegistry._mount_entries_from_creation_config) silently dropped it — destinations were only read from mount_id_map. Inference service creation, on the other hand, always honored the inline mount_destination because its wire schema has no separate destination map.

This PR closes that asymmetry with a one-line registry change: session creation now falls back to mount_options[uuid].mount_destination if mount_id_map does not supply a destination.

Precedence: mount_id_map (preferred — explicit, atomic to the destination concept) > mount_options[uuid].mount_destination (per-vfolder fallback).

This keeps the single unified MountOption type and avoids splitting into SessionMountOption / ModelServingMountOption. Wire change is purely additive — existing callers see no difference.

Test plan

  • tests/unit/manager/test_registry.py::TestMountEntriesFromCreationConfig (three cases) passes
  • ./bai session create with mount_options[uuid].mount_destination mounts at the requested destination
  • ./bai session create with mount_id_map still works (no regression)
  • ./bai service create (inference) still mounts extras at the requested destination

🤖 Generated with Claude Code

@github-actions github-actions Bot added size:S 10~30 LoC comp:common Related to Common component labels May 14, 2026
jopemachine added a commit that referenced this pull request May 14, 2026
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added size:M 30~100 LoC and removed size:S 10~30 LoC labels May 14, 2026
@jopemachine jopemachine force-pushed the refactor/deprecate-mount-destination-session-BA-6041 branch from 4ce8251 to 9c3636c Compare May 14, 2026 08:27
@jopemachine jopemachine changed the title docs(BA-6041): deprecate MountOption.mount_destination for session creation paths refactor(BA-6041): split MountOption into SessionMountOption and ModelServingMountOption May 14, 2026
@github-actions github-actions Bot added size:L 100~500 LoC comp:manager Related to Manager component comp:client Related to Client component comp:cli Related to CLI component and removed size:M 30~100 LoC labels May 14, 2026
Session creation previously read ``permission`` and ``subpath`` from
``mount_options[uuid]`` but silently dropped ``mount_destination`` —
destinations had to come from a separate ``mount_id_map``. Inference
service creation, on the other hand, always honored the inline
``mount_destination`` because ``extra_mounts`` has no separate
destination map on the wire.

Add the fallback so the same ``MountOption`` shape works for both
paths. Precedence: ``mount_id_map`` (explicit destination) >
``mount_options[uuid].mount_destination`` (per-vfolder fallback).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jopemachine jopemachine force-pushed the refactor/deprecate-mount-destination-session-BA-6041 branch from 9c3636c to 17cfb6d Compare May 14, 2026 08:34
@github-actions github-actions Bot added size:M 30~100 LoC and removed size:L 100~500 LoC labels May 14, 2026
@jopemachine jopemachine changed the title refactor(BA-6041): split MountOption into SessionMountOption and ModelServingMountOption feat(BA-6041): honor MountOption.mount_destination on session creation May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:cli Related to CLI component comp:client Related to Client component comp:common Related to Common component comp:manager Related to Manager component size:M 30~100 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant