Skip to content

[MM-09] Add deterministic bounded MemorySegmentBuilder #788

Description

@bug-superman

MM-09: Add deterministic bounded MemorySegmentBuilder

Parent

#771

Checkpoint

MC-2 Bounded recall

What to build

Replace full active-memory concatenation with deterministic query, scope, freshness, conflict, dedupe, top-K, per-entry, and total-token selection.

Acceptance criteria

  • Selection order matches the documented policy.
  • Tie-breaking is deterministic.
  • Superseded, contradicted, deleted, and out-of-scope entries cannot be selected.
  • Per-entry and total budgets are hard limits.
  • A selection failure falls back to a bounded safe result.

Required tests

  • Score/tie property tests
  • budget edges
  • Unicode/empty query
  • conflict and dedupe
  • privacy negative cases

Benchmark

40-case recall subset, three paired reps; F1 >= 0.90, privacy 100%, tokens no higher than Current Maka.

Blocked by

Rollout and rollback

Feature flag returns to the corrected legacy renderer; never return to cross-session or unbounded reads.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions