Skip to content

feat(memory): injection hygiene for the uteke integration — bounded, deduped, no silent fallback #384

Closed

Description

@ajianaz

Goal

Adopt jcode's memory injection hygiene (tier C — design adopted into our uteke integration): bounded batches, dedup of pending injections, and NO silent fallback when the memory backend degrades.

Acceptance criteria

  • Bounded batch: max 24 items / 64 KiB per injection batch (hard cap).
  • Hard threshold enforcement — the batch is capped, no soft-truncation with a warning only.
  • NO silent fallback: a failed batch invalidates the whole batch with a visible error — never degrades silently to fewer/empty injections.
  • Pending-injection dedup per session; expiry after 2 minutes; re-check that the memory still exists and its content is unchanged before injecting.
  • Docs (uteke integration docs) + CHANGELOG entry.

Testing

  • Unit: batch bounding; dedup; expiry; content-unchanged check.
  • Integration: simulate a failing memory backend → assert the batch is invalidated visibly (no silent degrade to empty context).
  • Live E2E: real uteke backend, restart mid-session, verify injection batch bounds and dedup hold.

Reference

jcode MEMORY_ARCHITECTURE (MIT, https://github.com/1jehuang/jcode) — bounded remote typed-relevance injection. Design adopted; implementation is our own against uteke.

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

    enhancementreliability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions