repo create: stamp a usable entire:// remote in the JSON output

main

Commit

stiak3mo ago

entire repo create echoed the raw Repo wire JSON, which has clusterHost and path but no ready-to-use clone/remote URL. Synthesize a remote field of the form entire://<clusterHost>/<path> (the form git clone and git-remote-entire accept), merged into the create output.

The path the API returns carries a leading slash, so trim it before joining to avoid a doubled separator. Omit the field entirely when either coordinate is unresolved (e.g. a still-provisioning repo) rather than emit a half-formed URL. The synthesis only fills a gap: if the wire object already carries a remote (a future first-class field, or one arriving via additional properties) it's left untouched so the server value wins.

Repo carries a custom marshaler plus additional properties, so the repo is round-tripped through its own encoder and the remote merged in rather than embedded in a wrapper struct.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com Entire-Checkpoint: 4e76f426e952

Checkpoints

Fix .remote Field Stamping in Repo Create

Claude CodeOpus 4.8[1m]
View session
Checkpoint 1