Skip to content

fix: anchor relative session sources to declaring bundle base_path - #279

Open
Sam Schillace (ramparte) wants to merge 2 commits into
mainfrom
fix/session-relative-source-provenance
Open

fix: anchor relative session sources to declaring bundle base_path#279
Sam Schillace (ramparte) wants to merge 2 commits into
mainfrom
fix/session-relative-source-provenance

Conversation

@ramparte

Copy link
Copy Markdown
Contributor

Summary

  • Fix: relative module sources in a bundle's session config (session.orchestrator.source / session.context.source) were not anchored to the declaring bundle's base_path, causing resolution failures when a bundle was composed onto an app-level behavior with a different base_path.
  • Root cause: providers/tools/hooks relative sources were already anchored in from_dict (via _validate_module_list), but the session section was not.
  • Fix details: 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 byte-for-byte untouched.

Test plan

  • Regression test added: tests/test_relative_source_provenance.py verifies orchestrator relative source is anchored to declaring bundle after compose, and non-relative sources remain untouched.
  • Full test suite passes: 1059 passed, 1 skipped

Generated with Amplifier

Sam Schillace and others added 2 commits April 9, 2026 18:11
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>
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