feat(p2): Phase 13 β episodic binding, chaining, write-time validation (v0.11.0)#5
Merged
Merged
Conversation
β¦n (v0.11.0) Three P2 features from the Researched Feature Roadmap, plus ruff cleanup: **Episodic role binding** (`episode.py`): EpisodeStore binds who/what/when/where role HVs into a composite via bundle(bind(R_role, value_hv)). Deterministic fixed role seeds so any two stores share the same role space. Partial-cue retrieval and exact unbind_role(). 17 tests. **Multi-hop chaining** (`chaining.py`): chain_query iteratively follows the nearest unvisited entry's key HV, building a relational traversal of the memory graph. min_similarity early-stop, no-revisit guarantee. 14 tests. **Write-time validation** (`validation.py`): WriteValidator enforces novelty (duplicate_threshold cosine gate) and per-source rate limits (sliding-window deque). validate() is read-only; record() commits the slot; validate_and_store() is the atomic combined path. 17 tests. **API**: POST /episodes/store, /episodes/query, /chain, /memories/validate. RestState gains EpisodeStore and WriteValidator pre-configured with agent_inference rate limit (100/min). ruff: 58 violations fixed (36 auto + 22 manual noqa/removals). 404 Python tests + 9 Rust tests passing. Version bumped to 0.11.0. https://claude.ai/code/session_01WVrWJAD1jsq6ah8Tg7jBrN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
episode.py):EpisodeStorebindswho/what/when/whereHVs into a composite viabundle(bind(R_role, value_hv)). Fixed deterministic role seeds shared across all instances. Partial-cue retrieval from any role subset. Exactunbind_role().chaining.py):chain_query(memory, start_key, hops, min_similarity)iteratively follows the nearest unvisited entry's key HV across the memory graph. No-revisit guarantee,terminated_earlyflag,.labels()/.similarities()helpers.validation.py):WriteValidatorenforces novelty (cosine duplicate threshold) and per-source sliding-window rate limits.validate()is read-only;record()commits;validate_and_store()is atomic.# noqa: E402/ statement splits / F841 removals). First clean ruff pass since the project started.POST /episodes/store,POST /episodes/query,POST /chain,POST /memories/validate.RestStategainsEpisodeStoreandWriteValidator(pre-configured withagent_inferencerate limit of 100 stores/min).Test plan
ruff check .β all checks passedcargo testβ 9 Rust tests passingpython -m pytest python/tests/ api/ tests/ -x -qβ 404 passedtest_episode.py(17),test_chaining.py(14),test_validation.py(17) β minus 2 fixed test assertion corrections0.11.0in__init__.pyandpyproject.tomlPLAN.mdupdated to current versionv0.10.0β Phase 13 ticked βhttps://claude.ai/code/session_01WVrWJAD1jsq6ah8Tg7jBrN
Generated by Claude Code