Skip to content

fix(plugin): map Hermes session id to a deterministic ferrosa UUID - #6

Open
kumarabd wants to merge 7 commits into
ferrosadb:mainfrom
kumarabd:fix/session-id-uuid-mapping
Open

fix(plugin): map Hermes session id to a deterministic ferrosa UUID#6
kumarabd wants to merge 7 commits into
ferrosadb:mainfrom
kumarabd:fix/session-id-uuid-mapping

Conversation

@kumarabd

@kumarabd kumarabd commented Jun 29, 2026

Copy link
Copy Markdown

Closes #5.

Summary

Revised per maintainer feedback (compare with ferrosa-memory#138): session-id UUID derivation stays in ferrosa-memory (generic, multi-agent). This PR is now a thin adapter fix only:

  • Pass the raw Hermes session_id on prefetch, sync_turn, on_memory_write, and on_session_end (previously prefetch omitted it entirely).
  • prefetch / hybrid_search uses explicit scope="both" for cross-session recall.
  • Removed plugin/session.py and client-side UUIDv5 mapping — a second mapping layer would produce different session UUIDs than #138's server derivation.

Why

Two bugs in the original plugin:

  1. Writes sent non-UUID Hermes ids → on older fmem, collapsed to the server default. #138 fixes this server-side by deriving uuid5(NAMESPACE_URL, "ferrosa-memory:session-id:v1:{raw}").
  2. prefetch omitted session_id → reads always hit the default session even when writes were session-scoped. This PR fixes that regardless of fmem version.

Requirements

  • ferrosa-memory build that includes #138 (merged to main 2026-06-29) for per-session isolation on non-UUID ids.
  • Rebuild/redeploy ferrosa-memory images before relying on server-side derivation.

Test plan

  • pre-commit run --all-files passes
  • python -m compileall -q hooks plugin passes
  • Against live ferrosa-memory (post-#138): no substituted configured default for caller-provided session_id for Hermes traffic
  • Distinct Hermes sessions → distinct ferrosa-memory sessions
  • prefetch recall includes session-scoped + global results (scope=both)

Abishek Kumar and others added 7 commits June 29, 2026 12:16
Co-authored-by: Cursor <cursoragent@cursor.com>
Closes ferrosadb#5

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…r UUID

Aligns with ferrosa-memory PR #138: non-UUID session_id derivation lives on
the server (generic, multi-agent). This adapter only threads the harness
session id through prefetch, sync_turn, on_memory_write, and on_session_end,
with scope="both" on hybrid_search for cross-session recall.

Removes plugin/session.py, client UUIDv5 mapping, and the in-repo unittest
suite that tested it.

Closes ferrosadb#5

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

Map Hermes session id to a UUIDv5 (non-UUID session_id collapses all sessions into the server default)

1 participant