Skip to content

fix(deps): bump amplifier-foundation pin to a snapshot that exports bridge_child_cost#224

Open
sadlilas wants to merge 1 commit into
mainfrom
fix/bump-foundation-pin-bridge-child-cost
Open

fix(deps): bump amplifier-foundation pin to a snapshot that exports bridge_child_cost#224
sadlilas wants to merge 1 commit into
mainfrom
fix/bump-foundation-pin-bridge-child-cost

Conversation

@sadlilas

@sadlilas sadlilas commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Problem

session_spawner.py imports from amplifier_foundation import bridge_child_cost, but the amplifier-foundation commit pinned in uv.lock predates that symbol. A clean environment resolving strictly from the lock file fails to import on the session-spawn path.

Timeline:

  • Locked foundation snapshot 91dc9dc dates to 2026-03-17.
  • bridge_child_cost was added to amplifier-foundation on 2026-05-08 — after the pinned snapshot.
  • The import was added to this repo the same day, but the accompanying foundation pin bump was never made, so the lock has continued to resolve the pre-bridge_child_cost snapshot.

This is invisible to anyone who already has a newer amplifier-foundation in their working environment; it only surfaces on a clean install from the lock.

Fix

Refresh the amplifier-foundation pin to current main (dc010423), which exports bridge_child_cost.

uv lock --upgrade-package amplifier-foundation

Scope

Single line in uv.lock: the amplifier-foundation commit only. No other packages move; no source changes.

…ridge_child_cost

The locked amplifier-foundation snapshot (91dc9dc, 2026-03-17) predates the
bridge_child_cost function it now depends on. session_spawner.py imports
`from amplifier_foundation import bridge_child_cost` (added alongside the
spawn cost-bridge feature), but that symbol did not exist in foundation until
2026-05-08 — after the locked snapshot. A clean install resolving strictly
from uv.lock therefore fails to import on the session-spawn path.

Refresh the pin to current foundation main (dc010423), which exports
bridge_child_cost. Only the lock's foundation commit changes; no other
packages move.
michaeljabbour pushed a commit to michaeljabbour/amplifier-app-cli that referenced this pull request Jul 14, 2026
… resume + REPL paths (microsoft#191)

This completes the unified @-mention expansion effort. Part 1 (foundation PR microsoft#224)
introduced expand_mentions_in_instruction() helper and converted foundation's call
sites. This PR (CLI) converts the remaining call sites and fixes two gaps where
expansion was missing entirely.

User-visible fix: resume_sub_session now expands @-mentions before passing the
instruction to child_session.execute(). Previously, raw @file.md strings were sent
directly to the LLM with no resolution — the gap peer reviewers caught.

Changes:
- Convert _process_runtime_mentions() in main.py to use the foundation helper
  - Now returns expanded prompt string instead of injecting developer messages
  - Updated all 5 call sites in the REPL loop to use the returned string
- Convert spawn_sub_session (both system_instruction and delegation instruction)
  to use the foundation helper
  - Replaces previous MentionLoader → developer-message-injection format
  - Now uses inline <context_file> XML blocks (consistent with system-prompt path)
- ADD expansion to resume_sub_session (previously had no expansion at all)
  - New block before session.execute(instruction), same structure as spawn path
  - Consistent with spawn and REPL semantics
- Delete amplifier_app_cli/lib/mention_loading/loader.py (MentionLoader class)
  - Zero remaining callers after conversion to foundation helper
  - Eliminates duplicate loader implementation (sync MentionLoader vs async expand_)
- Delete tests/lib/mention_loading/test_loader.py
  - Covered the deleted MentionLoader class
- Update TestSpawnMentionExpansion tests to assert new XML format
- Add TestResumeMentionExpansion to cover previously untested resume path

Net: 230 insertions, 428 deletions (-198 lines — more consolidation than new code)

Test results: 955 passed (1 pre-existing failure unrelated to @mention expansion).

Depends on: microsoft/amplifier-foundation#224 (must merge first)

Generated with 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