Release v0.2.0 — MemEvolve cartridge + curiosity homing#4
Merged
Conversation
Port MemEvolve dionysus_memory_provider + entity_extractor helpers into pure, HTTP-free shaping.py (PHASE_MEMORY_TYPES, parse_basins_to_memory_items, make_cache_key, cached_memories_to_response, sanitize_pii, extract_trajectory_entities). Add ingest.py (ingest_trajectory + stable_basin_name) for TrajectoryData → AttractorBasin ingestion with PII redaction, idempotent re-ingest via strengthen_basin, and deterministic basin naming. 29 new unit tests, all passing; full suite 1163/1163 green.
…tridge - src/elume/adapters/memevolve/__init__.py exposes the public surface with a try/except guard for the future provider import (A4). - encode.py: encode_query produces deterministic ±1 Hopfield patterns via SHA-256 iterated hash; optional LinOSS context enrichment path. - retrieve.py: retrieve_ranked_memories scores stored basins by normalized Hopfield overlap and returns a stable top-k MemoryItem- shaped list with id-as-tiebreaker. - records.py: frozen MemoryRecord dataclass; embedding flagged read-only; metadata wrapped in MappingProxyType. - 47 unit tests; full suite remains green.
- Conductor: register Tracks 023 (cartridge), 024 (curiosity), 025 (hyperevolution wiring) with spec.md + plan.md each. - README.md: drop "MemEvolve-style" hedge; foreground engineering benefits (determinism, immutable records, provider boundary, no framework lock-in); add cartridge section pointing to docs/adapters/. - ATTRIBUTION.md: corrected MemEvolve framing (substrate vs front-end); add bingreeky/MemEvolve Apache-2.0 credit for ported shaping helpers; add dionysus3 curiosity-engine credit. - CHANGELOG.md: insert [Unreleased] block above [0.1.0] covering Tracks 023/024/025 and the docs/attribution updates. - CITATIONS.bib: @misc entry for bingreeky/MemEvolve. - docs/archon-readiness/22-curiosity-determinism.md: rationale for curiosity's deterministic guarantees. - docs/adapters/memevolve.md: consumer-facing install + bench guide. - docs/posts/v0.2.0-launch.md: public announcement post draft.
Concrete in-process MemEvolve cartridge composing A1's curiosity, A2's encode/retrieve/records, and A3's ingest/shaping. Lazy-init state in __init__; real construction (AttractorBasin + InMemoryProvider + BeliefEmbedder + LinOSSEncoder + injected RNG + deterministic session_id) happens in initialize(). - provide_memory: phase-aware filter; encode_query → basin overlap ranking → MemoryItem-shaped dicts (duck-typed for MemEvolve). - take_in_memory: ingest_trajectory → AttractorBasin via content_to_pattern; PII-sanitized via shaping.sanitize_pii. - Curiosity extension points (Track 025 / A5) are no-op stubs at config["curiosity"] == True paths; default off. - 8 integration tests pinning init/end-to-end/determinism/phase- filtering/empty-query graceful failure. - __init__ guard removed; unconditional provider import. Tests: 1171 passed (1163 prior + 8 new); ruff clean.
Reader skim test: previous README/launch-post left a reader inferring that envelope, cartridge, curiosity-as-envelope-op, and hyperevolution coupling were upstream contributions. They are not. - README: insert "What Elume created" section listing the deterministic envelope (v0.1), platform-tagged float-hash policy, ElumeMemoryProvider baseline (v0.2), cognition.curiosity_score replayable op, hyperevolution coupling, and the kernel discipline that makes them compose. Distinct from upstream credit (kept intact in Attribution section). - Launch post: insert "What's original to Elume v0.2.0" callout right after the feature list, before the storyline. Names the three v0.2 originals (deterministic baseline, replayable curiosity op, hyperevolution coupling) and explicitly delineates ported math (entropy/info-gain formula from dionysus3, framing from MemEvolve) from original Elume work (envelope wrap, BeliefBuffer, A/B switch, integration). No code changed; tests still 1171 passed.
…dge A/B) Extension points filled in provider.py: 1. provide_memory — after retrieve_ranked_memories, when curiosity=True and the belief buffer is non-empty, re-ranks memory_dicts via _apply_curiosity_rerank. Each candidate basin receives a curiosity score via _basin_curiosity_score (entropy × (1 − p) for known basins, entropy for unknown basins), which is normalised to [0,1] across the candidate set and applied as an additive compound: base_score + boost_lambda * norm_c. Basins with norm_c < curiosity_threshold receive no boost. Sort is stable with id as tiebreaker. Empty belief buffer → plain ranking (no-op). 2. take_in_memory — after ingest_trajectory, when curiosity=True and trajectory_data.metadata contains is_correct, updates the per-session BeliefBuffer: is_correct=True → +0.1 to each ingested basin's mass; is_correct=False → -0.05; values clamped ≥ 0 and renormalised. Missing is_correct → no update. BeliefBuffer scheme: dict[session_id, dict[basin_name, float]] stored in provider._belief_buffer. Renormalised to sum-1 on every write. A/B switch behaviour: curiosity=False (default) leaves all existing logic untouched; curiosity=True activates both extension points. Same seed → byte-equal results within each mode. Curiosity-on run differs from off-run on ≥ 3/5 steps once belief state is established (demonstrated in test_hyperevolution_a_b.py::test_curiosity_moves_rankings_at_least_3_of_5_steps).
- pyproject.toml: 0.1.0 → 0.2.0; description tightened, names cartridge + curiosity homing explicitly (drops "MemEvolve-style" hedge). - reference_service/pyproject.toml: 0.1.0 → 0.2.0. - src/elume/__init__.py + reference_service/src/reference_service/__init__.py: __version__ bump. - tests/unit/test_version.py: assertion bump. - CHANGELOG.md: [Unreleased] promoted to [0.2.0] — 2026-05-04 with the headline summary (cartridge + curiosity + 4-of-5 A/B re-rank signal). Verification: 1176 passed, ruff clean, uv build → dist/elume-0.2.0-*.
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
Cuts v0.2.0 — the MemEvolve cartridge + curiosity homing device + hyperevolution coupling release.
Empirical headline: 4 of 5 retrieval steps re-rank between
curiosity=Falseandcuriosity=Trueon the synthetic 5-step fixture (seed=42). Curiosity actually moves the search, mechanically and deterministically.What landed across this release branch
The version bump in this PR sits on top of 7 feature/docs commits already merged into
feat/v0.2.0:5bf2c3e— Track 024 (curiosity) + Track 023 ingest/shapinga61df8a— Track 023 encode/retrieve/records0d53054— Track 023/024/025 docs + corrected MemEvolve attribution88cf1bf— Track 023 ElumeMemoryProvider + cartridge round-tripe2fa171— "What Elume created" foregrounded in README + launch post7153803— Track 025 hyperevolution wiring (curiosity × cartridge A/B)144f5b7— version bump (this PR)What Elume created (vs adopted)
elume.adapters.memevolve.ElumeMemoryProvider— the first deterministic baseline in MemEvolve's--memory_providerlist.cognition.curiosity_score— Shannon-entropy + information-gain scoring as a replayable envelope op (hash-equal replay). Math ported from dionysus3; the envelope wrap is original.provide_memoryre-ranking, the per-sessionBeliefBuffer, thetake_in_memorybelief update, and thecuriosity=TrueA/B switch.Adopted from upstream: MemEvolve framing +
BaseMemoryProvidercartridge interface (Apache-2.0); dionysus3 information-gain math; LinOSS encoder (Rusch & Rus); Hopfield substrate.Verification
pytest -q→ 1176 passed (was 1045 at v0.1.0; +131 new)ruff check src tests reference_service/src→ cleanuv build→dist/elume-0.2.0-py3-none-any.whl+elume-0.2.0.tar.gzTag plan
After merge:
git tag -a v0.2.0 -m "v0.2.0 — MemEvolve cartridge + curiosity homing"on the merge commit.git push origin v0.2.0triggers the publish workflow's build + TestPyPI step.gh release create v0.2.0 --notes-file docs/posts/v0.2.0-launch.mdtriggers PyPI publish (when trusted publishers are configured).Out of scope for this PR
bingreeky/MemEvolveaddingELUMEtoMemoryType+PROVIDER_MAPPING(deferred until benchmark numbers worth showing).Test plan
uv pip install -e ".[dev]" && pytest -qpython -m reference_serviceruns identically across two invocations (deterministic)from elume.adapters.memevolve import ElumeMemoryProvidersucceeds;provider.initialize()returns True