generic-chat adapter: strong error signals depend solely on explicit `is_error` flag — document the contract or widen detection

Đang mở Phù hợp với người mới
#626 0 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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
68/100
Loại issue
Tài liệu
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, nodejs
Lĩnh vực
backend, documentation

Hướng nghiên cứu

Bắt đầu trong evolver-runtime-adapters/adapters.js, đặc biệt là chatMessageToTurns và bộ trích xuất STRONG_TEXT, để theo dõi cách các lỗi của tool trở thành các tín hiệu mạnh. Ghi lại contract is_error/isError trong tài liệu về định dạng generic-chat, bao gồm hành vi bắt buộc đối với các kết quả tool thất bại và các lần thoát khác không; fallback tùy chọn dựa trên text-marker là một phần mở rộng riêng biệt.

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

Mô tả

Summary

While wiring a custom runtime (Pi session v3) into evolver via the generic-chat format, auto-distill silently produced zero genes ("not enough to distill — need ≥1 strong signal") even though the session contained real tool failures.

Root cause (source-level, 2.0.30)

In evolver-runtime-adapters/adapters.js (chatMessageToTurns), turn.errorMessage is set for a role=tool message only when is_error/isError === true (or text starts with Exit code: N≠0) — the code comment states: "messages have no universal error flag, so we honor an explicit is_error/isError when the producer sets one". Meanwhile the strong-signal extractor (STRONG_TEXT = /(^|\n)\s*(Error:|Traceback|Exception|FAILED|panic:|\bexit code [1-9])/) only tests the turn's text fields. A toolResult carrying a text-prefixed failure (e.g. ERROR (tool failed): ...) sets neither errorMessage nor matches STRONG_TEXT, so the strong-signal count is always 0 and draftGeneCandidate returns null.

Fix we applied (validated end-to-end)

Our adapter now emits "is_error": true on failed toolResults and on bash executions with non-zero exit codes — after which auto-distill immediately drafts genes (2× strong/error_result + 1× success_prose). Reference implementation:
https://github.com/stwhwing/pi-evox-lab/blob/main/code/pi_session_adapter.js

Suggestion

  • Document the is_error contract explicitly in the generic-chat format docs — it is load-bearing for the entire distill path;
  • Optionally: recognize common failure markers in toolResult text (Traceback / UnicodeDecodeError / JSONDecodeError / non-zero exit codes) as a fallback, since many transcript exporters won't set the flag.

Full report: https://github.com/stwhwing/pi-evox-lab/blob/main/docs/experiment-report.md (§13)

Ngôn ngữ chính
JavaScript
Star
9.1k
Fork
848
Merge trung bình
14 giờ 39 phút
Pull request đã merge (30 ngày)
1

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 EvoMap/evolver

Tất cả issue của EvoMap/evolver

Issue tương tự

Thêm issue về JavaScript

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.