Skip to content

fix(memory): back off failed full reindexes - #138786

Merged
steipete merged 10 commits into
openclaw:mainfrom
Grynn:fix/memory-reindex-livelock
Oct 10, 2026
Merged

steipete merged 10 commits into
openclaw:mainfrom
Grynn:fix/memory-reindex-livelock

Conversation

@Grynn

@Grynn Grynn commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Failed full memory rebuilds can retry on every search, repeatedly hitting an unavailable local embedding server while the published index is still usable.

User Impact

Automatic full-rebuild retries wait 30 seconds after failure, double the delay on repeated failures, and cap it at 30 minutes. Searches keep reading the published index. Queued session updates can publish against a valid index during cooldown, and explicit CLI repair remains immediate. A successful rebuild resets the process-local schedule.

Optional-provider failures still permit the first distinct keyword-only publication. If that publication also fails, subsequent attempts honor its deadline. Automatic provider recovery requests a full rebuild without bypassing cooldown when the separate provider-probe cache expires.

Why This Change Was Made

The existing retry state carries the deadline and failed generation kind through detached maintenance. Each sync pass returns its outcome through the existing ledger, so deferred or targeted work cannot erase an outstanding rebuild failure. The full-rebuild failure owner advances the schedule once per failed attempt, including explicit retries. Worker-owned publication, semantic-index protection, and the one-shot revision-conflict retry are preserved.

The PR retains @Grynn's original commit and removes the separate deferred-manager API, mutable ledger marker, and overlapping recovery tests. Production is +128/-34 (net +94), tests/support +257/-23, and docs +6/-0: +391/-57 overall, reduced from +441/-26. The production growth supplies retry timing and per-pass outcomes at the existing owners; no schema or public configuration is added.

Main through bc8f693df3aee184c65626f7e9c9c58889c51a8b is merged, including query-based health probes and EmbeddingGemma format-upgrade selection and metadata.

Fixes #138775

Evidence

Real Ollama nomic-embed-text is exercised through an isolated Gateway on port 19228 and its POST /tools/invoke memory_search endpoint. A logging proxy injects HTTP 400 only for a synthetic document's embedding; embedding caching is disabled.

  • Main baseline: four searches caused four failed rebuild requests, separated by 4.196/5.337/4.566 seconds. Every search retained the published note with a stale-index warning.
  • Final candidate: four searches caused one failed rebuild request; the next failure occurred 36.490 seconds later, and successful recovery occurred 72.201 seconds after that. All measured searches returned the published note. With the canonical session SDK prewarmed, two turns (four messages) appended in 166 ms, completing 0.416 seconds after failure during the 30-second cooldown; concurrent search returned the published note in 94 ms. Both turns were retrieved after recovery. The first cold SDK attempt took 63.142 seconds and is excluded from the in-window append claim.
  • Optional-provider bootstrap: three searches returned the note with provider: "none" and debug.embeddingBootstrap.degradedTo: "keyword-only" while document embeddings failed. After restoration, retrieval used provider: "openai", model nomic-embed-text, and vector score 0.703926. The adapter routed to real Ollama /v1; two failed document requests covered startup/background and the later bootstrap.

Session updates use the canonical session SDK and are checked through memory retrieval after successful rebuild recovery. The earlier optional sessions_history lookup did not resolve the synthetic session and is not passing proof. New turns are not claimed searchable during the incompatible-index cooldown.

Live entry point: pnpm openclaw --profile memory-sync-backoff gateway run --port 19228 --bind loopback --auth none, with isolated OPENCLAW_STATE_DIR and OPENCLAW_CONFIG_PATH, followed by the Gateway tool endpoint. This tests memory indexing and retrieval with real local embeddings. Runtime proof used source head f42ffe85a73099c91227826bb2842da783fb7ba2, Ollama 0.40.2, and Node 26.11.1. Final head 55c30ff66dcc7180d5424e781300810fe00c40c4 changes only the placement of the same cooldown documentation so it composes cleanly with the separately reviewed session-append fix; runtime evidence is reused for that prose-only delta.

Validation

The missing/older-identity regressions failed on main at the second search (expected one embedding attempt, observed two; 203.89 seconds wall). Review also exposed keyword-bootstrap suppression and an automatic optional-provider force call bypassing the longer deadline. Those paths were reproduced before correction; the latter made a third request before the 60-second deadline (expected two; 177.77 seconds wall).

  • Integrated head: 88/88 tests passed in five files, 905.54 seconds wall, using node scripts/run-vitest.mjs <files> --maxWorkers=1: backoff, FTS-only reindex, provider lifecycle, search upgrades, and index identity. This includes required/optional exponential schedules, first/background bootstrap, failed keyword publication, queued session publication, and the new EmbeddingGemma upgrade path.

  • The preceding eight-file run passed 115/115, including all six failures from the first CI cycle: late shadow recovery, worker overload, redaction recovery, detached rebuild warnings, and bootstrap/close behavior. Wall time was 1696.61 seconds.

  • Final batch test-execution cost: backoff 90.00 seconds; FTS-only reindex 52.64 seconds. These use the real manager and SQLite publication workers to catch lost retry state and blocked publication; a timer-only unit test cannot cover those handoffs. The clock is mocked, with no added sleeps, polling, or per-test Gateway boots. Shared-host load and worker compilation contributed to wall time; batch transform/import/setup accounted for roughly half the run.

  • Scoped lint passed (739.86 seconds, including package declarations); production/test type lanes passed (28.73/35.97 seconds). Max-lines, line-cap, assertion-safety, test-timeout-race, test-mock-exports, config-docs, and plugin-inventory checks passed. Formatting and git diff --check passed.

  • Full pnpm build passed in 3716.53 seconds under Node 26.11.1. The first run compiled successfully but failed CLI metadata after 3300.10 seconds because concurrent host package maintenance removed a library needed by its older Node process; the normal recovery rebuilt under the current Node version. Tests used Node 26.10. No cache validation was bypassed. The successful build printed an unrelated UI startup-size diagnostic; this PR changes no UI code.

  • Fresh independent Codex review: scoped-clean through P2 on final head 55c30ff66dcc7180d5424e781300810fe00c40c4, with no accepted/actionable findings.

  • Final exact-head hosted checks: CI run 38033977577 passed (41 jobs succeeded, 26 skipped), and openclaw/ci-gate passed. The four changed-extension bundles took 199–247 seconds each (926 aggregate job-seconds, including setup and sibling tests; not an isolated cost for these regressions). ClawSweeper reviewed 55c30ff66dcc7180d5424e781300810fe00c40c4: 5/6 for readiness, proof, and patch quality, with no findings or Before merge items.

@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added extensions: memory-core Extension: memory-core size: S triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. and removed triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Sep 5, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 5, 2026
@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR adds exponential cooldowns after failed full memory rebuilds while preserving published-index searches and targeted session updates.

Example: Four memory searches follow a failed document-embedding request to Ollama using nomic-embed-text.

  • Before: Each search starts another failed full rebuild.
  • After: Only one rebuild fails during the initial 30-second cooldown, while searches retain the published note.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused, useful repair with shipped-entry-point proof, meaningful regressions, successful exact-head checks, and no open findings; new retry state is process-local and requires no migration.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): Supplied live output exercises the changed Memory Core owner through an isolated Gateway with real Ollama embeddings, injected document failures, cooldown retries, published-note retrieval, optional keyword bootstrap, and successful recovery; the final head changes only documentation.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An unavailable embedding provider can cause repeated expensive full rebuilds whenever users search memory.
Reason: Bounded retries address the stated failure loop without adding configuration, changing stored preferences, or replacing the existing publication owner.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it repairs a current retry-scheduling defect, has relevant live proof, and has no actionable findings.

Priority: P2
Reviewed head: 55c30ff66dcc7180d5424e781300810fe00c40c4

Before merge

None.

Findings

None.

Agent review details

How this fits together

Memory Core accepts search and synchronization requests, prepares memory files and session transcripts, and publishes replacement SQLite indexes for subsequent recall.

flowchart LR
  A[Memory search] --> B[Published index]
  A --> C[Sync owner]
  C --> D[Retry cooldown]
  D --> E[Embedding provider]
  E --> F[Shadow publication]
  F --> B
Loading

Technical review

Best possible solution:

Land the existing sync-owner cooldown while retaining revision fencing, keyword bootstrap, and explicit repair behavior.

Do we have a high-confidence way to reproduce the issue?

Current source shows failed full rebuilds rearming without a deadline, and the supplied Gateway baseline demonstrates repeated attempts; this review ran no target code.

Is this the best way to solve the issue?

The repair belongs at the shared sync owner, where it covers detached maintenance and automatic identity recovery without weakening publication safety.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 699636375966.

Provenance checked

  • Full-rebuild retry state changes intended behavior with a stated reason (e99ab38: Preserve retry work and rollback recovery after failed rebuilds.)
  • Detached maintenance handoff keeps the original intent (b318bba: Transfer the dirty generation instead of forcing unnecessary full rebuilds.)
  • Revision-conflict retry keeps the original intent (822ae0f: Retry one automatic publication conflict against the newest live revision while preserving strict publication fencing.)
  • Sync failure reporting keeps the original intent (162df44: Report actual refresh failures without treating ordinary dirty work as failure or clearing a concurrent failure.)
  • Optional embedding bootstrap keeps the original intent (5922dd4: Preserve actionable keyword-only recall when optional embeddings cannot initialize.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit b318bba adds extensions/memory-core/src/memory/manager-search-maintenance.ts:35 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: b318bba0ce3b; files: extensions/memory-core/src/memory/manager-search-maintenance.ts)
  • Hoi Hin Adrian Ip: Raw commit a7766f1 adds extensions/memory-core/src/memory/manager-search-maintenance.ts:30 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: a7766f1d273f; files: extensions/memory-core/src/memory/manager-search-maintenance.ts)
  • Vitor Cepeda Lopes: Raw commit 822ae0f adds extensions/memory-core/src/memory/manager-search-maintenance.ts:40 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 822ae0ff92b5; files: extensions/memory-core/src/memory/manager-search-maintenance.ts)

PR surface

Source +94, Tests +234, Docs +6. Total +334 across 15 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 6 128 34 +94
Tests 8 257 23 +234
Docs 1 6 0 +6
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 15 391 57 +334

Review metrics

Metric Value Why it matters
Production versus regression coverage Production +128/-34; tests and support +257/-23 Production growth implements shared retry timing and per-pass outcomes; the regressions exercise published recall, cooldown recovery, and queued-session publication.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Repeated failed rebuilds waste embedding and indexing work, but published-index recall remains available through the existing serving path.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (8 earlier review cycles)
  • reviewed 2026-09-05T02:49:50.989Z sha 607df28dd8f809e9469af99bda02dbfce3839a74 :: needs real behavior proof before merge. :: [P2] Preserve the failed-sync outcome when a retry is deferred
  • reviewed 2026-09-17T15:34:52.557Z sha 411a5b416d4678f669b772a8e45bb43e3315f796 :: needs real behavior proof before merge. :: [P2] Reset the backoff after successful session-only recovery
  • reviewed 2026-09-24T00:00:28.936Z sha 94ccf0c860b9eebf76b3c789987f713b514545a5 :: needs real behavior proof before merge. :: [P1] Keep targeted session updates out of the rebuild cooldown
  • reviewed 2026-09-24T01:03:18.483Z sha 2fcddff :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-02T07:56:18.920Z sha 2fcddff :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-10T01:27:50.344Z sha 678cc98 :: needs changes before merge. :: [P1] Allow keyword-only bootstrap recovery through the cooldown | [P2] Advance recovery fixtures past the new retry deadline
  • reviewed 2026-10-10T01:41:51.793Z sha 678cc98 :: needs changes before merge. :: [P1] Allow keyword-only bootstrap recovery through the cooldown | [P2] Advance recovery fixtures past the new retry deadline
  • reviewed 2026-10-10T07:24:21.126Z sha 55c30ff :: needs maintainer review before merge. :: none

Reviewed October 10, 2026, 3:37 AM ET / 07:37 UTC (Revision 9).

@Grynn

Grynn commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Updated on bdd1b41161cbf23c70e8949b29b45529a2cd5b5b; current head 94ccf0c860b9eebf76b3c789987f713b514545a5.

The earlier P2 is fixed: successful source-wide sessions-only recovery clears the failed-rebuild streak, and a failed retry advances its deadline. Automatic missing-metadata and older-runtime identity repair now respects that deadline. Explicit non-force CLI identity repair still runs immediately.

Direct serving-manager proof uses repeated real manager.search calls with detached transient maintenance. A failed shadow publication leaves the published result readable, the next search during cooldown does not rebuild, and a search after the deadline recovers and sees newly indexed content. Two additional cases cover identity repair; a fourth verifies the CLI exception.

Validation: 64/64 focused Memory Core sibling tests passed (148.79s wall); the final CLI/search suite passed 4/4 (16.49s wall). Final node scripts/check-changed.mjs --base bdd1b41161cbf23c70e8949b29b45529a2cd5b5b passed, including extension typechecks, lint, format, ratchets, and dead exports. Fresh exact-patch Codex P0–P2 review found no actionable findings. No live Gateway or credentials were used; all runtime proof used isolated synthetic index data.

The PR body now carries the current problem, behavior, and evidence. Please review this head against the revised proof.

@Grynn

Grynn commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

Why: failed shadow rebuilds could retry on every search, sessions-only recovery could retain an expired streak, and the cooldown could silently discard queued session updates. A thrown deferred pass could also poison the next sync outcome.

What: keep a process-local cooldown and deferred failure outcome through detached maintenance; settle sessions-only retries; preserve explicit CLI repair; admit targeted session updates without selecting unrelated full rebuilds; clear a deferred marker when a sync throws.

Evidence: queued-session regression failed before the repair and passes for both force modes through the published SQLite index; ledger regression failed before the catch reset and now passes. Focused suites 7/7 and 45/45 passed, changed-file gate passed, and fresh independent review found no actionable issue.
@Grynn
Grynn force-pushed the fix/memory-reindex-livelock branch from 94ccf0c to 2fcddff Compare September 24, 2026 00:53
@Grynn

Grynn commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The P1 queued-session finding is repaired at head 2fcddff90aa8f7f9ff6113ffd486f65a3e4202d9. During failed-full-rebuild cooldown, a queued target now reaches the targeted sync path rather than returning successfully before indexing. A forced target also stays scoped to that target; pending full-retry work and its error remain visible. If index identity is invalid, the target remains dirty for repair.

The new queue-boundary regression waits for an in-flight failed rebuild, submits a session update through manager.sync, and checks the published SQLite session index for the new chunk. It passes for force: false and force: true. A second regression proves a deferred sync that throws does not leave the outcome ledger poisoned for the next successful sync. The two new regressions failed on their respective unfixed paths.

Validation: 7/7 cooldown/ledger tests (39.44 seconds wall), 45/45 neighboring recovery and queue tests (73.13 seconds wall), extension typechecks, and the full changed-file gate passed. Fresh independent review found no remaining actionable issue. This is isolated real-manager/SQLite proof with synthetic workspace data; no live Gateway or credentials were used, so the original sustained-load latency claim remains unverified on a real installation.

@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@openclaw-barnacle openclaw-barnacle Bot added triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. and removed triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Sep 24, 2026
@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. label Oct 2, 2026
@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Oct 10, 2026
@steipete

Copy link
Copy Markdown
Contributor

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 10, 2026
@steipete

Copy link
Copy Markdown
Contributor

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 10, 2026
@steipete steipete self-assigned this Oct 10, 2026
@steipete
steipete merged commit eecaa9d into openclaw:main Oct 10, 2026
133 checks passed
@steipete

Copy link
Copy Markdown
Contributor

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 11, 2026
* fix(memory): back off failed full reindexes

Why: failed shadow rebuilds could retry on every search, sessions-only recovery could retain an expired streak, and the cooldown could silently discard queued session updates. A thrown deferred pass could also poison the next sync outcome.

What: keep a process-local cooldown and deferred failure outcome through detached maintenance; settle sessions-only retries; preserve explicit CLI repair; admit targeted session updates without selecting unrelated full rebuilds; clear a deferred marker when a sync throws.

Evidence: queued-session regression failed before the repair and passes for both force modes through the published SQLite index; ledger regression failed before the catch reset and now passes. Focused suites 7/7 and 45/45 passed, changed-file gate passed, and fresh independent review found no actionable issue.

* fix(memory): preserve deferred outcomes across publication scope

* style(memory): format reindex cooldown condition

* fix(memory): advance backoff after explicit rebuild failures

* style(memory): clear backoff lint findings

* fix(memory): preserve keyword bootstrap through retry cooldown

* fix(memory): honor backoff during automatic provider recovery

* docs(memory): separate rebuild cooldown from chunk retention

---------

Co-authored-by: Peter Steinberger <[email protected]>
Grynn added a commit to Grynn/openclaw that referenced this pull request Oct 21, 2026
Retain the remaining raw-byte behavior from local8039fc5195d on upstreamf91bca9546f5. The host fs-safe append option recognizes leadingLF only; a proposed delta beginning withCR orCRLF must not receive an extraLF. Apply the same separator decision in sandbox writes and provenance contentAfter without changing replay rejection, source authority or path guards.

Do not replay the old aggregate maintenance/routing patch: upstream#168123 owns duplicate-note rejection,openclaw#138786 reindex backoff,openclaw#168471 and8fc0987fb08 Gateway CLI recall routing,openclaw#168860/openclaw#171322 worker-owned memory publication and admission. Raw proposed Markdown remains verbatim; no prefix stripping or normalized-offset mapping is retained.

Proof: four actual host/sandbox wrapper cases fail before the repair, then24tests pass including replay rejection, authority revocation and exact provenance/disk bytes forCRLF,CR,indentation,hard-break spaces and non-BMP text. Targeted agents-root types,scoped lint,format andline-cap pass; fresh independentP0-P2 review scoped-clean. Full candidate build,Doctor andactivation remain separate gates. Related:openclaw#125309.

Local-Feature: memory-append-raw-separators
Semantic-Source: 39a740d
Upstream-Tracking: openclaw#125309
Drop-When: Upstream host/sandbox append and provenance preserve leading CR and CRLF bytes.
Rebase-Base: ed9d493
Grynn added a commit to Grynn/openclaw that referenced this pull request Oct 21, 2026
Retain the remaining raw-byte behavior from local8039fc5195d on upstreamf91bca9546f5. The host fs-safe append option recognizes leadingLF only; a proposed delta beginning withCR orCRLF must not receive an extraLF. Apply the same separator decision in sandbox writes and provenance contentAfter without changing replay rejection, source authority or path guards.

Do not replay the old aggregate maintenance/routing patch: upstream#168123 owns duplicate-note rejection,openclaw#138786 reindex backoff,openclaw#168471 and8fc0987fb08 Gateway CLI recall routing,openclaw#168860/openclaw#171322 worker-owned memory publication and admission. Raw proposed Markdown remains verbatim; no prefix stripping or normalized-offset mapping is retained.

Proof: four actual host/sandbox wrapper cases fail before the repair, then24tests pass including replay rejection, authority revocation and exact provenance/disk bytes forCRLF,CR,indentation,hard-break spaces and non-BMP text. Targeted agents-root types,scoped lint,format andline-cap pass; fresh independentP0-P2 review scoped-clean. Full candidate build,Doctor andactivation remain separate gates. Related:openclaw#125309.

Local-Feature: memory-append-raw-separators
Semantic-Source: 39a740d
Upstream-Tracking: openclaw#125309
Drop-When: Upstream host/sandbox append and provenance preserve leading CR and CRLF bytes.
Rebase-Base: ed9d493
Grynn added a commit to Grynn/openclaw that referenced this pull request Nov 13, 2026
Retain the remaining raw-byte behavior from local8039fc5195d on upstreamf91bca9546f5. The host fs-safe append option recognizes leadingLF only; a proposed delta beginning withCR orCRLF must not receive an extraLF. Apply the same separator decision in sandbox writes and provenance contentAfter without changing replay rejection, source authority or path guards.

Do not replay the old aggregate maintenance/routing patch: upstream#168123 owns duplicate-note rejection,openclaw#138786 reindex backoff,openclaw#168471 and8fc0987fb08 Gateway CLI recall routing,openclaw#168860/openclaw#171322 worker-owned memory publication and admission. Raw proposed Markdown remains verbatim; no prefix stripping or normalized-offset mapping is retained.

Proof: four actual host/sandbox wrapper cases fail before the repair, then24tests pass including replay rejection, authority revocation and exact provenance/disk bytes forCRLF,CR,indentation,hard-break spaces and non-BMP text. Targeted agents-root types,scoped lint,format andline-cap pass; fresh independentP0-P2 review scoped-clean. Full candidate build,Doctor andactivation remain separate gates. Related:openclaw#125309.

Local-Feature: memory-append-raw-separators
Semantic-Source: 39a740d
Upstream-Tracking: none (no upstream issue or PR tracks CR-led append separators); related openclaw#125309 (closed completed 2026-10-24, memory-maintenance scope)
Drop-When: Upstream host/sandbox append and provenance preserve leading CR and CRLF bytes.
Rebase-Base: 0220489
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation extensions: memory-core Extension: memory-core P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: memory search livelocks — every search triggers a full reindex that cannot publish, and re-arms with no backoff

2 participants