Skip to content

fix(compression): mark pruned skill_view summaries (#32106) - #32375

Open
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/32106-skill-pruned-marker
Open

fix(compression): mark pruned skill_view summaries (#32106)#32375
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/32106-skill-pruned-marker

Conversation

@LeonSGP43

Copy link
Copy Markdown
Contributor

Summary

  • mark compressed skill_view tool results with an explicit [SKILL_PRUNED] reload marker
  • keep skills_list and skill_manage summaries metadata-only
  • add targeted compressor tests for the new skill_view marker behavior

Testing

  • uv run --frozen pytest -q -o addopts= tests/agent/test_context_compressor.py -k 'skill_view_summary_marks_pruned_content or other_skill_tool_summaries_remain_metadata_only'\n- uv run --frozen ruff check agent/context_compressor.py tests/agent/test_context_compressor.py\n- git diff --check

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint tool/skills Skills system (list, view, manage) labels May 26, 2026
@dolphin-creator

Copy link
Copy Markdown
Contributor

Hi @LeonSGP43, great work on this. I just left a note on #32562 proposing we merge our approaches: your tests + my prompt_builder P1 rule = a complete P0+P1 fix for #32106.>
If you're cool with it, I'll pull your tests into #32562 and we can close this one as superseded. Let me know!

dolphin-creator added a commit to dolphin-creator/JBO-Agent that referenced this pull request May 29, 2026
…coverage (NousResearch#32106)

- TestToolResultSummaries: skill_view emits [SKILL_PRUNED], skills_list/skill_manage remain metadata-only
- TestGuidanceConstants: SKILLS_GUIDANCE includes ## Skill Safety Rule with reload instruction
- Credits: test patterns from LeonSGP43 (PR NousResearch#32375), adapted for merged PR
@dolphin-creator

Copy link
Copy Markdown
Contributor

Hey @LeonSGP43 — I've incorporated your test patterns from #32375 into my PR #32562 (commit b7aaf2a), with full credit in the commit message.

The combined PR now covers both:

Since #32562 now supersedes the test coverage from #32375, would you be comfortable with closing #32375? Your contribution is credited in the merged commit.

If you have any concerns, happy to adjust!

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused P0 fix. Current main still emits metadata-only summaries for skill_view in agent/context_compressor.py:672-674; both the pre-pruning path (agent/context_compressor.py:1451) and deterministic fallback path (agent/context_compressor.py:1680) route through this helper. The proposed marker addresses that ambiguity while retaining the existing metadata-only handling for skills_list and skill_manage.

The added helper-level tests directly cover the changed summary contract. The helper and test module have moved since the PR branch, but the current implementation retains the same focused integration point, so salvage should be localized.

Automated hermes-sweeper review.

@teknium1 teknium1 added sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users area/compression Context compression and continuation sessions labels Jul 13, 2026
teknium1 added a commit that referenced this pull request Jul 23, 2026
…tected prune, real-compress survival

21 tests pinning the salvaged #44166 behavior:
- marker emit + extractor round trip (patterns adapted from PR #32375
  by @LeonSGP43, with credit)
- no-duplicate re-injection when the canonical marker survived (the
  original PR's presence-check defect)
- Phase-1 protection for just-loaded / user-referenced skills, and the
  Pass-4 pressure override that keeps #61932 fixed
- deterministic marker survival through a REAL compress() with a mocked
  aux LLM: drop → re-injected, keep → not duplicated, static-fallback
  path, iterative re-compression via rehydrated handoff
- markers never classify as handoff content (classify_summary_content /
  _strip_context_summary_handoff_message untouched)
- SKILLS_GUIDANCE Skill Safety Rule renders with real newlines
teknium1 added a commit that referenced this pull request Jul 23, 2026
…tected prune, real-compress survival

21 tests pinning the salvaged #44166 behavior:
- marker emit + extractor round trip (patterns adapted from PR #32375
  by @LeonSGP43, with credit)
- no-duplicate re-injection when the canonical marker survived (the
  original PR's presence-check defect)
- Phase-1 protection for just-loaded / user-referenced skills, and the
  Pass-4 pressure override that keeps #61932 fixed
- deterministic marker survival through a REAL compress() with a mocked
  aux LLM: drop → re-injected, keep → not duplicated, static-fallback
  path, iterative re-compression via rehydrated handoff
- markers never classify as handoff content (classify_summary_content /
  _strip_context_summary_handoff_message untouched)
- SKILLS_GUIDANCE Skill Safety Rule renders with real newlines
teknium1 added a commit that referenced this pull request Jul 23, 2026
…tected prune, real-compress survival

21 tests pinning the salvaged #44166 behavior:
- marker emit + extractor round trip (patterns adapted from PR #32375
  by @LeonSGP43, with credit)
- no-duplicate re-injection when the canonical marker survived (the
  original PR's presence-check defect)
- Phase-1 protection for just-loaded / user-referenced skills, and the
  Pass-4 pressure override that keeps #61932 fixed
- deterministic marker survival through a REAL compress() with a mocked
  aux LLM: drop → re-injected, keep → not duplicated, static-fallback
  path, iterative re-compression via rehydrated handoff
- markers never classify as handoff content (classify_summary_content /
  _strip_context_summary_handoff_message untouched)
- SKILLS_GUIDANCE Skill Safety Rule renders with real newlines
teknium1 added a commit that referenced this pull request Jul 23, 2026
…tected prune, real-compress survival

21 tests pinning the salvaged #44166 behavior:
- marker emit + extractor round trip (patterns adapted from PR #32375
  by @LeonSGP43, with credit)
- no-duplicate re-injection when the canonical marker survived (the
  original PR's presence-check defect)
- Phase-1 protection for just-loaded / user-referenced skills, and the
  Pass-4 pressure override that keeps #61932 fixed
- deterministic marker survival through a REAL compress() with a mocked
  aux LLM: drop → re-injected, keep → not duplicated, static-fallback
  path, iterative re-compression via rehydrated handoff
- markers never classify as handoff content (classify_summary_content /
  _strip_context_summary_handoff_message untouched)
- SKILLS_GUIDANCE Skill Safety Rule renders with real newlines
randlee pushed a commit to randlee/hermes-agent that referenced this pull request Aug 11, 2026
…tected prune, real-compress survival

21 tests pinning the salvaged NousResearch#44166 behavior:
- marker emit + extractor round trip (patterns adapted from PR NousResearch#32375
  by @LeonSGP43, with credit)
- no-duplicate re-injection when the canonical marker survived (the
  original PR's presence-check defect)
- Phase-1 protection for just-loaded / user-referenced skills, and the
  Pass-4 pressure override that keeps NousResearch#61932 fixed
- deterministic marker survival through a REAL compress() with a mocked
  aux LLM: drop → re-injected, keep → not duplicated, static-fallback
  path, iterative re-compression via rehydrated handoff
- markers never classify as handoff content (classify_summary_content /
  _strip_context_summary_handoff_message untouched)
- SKILLS_GUIDANCE Skill Safety Rule renders with real newlines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/compression Context compression and continuation sessions comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P2 Medium — degraded but workaround exists sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users tool/skills Skills system (list, view, manage) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants