Skip to content

Config/MemorySearch: add post-compaction force reindex toggle#25559

Draft
rodrigouroz wants to merge 8 commits intoopenclaw:mainfrom
rodrigouroz:codex/pr20038-07
Draft

Config/MemorySearch: add post-compaction force reindex toggle#25559
rodrigouroz wants to merge 8 commits intoopenclaw:mainfrom
rodrigouroz:codex/pr20038-07

Conversation

@rodrigouroz
Copy link
Contributor

@rodrigouroz rodrigouroz commented Feb 24, 2026

Summary

Describe the problem and fix in 2–5 bullets:

  • Problem: post-compaction sync force behavior for session memory indexing was not configurable.
  • Why it matters: operators need control over consistency vs indexing pressure after compaction events.
  • What changed: added agents.defaults.memorySearch.sync.sessions.postCompactionForce to types/schema/config resolution/help/labels and defaults.
  • What did NOT change (scope boundary): compact runner still does not invoke manager sync in this PR.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

User-visible / Behavior Changes

  • New memory-search key:
    • agents.defaults.memorySearch.sync.sessions.postCompactionForce (default true)

Security Impact (required)

  • New permissions/capabilities? (No)
  • Secrets/tokens handling changed? (No)
  • New/changed network calls? (No)
  • Command/tool execution surface changed? (No)
  • Data access scope changed? (No)
  • If any Yes, explain risk + mitigation:

Repro + Verification

Environment

  • OS: macOS
  • Runtime/container: Node 22 + pnpm
  • Model/provider: n/a (unit tests)
  • Integration/channel (if any): n/a
  • Relevant config (redacted): memorySearch defaults

Steps

  1. pnpm vitest run src/agents/memory-search.test.ts
  2. pnpm tsgo
  3. Verify resolved defaults include postCompactionForce: true.

Expected

  • Memory-search config tests and typecheck pass.

Actual

  • Local tests passed; typecheck passed.

Evidence

Attach at least one:

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios: schema + type + resolution all include postCompactionForce with default true.
  • Edge cases checked: existing session sync thresholds remain unchanged.
  • What you did not verify: live indexing throughput impact with force disabled.

Compatibility / Migration

  • Backward compatible? (Yes)
  • Config/env changes? (No)
  • Migration needed? (No)
  • If yes, exact upgrade steps:

Failure Recovery (if this breaks)

  • How to disable/revert this change quickly: revert this PR or omit the new key.
  • Files/config to restore: src/agents/memory-search.ts, src/config/zod-schema.agent-runtime.ts, src/config/types.tools.ts
  • Known bad symptoms reviewers should watch for: config validation errors from invalid boolean values.

Risks and Mitigations

List only real risks for this PR. Add/remove entries as needed. If none, write None.

  • Risk: misunderstanding of force semantics could lead to unexpected indexing behavior.
    • Mitigation: explicit help text and default set to current-safe behavior (true).

Stack: 7/9, depends on #25558.

@openclaw-barnacle openclaw-barnacle bot removed the app: web-ui App: web-ui label Feb 26, 2026
@openclaw-barnacle
Copy link

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle bot added the stale Marked as stale due to inactivity label Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling size: L stale Marked as stale due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants