CI: wire the Librarian eval harness in as a merge gate (explicit 100% + optional recall@k)

未关闭
#956 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@tanishbhandari11t 已经在做这个了。

开始于 2026年8月30日。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
72/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
python
领域
ci-cd

调研方向

从 scripts/evaluate_librarian.py 和 application/tests/librarian/fixtures/golden_dataset.json 开始,然后检查 make test 和仓库的 CI 当前如何运行检查。添加一个离线 CI 检查,使其针对已提交的 golden dataset 运行 harness,并在明确切片低于 100% 时失败。可选的 recall@k 检查留待后续工作,需要实时 embeddings、已填充的缓存数据库和 API 密钥。

由索引模型根据 Issue 内容生成。

描述

Follow-up from @northdpole's reviews on #925 and #937 (Module C - The Librarian).

The gap: the eval harness (scripts/evaluate_librarian.py) already fails loudly on an explicit-slice regression - it exits non-zero if the "explicit" slice drops below 100% on the golden dataset. The problem is nothing in CI actually runs it. make test only runs the unit tests, so today that 100% gate exists on paper but isn't enforced. A change could quietly break the explicit slice and still merge green.

What we'd like to do: wire the harness into CI so it guards merges automatically.

  • Add a small subprocess test (or a Makefile target) that runs evaluate_librarian.py against the committed golden dataset (application/tests/librarian/fixtures/golden_dataset.json). If the explicit slice isn't at 100%, the check fails and blocks the merge. This runs fully offline - no API key needed.
  • Later, extend the same setup to cover the C.1 retriever's recall@k. That part needs live embeddings (a populated cache DB + an embedding API key), so it can either be an optional CI job or a documented manual pre-merge check.

The offline explicit gate is the priority since it's deterministic and needs no credentials.

Scope: Module C. Not blocking W1–W3 - this just makes sure the harness is doing its job before the heavier ML slices (W4+) land.

主要语言
Python
星标
210
派生
167
平均合并
4 天 12 小时
30 天内合并 PR
28

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

OWASP/OpenCRE 的其他 Issue

查看 OWASP/OpenCRE 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。