feat(observability): structured termination reason for every run

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

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python
Lĩnh vực
observability

Hướng nghiên cứu

The issue names no files, tests, or entry points. Start by locating the trajectory/result payload and the termination paths that produce it, then define how each proposed reason maps to a terminated run. Done means every terminated run carries a machine-readable termination record in the result artifact, with timeout and backend errors distinguishable.

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

Mô tả

Problem

When a run ends abnormally, the result payload carries no machine-readable cause. Operators are left doing forensic fingerprinting — e.g. inferring "launch stall" from n_messages == 0 && elapsed ≈ watchdog timeout, or diffing timestamps to separate "gateway rejected the request" from "agent deadlocked internally" from "model stopped making progress".

In batch usage this is the single largest operational cost: for one incident class, roughly half of the debugging time went into merely classifying failures before any actual fixing could start.

Proposal

Every terminated run should emit a structured termination record in the result artifact itself (not only in logs), e.g.:

{
  "finish_reason": "llm_call_timeout",
  "detail": { "last_error": "...", "http_status": 429, "turn": 17 }
}

Suggested enum, minimally:

  • completed — normal finish
  • max_turns / budget_exhausted
  • context_limit_salvaged — see #152
  • llm_call_timeout vs backend_error(code) — these two being distinguishable is the core ask
  • no_progress — loop-break / degeneration interventions
  • aborted — external kill

Design notes:

  • The record belongs on the trajectory/result payload so downstream consumers can filter programmatically.
  • Pairs naturally with a heartbeat/progress event stream (#153): heartbeat covers the run's lifetime, termination reason covers its end.
Ngôn ngữ chính
Python
Star
4.1k
Fork
94
Merge trung bình
2 ngày 7 giờ
Pull request đã merge (30 ngày)
216

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 EverMind-AI/Raven

Tất cả issue của EverMind-AI/Raven

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.