Repository navigation
test(recall): payload conformance — full payload contract, no stubs - #1239
Merged
Merged
Conversation
…1232) Prepend a [Session date/time: ...] header to stored content so lexical and vector recall can answer temporal questions without metadata joins. - remember --timestamp / import --format text --timestamp (opt-in) - RFC 3339, YYYY-MM-DD HH:MM:SS, and YYYY-MM-DD accepted; invalid values fail loudly before any write - never double-prefixes already-anchored content - server-path remember forwards the anchor - rejected explicitly for --batch-dir (per-file anchors are ambiguous) Measured on the internal conversation eval: temporal QA 15% -> 100%. Closes #1232
…1233) Two HTTP-route tests pin the recall contract: responses carry the full SearchResult payload (memory id, full content, timestamps, score) and empty results are structured objects, never hit-count summary strings. Guards against the silent empty-context degradation class observed in internal integration work (#1233). Closes #1233
…s array required (#1233)
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
| let results = v | ||
| .get("results") | ||
| .and_then(|r| r.as_array()) | ||
| .expect("empty recall must return an object with a results array"); |
3 of 4 tasks
…ategy (#1233) Uteke::open_with_backend(":memory:", None) + /remember route (storage-only without embedder) + fts5 recall (keyword, no query embedding) so the tests run in CI builds without the ONNX runtime lib.
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.
What
Adds payload conformance tests for the recall contract (#1233): recall responses must carry the full hit payload (complete memory object: id, full content, timestamps, metadata) plus the score — never a hit-count summary stub.
Two tests added to the HTTP route (
POST /recall, in-memory store, no network):recall_http_payload_conformance— populated store; asserts the response is a JSON array of fullSearchResultobjects withmemory.id, fullmemory.content(distinctive probe token present),memory.created_at, and a numericscore; asserts noraw_hits-style stub markers anywhere in the payload.recall_http_empty_result_has_no_stub— empty-result query; asserts the response is structured (object with emptyresultsarray / explicit message), never a bare summary string.Why
Documented failure mode (internal eval research): a downstream integration that received a hit-count stub instead of the full payload produced empty-context prompts and a ~93.8% -> ~8.6% silent accuracy collapse — nothing errored anywhere. These tests pin the "raw response = full payload" contract so any future regression that summarizes/stubs the payload fails CI loudly.
Closes #1233
Testing
cargo test -p uteke-server: 35/35 pass (incl. 2 new conformance tests)cargo clippy -p uteke-server --all-targets: 0 warningscargo fmt --allclean