Skip to content

case→skill bridge matches index row ids against md-side source_case_ids #478

Closed

Description

@gloryfromca

memory/search/manager.py (_bridge_skills, around line 749) collects Candidate.id of the matched cases — the index row id, shaped <agent_id>_ac_<date>_<seq> — and passes them to AgentSkillRecaller.fetch_by_case_ids, which filters contains("source_case_ids", …). The source_case_ids written into SKILL.md frontmatter are md-side entry ids, shaped ac_<date>_<seq> (verified on a real root). The two shapes never match, so the bridge may never have returned a skill.

Not verified by a test yet; found while reading the id composition for the primary-key fix. Needs: a failing test that writes a case + a skill referencing it and asserts the bridge returns the skill, then the fix (compare on entry_id, or store row ids in frontmatter).

Activity

  1. chuiwenwei commented on Oct 18, 2026

    @chuiwenwei
    Contributor

    I'd like to take this. I'll add the failing test first: a case with entry_id ac_... and a skill whose source_case_ids contains it, asserting the bridge returns the skill. The fix will carry the md-side entry_id into bridge_cases; SearchAgentCaseItem doesn't expose it today, so I'd either add a private _entry_id or have the internal case search return the raw candidates. Do you have a preference?

  2. added a commit that references this issue on Oct 30, 2026
    962c63e
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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions