Skip to content

fix(recall): preserve collapsed-hit detail marker in #318-lite packed entries #326

Closed

Description

@hurttlocker

Summary

Integrated recall-lane dogfood on current main found a bounded #318-lite quality defect:
when packed same-source hits are collapsed and the primary snippet is long, the secondary-detail tail can be truncated away in packed content.

Result: recall line still says packed N hits, but the collapsed detail preview may disappear, making it harder to judge what was hidden.

Evidence

Dogfood prompt (operator-style):

  • Q merged 323 then 324 then 325 next 318 lite

Observed on current main (57ea3c3):

  • packed_hits = 2
  • packed_memory_ids = [19687, 19688]
  • packed content output did not include the [collapsed ...] detail tail

Why this happens:

  • collapseSameSourceHits builds combined = primary + " [collapsed ...: tail]"
  • then truncates combined to maxPackedContentChars (520)
  • long primary content consumes the full budget, cutting off the collapsed tail

Why this matters

This weakens same-source collapse safety and provenance transparency in tight prompt budgets:

  • operator can’t see a useful hint of secondary same-source details
  • hidden-detail risk is harder to assess before expanding back to raw hits

Bounded fix scope

Acceptance

  • For grouped entries with packed_hits > 1 and >=2 unique previews, packed content always includes collapse marker + at least one secondary preview token
  • Existing prompt budget caps remain enforced
  • Test covers long-primary-snippet truncation edge case

Out of scope

Activity

  1. hurttlocker commented on Mar 11, 2026

    @hurttlocker
    OwnerAuthor

    Dogfood result is in: this is the active next bounded take after the integrated recall-lane pass on main.

    Keep scope tight:

    • preserve the collapse marker + minimal secondary-detail tail when packed_hits > 1 and the primary snippet is long
    • keep existing prompt-budget caps enforced
    • add deterministic test coverage for the long-primary truncation edge case

    Do not widen into #320, summary storage, or broader recall architecture in this fix.

    After this fix, rerun the same integrated recall-lane dogfood/operator pass and reassess from evidence.

  2. hurttlocker commented on Mar 11, 2026

    @hurttlocker
    OwnerAuthor
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