Skip to content

refactor: portable amp-dev behavior and flat Anchors roots - #439

Merged
Brian Krabach (bkrabach) merged 4 commits into
mainfrom
feat/portable-amp-dev
Oct 5, 2026
Merged

Brian Krabach (bkrabach) merged 4 commits into
mainfrom
feat/portable-amp-dev

Conversation

@bkrabach

@bkrabach Brian Krabach (bkrabach) commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Migration / compatibility boundary

Old nested root URLs remain supported. Explicit references must migrate:

  • anchors-amp-dev:amplifier-dev-expert → amp-dev:amplifier-dev-expert
  • anchors-amp-dev:context/amplifier-ecosystem.md → amp-dev:context/amplifier-dev/amplifier-ecosystem.md

The old expert alias and context path are not retained. The wrappers and portable expert require foundation: to resolve to this version or later, not a stale separately cached Foundation tree. A bounded scan of 410 source/config/preset files in the installed official CLI and consuming application found no exact old-reference matches; this is not a global consumer inventory.

What is proposed

Make Amplifier ecosystem development a reusable capability, independent of the selected host:

  • Canonical flat complete roots: bundles/anchors.md and bundles/anchors-amp-dev.md.
  • One behaviors/amp-dev.yaml owns the lean expert, short ecosystem operating rules, and the tester/DTU/Gitea capability.
  • Keep the existing Anchors runtime, tools, hooks, six engineering agents and principle instruction; preserve the resource directory with namespace_root: anchors.
  • Keep old nested root URLs as thin compatibility wrappers. The expert is now amp-dev:amplifier-dev-expert; its old agent alias is intentionally not retained and migration is documented.
  • Update active guidance and deterministic validation for flat manifests and both host-owned runtime selectors. Repair a reproduced large-result shell-argument failure using lossless private payload files.

Boundaries and trade-offs

The amp-dev behavior selects neither orchestrator, context manager nor provider, and does not compose Anchors. Complete roots select runtime defaults; applications may override them. Existing heavy reference documents remain in a spawn-only expert. No kernel/runtime-library implementation changed, and legacy amplifier-dev was left unchanged.

Base-first capability composition intentionally changes skills-source precedence. Tests pin the intended parent-first sequence; this is not represented as a byte-identical include-order refactor. The old root entrypoint URLs remain supported, but the expert agent-name change is a documented compatibility boundary.

The downstream publication gate is now satisfied: this PR is merged and its post-merge CI passed before the dependent Work PR #10 was published and merged.

Merged outcome

Merged by administrator squash as ab87882027bc5cb3aa74a6f6de539560b2e4d264, preserving required linear history. The missing human-review requirement was bypassed; test checks were not bypassed. The entire merged tree equals reviewed candidate 7213f82; its feature branch is retained.

Post-merge run 37360793685 passed all six native Linux/Windows Python 3.11–3.13 jobs. Each Linux job reported 2,400 passed / 4 skipped; each Windows job reported 2,331 passed / 74 skipped. These are skipped tests inside completed jobs, not skipped jobs. The earlier validation-recipe FAIL/incomplete outcomes remain unchanged. Qualification is revision-specific; maintained main sources may advance.

Verification

Current CI repair and qualification

PR head: 7213f82697877135678e4ae06cf924c0717cbf2f.

The first CI run on c66fb26 failed in all six jobs: four test failures on Linux and five on Windows. This follow-up changes four test files only, with no runtime, module, recipe or Work implementation changes:

  • Prepare the git-ops catalog from the canonical flat Anchors manifest while retaining recursive compatibility-wrapper equivalence checks and the existing body/catalog assertions.
  • Update the two strict recipe-version expectations to the versions already declared in their changelogs.
  • Read recipe YAML and JSON payloads explicitly as UTF-8. A new behavioral regression simulates a legacy default code page, failed before the fix, and passes after it. The recipe is reread on every call; there is no parsed-result cache masking the regression. Static checks remain enabled on Windows.

Local repaired verification on Linux Python 3.13: 102 affected tests passed in 24.48s; full pytest tests/ qualification: 2,400 passed, 4 skipped in 62.45s. The skips are the same baseline four: two optional CLI-import tests, one optional tokenizer cross-check, and one Windows-specific orphan-prevention test. The supplementary modules/tool-delegate/tests directory was not part of this command.

The first local full run inherited application shared-source-store settings and failed 14 cache/source tests. The unchanged candidate passed after removing AMPLIFIER_SOURCE_STORE and UV_OVERRIDE for that test process only, matching CI's unset configuration. Both outcomes are retained. The first run populated the shared store with test fixtures; a bounded check confirmed at least five fixture objects present. No pre-run snapshot exists, no unchanged-store claim is made, and no cleanup of shared objects was attempted. Production settings were not changed.

Final native CI and outcome reviews

CI run 37357203574 completed successfully on this exact head. All six native jobs passed:

Platform Python versions Result in each job
Linux 3.11, 3.12, 3.13 2,400 passed / 4 skipped
Windows 3.11, 3.12, 3.13 2,331 passed / 74 skipped

The actual job logs show all eight critical repaired and composition test identities passing in every job, including both static encoding checks on Windows. Skip counts grouped by file/reason are unchanged from the original failed run; failures were not converted into skips. This verifies the repository's pytest tests/ suite and deterministic composition checks, not a clean full validation-recipe verdict: the earlier FAIL/incomplete recipe outcomes below remain explicit and were not rerun.

Two independent reviewers assessed the plan, the pre-push outcomes, and these final native results. Both supported reporting the scoped test repair complete with no required source fixes remaining. These were supplied-evidence reviews, not GitHub approvals or unrestricted repository audits. The later ordered publication was separately authorized and reviewed; its merged outcome and post-merge CI are recorded above.

Earlier exact revisions and documentation follow-up

Official CLI acceptance and the 232-test targeted Foundation qualification used 319a6dc12e513dc00e9d68c3e2507f5b834dbd06. The documentation follow-up c66fb26 added only documentation, an ignore rule, and regression-test platform scoping; no runtime manifests, recipes, modules or Python implementation changed after that live test. Its affected subset passed 70 tests in 25.60s, including real-registry composition tests.

git diff --stat 319a6dc..c66fb26
 .gitignore                                    |  3 +++
 bundles/anchors-amp-dev/README.md             | 31 ++++++++++++++++++++++-----
 docs/BUNDLE_GUIDE.md                          | 17 +++++++++++++++
 tests/test_bundle_recipe_payload_transport.py |  7 ++++++
 4 files changed, 53 insertions(+), 5 deletions(-)

The earlier non-Anchors consuming-host live test used Foundation 98f4f82aeb3d422e9ff8778735d466606178d8bb and Work 0292a0457e5fe6c6ac0f03ea3c200f915b41b3b2. Later Foundation changes were validation recipes/tests/documentation and the final ignore/test-portability follow-up; Work e9317ce2a9aa338d762f42e4346a47894bc1a07a added documentation only. These remain historical receipts, not a claim that every later commit was re-executed in that app.

Observed checks

  • Local targeted Foundation suite: 232 passed, not a claim that the entire repository test suite ran.
  • Coordinated Work suite: 93 passed.
  • Real registry tests cover unrelated working directories, flat/compatibility mount-plan equality, namespaces, resource resolution, host runtime/provider preservation, exact agent delta and skills precedence.
  • Production prompt-construction tests verify the host instruction and ecosystem context appear once and the expert's three canonical docs/baseline resolve on spawn. Module activation is mocked only in those local prompt checks.
  • Non-Anchors consuming-host DTU acceptance passed installed-source and bundle/resource hash checks, real root response, actual expert spawn, authenticated trusted HTTPS, and browser conversation reload.
  • Official amplifier-app-cli / amplifier-tester CLI acceptance: 17 passed, 0 failed, 0 blocked, covering both flat roots and both compatibility entry points. All four performed real file/Bash operations and named-agent spawning; amp-dev roots loaded DTU/Gitea skill bodies and the expert read canonical resources. Paid root request observations show the instruction once, with ecosystem context once only in amp-dev roots. No runtime override selected Work or Unified execution for these CLI tests.
  • Two independent second-opinion reviews supported opening Foundation first, conditional on explicit compatibility/recipe limitations and the bounded corrections described here. Reviews used a common supplied evidence packet, not unrestricted full-repository inspection.
  • Foundation's existing CI runs pytest tests/ on Linux/Windows with Python 3.11–3.13. It includes the real-registry test that asserts the composed amp-dev chain has no session/provider/root-instruction choices. That test resolves Foundation locally and fetches the external maintained @main chain; network failures or upstream drift must be distinguished from a candidate regression rather than silently skipped.
  • Executable payload regressions require Bash and POSIX permissions and now carry an explicit non-POSIX skip reason. The static no-inline-payload check remains enabled on all platforms. Windows ACL qualification is not claimed. The completed CI above covers pytest tests/; it does not qualify Windows ACLs or convert the separate validation-recipe outcomes into PASS.
  • Manifest versions are bumped to Anchors/Anchors amp-dev 0.3.0; the new amp-dev behavior starts at 0.1.0. The breaking resource-identifier boundary is stated above.

Full validation recipes: honest limits

Full bundle and agent recipes were invoked for both repositories. The corrected Foundation bundle recipe reached final synthesis with FAIL, not PASS: two pre-existing heavy-context behavior errors and two compatibility-wrapper resolutions against cached remote Foundation rather than the candidate. Its composition analysis timed out; build tools were unavailable. All 47 nonrecursive manifest loads passed, but that is not recursive candidate-closure proof.

The Foundation agent recipe discovered 24 agents with zero structural errors and six warnings; report-generation cancellation prevented a final verdict. The new lean expert passed the deterministic checks. Work's local-agent recipe has zero local agents, so coverage is N/A; its bundle run did not return a final report. These outcomes remain retained and are not waived or relabeled as green. Candidate closure is tested separately with explicit source qualification and live DTU evidence.

The payload transport repair has 73 passing regression checks over actual recipe producer/classifier code, including multi-megabyte JSON, complete records and a failing bundle at the end. Missing/corrupt payloads fail rather than truncating results. Original failed-run evidence is retained.

Fallback payload directories are Git-ignored within this repository and private on POSIX (0700 directories / 0600 files). This ignore does not protect other repositories: callers validating another tree must supply AMPLIFIER_RECIPE_SCRATCH_DIR outside it or add .validate-bundle-payloads-*/ to its ignore rules. Payloads remain available while saved runs can resume or their evidence is retained; the invoking caller owns archival and eventual cleanup. They are not automatically deleted at synthesis, which would invalidate saved context paths. This lifetime is documented in the authoring guide. Windows ACL protection is not established by POSIX mode checks.

Observations

Pre-existing repository-wide context-budget errors and validation-harness environment/coverage limitations remain outside this capability refactor. The tester behavior currently includes a DTU root that is only a thin behavior wrapper and selects no runtime; a behavior-to-behavior cleanup belongs to that upstream capability repository. No private credentials, settings, transcripts, host identity, LAN addresses or live private artifacts are published in this PR.

Retain nested entrypoints as wrappers, move lean ecosystem resources to the shared behavior, and validate namespace/runtime boundaries.

Generated with Amplifier

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
Retain full validation results in private payload files and record bounded live capability qualification.

Generated with Amplifier

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
Document payload retention and repository-scoped ignore ownership. Keep Bash and POSIX-mode regression execution explicitly platform-scoped.

Generated with Amplifier

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
Keep catalog contracts on the canonical Anchors manifest, update strict recipe version checks, and exercise UTF-8 recipe parsing under a legacy default code page.

Generated with Amplifier

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
@bkrabach
Brian Krabach (bkrabach) marked this pull request as ready for review October 5, 2026 19:04
@bkrabach
Brian Krabach (bkrabach) merged commit ab87882 into main Oct 5, 2026
7 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