Skip to content

fix(search): use session summaries in search and cap intent summary l…#494

Merged
qin-ctx merged 1 commit intovolcengine:mainfrom
lixingjia77:fix/session-summaries-search
Mar 9, 2026
Merged

fix(search): use session summaries in search and cap intent summary l…#494
qin-ctx merged 1 commit intovolcengine:mainfrom
lixingjia77:fix/session-summaries-search

Conversation

@lixingjia77
Copy link
Contributor

Description

This PR fixes the session context contract mismatch in search and adds prompt-safety truncation for session summaries.

Specifically:

Session.get_context_for_search() provides summaries (list), but VikingFS.search() was reading summary (singular).
After aligning to summaries, the list is normalized into a single string before passing to intent analysis.
IntentAnalyzer now truncates overly long compression_summary to avoid oversized prompts.
Related Issue

Related Issue

Fixes #493

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

  • Updated VikingFS.search() to consume session_info["summaries"] and normalize List[str] via "\n\n".join(...).
  • Added compression summary truncation in IntentAnalyzer (MAX_COMPRESSION_SUMMARY_CHARS) before prompt rendering.

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots (if applicable)

Additional Notes

@CLAassistant
Copy link

CLAassistant commented Mar 9, 2026

CLA assistant check
All committers have signed the CLA.

@lixingjia77 lixingjia77 force-pushed the fix/session-summaries-search branch from 99b809f to d0513f2 Compare March 9, 2026 11:34
@qin-ctx qin-ctx self-assigned this Mar 9, 2026
@qin-ctx qin-ctx merged commit c80a2e4 into volcengine:main Mar 9, 2026
1 check passed
@github-project-automation github-project-automation bot moved this from Backlog to Done in OpenViking project Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Bug]: Session search context contract mismatch (summary/summaries key + List[str]/str type)

3 participants