Skip to content

fix(conversation): cover validation retries and stale mute state - #8

Open
jakepu wants to merge 1 commit into
liuhao1024:liuhao/cron-bugfix-63860from
jakepu:improve/pr-63888-fallback-state
Open

fix(conversation): cover validation retries and stale mute state#8
jakepu wants to merge 1 commit into
liuhao1024:liuhao/cron-bugfix-63860from
jakepu:improve/pr-63888-fallback-state

Conversation

@jakepu

@jakepu jakepu commented Jul 13, 2026

Copy link
Copy Markdown

Summary

This is a focused follow-up to NousResearch/hermes-agent#63888. It keeps that PR's original fix and regression test, while closing three adjacent state-machine gaps found during review.

Changes

  • Move housekeeping/substantive classification immediately after tool-name repair, before validation branches can retry or continue.
  • Treat unknown and disabled tool names conservatively as substantive.
  • Clear _mute_post_response together with the cached fallback fields when substantive work resumes.
  • Hoist the post-response housekeeping policy to a documented module-level constant.
  • Add parameterized regression coverage for:
    • valid substantive tool-only turns
    • malformed, non-truncated JSON arguments
    • unknown tool calls
    • mixed housekeeping and substantive calls
  • Add positive coverage for legitimate same-turn housekeeping fallback behavior.
  • Add stream-consumer coverage proving substantive work unmutes progress output.

Why

On the current NousResearch#63888 head, the expanded suite produced:

6 focused scenarios: 3 passed, 3 failed

Malformed JSON and unknown-tool retries could bypass classification and still finalize two-turn-old housekeeping narration. A normal substantive turn also left _mute_post_response=True, suppressing progress output.

With this patch, all seven focused tests—including NousResearch#63888's original standalone regression—pass.

Verification

Focused fallback tests:                  7 passed
Full run_agent test file + original test: 423 passed
Related finalizer/state tests:            6 passed
Ruff:                                     passed
Python compilation:                       passed
git diff --check:                         clean

This PR targets the existing contributor branch so the improvements can be incorporated into NousResearch#63888 without opening a competing upstream PR.

liuhao1024 pushed a commit that referenced this pull request Aug 15, 2026
…eview #8)

test_progress_extends_idle_budget_until_success raced wall-clock: the
0.1s-idle/0.04s-tick shape left ~60ms of slack per tick, so one slow
scheduler pass on a loaded CI box lapsed the idle budget mid-loop.
Widened to 0.5s idle / 0.1s ticks (5x per-tick margin, total runtime
still <1s) per the FLAKY policy's minimum-margin guidance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant