Skip to content

Release v0.2.0 — MemEvolve cartridge + curiosity homing#4

Merged
bionicbutterfly13 merged 8 commits into
mainfrom
release/0.2.0
May 5, 2026
Merged

Release v0.2.0 — MemEvolve cartridge + curiosity homing#4
bionicbutterfly13 merged 8 commits into
mainfrom
release/0.2.0

Conversation

@bionicbutterfly13
Copy link
Copy Markdown
Owner

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=False and curiosity=True on 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/shaping
  • a61df8a — Track 023 encode/retrieve/records
  • 0d53054 — Track 023/024/025 docs + corrected MemEvolve attribution
  • 88cf1bf — Track 023 ElumeMemoryProvider + cartridge round-trip
  • e2fa171 — "What Elume created" foregrounded in README + launch post
  • 7153803 — 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_provider list.
  • 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.
  • Hyperevolution coupling — the provide_memory re-ranking, the per-session BeliefBuffer, the take_in_memory belief update, and the curiosity=True A/B switch.
  • Authorship clarity — README and launch post now foreground "What Elume created" so readers don't infer that envelope/cartridge/curiosity wiring are upstream contributions.

Adopted from upstream: MemEvolve framing + BaseMemoryProvider cartridge interface (Apache-2.0); dionysus3 information-gain math; LinOSS encoder (Rusch & Rus); Hopfield substrate.

Verification

  • pytest -q1176 passed (was 1045 at v0.1.0; +131 new)
  • ruff check src tests reference_service/src → clean
  • uv builddist/elume-0.2.0-py3-none-any.whl + elume-0.2.0.tar.gz
  • Reference demo regression: identical JSON output for fixed seed

Tag plan

After merge:

  1. git tag -a v0.2.0 -m "v0.2.0 — MemEvolve cartridge + curiosity homing" on the merge commit.
  2. git push origin v0.2.0 triggers the publish workflow's build + TestPyPI step.
  3. gh release create v0.2.0 --notes-file docs/posts/v0.2.0-launch.md triggers PyPI publish (when trusted publishers are configured).

Out of scope for this PR

  • Upstream PR to bingreeky/MemEvolve adding ELUME to MemoryType + PROVIDER_MAPPING (deferred until benchmark numbers worth showing).
  • Live GAIA / WebWalkerQA / xBench runs (require LLM API keys).

Test plan

  • CI green on Python 3.11 and 3.12
  • On a clean checkout: uv pip install -e ".[dev]" && pytest -q
  • python -m reference_service runs identically across two invocations (deterministic)
  • from elume.adapters.memevolve import ElumeMemoryProvider succeeds; provider.initialize() returns True

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-*.
@bionicbutterfly13 bionicbutterfly13 merged commit 09d0f59 into main May 5, 2026
2 checks passed
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.

1 participant