P02: Review, commit, push, and record an offline-local receipt
Choose the commands you use
Operating system
CodeArbiter host
Know before you begin
P02 is a public guided and runnable lesson in this preview. Its action cards use the installed Academy verifier and the shared public lesson renderer.
The installed receipt recorder creates the same contained, untracked local receipt on Windows, macOS, and Linux. Select your operating system on each native-terminal card.
This is an offline-local pull-request rehearsal. Academy temporarily routes the checkout to two verifier-owned local bare repositories. It does not open GitHub, contact a hosted reviewer, run hosted CI, or prove that a person reviewed the change. The Browser explains the boundary; the native terminal and active CodeArbiter harness perform the lesson work.
Read the offline boundary
You · Browser · All operating systems
Read this public lesson before running a command. The exercise uses local bare repositories and never creates a hosted pull request. The installed recorder creates the same single local receipt on Windows, macOS, and Linux.
The learner must distinguish local proof from a hosted collaboration workflow.
You can state that this is a public offline-local rehearsal with a complete native Windows, macOS, and Linux receipt path.
If you expected a GitHub pull request or hosted CI, stop here and reread the boundary.
No repository state changes yet.
What you will prove
You will leave two learner commits after the prepared commit: one exact Workshop Queue work range, then one separate receipt-only commit. The prepared learner origin receives the work head. The prepared official upstream never receives the attempt branch.
Prepare the numbered local attempt
In a native terminal outside the checkout, replace every literal <learner-repository> in the selected command with the absolute path to the fork clone you used for P01. It is a placeholder, not a directory you can paste literally. Then run Prepare and record the printed branch and prepared commit before entering that checkout.
Prepare establishes the verifier-owned local topology before learner work begins.
You · Native terminal · Windows
$academy = "$env:LOCALAPPDATA\ArbiterAcademy\preview-0.30\Scripts\arbiter-academy.exe"
& $academy --repository (Resolve-Path -LiteralPath '<learner-repository>').Path prepare P02-commit-review-pr
You · Native terminal · macOS
academy="${XDG_DATA_HOME:-$HOME/.local/share}/arbiter-academy/preview-0.30/bin/arbiter-academy"
"$academy" --repository "$(cd '<learner-repository>' && pwd)" prepare P02-commit-review-pr
You · Native terminal · Linux
academy="${XDG_DATA_HOME:-$HOME/.local/share}/arbiter-academy/preview-0.30/bin/arbiter-academy"
"$academy" --repository "$(cd '<learner-repository>' && pwd)" prepare P02-commit-review-pr
Academy prints an academy/P02-commit-review-pr/ATTEMPT branch, prepared commit, and two logical repository IDs.
Preserve any error. Do not run Prepare inside the learner checkout or guess an attempt number.
The printed identity binds later guards to this attempt.
Prepare safely
Prepare from outside the checkout, preserve the printed branch, prepared commit, and logical repository IDs, then enter that exact checkout. Do not use an active harness shell command for this setup: it changes the repository and belongs in the native terminal.
Enter and guard the prepared checkout
Enter the learner checkout in the native terminal. Compare the printed branch and prepared commit to the live checkout, then inspect status and remotes.
The guard prevents review or commit work in the wrong repository or attempt.
You · Native terminal · Windows
Set-Location -LiteralPath '<learner-repository>'
git branch --show-current
git rev-parse HEAD
git status --short
git remote -v
You · Native terminal · macOS
cd '<learner-repository>'
git branch --show-current
git rev-parse HEAD
git status --short
git remote -v
You · Native terminal · Linux
cd '<learner-repository>'
git branch --show-current
git rev-parse HEAD
git status --short
git remote -v
The branch and HEAD match Prepare, status is clean, and origin and upstream use local exercise routes.
If any value differs, preserve the output and Reset instead of changing remotes by hand.
You confirmed the target before generating work evidence.
Inspect the prepared exercise change
Inspect the two prepared paths and read the scenario before staging them. Do not stage a third path.
The work range is intentionally limited to the two Workshop Queue paths.
You · Native terminal · Windows
git diff -- tests/test_cli.py workshop_queue/cli.py
Get-Content -Raw -LiteralPath training_scenarios/P02-commit-review-pr.json
You · Native terminal · macOS
git diff -- tests/test_cli.py workshop_queue/cli.py
cat training_scenarios/P02-commit-review-pr.json
You · Native terminal · Linux
git diff -- tests/test_cli.py workshop_queue/cli.py
cat training_scenarios/P02-commit-review-pr.json
You can describe the intended two-path patch before staging it.
If another path is modified, preserve it outside this attempt before continuing.
The work boundary is visible before the agent reviews it.
Stage exactly the reviewed work boundary
In the native terminal, stage exactly the two Workshop Queue paths and inspect the staged path list before asking the active agent to review.
The agent reviews and commits the explicit two-path work boundary, never an inferred working-tree change.
You · Native terminal · Windows
git add -- tests/test_cli.py workshop_queue/cli.py
git diff --cached --name-only
You · Native terminal · macOS
git add -- tests/test_cli.py workshop_queue/cli.py
git diff --cached --name-only
You · Native terminal · Linux
git add -- tests/test_cli.py workshop_queue/cli.py
git diff --cached --name-only
The staged path list contains exactly tests/test_cli.py and workshop_queue/cli.py.
If another path appears, preserve it and unstage only that unrelated path before continuing.
The review boundary is explicit before the active agent sees it.
Practice
You decide whether the local review is cleared. Ask the active agent to inspect the staged two-file boundary and run the CodeArbiter review gate. A cleared learner declaration is evidence you supply; it is not authenticated human approval.
Declare the review boundary
Paste the reviewed request into your selected active harness. It asks the agent to inspect only the staged two-path change and stop with findings; you decide whether findings are cleared before asking for a commit.
The learner owns the review decision; Academy does not authenticate it as human approval.
You · Claude Code harness · All operating systems
Review only the staged change in tests/test_cli.py and workshop_queue/cli.py. Show the staged path list, inspect the staged diff for the prepared exercise boundary, and report concrete findings or state that none remain. Do not stage, commit, push, change files, or declare the review cleared; stop for my decision.
You · Codex harness · All operating systems
Review only the staged change in tests/test_cli.py and workshop_queue/cli.py. Show the staged path list, inspect the staged diff for the prepared exercise boundary, and report concrete findings or state that none remain. Do not stage, commit, push, change files, or declare the review cleared; stop for my decision.
You · Pi harness · All operating systems
Review only the staged change in tests/test_cli.py and workshop_queue/cli.py. Show the staged path list, inspect the staged diff for the prepared exercise boundary, and report concrete findings or state that none remain. Do not stage, commit, push, change files, or declare the review cleared; stop for my decision.
You have a bounded review request and a conscious cleared or not-cleared decision.
If findings remain, correct only the exercise change and review again. Do not declare it cleared early.
The later receipt records only your cleared declaration.
Let the agent run the review gate
Use the host-native CodeArbiter review command after the learner asks for the bounded review. This is a harness command, never a shell command.
The review gate produces the agent-side review result without the learner imitating a terminal command.
Your agent · Claude Code harness · All operating systems
/ca:review
Your agent · Codex harness · All operating systems
$ca-review
Your agent · Pi harness · All operating systems
/ca-review
Your agent · Pi harness · All operating systems
/skill:ca-review
The active agent reports the review result for the staged work boundary.
If the review gate blocks, preserve the finding and resolve it before the work commit.
The learner has inspected the review result but Check cannot authenticate who reviewed.
Let the agent commit the reviewed work
After the learner approves the exact two staged paths and clears the review, invoke the host-native CodeArbiter commit gate.
The work commit remains separate from the later receipt-only commit.
Your agent · Claude Code harness · All operating systems
/ca:commit
Your agent · Codex harness · All operating systems
$ca-commit
Your agent · Pi harness · All operating systems
/ca-commit
Your agent · Pi harness · All operating systems
/skill:ca-commit
One new commit changes only tests/test_cli.py and workshop_queue/cli.py.
If the gate blocks, preserve its finding. Do not substitute git commit or amend another attempt.
The local work range starts after the prepared commit.
Prove the work range and push only origin
In the native terminal, inspect the nonempty one-commit range, push its head to origin, then compare both local bare remotes. Never push upstream.
The receipt binds the exact work head only after the learner origin contains it.
You · Native terminal · Windows
$branch = git branch --show-current
$workHead = git rev-parse HEAD
git log --oneline "HEAD~1..$workHead"
git push origin "HEAD:refs/heads/$branch"
git ls-remote origin "refs/heads/$branch"
git ls-remote upstream "refs/heads/$branch"
You · Native terminal · macOS
branch=$(git branch --show-current)
git log --oneline HEAD~1..HEAD
git push origin "HEAD:refs/heads/$branch"
git ls-remote origin "refs/heads/$branch"
git ls-remote upstream "refs/heads/$branch"
You · Native terminal · Linux
branch=$(git branch --show-current)
git log --oneline HEAD~1..HEAD
git push origin "HEAD:refs/heads/$branch"
git ls-remote origin "refs/heads/$branch"
git ls-remote upstream "refs/heads/$branch"
Origin reports the attempt work head and upstream reports no attempt ref.
If origin differs or upstream has the ref, stop and preserve the evidence. Do not force-push or edit the remotes.
The receipt will bind the origin-only local push proof.
Record the declared local receipt
After deciding the review is cleared, run the installed helper in the native terminal. It writes one untracked canonical receipt and does not stage, commit, or push it.
The helper formats only recomputable local facts plus the learner declaration.
You · Native terminal · Windows
$academy = "$env:LOCALAPPDATA\ArbiterAcademy\preview-0.30\Scripts\arbiter-academy.exe"
& $academy --repository (Get-Location).Path record P02-commit-review-pr --review-declared-cleared
You · Native terminal · macOS
academy="${XDG_DATA_HOME:-$HOME/.local/share}/arbiter-academy/preview-0.30/bin/arbiter-academy"
"$academy" --repository "$PWD" record P02-commit-review-pr --review-declared-cleared
You · Native terminal · Linux
academy="${XDG_DATA_HOME:-$HOME/.local/share}/arbiter-academy/preview-0.30/bin/arbiter-academy"
"$academy" --repository "$PWD" record P02-commit-review-pr --review-declared-cleared
Only .codearbiter/reports/academy/P02-pr-receipt.json appears as untracked work.
If it refuses, preserve the message and use Reset. Do not hand-write a replacement receipt.
The output says it recorded a learner-declared offline-local review receipt.
Stage only the receipt
Stage the one canonical receipt path and inspect the staged path list before asking the agent to commit it.
The final commit may contain only the receipt.
You · Native terminal · Windows
git add -- .codearbiter/reports/academy/P02-pr-receipt.json
git diff --cached --name-only
You · Native terminal · macOS
git add -- .codearbiter/reports/academy/P02-pr-receipt.json
git diff --cached --name-only
You · Native terminal · Linux
git add -- .codearbiter/reports/academy/P02-pr-receipt.json
git diff --cached --name-only
The staged path list contains exactly .codearbiter/reports/academy/P02-pr-receipt.json.
If another path appears, preserve it and unstage only that unrelated path before continuing.
The receipt commitment boundary is explicit.
Let the agent commit the receipt
After the learner approves the one staged receipt path, invoke the host-native CodeArbiter commit gate for the receipt-only commit.
A separate commit distinguishes reviewed work from the declaration about it.
Your agent · Claude Code harness · All operating systems
/ca:commit
Your agent · Codex harness · All operating systems
$ca-commit
Your agent · Pi harness · All operating systems
/ca-commit
Your agent · Pi harness · All operating systems
/skill:ca-commit
A later commit changes only the receipt path.
If the gate blocks, preserve the finding. Do not amend the work commit or commit a second path.
Check expects the receipt commit to have the work head as its sole parent.
Recognize success
The worktree is clean. The work range is nonempty, origin has its exact work head, upstream has no attempt ref, and the receipt is committed separately. This is local evidence only, not a hosted pull request.
Confirm the attempt is clean
Inspect status in the native terminal before Check. A clean worktree means the receipt is committed rather than merely present.
Check accepts committed evidence, not an uncommitted local file.
You · Native terminal · Windows
git status --short
You · Native terminal · macOS
git status --short
You · Native terminal · Linux
git status --short
Git prints nothing.
If Git prints a path, preserve the committed attempt and resolve only the uncommitted path. Do not reset completed evidence.
The checkout matches the receipt commit.
Check
Academy Check recomputes the prepared branch, remotes, exact patch, pushed work range, and later receipt-only commit. It cannot prove who reviewed, review quality, command chronology, a hosted pull request, hosted CI, or GitHub remote use.
Run external Academy Check
Run the installed Check command from the native terminal. It recomputes the offline-local evidence and records progress only after passing.
External verification separates accepted Git facts from the learner's local narration.
You · Native terminal · Windows
$academy = "$env:LOCALAPPDATA\ArbiterAcademy\preview-0.30\Scripts\arbiter-academy.exe"
& $academy --repository (Get-Location).Path check P02-commit-review-pr
You · Native terminal · macOS
academy="${XDG_DATA_HOME:-$HOME/.local/share}/arbiter-academy/preview-0.30/bin/arbiter-academy"
"$academy" --repository "$PWD" check P02-commit-review-pr
You · Native terminal · Linux
academy="${XDG_DATA_HOME:-$HOME/.local/share}/arbiter-academy/preview-0.30/bin/arbiter-academy"
"$academy" --repository "$PWD" check P02-commit-review-pr
Check reports a passed P02 checkpoint.
If Check fails, preserve the clean committed attempt and use the named failed predicate to decide whether to Reset.
Check proves the local graph and receipt structure, not hosted review facts.
Recover or continue
If a guard, record, or Check step fails, preserve its output. Use the rendered Reset action only when the prepared topology still matches; it archives the attempt before restoring original remotes. Do not edit remotes, delete evidence, rebase, force-push, or manufacture a receipt.
Preserve and reset an attempt
Use Reset only for a retry or when directed by a failure message. It archives the current attempt before restoring the original topology.
Preservation-first recovery keeps failed evidence inspectable.
You · Native terminal · Windows
$academy = "$env:LOCALAPPDATA\ArbiterAcademy\preview-0.30\Scripts\arbiter-academy.exe"
& $academy --repository (Get-Location).Path reset P02-commit-review-pr
You · Native terminal · macOS
academy="${XDG_DATA_HOME:-$HOME/.local/share}/arbiter-academy/preview-0.30/bin/arbiter-academy"
"$academy" --repository "$PWD" reset P02-commit-review-pr
You · Native terminal · Linux
academy="${XDG_DATA_HOME:-$HOME/.local/share}/arbiter-academy/preview-0.30/bin/arbiter-academy"
"$academy" --repository "$PWD" reset P02-commit-review-pr
Academy preserves the current attempt and restores original remotes when the sidecar topology matches.
If Reset refuses, preserve its output and do not force-reset, edit remotes, or delete refs.
The prior attempt remains reachable for inspection.
Hint 1
Compare the branch and HEAD printed by Prepare with git branch --show-current and git rev-parse HEAD. A mismatch means you are not in the prepared attempt.
Hint 2
Keep the two commits distinct: first the two Workshop Queue paths, then the one receipt path. The helper refuses an uncommitted or ambiguous work range.
Hint 3
If origin or upstream evidence differs, stop. The local bare routes are verifier-owned exercise state; editing them would erase the condition you need to understand.
Understand the mechanism
The receipt is a canonical local statement that binds your declared cleared review to Git facts the verifier can recompute. The separate receipt commit keeps the reviewed work range distinct from the declaration about it. Continue to P03 after Reset or after preserving this completed attempt.