fix(screener): 拦截「三态混同」+ flow 的置信度闸被 passthrough 关掉——低置信猜测与基础设施故障都以「判定为注入风险」永久 blocked

Đang mở
#5 18 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
24/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
backend

Hướng nghiên cứu

Start in issue_keeper/screener.py: the Verdict is assembled where the flow result is read (~lines 485-491, where out["low_confidence"] is dropped) and where exceptions fall through (~328-330, 538-541). Then read how keeper.py:466-473 turns any unsafe verdict into a permanent blocked plus a public comment, and compare the flow cache ~/.issue-keeper/screener-flow.json against the validation proposed in point ⑤. Done means low-confidence verdicts and backend errors no longer yield blocked or accusatory comments, with tests covering both paths.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

场景 gap 单(okguitar 提报)· 优先级 P0 · 依赖:无

基线 HEAD = c08c667。(与 OPEN #3 同族:#3 记录现象层,本单给出机制层根因与修复面。)

Summary(三方佐证:代码 + 运行缓存 + 已发出评论)

  1. 置信度闸被关:生产判定配置来自 console flow 且原样透传(issue_keeper/screener.py:416-441 取 min_confidence 与 on_low_confidence);运行缓存 ~/.issue-keeper/screener-flow.json(v1.0.4)实测 min_confidence=0.8 但 on_low_confidence="passthrough"(plaita-nodes decision.py:388:passthrough = 低置信选择原样返回);而 screener.py:485-491 只取 out["choice"]/["confidence"],丢弃 out["low_confidence"]——阈值形同虚设,0.6-0.78 的猜测与 0.93 的判定同一文案输出。
  2. 基础设施失败 = 真判定:decision 异常/非 JSON/flow 异常统一走 Verdict(safe=False, reason=f"flow 后端: {exc}")(screener.py:328-330,484,538-541)→ keeper 统一 blocked + 公开评论(keeper.py:466-473 + _public_reason 空原因兜底文案「疑似指令注入或越权诱导」)。
  3. 实盘:10-03/04 keeper.log 共 23 条拦截评论——10 条 reason 是 screener 自身故障(choice '' 不在决策空间 ×6、LLM 端点不完整 ×2、未返回 JSON ×2,含模板占位 $your_answer 被回显);13 条「判定为注入风险」中 9 条置信度 <0.8(0.60-0.78)。这些评论已公开贴在 recursive#97/100/102/107、plaita#30/37、agentproc#9/19 上;state.json 现存 10 条 blocked,唯一出口是人工 reopen。

影响

安全加固类技术 issue 被批量永久拦下;对公众输出「你在注入」的不实指控;运维无法区分「模型说 unsafe」与「screener 自己坏了」;每次 reopen 都是重新掷骰子(#97/#100/#107 各被拦 2 次)。

建议

① Verdict 增 error: bool / low_confidence: float|None;② low_confidence=True 一律按「不确定」处理(禁止进 blocked,转人工/自动重试),不受 flow 配置影响;③ 基础设施失败 = 自动重试 N 次 + 计数升级,不设 blocked;④ 公开文案区分「判定为注入(置信度 X)」与「安全过滤服务故障,待重试」;⑤ flow 定义校验(choices 非空、占位符残留、on_low_confidence 白名单)。

Ngôn ngữ chính
Python
Star
0
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của jeffkit/issue-keeper

Tất cả issue của jeffkit/issue-keeper

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.