Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

status: a truncated ACTIVE_GOAL_STATE.md reports healthy with zero Todos

Đang mở
#6,870 2 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

@JasonBuildAI đang làm issue này rồi.

Từ ngày 19/10/2026.

  • #6921 của @JasonBuildAI — đang mở

Đá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
55/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python

Hướng nghiên cứu

Start with loopx/control_plane/todos/active_state_todos_parser.py:36 and the state parsing rules in machine_region.py:53-58,86,103, then exercise loopx status --format json and loopx todo list --format json with the provided healthy and truncated fixtures. Done means truncated state no longer reports healthy with zero Todos, and the warning or validation behavior is covered by tests.

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

Mô tả

What happens

ACTIVE_GOAL_STATE.md truncated at a section boundary (e.g. everything from
## Agent Todo onward removed) is read as a goal with no Todos:

healthy: {"status_exit":0,"status_ok":true,"todo_index_total":2,"attention":"[P1] implement the thing","todo_total":2}
wounded: {"status_exit":0,"status_ok":true,"todo_index_total":0,"attention":"run the first read-only adapter tick and save a compact run record","todo_total":0}

Both loopx status --format json and loopx todo list --format json exit 0
with ok:true, and the attention line silently degrades from the real P1 item
to the generic first-tick advice. 5/5 runs.

Why this path is taken

parse_active_state_todos iterates only the regions it finds
(loopx/control_plane/todos/active_state_todo_parser.py:36), and a missing
section is legal — only unterminated frontmatter or malformed/orphan markers
raise (machine_region.py:53-58,86,103). A present-but-truncated file is
therefore indistinguishable from a goal that genuinely has no Todos.

Trigger honesty

The state writer is atomic (runtime/document_io.py, temp + fsync + replace),
so this is not a same-version torn write. It models disk corruption after a
crash, a partial backup/restore, or a bad manual/merge edit of a file that is
present.

Relationship to #6799

#6799 is about a missing state file letting the quota gate authorize turns.
This is the sibling case: the file exists, its earlier sections parse, and the
Todo section is simply gone — so a missing-file guard would not fire, and the
quota gate sees a goal with no open work.

Expected

A state file that parses but lost a section it used to have should not read as
"no open work". Options: require the ## Agent Todo region; compare a revision
or section inventory against the last known good state; or surface a
state_incomplete warning on status/todo list.

Reproduced

Snapshot 105c4bc1; unchanged on main at 1c7b258cb. Fixture: one goal with
exactly two Agent Todos; the wounded copy is the same fixture with the state
file cut at 377 → 235 bytes (before ## Agent Todo). The script asserts the
healthy control first (2 Todos, P1 attention) and fails if the wounded side does
not match.

Ngôn ngữ chính
Python
Star
6.2k
Fork
596
Merge trung bình
7 giờ 47 phút
Pull request đã merge (30 ngày)
904

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

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 loopx-project/loopx

Tất cả issue của loopx-project/loopx

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.