Skip to content

fix(memory): keep curated annotation indexing linear - #138995

Merged
obviyus merged 1 commit into
openclaw:mainfrom
LeizhenZhang:fix/memory-core-annotation-backtracking
Sep 5, 2026
Merged

obviyus merged 1 commit into
openclaw:mainfrom
LeizhenZhang:fix/memory-core-annotation-backtracking

Conversation

@LeizhenZhang

@LeizhenZhang LeizhenZhang commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #138994.

What Problem This Solves

A short incomplete annotation in MEMORY.md can block memory indexing for seconds. The original repeated suffix expression explores many ways to divide comments before rejecting an incomplete final marker.

The initial repair removed exponential backtracking but retained quadratic work and changed recall metadata when ordinary comments appeared between annotations.

Why This Change Was Made

Use the existing curated-annotation owner for one forward-only scanner shared by carrier stripping, project extraction, and recall metadata parsing. Reuse metadata for fragments with the same source span.

Keep the existing grammar:

  • Trailing recall metadata can span intervening ordinary comments and text.
  • Trigger phrases retain their order and deduplication; importance retains the largest valid value from 1 through 10.
  • Project extraction stays independent, including project markers nested inside other annotation payloads.
  • Incomplete and invalid project annotations remain scoped but unsatisfiable.
  • Existing multiline-prefix and line-scoped carrier-body behavior stays unchanged.

This removes the manager-owned parser and the proposed test-only matcher export. No configuration, schema, migration, or stored representation changes.

User Impact

Curated memory indexing stays responsive with incomplete or long annotation-shaped input in both keyword-only and semantic modes. Reindexing preserves existing recall metadata and project isolation.

Thanks @lzhan011 for the report, initial repair, and short reproduction.

Evidence

Baseline: 49ecde890905fa601cafc9cfbf6ea0cfe9aab824.
Verified candidate: 4e2ad3d06424b17f769df6b2724d7d7250e16b92.

Real indexing

Ran the built CLI against isolated workspaces and databases:

node openclaw.mjs memory index --force --verbose

The reported 403-byte payload was placed inside a 432-byte curated entry. On main, the command took 25.38 seconds and the event loop stalled for 20.19 seconds. The baseline control had a 1.62-second startup delay.

On the candidate, the same keyword-only witness took 5.01 seconds including startup, with maximum event-loop delay 1.54 seconds. A 300 KB version took 4.99 seconds. Valid mixed-comment metadata remained intact.

Separate runs used deliberately unfinished project openers:

Input Keyword-only command Semantic command Embedding requests
120 KB 4.78 s 5.40 s 38
240 KB 4.88 s 5.53 s 76
480 KB 5.03 s 5.79 s 151
960 KB 5.08 s 6.06 s 301

These times include CLI startup. Semantic runs used a local deterministic HTTP embedding endpoint through the real provider, chunking, indexing, and SQLite publication path. They are not live external-provider tests. Embedding requests increased with input size; repeated identical fragments naturally share persisted chunk identities.

Both modes also passed valid trigger/importance/project controls, nontrailing-annotation controls, the original witness, and a 160 KB incomplete whitespace tail. Stored metadata and embedding rows were inspected.

Regression and compatibility

  • New indexing regression fails on baseline in both modes: 3.80/3.88 seconds against a 3-second bound.
  • Candidate: 16 shared-owner grammar tests and all 72 index tests pass; the new cases take about 0.11 seconds each.
  • 50,000 bounded generated cases match baseline carrier stripping, project extraction, and all recall/project eligibility combinations.
  • Shared-owner incomplete-input medians across seven samples: 120 KB 0.90 ms; 240 KB 1.85 ms; 480 KB 3.13 ms; 960 KB 8.78 ms; 1.92 MB 18.76 ms.
  • Existing invalid-project isolation, curated/daily/user eligibility, search, and oversized-fragment inheritance tests pass.
  • Exact pinned formatter, type-aware lint for both changed lanes, runtime build, and independent code review pass.

The runtime build used the baseline source archive plus the candidate's committed files, with source digests checked after commit. Baseline dependency build artifacts were reused; the runtime was rebuilt from the repaired source. The runtime-only build's inherited version metadata is not used as candidate identity.

Diff accounting

  • Production: +123 / -84, net +39.
  • Tests: +117 / -0.
  • Much of the parser moved to its existing owner. Remaining growth implements a shared forward-only scanner and per-source-span reuse. A shorter suffix-only regex change leaves the other incomplete-input scans and repeated-fragment work unresolved.

The existing review's mixed-comment, whitespace, long-input, real-indexing, and compatibility requests are covered above.

@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.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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 real behavior proof before merge. Reviewed September 5, 2026, 6:13 AM ET / 10:13 UTC.

ClawSweeper review

What this changes

The PR changes how Memory Core recognizes trailing annotation comments to reduce backtracking and adds focused matcher tests.

Merge readiness

⛔ Blocked before merge - 7 items remain

Keep open: current main still needs this repair, but the replacement changes existing recall results and the supplied proof does not exercise real memory indexing.

Priority: P2
Reviewed head: 775185bd5551c4b0bbbbec78d8b60486431a1d63

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful measurements support the repair, but changed recall semantics and missing real indexing proof prevent merge readiness.
Proof confidence 🦐 gold shrimp (3/6) Needs stronger real behavior proof before merge: The captured standalone RegExp timings and helper-level Vitest output demonstrate the reported local improvement, but do not exercise Memory Core synchronization through source loading, metadata extraction, and index publication in a real setup. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: The captured standalone RegExp timings and helper-level Vitest output demonstrate the reported local improvement, but do not exercise Memory Core synchronization through source loading, metadata extraction, and index publication in a real setup. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 10 items Verified introduced change and merge result: The original head has the recorded parent 2595432. The test merge has the pinned main followed by that exact head as parents; its production diff contains the same matcher replacement and formatting adjustment, without unrelated base-branch reversions.
Current main still contains the reported matcher: Current main retains the repeated suffix expression whose comment body can cross closing delimiters. No replacement implementation appears at this owner boundary.
Production owner and execution boundary: Memory file synchronization calls indexFile; prepareIndexEntry preserves original source lines while stripping carriers from searchable text, then resolves recall metadata before writeChunks persists it. Both semantic and keyword-only indexing use this path. The changed parsing is OpenClaw-owned and supplies no affirmative Codex runtime or protocol dependency.
Findings 1 actionable finding [P2] Preserve recall metadata across intervening ordinary comments
Security None None.

How this fits together

Memory Core indexes workspace memory files and extracts annotation metadata used for search ranking and automatic recall. This matcher selects the comments from which trigger phrases and importance scores are read.

flowchart TD
  A[Workspace memory files] --> B[Chunking and path classification]
  B --> C{Curated root file}
  C -->|Yes| D[Trailing annotation parser]
  C -->|No| E[Chunks without trigger metadata]
  D --> F[Agent memory index]
  E --> F
  F --> G[Search and automatic recall]
Loading

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: The captured standalone RegExp timings and helper-level Vitest output demonstrate the reported local improvement, but do not exercise Memory Core synchronization through source loading, metadata extraction, and index publication in a real setup. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Preserve recall metadata across intervening ordinary comments (P2) - For body <!--trigger: alpha --><!-- note --><!--importance: 3 -->, current main selects the entire suffix and subsequently extracts both alpha and importance 3. The new delimiter guard makes matching restart at the importance comment, so reindexing silently removes the trigger. Preserve the existing suffix results for this case and cover the resulting metadata through the indexing boundary; the reported random differential run does not establish equivalence.
  • Resolve merge risk (P1) - Reindexing mixed ordinary-comment and annotation lines can silently change previously extracted recall metadata.
  • Resolve merge risk (P1) - The mitigation leaves leading and trailing whitespace inside the repeated group, allowing ambiguous separator ownership; long-line quadratic cost is also acknowledged in the body. These are remaining limitations, not newly introduced regressions.
  • Resolve merge risk (P1) - The substantive production growth creates an exported testing seam despite an existing indexing fixture that can exercise the owning boundary.
  • Complete next step (P2) - Repair the suffix-selection regression and complete the bounded matcher handling before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.

Findings

  • [P2] Preserve recall metadata across intervening ordinary comments — extensions/memory-core/src/memory/manager-embedding-ops.ts:120-121
Agent review details

Security

None.

PR surface

Source +11, Tests +30. Total +41 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 24 13 +11
Tests 1 30 0 +30
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 54 13 +41

Review metrics

Metric Value Why it matters
Production versus test growth Production +10 substantive lines (+11 including formatting); tests +30 Production growth primarily extracts and exports the matcher for testing; the existing indexing fixture offers a boundary-level alternative.

Stored data model

Persistent data-model change detected: unknown-data-model-change: extensions/memory-core/src/memory/manager-embedding-ops.ts, vector/embedding metadata: extensions/memory-core/src/memory/manager-embedding-ops.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #138994
Summary: This PR is the explicit candidate repair for the open annotation-backtracking issue.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Preserve existing recall results (recommended)
    Repair suffix recognition without dropping metadata across ordinary comments and verify the resulting indexed rows.

Technical review

Best possible solution:

Fold suffix recognition into the existing metadata pass for a bounded, preferably net-neutral repair that preserves recall results and uses indexing-level regression coverage.

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

Yes, from source: the reported line reaches the original matcher during curated-file indexing, and the contributor supplies failing helper measurements. No real indexing reproduction was executed in this read-only review.

Is this the best way to solve the issue?

No, not yet: bounding individual comments addresses one backtracking cause, but changes suffix selection and leaves ambiguous whitespace ownership; a single bounded metadata pass is more complete.

Full review comments:

  • [P2] Preserve recall metadata across intervening ordinary comments — extensions/memory-core/src/memory/manager-embedding-ops.ts:120-121
    For body <!--trigger: alpha --><!-- note --><!--importance: 3 -->, current main selects the entire suffix and subsequently extracts both alpha and importance 3. The new delimiter guard makes matching restart at the importance comment, so reindexing silently removes the trigger. Preserve the existing suffix results for this case and cover the resulting metadata through the indexing boundary; the reported random differential run does not establish equivalence.
    Confidence: 0.9

Overall correctness: patch is incorrect
Overall confidence: 0.88

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against a61fcf82f604.

Labels

Label changes:

  • add P2: This is a concrete memory-indexing performance repair with input-dependent impact and a localized parsing regression.
  • add merge-risk: 🚨 compatibility: The replacement can stop recognizing trigger metadata that current main extracts from existing mixed-comment lines.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The captured standalone RegExp timings and helper-level Vitest output demonstrate the reported local improvement, but do not exercise Memory Core synchronization through source loading, metadata extraction, and index publication in a real setup. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P2: This is a concrete memory-indexing performance repair with input-dependent impact and a localized parsing regression.
  • merge-risk: 🚨 compatibility: The replacement can stop recognizing trigger metadata that current main extracts from existing mixed-comment lines.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The captured standalone RegExp timings and helper-level Vitest output demonstrate the reported local improvement, but do not exercise Memory Core synchronization through source loading, metadata extraction, and index publication in a real setup. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Verified introduced change and merge result: The original head has the recorded parent 2595432. The test merge has the pinned main followed by that exact head as parents; its production diff contains the same matcher replacement and formatting adjustment, without unrelated base-branch reversions. (extensions/memory-core/src/memory/manager-embedding-ops.ts:121, 775185bd5551)
  • Current main still contains the reported matcher: Current main retains the repeated suffix expression whose comment body can cross closing delimiters. No replacement implementation appears at this owner boundary. (extensions/memory-core/src/memory/manager-embedding-ops.ts:134, a61fcf82f604)
  • Production owner and execution boundary: Memory file synchronization calls indexFile; prepareIndexEntry preserves original source lines while stripping carriers from searchable text, then resolves recall metadata before writeChunks persists it. Both semantic and keyword-only indexing use this path. The changed parsing is OpenClaw-owned and supplies no affirmative Codex runtime or protocol dependency. (extensions/memory-core/src/memory/manager-embedding-ops.ts:1031, 775185bd5551)
  • Source-derived suffix difference: For body <!--trigger: alpha --><!-- note --><!--importance: 3 -->, the original expression selects the entire comment suffix and the downstream parser extracts alpha and importance 3. The replacement cannot cross the first closing delimiter and selects only the importance comment, dropping alpha. This counterexample follows from source inspection; it was not executed. (extensions/memory-core/src/memory/manager-embedding-ops.ts:121, 775185bd5551)
  • Existing indexing coverage and sibling parsing: The existing index suite exercises manager.sync and checks persisted trigger, importance, project, and provenance metadata. Shared carrier stripping and project parsing live in packages/memory-host-sdk/src/host/curated-annotations.ts; neither substitutes for suffix selection. The four new tests call only the exported matcher and omit mixed ordinary comments and whitespace-separated adversarial runs. (extensions/memory-core/src/memory/index.test.ts:119, 775185bd5551)
  • Documented annotation behavior: The documentation describes trailing trigger and importance comments on curated entry lines and explains that missing metadata removes trigger eligibility or leaves ranking neutral. Public docs: docs/concepts/memory-architecture.md. (docs/concepts/memory-architecture.md:230, 775185bd5551)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Preserve mixed-comment recall results and extend the existing indexing tests instead of relying only on the exported matcher.
  • Remove remaining whitespace ambiguity and verify bounded long-line behavior at the metadata owner.
  • Add after-fix real indexing output or logs showing completion and intact recall metadata; terminal screenshots are welcome. Redact credentials, IP addresses, phone numbers, and private endpoints. Updating the PR body should trigger review automatically; otherwise ask a maintainer for @clawsweeper re-review.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@obviyus obviyus self-assigned this Sep 5, 2026
Use forward-only annotation scans and reuse metadata across fragments of the same source span. Preserve trailing recall grammar and invalid project isolation.

Co-authored-by: lzhan011 <[email protected]>
@obviyus
obviyus force-pushed the fix/memory-core-annotation-backtracking branch from 775185b to 4e2ad3d Compare September 5, 2026 11:24
@obviyus obviyus changed the title fix(memory-core): stop annotation suffix matching from backtracking fix(memory): keep curated annotation indexing linear Sep 5, 2026
@obviyus

obviyus commented Sep 5, 2026 •

Copy link
Copy Markdown
Collaborator

Landed as e55f25b15ea6 from verified head 4e2ad3d06424. Thanks @lzhan011!

  • The original witness no longer causes the 20.19-second indexing stall. Keyword-only and semantic indexing pass the valid, incomplete, and long-input controls.
  • The shared annotation owner now scans forward and reuses metadata across source-span fragments. Existing recall grammar and invalid-project isolation remain intact.
  • Exact-head CI passed; 114 focused tests, pinned formatting, both type-aware lint lanes, and the runtime build passed.
  • Fresh independent code review and exact-head landing review passed with zero findings. All earlier review requests are addressed; no schema or migration change was needed.
  • memory-core: 403-byte curated annotation line takes 40s (exponential backtracking in the annotation suffix matcher) #138994 is closed by this merge.

Verification commands:

node scripts/run-vitest.mjs packages/memory-host-sdk/src/host/curated-annotations.test.ts extensions/memory-core/src/memory/index.test.ts
node scripts/run-vitest.mjs packages/memory-host-sdk/src/host/internal.test.ts
node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json packages/memory-host-sdk/src/host/curated-annotations.ts packages/memory-host-sdk/src/host/curated-annotations.test.ts src/plugin-sdk/memory-core-host-engine-curated.ts
node scripts/run-oxlint.mjs --tsconfig extensions/tsconfig.json extensions/memory-core/src/memory/index.test.ts extensions/memory-core/src/memory/manager-embedding-ops.ts
node --import ./scripts/tsx.mjs scripts/build-all.mts qaRuntime
node openclaw.mjs memory index --force --verbose

Semantic proof used a local deterministic HTTP embedding endpoint, not an external live provider. Source digests bound the rebuilt runtime to the reviewed commit; inherited runtime version metadata was not used as identity.

@obviyus
obviyus merged commit e55f25b into openclaw:main Sep 5, 2026
215 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 6, 2026
Fixes openclaw#138994.

## What Problem This Solves

A short incomplete annotation in `MEMORY.md` can block memory indexing for seconds. The original repeated suffix expression explores many ways to divide comments before rejecting an incomplete final marker.

The initial repair removed exponential backtracking but retained quadratic work and changed recall metadata when ordinary comments appeared between annotations.

## Why This Change Was Made

Use the existing curated-annotation owner for one forward-only scanner shared by carrier stripping, project extraction, and recall metadata parsing. Reuse metadata for fragments with the same source span.

Keep the existing grammar:

- Trailing recall metadata can span intervening ordinary comments and text.
- Trigger phrases retain their order and deduplication; importance retains the largest valid value from 1 through 10.
- Project extraction stays independent, including project markers nested inside other annotation payloads.
- Incomplete and invalid project annotations remain scoped but unsatisfiable.
- Existing multiline-prefix and line-scoped carrier-body behavior stays unchanged.

This removes the manager-owned parser and the proposed test-only matcher export. No configuration, schema, migration, or stored representation changes.

## User Impact

Curated memory indexing stays responsive with incomplete or long annotation-shaped input in both keyword-only and semantic modes. Reindexing preserves existing recall metadata and project isolation.

Thanks @lzhan011 for the report, initial repair, and short reproduction.

## Evidence

Baseline: `8a1577ea1470073eef9823529bf9428a11f02da7`.
Verified candidate: `4e2ad3d06424b17f769df6b2724d7d7250e16b92`.

### Real indexing

Ran the built CLI against isolated workspaces and databases:

```sh
node openclaw.mjs memory index --force --verbose
```

The reported 403-byte payload was placed inside a 432-byte curated entry. On main, the command took 25.38 seconds and the event loop stalled for 20.19 seconds. The baseline control had a 1.62-second startup delay.

On the candidate, the same keyword-only witness took 5.01 seconds including startup, with maximum event-loop delay 1.54 seconds. A 300 KB version took 4.99 seconds. Valid mixed-comment metadata remained intact.

Separate runs used deliberately unfinished project openers:

| Input | Keyword-only command | Semantic command | Embedding requests |
|---|---:|---:|---:|
| 120 KB | 4.78 s | 5.40 s | 38 |
| 240 KB | 4.88 s | 5.53 s | 76 |
| 480 KB | 5.03 s | 5.79 s | 151 |
| 960 KB | 5.08 s | 6.06 s | 301 |

These times include CLI startup. Semantic runs used a local deterministic HTTP embedding endpoint through the real provider, chunking, indexing, and SQLite publication path. They are not live external-provider tests. Embedding requests increased with input size; repeated identical fragments naturally share persisted chunk identities.

Both modes also passed valid trigger/importance/project controls, nontrailing-annotation controls, the original witness, and a 160 KB incomplete whitespace tail. Stored metadata and embedding rows were inspected.

### Regression and compatibility

- New indexing regression fails on baseline in both modes: 3.80/3.88 seconds against a 3-second bound.
- Candidate: 16 shared-owner grammar tests and all 72 index tests pass; the new cases take about 0.11 seconds each.
- 50,000 bounded generated cases match baseline carrier stripping, project extraction, and all recall/project eligibility combinations.
- Shared-owner incomplete-input medians across seven samples: 120 KB 0.90 ms; 240 KB 1.85 ms; 480 KB 3.13 ms; 960 KB 8.78 ms; 1.92 MB 18.76 ms.
- Existing invalid-project isolation, curated/daily/user eligibility, search, and oversized-fragment inheritance tests pass.
- Exact pinned formatter, type-aware lint for both changed lanes, runtime build, and independent code review pass.

The runtime build used the baseline source archive plus the candidate's committed files, with source digests checked after commit. Baseline dependency build artifacts were reused; the runtime was rebuilt from the repaired source. The runtime-only build's inherited version metadata is not used as candidate identity.

### Diff accounting

- Production: +123 / -84, net +39.
- Tests: +117 / -0.
- Much of the parser moved to its existing owner. Remaining growth implements a shared forward-only scanner and per-source-span reuse. A shorter suffix-only regex change leaves the other incomplete-input scans and repeated-fragment work unresolved.

The existing review's mixed-comment, whitespace, long-input, real-indexing, and compatibility requests are covered above.

Co-authored-by: Ayaan Zaidi <[email protected]>
steipete added a commit that referenced this pull request Sep 16, 2026
Keep incomplete and mixed annotation indexing coverage while timing the historical backtracking witness at the parser owner. Related: #150236, #138995.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 17, 2026
…150260)

Keep incomplete and mixed annotation indexing coverage while timing the historical backtracking witness at the parser owner. Related: openclaw#150236, openclaw#138995.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: memory-core Extension: memory-core merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

memory-core: 403-byte curated annotation line takes 40s (exponential backtracking in the annotation suffix matcher)

2 participants