status: a truncated ACTIVE_GOAL_STATE.md reports healthy with zero Todos
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 55/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- python
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Python
- 星标
- 6.2k
- 派生
- 596
- 平均合并
- 7 小时 35 分钟
- 30 天内合并 PR
- 928
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
loopx-project/loopx 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
loopx-project/loopx#6842 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
loopx-project/loopx#6108 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
loopx-project/loopx#5688 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 60/100
loopx-project/loopx#5632 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
loopx-project/loopx#5443 · 1 条评论 ·
维护者通常 1 天内回复
查看 loopx-project/loopx 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
CLIMADA-project/climada_python#1337 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
8go/matrix-commander#233 ·
-
documentation
难度 2/5 1-3 小时 新手友好度 66/100
-
documentation enhancement priority:high size:M
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
Validate non-divisible effective batch sizes in the Unsloth LoRA backend可能已有人在做 @debesh-biswas 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 70/100