feat(BA-6041): honor MountOption.mount_destination on session creation#11610
Draft
jopemachine wants to merge 1 commit into
Draft
feat(BA-6041): honor MountOption.mount_destination on session creation#11610jopemachine wants to merge 1 commit into
jopemachine wants to merge 1 commit into
Conversation
jopemachine
added a commit
that referenced
this pull request
May 14, 2026
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4ce8251 to
9c3636c
Compare
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>
9c3636c to
17cfb6d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #11608 / BA-6040. The unified
MountOptiondeclaredmount_destination, but the session-creation runtime (AgentRegistry._mount_entries_from_creation_config) silently dropped it — destinations were only read frommount_id_map. Inference service creation, on the other hand, always honored the inlinemount_destinationbecause 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_destinationifmount_id_mapdoes 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
MountOptiontype and avoids splitting intoSessionMountOption/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 createwithmount_options[uuid].mount_destinationmounts at the requested destination./bai session createwithmount_id_mapstill works (no regression)./bai service create(inference) still mounts extras at the requested destination🤖 Generated with Claude Code