Skip to content

docs(tools): enable tool_schema_filter testing coverage for #2020 (issue #2040)#2056

Merged
bug-ops merged 4 commits intomainfrom
issue-2040-tool-schema-filter
Mar 20, 2026
Merged

docs(tools): enable tool_schema_filter testing coverage for #2020 (issue #2040)#2056
bug-ops merged 4 commits intomainfrom
issue-2040-tool-schema-filter

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Mar 20, 2026

Summary

Document tool_schema_filter feature in CHANGELOG.md following live testing validation (issue #2040).

Context

Changes

  • CHANGELOG.md: document tool_schema_filter enablement with 3 critical caveats from code review:
    1. Known limitation: prompt-based providers (Ollama, Candle) receive unfiltered tool set
    2. Cache invalidation risk: Claude's cache_control on tools block may invalidate per-turn filtering benefit
    3. Token savings corrected to realistic 15-25% (measured in live session: 27.3%)

Testing

  • 8 live test scenarios: all pass
  • Tool count reduction verified: 27.3% (22 baseline → 16 filtered, top_k=5)
  • Always-on tool enforcement confirmed
  • Graceful degradation paths validated (embed failure → full tool set)
  • No crashes, no panics

Reviewers

  • ✅ Architect: testing strategy design complete
  • ✅ Critic: adversarial review (PROCEED WITH CAVEATS)
  • ✅ Developer: implementation clean (only CHANGELOG.md in diff)
  • ✅ Tester: live validation complete (ready for review)
  • ✅ Reviewer: code review APPROVE (3 out-of-scope files reverted)

Closes #2040

bug-ops added 3 commits March 20, 2026 16:13
…n CHANGELOG

Add known limitations to the tool_schema_filter entry:
- Prompt-based providers (Ollama non-native, Candle) receive unfiltered tool set
- Claude prompt cache invalidation risk when filtered tool set changes per turn
- Realistic token savings estimate corrected to 15-25% (not 55%)
Remove unrelated changes bundled into this branch:
- crates/zeph-sanitizer/src/lib.rs: restore MemorySourceHint enum
- crates/zeph-core/src/agent/context/assembly.rs: restore hint-based injection detection
- crates/zeph-memory/tests/ollama_integration.rs: restore deleted integration test

These changes (MemorySourceHint removal + test deletion) are security-relevant
and must be addressed in a separate PR with proper issue, analysis, and tests.
@github-actions github-actions bot added documentation Improvements or additions to documentation memory zeph-memory crate (SQLite) rust Rust code changes core zeph-core crate size/L Large PR (201-500 lines) labels Mar 20, 2026
@github-actions github-actions bot added size/XS Extra small PR (1-10 lines) and removed memory zeph-memory crate (SQLite) rust Rust code changes core zeph-core crate size/L Large PR (201-500 lines) labels Mar 20, 2026
@bug-ops bug-ops merged commit eb8acfd into main Mar 20, 2026
17 checks passed
@bug-ops bug-ops deleted the issue-2040-tool-schema-filter branch March 20, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/XS Extra small PR (1-10 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(tools): enable tool_schema_filter in testing.toml for live coverage of #2020

1 participant