The Judge Isn't the Builder

Independent validation for Amplifier shadow environments

Amplifier · Shadow Environments

Shadow environments test risky changes without touching the host

They run your local, uncommitted, multi-repo Amplifier changes inside OS-level isolated Docker or Podman containers — so you can try dangerous edits safely.

The trick that makes it work is a selective git rewrite. Here it is.

Git's insteadOf config redirects only your registered repos

A global url.<gitea>.insteadOf rule points registered GitHub repos at an embedded Gitea server on localhost:3000, serving exact working-tree snapshots. Every unregistered dependency still hits real GitHub.

Integration test test_url_rewriting.py asserts this is real — and repo-specific, not a blanket rewrite.

# manager.py:585 — selective rewrite git config --global --add \ url."http://localhost:3000".insteadOf \ "<registered repo>" # gitea.py:39 base_url = "http://localhost:3000" # test_url_rewriting.py asserts: # - localhost:3000 + github.com in config # - unregistered repo passes through

The agent that builds the rewrite can't judge its own work

The shadow-operator agent builds that rewrite. But if a rewrite silently fails, you'd unknowingly test upstream code — and the run would still look green.

A builder certifying its own build isn't a verdict you can trust. So who checks it?

A separate agent runs AFTER the shadow is built

amplifier-foundation ships the amplifier-smoke-test agent (~290 lines at commit 41639d1, by Brian Krabach). Its text: "You run SEPARATELY from shadow-operator to provide unbiased verification. Don't trust claims — verify with evidence."

Independence only matters if it has teeth. Here's where it bites.

290
lines at commit 41639d1 (2026-02-04); 307 at HEAD
8
commits on the agent, all by Brian Krabach

Source Verification checks the exact mechanism that could fail silently

The 25-point Source Verification category inspects the actual git insteadOf rules and compares installed commits to snapshot commits — so a silent rewrite failure scores zero instead of passing unnoticed.

Zero here isn't just a low score — it triggers an automatic FAIL.

The rubric is unforgiving by design

100 points across five weighted categories, a pass threshold of 75, and an automatic FAIL if Source Verification hits zero. A scored, thresholded judgment replaces the builder's self-report.

And when it can't even run the tests, it does something stricter still.

When it can't actually run the shadow tests, it HALTS

No shadow_id, shadow missing, or shadow tool unavailable? The agent returns CANNOT_PROCEED / VERDICT: INCOMPLETE and refuses to test on the host as a workaround — rather than hand out a PASS it can't back up.

Refusing to fake success is exactly what makes the verdict trustworthy.

Status: CANNOT_PROCEED
VERDICT: INCOMPLETE

"NEVER give a PASS verdict if you couldn't actually run shadow tests." (6 NEVER rules in the agent)

The pattern to keep

A verdict you can trust requires that the judge is not the builder

Independent, evidence-based validation that halts beats a self-certified green. Separate the builder from the judge.

Sources

Research Methodology

Data as of: 2026-02-28 (agent HEAD 517f94d = 307 lines; framing version 41639d1, 2026-02-04 = 290 lines).

Feature status: Active — amplifier-smoke-test agent in microsoft/amplifier-foundation; shadow bundle microsoft/amplifier-bundle-shadow present.

Note: samueljklee/amplifier-bundle-smoke-test (v1.0.0) is a separate CLI sanity check with "no containers, no isolation"; the container/shadow/100-point-rubric mechanism lives in amplifier-foundation + amplifier-bundle-shadow.

Commands run:

Gaps: No live end-to-end shadow run (no Docker/Podman executed); URL-rewriting, snapshot, and isolation claims rest on source code + integration-test assertions, not a live container run. "Silent rewrite failure" wording paraphrases the topic; the agent supports the intent via "Don't trust claims — verify with evidence."

Primary contributors: Brian Krabach (all 8 commits on the validation agent); Samuel Lee (all 5 commits on the separate smoke-test bundle).

More Amplifier Stories