Skip to content

chore: EXTRACTED_DIR marker cleanup + log rotation + dead code removal #321

@buildingjoshbetter

Description

@buildingjoshbetter

Cleanup items from PR #315 review

1. EXTRACTED_DIR unbounded growth

~/.truememory/extracted/ accumulates one marker file per session_id forever. No TTL, no pruning.

  • Add cleanup: delete markers >30 days old (checked on write or session_start)

2. Log file accumulation

~/.truememory/logs/ accumulates per-session log files from backlog drains. No rotation.

  • Add cleanup: delete logs >7 days old

3. Dead code in _shared.py

should_extract() and mark_extracted() are no longer called after PR #315 removed incremental extraction from UserPromptSubmit.

  • Remove both functions

4. TRUEMEMORY_INCREMENTAL_INTERVAL env var deprecated

This env var no longer does anything. Should be documented or logged as deprecated.

Found by: Rustle the Feathers adversarial review + codebase explorer

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions