Skip to content

fix(bundle-loader): preserve root instruction with AGENTS context - #332

Merged
Brian Krabach (bkrabach) merged 1 commit into
mainfrom
fix/root-agents-context-tail
Sep 8, 2026
Merged

Brian Krabach (bkrabach) merged 1 commit into
mainfrom
fix/root-agents-context-tail

Conversation

@bkrabach

Copy link
Copy Markdown
Collaborator

Summary

  • Preserve the root instruction while appending the CLI's optional home and project .amplifier/AGENTS.md mentions.
  • Add regression coverage for behavior composition, fresh per-request resolution, resume, and cached-bundle reuse.

Why/design

  • Appending the tail after behavior composition preserves the prompt and bodyless-inheritance behavior.
  • A shallow copy avoids cache accumulation when the same registry is reused.
  • The normal resolver handles optional files and refreshes them per request; no plain cwd/AGENTS.md is added by the CLI.

Tests

  • uv run --with truststore==0.10.4 pytest -q — 2083 passed, 1 skipped, 13 deselected, 1 xfailed.
  • uv run --with truststore==0.10.4 pytest -q tests/lib/bundle_loader/test_root_instruction_survives_behaviors.py — 11 passed.
  • DTU 23/23 provider-bound assertions across real fresh/run --resume, custom vs. actual anchors context.
  • Deterministic provider and minimal context/orchestrator plus persistence-hook coverage; partial-bundle mode excludes unrelated app-behaviors.
  • No live vendor tested; this does not claim a full default-stack run.

Compatibility/scope

  • CLI-only change using the existing API; no foundation edits, workspace commits, version bump, merge, or auto-merge.
  • No breaking changes; missing optional files remain non-fatal and are resolved dynamically per request.

Generated with Amplifier

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
@bkrabach
Brian Krabach (bkrabach) merged commit bb9c248 into main Sep 8, 2026
9 checks passed
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.

2 participants