omnigraph/crates/omnigraph-cli
Devin AI 0949f28794 fix(MR-656): address Devin Review findings on /query and /change
Two issues raised by Devin Review on PR #110:

1. `POST /query` mutation-rejection error pointed at the deprecated
   `/change` endpoint instead of the canonical `/mutate`. Fixed in
   three places: the runtime error message in `server_query`, the
   utoipa 400-response description, and the handler doc comment. The
   `QueryRequest` schema docstrings in `api.rs` got the same update so
   the openapi.json bodies match. Server and openapi tests updated.

2. `execute_change_remote` serialized `ChangeRequest` directly, which
   emits the new canonical field names `query` / `name` on the wire.
   `#[serde(alias = "query_source")]` only affects deserialization, so
   a newer CLI talking to an older server would have its `/change`
   POST body fail with "missing field: query_source". Fixed by
   extracting a `legacy_change_request_body` helper that hand-rolls
   the JSON with the legacy keys (`query_source` / `query_name`), the
   same byte-stable contract `execute_read_remote` already uses
   against `/read`. Added two unit tests on the helper to lock the
   wire shape in.

Co-Authored-By: Ragnor Comerford <ragnor.comerford@gmail.com>
2026-05-23 13:48:21 +00:00
..
src fix(MR-656): address Devin Review findings on /query and /change 2026-05-23 13:48:21 +00:00
tests feat(MR-656): rename read/change to query/mutate with deprecation signals 2026-05-23 13:34:28 +00:00
Cargo.toml policy: CLI policy injection — local writes go through engine enforce (MR-722) (#104) 2026-05-18 04:06:21 +03:00