This guide shows how to rehearse progressive publish enablement in a sandbox GitHub repository before enabling the same settings in a production repository.
Use this document when you want to:
- keep
tracker.kind: githubandtracker.mode: rest - validate
allow_write_commentsfirst, thenallow_open_pr - force
github smoke --require-write-readyto gate draft-PR publish - produce a final handoff bundle only after the sandbox gate turns green
- connect that green sandbox posture to one deterministic issue execution before touching a real repo
- ../examples/live-github-sandbox-rollout/README.md
- ../examples/live-github-sandbox-rollout/ops/preflight.md
- ../examples/live-github-sandbox-rollout/ops/rollout-order.md
- ../examples/live-github-sandbox-rollout/ops/execution-order.md
- ../examples/live-github-sandbox-rollout/ops/set-sandbox-phase.sh
- ../examples/live-github-sandbox-rollout/ops/rehearse-rollout.sh
- ../examples/live-github-sandbox-rollout/ops/rehearse-execution.sh
- ../scripts/demo_live_publish_sandbox.sh
baselineNo live writes are enabled. Use this to prove the repo, token, origin, and branch policy surfaces are readable.comments-readyComment writes are enabled, draft-PR writes are still disabled.pr-gatedDraft-PR writes are requested, butgithub smoke --require-write-readymust still fail.pr-readyDraft-PR writes are requested and the readiness gate passes. Only now should you build a handoff bundle for review.
Run the bundled sandbox demo:
bash scripts/demo_live_publish_sandbox.shThis prepares a temporary repository, sets a fake GITHUB_TOKEN, points tracker.smoke_fixture_path at the phase fixtures, records per-phase doctor and github smoke exports, builds the readiness bundle under .ai-repoagents/reports/ops/sandbox-pr-ready/, then switches temporarily into github fixture + offline fake Codex shim mode to run one deterministic issue and build a second execution bundle under .ai-repoagents/reports/ops/sandbox-issue-201/.
During the rehearsal, the helper script creates local commits for each phase transition so workspace.dirty_policy: block remains valid while doctor is re-run.
The per-phase reports live under:
.ai-repoagents/reports/sandbox-rollout/baseline/.ai-repoagents/reports/sandbox-rollout/comments-ready/.ai-repoagents/reports/sandbox-rollout/pr-gated/.ai-repoagents/reports/sandbox-rollout/pr-ready/
The critical gate files are:
.ai-repoagents/reports/sandbox-rollout/pr-gated/require-write-ready.exit-code.ai-repoagents/reports/sandbox-rollout/pr-ready/require-write-ready.exit-code
Expected values:
pr-gated:1pr-ready:0
After the publish gate is green, the example runs one issue in offline execution mode:
tracker.mode=fixturetracker.fixtures_path=issues.jsonllm.mode=codex
That path writes:
.ai-repoagents/reports/sandbox-execution/trigger-dry-run.txt.ai-repoagents/reports/sandbox-execution/trigger.txt.ai-repoagents/reports/sandbox-execution/status.json|md.ai-repoagents/artifacts/issue-201/<run-id>/....ai-repoagents/reports/ops/sandbox-issue-201/
The repo is then restored to live tracker.mode=rest and llm.mode=codex so the final config still represents publish-enabled sandbox posture.
- Clone the sandbox repository locally.
- Run
repoagents initinside it. - Switch the config to
tracker.kind: github,tracker.mode: rest,workspace.strategy: worktree,logging.file_enabled: true. - Start with:
safety:
allow_write_comments: false
allow_open_pr: false- Run
uv run repoagents doctor. - Run
uv run repoagents github smoke --format all. - Enable comment writes only and repeat the smoke step.
- Enable draft-PR writes in the sandbox and require:
uv run repoagents github smoke --require-write-readyIf this still exits non-zero, keep allow_open_pr=true disabled or revert it until the sandbox repo branch policy is corrected.
Before you let a real sandbox repository publish comments or draft PRs, run one deterministic issue rehearsal to prove the artifact flow:
- Keep the same repository checkout and green
pr-readyconfig. - Temporarily switch to a fixture issue source and deterministic backend.
- Run one issue with
trigger. - Inspect artifacts, status, and the execution handoff bundle.
- Restore the live sandbox config before you leave the repo ready for real use.
The bundled helper already does this:
bash ops/rehearse-execution.shOpen the execution artifacts in the order pinned by ../examples/live-github-sandbox-rollout/ops/execution-order.md.
Only after pr-ready is clean should you generate a bundle:
uv run repoagents ops snapshot \
--output-dir .ai-repoagents/reports/ops/sandbox-pr-ready \
--include-sync-check \
--include-sync-repair-preview \
--archiveThen refresh:
uv run repoagents ops status --format all
uv run repoagents dashboard --refresh-seconds 30 --format allOpen the bundle in this order:
index.htmlops-brief.mdgithub-smoke.mdops-status.mddashboard.html
For the exact rehearsal sequence, follow ../examples/live-github-sandbox-rollout/ops/rollout-order.md.
- Keep
merge_policy.mode: human_approval. - Treat sandbox publish as a rehearsal, not as production automation.
- Remove
tracker.smoke_fixture_pathbefore using the same commands against the real sandbox repository. - Do not enable unattended writes in production until the sandbox path has already passed and the handoff bundle has been reviewed.