always-on mark_todos_done: no ToolGroup ever exposed it, blocking every agent

This commit is contained in:
damocles 2026-08-03 19:08:52 +02:00
commit 8a16d4ca7e
3 changed files with 39 additions and 8 deletions

View file

@ -423,6 +423,22 @@ mod tests {
);
}
#[test]
fn mark_todos_done_present_with_no_groups() {
// Regression: mark_todos_done was declared as a
// tool but never added to any ToolGroup, so no agent could ever
// get it into --allowedTools regardless of which groups it held —
// including `inbox`, which only gates get_loose_ends/
// cancel_loose_end/remind.
let tools = allowed_mcp_tools(&[]);
assert!(
tools.contains(&qualified("mark_todos_done")),
"mark_todos_done missing from empty-group allow-list: {tools:?}"
);
let tools = allowed_mcp_tools(&[ToolGroup::Inbox]);
assert!(tools.contains(&qualified("mark_todos_done")));
}
#[test]
fn set_status_present_without_meta_group() {
let tools = allowed_mcp_tools(&[ToolGroup::Messaging, ToolGroup::Inbox]);