Use this guide after the agent finishes, or when the live path needs recovery.
Keep the sandbox running while fetching because its Git daemon is available only while the sandbox runs.
From the host uportal-messaging checkout:
git fetch sandbox-java-appmod
git --no-pager log --oneline --decorate sandbox-java-appmod/modernize/java-*
git --no-pager diff --stat master..sandbox-java-appmod/modernize/java-*
git --no-pager diff master..sandbox-java-appmod/modernize/java-*Review executable and trust-sensitive changes in addition to application code:
git --no-pager diff --name-status master..sandbox-java-appmod/modernize/java-*
git --no-pager diff master..sandbox-java-appmod/modernize/java-* -- pom.xml .githubNote
* may refer to a timestamp or a random string
Pay particular attention to:
- Maven plugins, repositories, and dependency versions in
pom.xml. - CI definitions and automation under
.github/. .github/modernize/assessment/,plan.md, andtasks.json.- Newly added scripts, Dockerfiles, agent configuration, and Git hooks.
- Build and vulnerability-scan output reported by the agent.
Clone mode prevents writes to the host, but the source mount is readable. Do not keep .env, tokens, private keys, or other secrets inside the repository, even when they are ignored by Git.
After reviewing the remote-tracking branch:
git switch -c modernized --track sandbox-java-appmod/modernize/java-*
git statusRun host-side build or test commands only after reviewing the changes as untrusted code. The demo can stop at the diff if executing fetched code on the host is outside the presentation's safety boundary.
| Evidence | Expected result |
|---|---|
git status --short on the host before fetch |
No output |
Write under /run/sandbox/source |
Fails as read-only |
docker info in the sandbox |
Reports the sandbox's Docker Engine |
sbx policy ls and dashboard |
Balanced policy and connection decisions visible |
| Modernization artifacts | Assessment, plan.md, and tasks.json present |
| Git history | Separate modernization task commits |
| Maven verification | Result reported; failures have a specific cause and next action |
| Vulnerability check | Result or explicit tool limitation reported |
From a sandbox shell:
copilot plugin marketplace list
copilot plugin marketplace add microsoft/github-copilot-modernization
copilot plugin install github-copilot-modernization@github-copilot-modernizationBack in Copilot CLI, run /plugin list, then select github-copilot-modernization:modernize again with /agent.
Confirm that Copilot started in the private clone root:
pwd
test -f pom.xml && echo "pom.xml found"
git rev-parse --show-toplevelStart the modernization agent from the directory containing pom.xml.
Use the dashboard's network panel to identify the exact host, then check its decision:
sbx policy check network --sandbox java-appmod example.comIf the host is required and approved, add only that host:
sbx policy allow network --sandbox java-appmod example.comIf organization governance is active, local allow rules cannot expand the organization policy. Ask the organization administrator to allow the host. Local deny rules still apply.
For this sample, legacy Maven repositories that might require a scoped rule include:
sbx policy check network --sandbox java-appmod artifacts.doit.wisc.edu
sbx policy check network --sandbox java-appmod artifactorydoit.jfrog.ioDo not present a failed build as a completed modernization. Capture:
java -version
mvn -version
mvn -U verifyClassify the failure before retrying:
- A denied hostname requires a reviewed policy rule.
- A missing legacy artifact might require replacing or removing the obsolete repository or dependency as part of the modernization plan.
- Compilation errors require another modernization task and commit.
- Test failures require either a fix or an explicit, documented blocker.
Clone mode is fixed when the sandbox is created. Preserve useful commits, then recreate it:
git fetch sandbox-java-appmod
sbx stop java-appmod
sbx rm java-appmod
sbx run --clone --name java-appmod copilot .The private clone's Git daemon is unavailable while the sandbox is stopped. Restart it and fetch again:
sbx run --name java-appmod
git fetch sandbox-java-appmodIf the agent used a different branch name, inspect branches inside the sandbox:
sbx exec -it java-appmod bashgit branch --allFetch or push every branch you want to preserve before cleanup:
git fetch sandbox-java-appmod
sbx stop java-appmod
sbx rm java-appmodRemoving the sandbox deletes its microVM, private clone, installed tools, Docker images and containers, and the sandbox-java-appmod host remote. It does not modify the host working tree.
Previous: Demo 1 Java live runbook