check actionability at the top of navigation

Move the actionability guard (confirm_non_action) to the top of navigate,
before category selection, instead of only firing when the category softmax
proposed response/create_category. A non-request now goes straight to the
closed response tree and never reaches the category softmax, and the category
softmax offers only real categories (the canned response tree is excluded), so
a request can never be canned and a non-request can never be routed into a
real category.

Reword the guard so vague/incomplete fragments ("what") count as non-action:
they previously matched none of the non_action cases and split the decision
(action 0.513 / non_action 0.487), so "what" authored a redundant
"unclear"/"clarify_intent" category. It now lands on the catchall
response.clarify.

Remove the now-dead CreateSkill-for-canned fallback and _canned_fallback.

Update AGENTS.md, the navigation unit tests, the tune_navigation eval set, and
add an integration test for the vague-fragment route.
This commit is contained in:
gabby committed 2026-10-05 21:44:18 +00:00
1 parent 80518dcdda
commit 1d9730bfcb
6 files changed
+220 -98

No files matched your search

+22
View File
@@ -172,6 +172,28 @@ def test_navigation_routes_noise_into_the_response_tree(tmp_path):
assert getattr(result, "category", None) == "response", f"noise left the response tree: {text!r}"
def test_navigation_routes_vague_fragment_to_clarify(tmp_path):
"""A fragment too vague to act on ("what") is non-action: it lands on the
catchall `response.clarify` rather than authoring a redundant clarify skill.
Regression: "what" scored action 0.513 / non_action 0.487 and authored an
"unclear"/"clarify_intent" category."""
config = load_config()
require_real(config)
_isolate_runtime(config, tmp_path)
scheduler, config = build_scheduler(config)
result = navigate(
scheduler.engine,
scheduler.log,
scheduler.trace,
Request("what"),
scheduler.tree,
)
print(f"[vague] 'what' -> {result!r}")
assert getattr(result, "category", None) == "response", result
assert getattr(result, "name", None) == "response.clarify", result
def test_navigation_routes_uncovered_requests_to_create(tmp_path):
"""A request no skill covers must author a skill, not get a canned reply: the
actionability guard keeps the closed `response` tree for non-request input