Commit f2891e0
committed
fix(todos): teach the priority marker in the machine's own authoring hint
The planner offers the current priority band, so an Agent Todo whose text has no
`[P0]/[P1]/[P2]` marker is written to the active state and then cannot be bound
with `quota should-run --todo-id` in the same Turn. Reproduced on the
2026-09-17 and 2026-09-20 wakes of goal `loopx-meta`: the rows authored from the
hint's own `agent_todo_command_template` answered
`state=quota_action_selection_rejected reason=candidate_not_currently_eligible`,
and seven already-open rows in that lane had to be repaired by hand before the
planner could offer them.
The hint is the machine-readable guidance every heartbeat reads, so its agent
template now prints the marker: `--text '[P1] <agent action>'`. The rule sentence
is deliberately unchanged — agent-facing CLI output has a measured per-row
budget (the first draft added a second field and failed
`cli-output-budget-regression-smoke` with +271 chars against a 128-char
allowance), and a template the agent copies teaches the marker without growing
every quota should-run row.
Validation: new tests/control_plane/test_todo_write_hint_contract.py (template
carries the marker; rule and user templates unchanged),
`project-agent-adoption-smoke` ok with the added assertion,
`cli-output-budget-regression-smoke` ok, 65 quota settlement CLI tests passed,
ruff and mypy clean, and `loopx canary premerge --from-git-diff` passed with 0
failures and 0 manual holds.
Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>1 parent bfbb5ac commit f2891e0
3 files changed
Lines changed: 64 additions & 1 deletion
File tree
- examples/project
- loopx/control_plane/todos
- tests/control_plane
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
259 | 263 | | |
260 | 264 | | |
261 | 265 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
8 | 15 | | |
9 | 16 | | |
10 | 17 | | |
| |||
16 | 23 | | |
17 | 24 | | |
18 | 25 | | |
19 | | - | |
| 26 | + | |
20 | 27 | | |
21 | 28 | | |
22 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
0 commit comments