Git history and agent output
Keep reviewed source in Git and hand a small generated report to a fresh worker through mountable.io.
Use Git to review a source change. Save the generated report on mountable.io when a later worker needs that run's file. The report can name the source commit so the reader knows which change to open.
mountable.io maintains this runnable companion. It creates two commits in a disposable repository on local disk, writes a 110-byte synthetic report, then transfers it through the Python SDK. The second reader runs in a fresh process. No model, mount or Git host is needed.
Setup
Use Git 2.29+, Python 3.11+ and uv. For the upload, use an existing mountable.io
account with a saved payment method, filesystem and API key. Keep
MOUNTABLE_API_KEY in your private environment or secret manager.
git clone https://github.com/writeitai/mountable.git
cd mountable/examples/git-and-output
uv sync --locked
export FS_ID=your-filesystem-id
export RUN="demo-$(date +%s)"Your job chooses FS_ID and RUN. Use a new run ID each time: 1–40 lowercase
letters, digits or hyphens. The report supplies neither value.
Make a source change and its report
uv run python handoff.py git-demo --report report.jsonThe command makes an initial total.py, commits it, creates a branch, changes
the function to ignore negative numbers, shows the diff and commits the fix.
It executes that function and writes this report:
{"check": "total([3, -2, 4]) == 7", "result": 7, "source_commit": "c779fafd5d0d6876b9509f5ae21458849530888e"}The temporary repository is removed. report.json stays on your disk. Use a
new filename to repeat the fixture. In your application, keep the source
repository and put its actual tested commit in the report.
Upload and read in a fresh process
export SHA=$(uv run python -c 'import hashlib; print(hashlib.sha256(open("report.json", "rb").read()).hexdigest())')
uv run python handoff.py upload --filesystem "$FS_ID" --run "$RUN" --report report.json
uv run python handoff.py read --filesystem "$FS_ID" --run "$RUN" --sha256 "$SHA"The writer exits before the read command starts. Upload prints stored, the
path git-output-<run>.json, its size and SHA-256. Read opens a read-only SDK
session, checks the expected checksum and report fields, then prints match
and the JSON above. It needs no copy of report.json.
The report is limited to 4096 bytes. Upload fails with 412 if the path already exists, so a rerun leaves the original report alone. The script does not retry writes after a failure. After an unknown outcome, read the path before trying again.
A read-only SDK session receives 403 on a write. For a separate reader, give
it a read-only grant or credential with the authority you intend. The example
uses your API key to request each session; setting ro in code does not
remove write authority from that key. See permissions.
The checksum checks bytes against the value supplied by your job. It does not prove the report's claimed source commit. The example fixes its own source and executes it locally. For filesystem behavior, see contract and limits.
Clean up and costs
uv run python handoff.py cleanup --filesystem "$FS_ID" --run "$RUN" --sha256 "$SHA"Cleanup checks the expected bytes and deletes with the matching ETag. A changed
file is left alone. A missing file returns 404. Remove local report.json
when you finish.
At the USD usage prices, storage costs $0.20/GiB-month and downloads cost $0.02/GiB. A report is 110 bytes; retained data can remain billable until garbage collection after deletion. Keep an application-owned retention policy and a filesystem spending cap. The local Git fixture uses local disk and compute.
SDK token sessions expire after an hour. Closing the client closes its HTTP connections; a backend can revoke sessions sooner through the management API. The production check revoked every session it created and confirmed the file returned 404 after deletion.
Offline checks
uv run --locked pytest -qThese checks run real local Git and the released SDK over fake HTTP. They cover the source diff, report fields, repeated upload, read-only denial, changed-file preservation and conditional cleanup. No cloud calls are made.
Git sources, read 2026-10-27: commits, diffs, local history and offline work.