Repository navigation
Conversation
volcengine#6390 forwarded an event time-decay window from recall config for the harnesses whose callers hand the whole config to the shared recall core (claude-code, codex), and it updated the vendored shared core in openclaw-plugin, whose buildContextSearchBody already reads cfg.recallEventsDecayProtection. But openclaw's TypeScript layer never passes it: config.ts rejects the key as unknown, client.ts builds its contractConfig field by field without the window, and buildAutoRecall Context sends nothing. Openclaw is now the only host where the decay window cannot be configured at all (dsh and pi resolve it through buildPluginConfig, opencode and the claude-code/codex entries pass the whole config, hermes is covered by volcengine#6574). Wire it through the same layers as the other options: parse recallEventsDecayProtection (trimmed, default empty), accept eventsDecayProtection on OpenVikingClient.searchContext and map it into the contractConfig so the shared buildContextSearchBody emits events_time_decay_protection, and pass the configured window from buildAutoRecallContext. Document the option in both READMEs. Tests: config normalization (trim/default), client body forwarding and omission, and an end-to-end buildAutoRecallContext assertion that the configured window reaches the context search.
10 of 11 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
#6390 forwarded an event time-decay window from recall config (
recallEventsDecayProtection, sent asevents_time_decay_protection). It works for the harnesses whose callers hand the whole config object to the shared recall core — claude-code and codex, with dsh/pi/opencode resolving the same schema throughbuildPluginConfig. It does not work for openclaw: that PR updated openclaw's vendoredshared/recall-core.mjs, whosebuildContextSearchBodyalready readscfg.recallEventsDecayProtection, but openclaw's TypeScript layer never passes it —config.tsrejects the key as unknown,client.tsbuilds itscontractConfigfield by field without the window, andbuildAutoRecallContextsends nothing. Openclaw is now the only host where the decay window cannot be configured at all, so its auto-recall keeps ranking events time-blind: a "scheduled" event outranks a newer terminal-state event on every status question.Fix
config.ts: acceptrecallEventsDecayProtection(trimmed, default empty), expose it in the config spec.client.ts: accepteventsDecayProtectiononSearchContextOptionsand map it into the contractConfig, so the sharedbuildContextSearchBodyemitsevents_time_decay_protection.auto-recall.ts: pass the configured window frombuildAutoRecallContext.No shared-core changes: the vendored copy already implements the contract.
Tests
tests/ut/config.test.ts: trim + default empty.tests/ut/client.test.ts:events_time_decay_protectionlands on the request body; omitted when unset.tests/ut/build-memory-lines.test.ts: end-to-end — configured window reaches the context search call.tsc --noEmitclean; full vitest suite green (44 files, 828 tests).Notes