Skip to content

feat(p2): Phase 13 β€” episodic binding, chaining, write-time validation (v0.11.0)#5

Merged
konjoinfinity merged 1 commit into
mainfrom
claude/konjo-kohaku-tdnaT
May 19, 2026
Merged

feat(p2): Phase 13 β€” episodic binding, chaining, write-time validation (v0.11.0)#5
konjoinfinity merged 1 commit into
mainfrom
claude/konjo-kohaku-tdnaT

Conversation

@konjoinfinity
Copy link
Copy Markdown
Contributor

Summary

  • Episodic role binding (episode.py): EpisodeStore binds who/what/when/where HVs into a composite via bundle(bind(R_role, value_hv)). Fixed deterministic role seeds shared across all instances. Partial-cue retrieval from any role subset. Exact unbind_role().
  • Multi-hop associative chaining (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_early flag, .labels() / .similarities() helpers.
  • Write-time validation (validation.py): WriteValidator enforces novelty (cosine duplicate threshold) and per-source sliding-window rate limits. validate() is read-only; record() commits; validate_and_store() is atomic.
  • ruff cleanup: 58 violations fixed (36 auto-fixable unused imports + 22 manual # noqa: E402 / statement splits / F841 removals). First clean ruff pass since the project started.
  • API: 4 new endpoints β€” POST /episodes/store, POST /episodes/query, POST /chain, POST /memories/validate. RestState gains EpisodeStore and WriteValidator (pre-configured with agent_inference rate limit of 100 stores/min).

Test plan

  • ruff check . β†’ all checks passed
  • cargo test β†’ 9 Rust tests passing
  • python -m pytest python/tests/ api/ tests/ -x -q β†’ 404 passed
  • 46 new tests: test_episode.py (17), test_chaining.py (14), test_validation.py (17) β€” minus 2 fixed test assertion corrections
  • Version bumped to 0.11.0 in __init__.py and pyproject.toml
  • PLAN.md updated to current version v0.10.0 β†’ Phase 13 ticked βœ…

https://claude.ai/code/session_01WVrWJAD1jsq6ah8Tg7jBrN


Generated by Claude Code

…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
@konjoinfinity konjoinfinity marked this pull request as ready for review May 19, 2026 19:31
@konjoinfinity konjoinfinity merged commit b01a620 into main May 19, 2026
6 checks passed
@konjoinfinity konjoinfinity deleted the claude/konjo-kohaku-tdnaT branch May 19, 2026 19:31
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.

2 participants