Repository navigation
feat: include_history on read() and recent(), fingerprint on read() and write(), the revision chain on items (0.4.0) - #21
Conversation
…nd write(), the revision chain on items (0.4.0) The API has accepted all three since the revision chain shipped, and the SDK had never learned them: a Python caller could not ask for superseded revisions, could not match a memory by an exact episodic fingerprint, and saw items without their `supersedes` / `superseded_by` even when the server sent both. - read(..., include_history=True) and recent(..., include_history=True), sent only when True so a default request is byte-identical to before. - read(..., fingerprint=...) and write(..., fingerprint=...), at most 512 characters, exact episodic match; `episodic_hit` reports the hit. - MemoryItem and RecentItem gain `supersedes` (default []) and `superseded_by` (default None); both are omitted on the wire when they do not apply. New public names, so a MINOR: 0.4.0. Nine tests cover the wire shape in both clients, the by-default omission, and the parsing of both chain fields; the existing suite is unchanged. Co-Authored-By: Σ <sigma@mnemoverse.ai> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Next included review available in 56 minutes. View limit detailsLimit details: You’ve used the included review currently available. Your 90 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (8)
Comment |
|
Live smoke of this branch against Every field parsed into the new |
What
Three keyword arguments the API has accepted since the revision chain shipped and the SDK never learned, plus the two response fields that make the chain visible:
read(..., include_history=True)andrecent(..., include_history=True): superseded revisions alongside live ones. Sent only whenTrue; a default request is byte-identical to 0.3.x.read(..., fingerprint=...)andwrite(..., fingerprint=...): exact episodic match on a fingerprint given at write time (at most 512 characters);ReadResponse.episodic_hitsays whether it hit.MemoryItem.supersedes/.superseded_byandRecentItem.supersedes/.superseded_by, defaulting to[]andNonebecause the server omits them when they do not apply.Version 0.4.0 in
pyproject.toml,__version__and the CHANGELOG (MINOR: new public names, nothing existing changes).Verification
pytest: 66 passed (9 new: wire shape through both clients, by-default omission, parsing of both chain fields on read and recent items);mypy mnemoverseclean.core.mnemoverse.com/openapi.json(ReadRequestSchema.include_history,.fingerprint,WriteRequestSchema.fingerprint,MemoryItemSchema/RecentItemSchemasupersedesandsuperseded_by) and from/docs/api/reference("Reading history").smoke:ai-sdk-2026-10-02with the branch build: write with a fingerprint, read with the same fingerprint, a superseding write, then read with and withoutinclude_historyandrecent(include_history=True); the output is in the PR conversation.Ships as 0.4.0 after the 0.3.2 release run finishes (two tags in flight would race at the publish step).
🤖 Generated with Claude Code