codec: let open Json.Codec in cleanup across claude + bottler
Reduce Json.Codec. qualifier noise in codec-heavy bodies. Pattern:
each [let X : ... Json.codec = ...] body opens [Json.Codec] at the
top of its expression, so combinators ([Object.map], [string], [int],
[list], [bool], [enum], etc.) resolve unqualified.
Files cleaned:
- ocaml-claude/lib/{outgoing,options,client,model}.ml -- the
case_mem chains and Object.map pipelines now read like the
encodings-skill examples instead of being hidden behind the
Json.Codec. prefix.
- bottler/lib/config.ml -- six Object.map pipelines (dep_type,
head_dep, linux_mode, build, package, storage, tap, jsont) all
use the open. The package one needed explicit (p : package) and
: package annotations because Json.Codec.mem_map carries fields
named [name] / [enc] that would otherwise shadow the package
record's fields under the open.
The lesson for future cleanups: any record whose field names clash
with mem_map's fields ([name], [doc], [type'], [id], [dec_absent],
[enc], [enc_omit]) needs anchoring annotations on the constructor
function and on each [~enc] lambda. Most records in this repo
don't clash, but the [name]/[enc] case is common enough to call
out.