Skip to content

feat(plugins): default auto-recall event decay protection to 30 days - #8093

Merged
qin-ctx merged 9 commits into
volcengine:mainfrom
heaoxiang-ai:codex/auto-recall-event-time-decay
Nov 25, 2026
Merged

qin-ctx merged 9 commits into
volcengine:mainfrom
heaoxiang-ai:codex/auto-recall-event-time-decay

Conversation

@heaoxiang-ai

@heaoxiang-ai heaoxiang-ai commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Set a fixed 30-day event score protection period for plugins that use the shared auto-recall hook. Event memory scores stay unchanged during the 30 days after the record was updated and decay afterward.

Changes Made

  • Default OPENVIKING_RECALL_EVENTS_DECAY_PROTECTION to 30d for the shared hook. The protection period is the same for every prompt.
  • Accept off to disable decay and other durations such as 7d or 12h as overrides.
  • When Context search returns HTTP 400 or 422, report the status and original server message even with debug disabled. Codex and Claude Code use a user-facing hook warning. Other shared recall callers write to stderr. Recall ends for that turn without retrying. Magpie uses a separate request client and can opt in through its configuration.
  • Keep direct MCP find and search under caller control through the existing request parameter.
  • Regenerate the distributed shared code, bump the registered plugin release versions, and document the setting.

Human Involvement

  • A human participated in the implementation or review loop
  • This PR was generated entirely by AI agents without human participation in the loop

The requester reviewed the implementation and chose a fixed 30-day window. Codex revised the patch and ran validation.

Related Issue

Builds on #5214 and #6390. OpenClaw's native configuration wiring is tracked in #6875.

Type of Change

  • New feature
  • Documentation update
  • Test update

Testing

  • All 167 focused shared configuration, recall, Codex, and Claude Code hook tests passed on macOS. The broader runtime suite on the earlier revision had 1,589 passes and 9 environment-dependent skips.
  • Earlier in this PR, tested the Codex hook on Linux against a real OpenViking v0.5.5 instance. Recent and historical queries both sent 30d by default. Setting off omitted the field and restored injection of a 41-day-old test event. A fixed 7d override was forwarded.
  • Local HTTP fixtures confirmed that the Codex and Claude Code hooks each make one search request and emit the original HTTP 400 or 422 error as a user-facing warning while debug is disabled. Generated runtime copies, the seven registered plugin version bumps, and git diff --check were verified.
node --test examples/memory-plugin-shared/recall-core.test.mjs examples/memory-plugin-shared/plugin-config.test.mjs examples/codex-memory-plugin/scripts/auto-recall.test.mjs examples/claude-code-memory-plugin/scripts/auto-recall.test.mjs
bash .github/scripts/check-plugin-version-bumps.sh ov/main

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation

Additional Notes

In the earlier 504-call synthetic pilot, a fixed 30-day period retained 7/12 and 8/12 historical-ticket injections across the two corpora. A fixed seven-day period retained 0/12 and 2/12. Turning event decay off recovered 12/12 in each corpus.

@heaoxiang-ai
heaoxiang-ai marked this pull request as draft November 20, 2026 09:45
@heaoxiang-ai heaoxiang-ai changed the title feat(plugins): enable intent-aware event decay in auto recall feat(plugins): default auto-recall event decay protection to 30 days Nov 20, 2026
@heaoxiang-ai
heaoxiang-ai marked this pull request as ready for review November 20, 2026 09:48
@heaoxiang-ai
heaoxiang-ai force-pushed the codex/auto-recall-event-time-decay branch from f0fc360 to 02f6f5d Compare November 24, 2026 03:00
默认衰减请求会进入分布式 openGauss 不支持的高级排序分支,导致自动召回丢失结果。按实际账号后端判断支持情况,无法应用衰减时直接执行原有查询。

Co-authored-by: qin-ctx <qinhaojie.exe@bytedance.com>
@qin-ctx
qin-ctx merged commit 6b338cb into volcengine:main Nov 25, 2026
29 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in OpenViking project Nov 25, 2026
2SinceJuly added a commit to 2SinceJuly/OpenViking that referenced this pull request Nov 25, 2026
main moved every plugin manifest one patch ahead (volcengine#8093 and others), so the
version bumps this branch carries for the short-prompt compression skip
collide with it. The bump has to sit on top of main's number rather than
overwrite it, so each manifest here takes main's version plus one. Conflict
hunks were version lines only; the memory-plugin-shared tests still pass.
2SinceJuly added a commit to 2SinceJuly/OpenViking that referenced this pull request Nov 26, 2026
main moved the plugin manifests to 0.7.30 since the last merge (volcengine#8093 and others), so the version bumps this branch carries collide with it. Each conflicting manifest keeps main's number plus one, following the same convention as the previous merge: 0.7.31.

Conflict hunks were version lines only. Ran the memory-plugin-shared recall tests (51 pass) and the magpie plugin tests (51 pass, 1 skipped).
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.

4 participants