Skip to content

feat: include_history on read() and recent(), fingerprint on read() and write(), the revision chain on items (0.4.0) - #21

Merged
izgorodin merged 1 commit into
mainfrom
feat/history-and-fingerprint
Oct 2, 2026
Merged

izgorodin merged 1 commit into
mainfrom
feat/history-and-fingerprint

Conversation

@izgorodin

Copy link
Copy Markdown
Member

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) and recent(..., include_history=True): superseded revisions alongside live ones. Sent only when True; a default request is byte-identical to 0.3.x.
  • read(..., fingerprint=...) and write(..., fingerprint=...): exact episodic match on a fingerprint given at write time (at most 512 characters); ReadResponse.episodic_hit says whether it hit.
  • MemoryItem.supersedes / .superseded_by and RecentItem.supersedes / .superseded_by, defaulting to [] and None because 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 mnemoverse clean.
  • Field names and semantics taken from the live core.mnemoverse.com/openapi.json (ReadRequestSchema.include_history, .fingerprint, WriteRequestSchema.fingerprint, MemoryItemSchema / RecentItemSchema supersedes and superseded_by) and from /docs/api/reference ("Reading history").
  • Live smoke against the API in the domain smoke:ai-sdk-2026-10-02 with the branch build: write with a fingerprint, read with the same fingerprint, a superseding write, then read with and without include_history and recent(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

…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>
@coderabbitai

coderabbitai Bot commented Oct 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Next included review available in 56 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 4c2016fe-cc1a-4b91-b08c-a0626c0cac06

📥 Commits

Reviewing files that changed from the base of the PR and between f10afc2 and 26cef87.

📒 Files selected for processing (8)
  • CHANGELOG.md
  • README.md
  • mnemoverse/__init__.py
  • mnemoverse/_async_client.py
  • mnemoverse/client.py
  • mnemoverse/types.py
  • pyproject.toml
  • tests/test_client.py
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Comment @coderabbitai help to get the list of available commands.

@izgorodin

Copy link
Copy Markdown
Member Author

Live smoke of this branch against core.mnemoverse.com, domain smoke:ai-sdk-2026-10-02, 2026-10-02 (ids shortened):

write1 stored=True atom=ef6fd204                      # write(..., fingerprint="smoke:fp:<tag>")
read(fingerprint=same): episodic_hit=True items=1 first=ef6fd204
write2 supersedes -> [ef6fd204]                      # write(..., supersedes=[write1.atom_id])
read(include_history=True): [(b5896ad1, superseded_by=None, supersedes=[ef6fd204]), (ef6fd204, superseded_by=b5896ad1, supersedes=[])]
read() default: history visible? False, items=1     # the organisation's read-side filter hides the replaced revision
recent(include_history=True): items=3, with superseded_by=1

Every field parsed into the new supersedes / superseded_by attributes; nothing in the existing fields changed.

@izgorodin
izgorodin merged commit 279c38a into main Oct 2, 2026
9 checks passed
@izgorodin
izgorodin deleted the feat/history-and-fingerprint branch October 2, 2026 20:35
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.

1 participant