memory-systems example script: three upstream issues (text not stored, unstable embeddings, ignored time filter)

Open
#528 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
55/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
documentation

Research direction

Read skills/memory-systems/scripts/memory_store.py alongside the skill's README to confirm which limits are already described. Note that the file is vendored byte-identical at a pinned upstream commit and is exercised only by the offline context-skills check, so the work is not editing it: either file the three findings upstream or document the limitations (text not persisted, salted hash() embeddings, ignored time_filter) in the skill README. Done means the chosen route is clear and the README states the limits or links the upstream report; confirm which option the maintainers want before writing.

Written by the indexing model from the issue text.

Description

upstream

skills/memory-systems/scripts/memory_store.py is vendored verbatim from muratcankoylan/Agent-Skills-for-Context-Engineering at 9ff0c99108b3 (MIT). It is an example script for the memory-systems skill. Only the offline context-skills check runs it, and no install or runtime path uses it.

An automated review found three medium issues in the upstream code:

  1. add() does not keep the text. add(text, metadata) uses text only to compute the embedding. search() then returns metadata["text"], falling back to "", so a caller that doesn't also put the text in metadata gets empty strings back.
  2. Embeddings change between runs. The placeholder embedding is seeded with Python's built-in hash(). String hashing is salted per process (PYTHONHASHSEED), so the same text gives different vectors in different runs. That breaks the docstring's claim that identical texts always produce identical vectors, and anything persisted across runs.
  3. time_filter is ignored. retrieve_memories() accepts time_filter and its docstring says results can be filtered by time, but the parameter is never used, so callers get unfiltered results.

Two low items were also noted: an unused json import, and the query vector's norm being recomputed inside the search loop.

We don't patch the vendored file here: it stays byte-identical to the pinned upstream commit. Options are to report these upstream and re-vendor once fixed, or to document the limits in the skill's README.

Dominant language
HTML
Stars
347
Forks
12
Avg merge
2d 16h
Merged PRs (30d)
95

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from coco-research/coco

All issues in coco-research/coco

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.