Skip to content

test(recall): payload conformance — full payload contract, no stubs - #1239

Merged
ajianaz merged 5 commits into
developfrom
test/recall-payload-contract
Sep 14, 2026
Merged

ajianaz merged 5 commits into
developfrom
test/recall-payload-contract

Conversation

@ajianaz

@ajianaz ajianaz commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

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):

  1. recall_http_payload_conformance — populated store; asserts the response is a JSON array of full SearchResult objects with memory.id, full memory.content (distinctive probe token present), memory.created_at, and a numeric score; asserts no raw_hits-style stub markers anywhere in the payload.
  2. recall_http_empty_result_has_no_stub — empty-result query; asserts the response is structured (object with empty results array / 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 warnings
  • cargo fmt --all clean

…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
@github-actions

github-actions Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

Comment thread crates/uteke-server/src/handlers.rs Outdated
let results = v
.get("results")
.and_then(|r| r.as_array())
.expect("empty recall must return an object with a results array");
…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.
@ajianaz
ajianaz merged commit c7329ab into develop Sep 14, 2026
15 checks passed
@ajianaz
ajianaz deleted the test/recall-payload-contract branch October 13, 2026 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(recall): full raw-payload pass-through contract (no hit-count stubs)

2 participants