Skip to content

Bound curated memory with a load-bearing-preserving compaction arc #426

Description

@hadamrd

The memory-generation paths (record_merged_outcomes, record_failed_outcomes, record_procedural_skill in runner/learning.py) each upsert one durable MemoryItem per issue and never reclaim it. SqliteMemoryStore exposes put/get/list_active/supersede but NO compaction — unlike the event log, which has compact_noise() plus a load-bearing guard (eventlog/models.is_load_bearing). assemble_boot_context loads EVERY active memory id into context, so as the loop runs hundreds of issues the per-issue episodic 'failed'/'merged' episodes accumulate monotonically and drown the load-bearing decisions in working-memory bloat — the exact failure the vision's 'return arc' rule names. This epic adds the missing paired arc: a compaction that bounds prunable episodic memory while preserving load-bearing cognition (decisions, rejected paths, skills), mirroring the event-log's proven preserve-load-bearing/prune-noise design. Decomposed into three single-mechanism sub-tickets below; this umbrella is not itself dispatchable.

Customer story

A maestro resuming forge-loop after context loss must rebuild from durable memory; today boot loads every active item, so unbounded per-issue episodes bury the load-bearing decisions it actually needs after a reset.

Metadata

Metadata

Assignees

No one assigned

    Labels

    axis:project-cognition-memoryValue axis: project cognition memoryepicMulti-PR umbrella tracking a major theme

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions