Skip to content

fix(search): bridge agent skills on md entry ids - #513

Open
chuiwenwei wants to merge 1 commit into
EverMind-AI:mainfrom
chuiwenwei:fix/skill-bridge-entry-id
Open

chuiwenwei wants to merge 1 commit into
EverMind-AI:mainfrom
chuiwenwei:fix/skill-bridge-entry-id

Conversation

@chuiwenwei

Copy link
Copy Markdown

Summary

The reverse case→skill bridge keyed on Candidate.id, the index row id
(<owner>_ac_<date>_<seq>). SKILL.md's source_case_ids stores the
md-side entry id (ac_<date>_<seq>), so the two never matched and the
bridge could not return a skill.

Carry the entry id from the case shaper in a private DTO attribute and
build the internal bridge candidates on it. The public response keeps
the index row id; only the internal bridge key changes.

Closes #478.

Area

  • Architecture method
  • Benchmark
  • Use case
  • Documentation
  • Developer experience
  • CI, build, or release

Verification

make lint        passed
make test        2702 passed, 4 skipped
make integration 186 passed, 7 skipped, 7 deselected

Additional tests:

  • tests/unit/test_memory/test_search/test_shaper.py — the shaper carries
    the md-side entry_id into the private DTO attribute; the public id
    remains the index row id.
  • tests/unit/test_memory/test_search/test_manager.py — the bridge
    receives ac_... (not <owner>_ac_...) and max-pools the matched case
    score; the existing end-to-end bridge test now uses the real ID shape.

Checklist

  • I kept the change scoped to the relevant area.
  • I am opening this from a separate branch, not pushing directly to main.
  • I updated docs, examples, or setup notes when behavior changed.
  • I added or updated tests when the change affects behavior.
  • I did not commit secrets, .env files, dependency folders, or generated output.
  • Active relative links in Markdown files resolve.

Notes for Reviewers

  • No docs change: the reverse bridge is internal, and the public response
    schema is unchanged.
  • SearchAgentCaseItem._entry_id is a Pydantic PrivateAttr: it is never
    serialized, so the public schema and response are unchanged.
  • Cases without an entry id are skipped from the bridge rather than
    falling back to the row id (which can never match source_case_ids).
  • The alternative is to store index row ids in source_case_ids; I chose
    the internal entry-id path because it does not rewrite existing skills.

By submitting this pull request, I agree that my contribution is licensed under
the Apache License 2.0.

The reverse case→skill bridge keyed on Candidate.id, the index row id
(<owner>_ac_<date>_<seq>). SKILL.md's source_case_ids stores the
md-side entry id (ac_<date>_<seq>), so the two never matched and the
bridge could not return a skill.

Carry the entry id from the case shaper in a private DTO attribute and
build the internal bridge candidates on it. The public response keeps
the index row id; only the internal key changes. Regression tests pin
both the shaper hand-off and the bridge construction.

Refs EverMind-AI#478.
@chuiwenwei
chuiwenwei force-pushed the fix/skill-bridge-entry-id branch from b786709 to d81c112 Compare October 20, 2026 13:00

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant