coreapi: decode 201/204 responses, and default the mirror cluster

main

Commit

Soph3mo ago

Two fixes to entire repo mirror create, which failed with "decode response: default (code 201): unexpected Content-Type: application/json".

  1. 201/204 decode (control-plane-wide). The spec declares only 200 for each operation, but the server answers 201 Created on POSTs and 204 No Content on DELETEs. ogen routed those unenumerated codes to the error decoder (which expects problem+json), so every create/delete broke on a successful response. The normalizer now collapses each operation's success to a single "2XX" range response, which matches whatever 2xx the server returns and decodes it as the success type. ogen surfaces the actual code via a *…StatusCode wrapper, so the command fetch closures unwrap .Response; that adaptation stays in the closures and isn't visible to users.

  2. Default cluster host. mirror create / mirror remove now take the <cluster-host> positional optionally, defaulting to aws-us-east-2.entire.io, so the common case is just entire repo mirror create github.com/owner/repo. A single-region default for now — multi-cluster selection should later come from config/context rather than a constant.

Verified live: create (idempotent re-run) now decodes the 201 and prints the existing mirror; create without a cluster arg targets the default.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com Entire-Checkpoint: 6e4f9286de7c

Checkpoints

CoreAPI Command Output and Mirror Improvements

CodexGPT-5.5
View session
Checkpoint 1

Integrate EntireDB Commands into CLI

Claude Code
View session
Checkpoint 1