fix: anchor relative session sources to declaring bundle base_path - #279
Open
Sam Schillace (ramparte) wants to merge 2 commits into
Open
fix: anchor relative session sources to declaring bundle base_path#279Sam Schillace (ramparte) wants to merge 2 commits into
Sam Schillace (ramparte) wants to merge 2 commits into
Conversation
The session naming hook had a hardcoded 10-second timeout that caused "Session naming provider call timed out" errors when using local Ollama models that require more than 10s to cold-load from external storage (e.g., Mac Studio with models on ai-storage). This change: - Adds `provider_timeout: float = 10.0` to SessionNamingConfig - Uses config value in asyncio.wait_for instead of hardcoded 10.0 - Updates logger output to show actual configured timeout - Allows users to override via settings.yaml if needed Backward compatible (10s default preserved). Verified on Mac Studio running Ollama with 234GB model directory on external storage. Generated with Amplifier Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
When a bundle declared orchestrator or context sources with relative paths (e.g., './modules/orchestrator'), these were resolved against the app's base_path rather than the bundle's base_path. This caused silent failures when the bundle was composed into an app with a different base_path (e.g., '.../behaviors/modules/loop-streaming' → File not found). Root cause: providers/tools/hooks relative sources were already anchored via _validate_module_list in from_dict, but the session section was not. Fix: Extract shared _resolve_relative_source() helper and apply it to session sources via _resolve_session_sources() at from_dict. Only literal ./ and ../ sources are rewritten; git+https://, file://, zip+..., and bare module-name sources are left untouched. Test: Added regression test verifying orchestrator relative source is anchored to declaring bundle after compose, and non-relative sources remain untouched. Generated with [Amplifier](https://github.com/microsoft/amplifier) Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
Sam Schillace (ramparte)
requested review from
Brian Krabach (bkrabach) and
Salil Das (sadlilas)
August 4, 2026 18:49
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
sessionconfig (session.orchestrator.source/session.context.source) were not anchored to the declaring bundle'sbase_path, causing resolution failures when a bundle was composed onto an app-level behavior with a different base_path.from_dict(via_validate_module_list), but thesessionsection was not._resolve_relative_source()helper and apply it to session sources via_resolve_session_sources()atfrom_dict. Only literal./and../sources are rewritten; git+https://, file://, zip+..., and bare module-name sources are left byte-for-byte untouched.Test plan
tests/test_relative_source_provenance.pyverifies orchestrator relative source is anchored to declaring bundle after compose, and non-relative sources remain untouched.1059 passed, 1 skippedGenerated with Amplifier