claude: fix test fallout from Json.of_string's structured error
[Json.of_string] returns [(_, Json.Error.t) result]; [Alcotest.fail]
takes a [string], so pipe through [Json.Error.to_string] at the call
site. Also fix a stray typo in [test/dune] that put [loc] outside the
[(libraries ...)] list, and let [dune fmt] reflow the codec blocks in
[control] / [hooks] / [message] / [permissions] now that they sit
inside [let open Json.Codec in].