Skip to content

Design configurable pressure-driven consolidation policies #55

Description

@TerminallyLazy

Context

Raised by bio1-aws in Shiyao-Huang/awesome-agent-evolution#18: Tree Ring currently offers deterministic consolidation, but an embedding harness cannot express a fixed-capacity or pressure-triggered memory policy as a first-class Tree Ring contract.

Source discussion: Shiyao-Huang/awesome-agent-evolution#18 (comment)

Current behavior

  • Consolidation runs only when a caller invokes tree-ring consolidate; Tree Ring does not run a daemon or autonomously schedule it.
  • --period-type supports daily, weekly, monthly, yearly, and manual buckets.
  • Project, agent-profile, workflow, and session filters partition the plan.
  • Eligibility currently uses a fixed salience threshold plus protected ring/retention cases.
  • Daily/manual summaries normally land in outer; weekly/monthly/yearly summaries normally land in inner; scar, seed, and sufficiently confident heartwood are preserved.
  • Source memories remain intact, and the same period/source set is idempotent.
  • There is no size-, count-, or byte-pressure trigger and no configurable metabolic-rate policy.

Desired design

Add an explicit, inspectable policy/planner surface that lets a harness decide when consolidation pressure is high enough without turning Tree Ring into a hidden autonomous scheduler. Candidate inputs may include:

  • active memory count or approximate storage bytes by partition/ring;
  • age/time window;
  • event count since the last consolidation;
  • configurable salience/retention eligibility;
  • target output ring and maximum summary fan-in.

Acceptance criteria

  • A read-only command/API reports pressure, selected sources, and the reason a threshold fired.
  • Applying a plan remains explicit, deterministic, partition-aware, sensitivity-safe, and idempotent.
  • Existing period-based behavior stays backward compatible.
  • No background daemon or implicit mutation is introduced.
  • Tests cover episodic/high-churn and semantic/low-churn profiles plus dry-run non-mutation.
  • Documentation explains how a host can invoke the planner on an L1/backpack overflow event.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions