Repository navigation
feat(recall): add bounded atomic memory manifest - #2192
Tech-Circle-48 wants to merge 12 commits into
Conversation
hidb4ai
left a comment
There was a problem hiding this comment.
The tagged manifest path rejects valid input, and the Desktop and skill-validation contracts need to be synchronized. Details inline.
| * Read a bounded metadata-only recall manifest | ||
| * @description Lists active Atomic Memory metadata only. Empty inventory never proves the Scope has no context or authorizes skipping prepare_context. Fetch selected exact refs with get_artifact_revision. Pagination is live keyset order, not a cross-request snapshot. | ||
| */ | ||
| post: operations["get_recall_manifest"]; |
There was a problem hiding this comment.
[P2] Regenerate the complete Desktop contract
The Desktop contract outputs are out of sync with this OpenAPI change. Both ui/src/generated/operations.ts and src-tauri/src/transport/operations.json still carry the base contract hash, so tests/test_desktop_contract.py fails. Windows CI also stops at generate:check with a drift error for src-tauri/src/transport/wire.rs. Please run pnpm --dir desktop generate and commit all affected outputs together so Desktop validation and builds succeed.
There was a problem hiding this comment.
One more symptom in the same file set: api.d.ts was regenerated from a stale draft, not just left without a new hash.
Both AtomicMemoryWriteContent and RememberMemoryRequest.description carry this doc string at the PR head (desktop/ui/src/generated/api.d.ts:2375 and :4465):
"Optional supplied single-line summary. When omitted, the Server generates it before writing; without a generation model the write fails with inference_unavailable."
That sentence appears nowhere in openapi/powercontext.yaml. The contract says the opposite at :5461 and :11058 - a whitespace-collapsed prefix of the final text, and "Explicit writes do not invoke a generation model". default_description in builtin/artifacts/atomic_memory/summary.py implements the model-free prefix.
So this file is currently worse than absent: it documents behavior the implementation does not have, and it is the artifact Desktop and integration consumers read. Regenerating the whole Desktop output set from the current contract fixes both this and the identity drift.
There was a problem hiding this comment.
Rechecked at 080b2d29: this is still reproducible. wire.rs and the description docs have been updated, but ui/src/generated/operations.ts and src-tauri/src/transport/operations.json still carry the base hash a6758fd3…, whereas the current OpenAPI hash starts with d183fce0…. Both assertions in tests/test_desktop_contract.py still fail, and the current Windows job stops with Contract drift: ui/src/generated/operations.ts. Please regenerate and commit the complete Desktop outputs from the current contract before resolving this thread.
| "scope_id": self.scope_id, | ||
| "subject": self.application.security.subject(context), | ||
| "kind": kind, | ||
| "tags": None if tag_filter is None else list(tag_filter.keys), |
There was a problem hiding this comment.
[P2] Keep returned manifest cursors within the accepted request limit
The cursor embeds the complete UTF-8 tag filter before base64 encoding, while RecallManifestRequest.cursor is capped at 4096 characters. With tags ["界" * 63 + chr(97 + i) for i in range(16)] (all within the supported limits), two active memories tagged with the first label, tag_match: "any", and limit: 1, the first HTTP request returns 200 with a 4458-character next_cursor. Passing that cursor unchanged to page two returns 422; the Python request model also rejects it as string_too_long. A short-tag control paginates successfully. Please ensure every cursor produced for accepted filters can be used in the next-page request.
Which issue or RFC does this PR close?
Closes #1864
Rationale for this change
Agents currently need to retrieve memory content before deciding which entries are useful. A bounded, metadata-only manifest provides a cheaper first step, allowing agents to select entries before fetching their full content.
What changes are included in this PR?
Are there any user-facing changes?
POST /v1/recall/manifestandget_recall_manifest.How was this change tested?
make checkAI usage statement