v1 slice 6: search_lessons, ranked by similarity and recency, with every result logged #9

Open
opened 2026-11-25 18:00:21 +00:00 by uranus · 0 comments
Member

Purpose (feature): a member searches what the team knows across mcl-rag and mcl-graph in one call, and every search is logged for the version 2 ranker.

After slices 1 and 4.

  • Query mcl-rag (answer_query) and mcl-graph (resolve_link), and take the union, keyed by lesson id.
  • v1 ranker: similarity and recency, with fixed weights (settings).
  • Each result carries its source (mcl-rag document id, and the graph links that matched).
  • A search_run event logs the query, the caller's role and the ids shown, in order.

Done when:

  • A lesson found only through a graph link is in the result, with its source.
  • The same lesson found by both is returned once.
  • The logged event holds exactly the ids returned, in order.
  • Tests use stand-ins for mcl-rag and mcl-graph.
  • search_lessons is granted to the realm's identified callers ({callers, members}, confidential required, no open), and a caller from another realm is refused (test with a second realm key).

Grant line added (2026-11-25), moved from #12. Mars ruling 2026-11-25: "(a). Do #12 now for record_lesson and lesson_status: the cross-realm refusal test with a second realm key on both, plus the startup grant log line, threat model first." Mars, same ruling: "add search_lessons' grant and refusal test to #9's Done-when."

Refs #1

Purpose (feature): a member searches what the team knows across mcl-rag and mcl-graph in one call, and every search is logged for the version 2 ranker. After slices 1 and 4. - Query mcl-rag (`answer_query`) and mcl-graph (`resolve_link`), and take the union, keyed by lesson id. - v1 ranker: similarity and recency, with fixed weights (settings). - Each result carries its source (mcl-rag document id, and the graph links that matched). - A `search_run` event logs the query, the caller's role and the ids shown, in order. Done when: - [ ] A lesson found only through a graph link is in the result, with its source. - [ ] The same lesson found by both is returned once. - [ ] The logged event holds exactly the ids returned, in order. - [ ] Tests use stand-ins for mcl-rag and mcl-graph. - [ ] `search_lessons` is granted to the realm's identified callers (`{callers, members}`, confidential required, no `open`), and a caller from another realm is refused (test with a second realm key). **Grant line added (2026-11-25), moved from #12.** Mars ruling 2026-11-25: "(a). Do #12 now for record_lesson and lesson_status: the cross-realm refusal test with a second realm key on both, plus the startup grant log line, threat model first." Mars, same ruling: "add search_lessons' grant and refusal test to #9's Done-when." Refs #1
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
macula-services/mcl-scribe#9
No description provided.