Title: status: a truncated ACTIVE_GOAL_STATE.md reports healthy with zero Todos · Issue #6870 · loopx-project/loopx · GitHub
Open Graph Title: status: a truncated ACTIVE_GOAL_STATE.md reports healthy with zero Todos · Issue #6870 · loopx-project/loopx
X Title: status: a truncated ACTIVE_GOAL_STATE.md reports healthy with zero Todos · Issue #6870 · loopx-project/loopx
Description: 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] impl...
Open Graph Description: 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,"to...
X Description: 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,"stat...
Opengraph URL: https://github.com/loopx-project/loopx/issues/6870
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"status: a truncated ACTIVE_GOAL_STATE.md reports healthy with zero Todos","articleBody":"**What happens**\n\n`ACTIVE_GOAL_STATE.md` truncated at a section boundary (e.g. everything from\n`## Agent Todo` onward removed) is read as a goal with no Todos:\n\n```\nhealthy: {\"status_exit\":0,\"status_ok\":true,\"todo_index_total\":2,\"attention\":\"[P1] implement the thing\",\"todo_total\":2}\nwounded: {\"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}\n```\n\nBoth `loopx status --format json` and `loopx todo list --format json` exit 0\nwith `ok:true`, and the attention line silently degrades from the real P1 item\nto the generic first-tick advice. 5/5 runs.\n\n**Why this path is taken**\n\n`parse_active_state_todos` iterates only the regions it finds\n(`loopx/control_plane/todos/active_state_todo_parser.py:36`), and a missing\nsection is legal — only unterminated frontmatter or malformed/orphan markers\nraise (`machine_region.py:53-58,86,103`). A present-but-truncated file is\ntherefore indistinguishable from a goal that genuinely has no Todos.\n\n**Trigger honesty**\n\nThe state writer is atomic (`runtime/document_io.py`, temp + fsync + replace),\nso this is not a same-version torn write. It models disk corruption after a\ncrash, a partial backup/restore, or a bad manual/merge edit of a file that is\npresent.\n\n**Relationship to #6799**\n\n#6799 is about a *missing* state file letting the quota gate authorize turns.\nThis is the sibling case: the file exists, its earlier sections parse, and the\nTodo section is simply gone — so a missing-file guard would not fire, and the\nquota gate sees a goal with no open work.\n\n**Expected**\n\nA state file that parses but lost a section it used to have should not read as\n\"no open work\". Options: require the `## Agent Todo` region; compare a revision\nor section inventory against the last known good state; or surface a\n`state_incomplete` warning on `status`/`todo list`.\n\n**Reproduced**\n\nSnapshot `105c4bc1`; unchanged on `main` at `1c7b258cb`. Fixture: one goal with\nexactly two Agent Todos; the wounded copy is the same fixture with the state\nfile cut at 377 → 235 bytes (before `## Agent Todo`). The script asserts the\nhealthy control first (2 Todos, P1 attention) and fails if the wounded side does\nnot match.\n","author":{"url":"https://github.com/BiBoyang","@type":"Person","name":"BiBoyang"},"datePublished":"2026-10-19T08:41:53Z","url":"https://github.com/loopx-project/loopx/issues/6870"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:eff0ea8f-cd16-3b0c-84eb-39d026ba7ebb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E0DC:2AB5E3:12A2795:186729C:6AED6C25 |
| html-safe-nonce | 11a7bfc40a442f0db9ec26e7a474f39b95ebdacdb65f35b7a14846f963c03a42 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMERDOjJBQjVFMzoxMkEyNzk1OjE4NjcyOUM6NkFFRDZDMjUiLCJ2aXNpdG9yX2lkIjoiMTg4ODE1MjM0NzY0MDQyNTUwOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5265f3388f89dbb318dcefe7537b52c96fd4c4041513430f218a7c98e27cfe1f |
| hovercard-subject-tag | issue:5920653322 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/loopx-project/loopx/6870/issue_layout |
| twitter:image | https://opengraph.githubassets.com/181fa2f7348a315b783fd332d2e88d5cd118ffe09f2ce5a912734af6bbba1888/loopx-project/loopx/issues/6870 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/181fa2f7348a315b783fd332d2e88d5cd118ffe09f2ce5a912734af6bbba1888/loopx-project/loopx/issues/6870 |
| og:image:alt | 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,"to... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | BiBoyang |
| hostname | github.com |
| expected-hostname | github.com |
| None | 56fb42677ae87ed3e64410323d67980aa65d0485568a7858f874e7edfc6d1c11 |
| turbo-cache-control | no-preview |
| go-import | github.com/loopx-project/loopx git https://github.com/loopx-project/loopx.git |
| octolytics-dimension-user_id | 331332701 |
| octolytics-dimension-user_login | loopx-project |
| octolytics-dimension-repository_id | 1255217938 |
| octolytics-dimension-repository_nwo | loopx-project/loopx |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1255217938 |
| octolytics-dimension-repository_network_root_nwo | loopx-project/loopx |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c9a37e2423ed382cf39f70b5aa4b4858b40a3b0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width