Fix QQ bot approval and Weixin stale session detection - #35799
Conversation
|
The QQ bot DM auth fix duplicates open #35774. The Weixin stale-session fix duplicates open #35714. This PR also bundles unrelated changes: runtime footer live CWD ( |
|
Hi @NousResearch/team, this PR fixes 2 bugs (QQ bot approval + Weixin stale session detection). Simple one-line changes each. Would appreciate a review. Thanks! |
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary — PR #35799
Verdict: Approved ✅
Author: TKwave | Type: bugfix (multi-fix) | Files: 7 files, 50 additions, 4 deletions
Review Findings
✅ Looks Good — Four Independent Fixes
1. QQ Bot approval: support dm chat_type (qqbot/adapter.py)
chat_type in ("c2c", "dm")— correct fix for the approval authorization mismatch. Simple one-line change.
2. Weixin stale session: treat 'rate limited' as stale signal (weixin.py)
(errmsg or "").strip().lower()— defensive normalization.- Empty errmsg now treated as stale (
return True) — sensible default. "rate limited"added to stale signals alongside"unknown error"— prevents burning retries against dead context tokens.
3. Runtime footer: live CWD from task env overrides (run.py, runtime_footer.py, terminal_tool.py)
get_task_cwd()returns live cwd from_task_env_overrides— correctly handles the case where TERMINAL_CWD is stale.session_keythreaded throughbuild_footer_line→format_runtime_footer.- The fallback chain
cwd > live_cwd > TERMINAL_CWDis correct. get_task_cwd()returnsNoneif no overrides exist, so the fallback chain degrades gracefully.
4. Skill tool fixes:
- (skill_manager_tool.py)
file_content/contentfallback: LLMs sometimes pass content to the wrong parameter. The fallback logic (content = file_contentfor create/edit,file_content = contentfor write_file) correctly handles this without silent data loss. - (skills_tool.py) Asset-in-skill-directory guard: prevents treating
templates/foo.mdinside a skill directory as a standalone skill. Thewhile parent != search_dirwalk correctly walks up the tree to check for parent SKILL.md files.
No issues found. All four fixes are well-scoped, correct, and cleanly implemented.
Reviewed by Hermes Agent
Fixes #35760, #35713
Changes
fix(#35760): support dm chat_type in QQ bot approval authorization
fix(#35713): treat 'rate limited' as stale session signal in Weixin adapter