Skip to content

fix: harden retrieval routing and runtime hints - #29141

Closed
acidember wants to merge 2 commits into
NousResearch:mainfrom
acidember:kai-retrieval-route-hints-20260519
Closed

fix: harden retrieval routing and runtime hints#29141
acidember wants to merge 2 commits into
NousResearch:mainfrom
acidember:kai-retrieval-route-hints-20260519

Conversation

@acidember

Copy link
Copy Markdown

Summary

This PR preserves two local Hermes fixes after rebasing them onto current origin/main:

  • Hardens retrieval/source-of-truth routing guidance so current/system/file/git/math facts are grounded through tools instead of memory.
  • Wires retrieval route hints into the run-agent API payload only, avoiding persistence into session history.
  • Stabilizes adjacent Kanban regression tests after upstream drift.

Verification

Targeted verification performed locally after rebase:

python -m py_compile agent/conversation_loop.py hermes_cli/kanban_db.py run_agent.py tests/run_agent/test_run_agent.py tests/hermes_cli/test_kanban_core_functionality.py
PASS
python -m pytest tests/hermes_cli/test_kanban_core_functionality.py::test_default_spawn_auto_loads_kanban_worker_skill tests/hermes_cli/test_kanban_core_functionality.py::test_default_spawn_appends_per_task_skills tests/hermes_cli/test_kanban_core_functionality.py::test_default_spawn_dedupes_kanban_worker_from_task_skills tests/hermes_cli/test_kanban_core_functionality.py::test_gateway_dispatcher_disables_corrupt_board_without_traceback -q -o addopts= --tb=short
4 passed
python -m pytest tests/run_agent/test_run_agent.py -q -o addopts= --tb=short
345 passed

Notes

The stack was preserved before rebase via a local preservation branch and bundle. It rebased cleanly onto origin/main; one exact Kanban test expectation was corrected for the runner's auto-decompose-disabled setup and amended into the top commit.

Kai and others added 2 commits May 19, 2026 05:55
Add source-of-truth routing helpers and tests, then adopt builder retrieval-manners guidance to avoid raw retrieval block leakage, irrelevant context bleed, and unverified snippet claims.\n\nVerification:\n- python -m py_compile agent/prompt_builder.py tests/agent/test_prompt_builder.py\n- python -m pytest -o addopts= tests/agent/test_prompt_builder.py::TestGuidanceConstants::test_session_search_guidance_routes_between_memory_surfaces tests/agent/test_prompt_builder.py::TestRetrievalRouteHelper -q
@alt-glitch alt-glitch added type/refactor Code restructuring, no behavior change P3 Low — cosmetic, nice to have comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint duplicate This issue or pull request already exists labels May 20, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #29143 (same author, same fix, fresher rebase on newer main at 6a6766f).

@acidember

Copy link
Copy Markdown
Author

Closing as duplicate of #29143 (same fix on fresher rebase).

@acidember acidember closed this May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have type/refactor Code restructuring, no behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants