Repository navigation
refactor(core): typed list request shared by HTTP, MCP and CLI (#1343) - #1424
Merged
Merged
Conversation
Refs #1343 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
This was referenced Oct 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1343 (
listslice; therecallslice is #1423 and is the template).What
New
uteke-core::list_requestmodule:ListInput(raw, per-surface decode),ListPolicy(HTTP,MCP),ListRequest::decode,ListInput::to_http_body(CLI-via-server body) andListRequest::{wants_envelope, page_meta}(the #1188 envelope arithmetic)./list: the 1000 cap (security: untrusted project config, CORS off by default, list limit caps #1321) and theatRFC3339 parse now go throughListParams::decode(ListPolicy::HTTP). Envelopehas_more/next_offsetusepage_meta.uteke_list: newdecode_list_args(ListPolicy::MCP);exec_listuses it./listbody is built byListInput::to_http_body.MAX_LIST_LIMITnow aliasesuteke_core::LIST_HTTP_MAX_LIMIT(same value, still used by the other list-style endpoints).Extraction only: no change to routes, request/response shapes, defaults, caps or error texts.
docs/is byte-identical aftercargo run -p docgen.Why
Each surface parsed, defaulted and clamped its own list arguments. #1343 moves that logic to one typed request per operation, encoding where surfaces disagree as explicit policy values rather than resolving them.
Surface disagreements (owner decisions, none unified here)
/listuteke_listdefault_limit, shared with recall)limit: "5",-1, null)at(time travel)--atforwardedinclude_meta(#1188)at)default)entity/categoryHTTP default limit (5) differing from the MCP/CLI default (20) is the one most likely to surprise a client.
Testing
uteke-core(list_request::tests, 6): per-policy defaults, cap boundaries (0/1/999/1000/1001/usize::MAX),atUTC normalisation and exact error text, envelope vsat,page_metaarithmetic, CLI body shape. They fail without the change (the module does not exist).uteke-server(list_request_cross_surface_tests, 8): the same logical request through the HTTP and MCP decoders gives equal typed requests where behaviour agrees; each disagreement above is pinned.uteke-servebuilt fromorigin/developand from this branch, freshUTEKE_HOME, identical seed (15 memories, 3 namespaces, via/remember; embeddings unavailable so rows are FTS-only, which/listdoes not need). 62/listcases (default, limit 0/1/999/1000/1001/u64::MAX/overflow/negative/string/float/null/bool, offsets, tag, namespace,include_metapages and edges,atvalid/offset/invalid/combined, unknown fields, malformed bodies): status codes and normalised bodies (ids and timestamps masked): 62 cases, 0 differences.cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warnings,cargo test --workspace,cargo test -p uteke-core --no-default-features --features "onnx,vecq" --lib: all pass.cargo run -p docgenleavesdocs/clean.🤖 Generated with Claude Code