Skip to content

fix(openclaw-plugin): fix compact result mapping#1058

Open
jcp0578 wants to merge 2 commits intovolcengine:mainfrom
jcp0578:main
Open

fix(openclaw-plugin): fix compact result mapping#1058
jcp0578 wants to merge 2 commits intovolcengine:mainfrom
jcp0578:main

Conversation

@jcp0578
Copy link
Copy Markdown
Contributor

@jcp0578 jcp0578 commented Mar 28, 2026

Description

This PR fixes compact result handling in the OpenClaw OpenViking plugin so the /compact command returns a result structure that matches OpenClaw's expectations, without affecting compaction functionality.

Related Issue

N/A

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

  • fixes compact result handling in the OpenClaw OpenViking plugin so the /compact command returns a result structure that matches OpenClaw's expectations
  • Updated compact handling to use the most reliable available token values and archive metadata, while keeping successful compaction independent from optional context refresh failures.

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)

N/A

Additional Notes

This change was validated in a remote Linux container running OpenClaw with the OpenViking plugin enabled. The compact flow was exercised against real session data to verify archive creation, token logging, and compact result behavior.

@github-actions
Copy link
Copy Markdown

Failed to generate code suggestions for PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant