Skip to content

fix(memory-lancedb): reject envelope metadata sludge (incl. marker-free shapes) - #88806

Merged
steipete merged 20 commits into
openclaw:mainfrom
amittell:fix/memory-lancedb-envelope-sludge
Jun 1, 2026
Merged

steipete merged 20 commits into
openclaw:mainfrom
amittell:fix/memory-lancedb-envelope-sludge

Conversation

@amittell

@amittell amittell commented May 31, 2026 •

Copy link
Copy Markdown
Contributor

Supersedes #73787. Closes the timestamp-free envelope coverage gap flagged in the clawsweeper review of #73787 (#issuecomment-4340178019).

Behavior addressed

formatInboundEnvelope in src/auto-reply/envelope.ts produces a leading bracket header whose markers (+elapsed, host, ip, date) are all conditional. When previousTimestamp is undefined and host/ip/date are absent, the emitted shape is [<channel> <from>] <body> with no markers. The prior looksLikeEnvelopeSludge regex keyed on elapsed/date markers and missed this case, allowing channel/sender metadata to persist in long-term memory captures.

Change

The new commit (1a5dca094d) adds an INBOUND_ENVELOPE_KNOWN_CHANNEL_PREFIX_RE regex that matches the marker-free [<channel-id> <from-label>] shape using a canonical channel-id list. Concretely:

  • New SDK subpath openclaw/plugin-sdk/chat-channel-ids (src/plugin-sdk/chat-channel-ids.ts) re-exports CHAT_CHANNEL_ORDER from src/channels/ids.ts as BUNDLED_CHAT_CHANNEL_IDS.
  • extensions/memory-lancedb/index.ts imports BUNDLED_CHAT_CHANNEL_IDS and treats a leading [<known-channel-id> <from-label>] as envelope sludge regardless of marker presence. The existing marker-based path is preserved so unknown-channel envelopes still get filtered when an unambiguous marker is present.

The channel-id list and formatInboundEnvelope now read the same canonical source, so the detector cannot drift from the formatter.

Real behavior proof

Behavior addressed: Timestamp-free formatInboundEnvelope outputs of shape [<channel-id> <from-label>] <body> were not being stripped before auto-capture, leaking channel and sender metadata into long-term memory.

Real environment tested: Live OpenClaw gateway on rh-bot.lan, pid 65734, build SHA 23804e6 (upgrade-v2026.5.28 with this PR cherry-picked). The fix is deployed and active. Verification driver imports the deployed extensions/memory-lancedb/index.js bundle that the running gateway has loaded for its memory plugin, exposing BUNDLED_CHAT_CHANNEL_IDS (22 known channels: feishu, googlechat, nostr, msteams, mattermost, nextcloud-talk, matrix, line, telegram, discord, slack, signal, imessage, whatsapp, irc, qqbot, twitch, synology-chat, tlon, zalo, zalouser, xiaomi).

Exact steps or command run after this patch:

ssh [email protected] 'node -e "import(\"/Users/alexm/.openclaw/openclaw/dist/extensions/memory-lancedb/index.js\").then(m => { /* probe det = m.looksLikeEnvelopeSludge against 7 cases */ })"'

Evidence after fix:

host: rh-bot.lan
gateway-pid: 65734
build-SHA: 23804e610c
node-version: 25.8.2
---
PASS marker-free [telegram alice] envelope (the gap) -> true (expected true)
PASS case-insensitive [TELEGRAM alice] -> true (expected true)
PASS marker-present existing path -> true (expected true)
PASS multi-line marker-free envelope -> true (expected true)
PASS user prose [note] not an envelope -> false (expected false)
PASS markdown link [text](url) -> false (expected false)
PASS bare [channel] no from-label -> false (expected false)
---
result: 7 pass / 0 fail
sanitize [telegram alice] hello world -> "hello world"

Observed result after fix: All seven envelope shapes match expectations against the deployed runtime. The gap case (marker-free [telegram alice] envelope) is now filtered. Existing marker-present envelopes still filter. The three false-positive guards (user [note] prose, markdown link syntax, bare [channel] without from-label) correctly do NOT filter. Sanitize round-trip strips the envelope prefix and returns clean body hello world.

What was not tested: Full memory_capture + memory_recall round trip through the running gateway with a forged channel inbound. The detector is the canonical filter point; the sanitize round-trip proof above shows the body extraction path also handles the shape.

Copilot AI review requested due to automatic review settings May 31, 2026 22:24
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation extensions: memory-lancedb Extension: memory-lancedb scripts Repository scripts size: L triage: mock-only-proof Candidate: PR proof only shows tests, mocks, snapshots, lint, typecheck, or CI. labels May 31, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds envelope/transport metadata sanitization to the memory-lancedb extension to prevent contaminated text (envelope brackets, inbound-meta sentinels, media annotations, etc.) from being captured or recalled as long-term memories. Also exposes the bundled chat-channel id list as a new plugin-sdk entrypoint so the extension can detect marker-free [<channel> <from>] envelope prefixes without hardcoding channel ids.

Changes:

  • New plugin-sdk entrypoint chat-channel-ids re-exporting CHAT_CHANNEL_ORDER as BUNDLED_CHAT_CHANNEL_IDS (+ wired into package.json exports and plugin-sdk-entrypoints.json).
  • New looksLikeEnvelopeSludge / sanitizeForMemoryCapture helpers in memory-lancedb, plus integration into shouldCapture, the auto-recall path (overfetch + filter), the auto-capture hook, and formatRelevantMemoriesContext.
  • Updated escapeMemoryForPrompt to strip [media attached: ...] annotations and conditionally collapse spaces/tabs while preserving newlines.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/plugin-sdk/chat-channel-ids.ts New SDK module re-exporting bundled chat-channel ids/types.
scripts/lib/plugin-sdk-entrypoints.json Registers the new chat-channel-ids entrypoint.
package.json Adds export mapping for ./plugin-sdk/chat-channel-ids.
extensions/memory-lancedb/index.ts Adds envelope-sludge detection/sanitization and integrates into capture, recall, and prompt formatting.
extensions/memory-lancedb/index.test.ts Adds extensive tests for new sanitization, detection, escaping, and recall-path overfetch behavior.
docs/.generated/plugin-sdk-api-baseline.sha256 Updated SDK API baseline checksums to reflect new entrypoint.

Comment thread extensions/memory-lancedb/index.ts Resolved
Comment thread extensions/memory-lancedb/index.ts Resolved
Comment thread extensions/memory-lancedb/index.ts Resolved
Comment thread extensions/memory-lancedb/index.ts Resolved
Comment thread extensions/memory-lancedb/index.test.ts Resolved
@clawsweeper

clawsweeper Bot commented May 31, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 1, 2026, 12:45 AM ET / 04:45 UTC.

Summary
The PR adds memory-lancedb envelope-sludge detection and sanitization, filters auto-capture and auto-recall prompt context, adds openclaw/plugin-sdk/chat-channel-ids, and refactors cron tool schema construction/tests.

PR surface: Source +672, Tests +758, Docs +1, Config +4, Other +1. Total +1436 across 9 files.

Reproducibility: yes. Source inspection shows formatInboundEnvelope can emit marker-free [<channel> <from>] <body> on current main while memory-lancedb has no envelope-sludge guard before capture; I did not run a full gateway repro in this read-only review.

Review metrics: 2 noteworthy metrics.

  • Public Plugin SDK subpaths: 1 added. openclaw/plugin-sdk/chat-channel-ids becomes a package export that external plugins may rely on after release.
  • Auto-recall search window: overfetch 3 -> 10, prompt cap remains 3. The PR changes LanceDB recall query breadth to compensate for post-search sludge filtering while preserving the injected-memory cap.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🐚 platinum hermit
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Confirm maintainers are comfortable shipping the new public SDK subpath and the documented sanitizer tradeoff.

Risk before merge

  • [P1] The PR adds one public Plugin SDK subpath, so merging makes openclaw/plugin-sdk/chat-channel-ids a compatibility surface for bundled and third-party plugins.
  • [P1] The memory sanitizer changes which existing and future LanceDB memories are captured or injected into prompts; this is desirable for envelope sludge, but maintainers should accept the session-state tradeoff for ambiguous bracketed text and old contaminated rows.

Maintainer options:

  1. Accept the SDK and memory-filter tradeoff (recommended)
    Merge with the public chat-channel-ids subpath documented and the conservative sanitizer behavior treated as the intended contract.
  2. Narrow before merge
    If maintainers do not want this SDK surface, replace it with a smaller approved seam and keep the memory-lancedb extension inside the plugin boundary.
  3. Pause if full gateway proof is required
    Hold the PR only if maintainers require a complete capture-plus-recall gateway round trip rather than the supplied deployed detector/sanitizer proof.

Next step before merge

  • No automated repair is indicated; the remaining action is maintainer merge review for the SDK public-contract and memory-state compatibility risk.

Security
Cleared: No concrete security or supply-chain regression was found; the diff adds TypeScript/plugin SDK code and docs without new dependencies, workflow permissions, secret handling, or artifact execution.

Review details

Best possible solution:

Land this after maintainer acceptance of the SDK contract and memory-filter compatibility tradeoff, keeping the conservative sender-prefix gates and regression coverage.

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

Yes. Source inspection shows formatInboundEnvelope can emit marker-free [<channel> <from>] <body> on current main while memory-lancedb has no envelope-sludge guard before capture; I did not run a full gateway repro in this read-only review.

Is this the best way to solve the issue?

Yes, this is an acceptable bounded fix for the PR: keep the extension inside the plugin boundary by adding a narrow SDK subpath, sanitize before capture, and filter before auto-recall injection. The longer-term ideal would be passing clean user body separately from envelope text, but that is broader than this repair.

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 296cd8c91292.

Label changes

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes after-fix terminal/live-output proof from a deployed OpenClaw gateway bundle showing the changed detector and sanitizer passing the marker-free envelope case and false-positive guards.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body includes after-fix terminal/live-output proof from a deployed OpenClaw gateway bundle showing the changed detector and sanitizer passing the marker-free envelope case and false-positive guards.
  • remove rating: 🌊 off-meta tidepool: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P1: The PR targets a broken memory-capture/recall workflow where transport metadata can persist into long-term memory and mislead later agent turns.
  • merge-risk: 🚨 compatibility: The diff adds a public Plugin SDK subpath and package export that become a stable plugin compatibility surface after release.
  • merge-risk: 🚨 session-state: The diff changes what memory-lancedb captures and injects into prompt context, affecting persisted memory and recalled session context behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body includes after-fix terminal/live-output proof from a deployed OpenClaw gateway bundle showing the changed detector and sanitizer passing the marker-free envelope case and false-positive guards.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes after-fix terminal/live-output proof from a deployed OpenClaw gateway bundle showing the changed detector and sanitizer passing the marker-free envelope case and false-positive guards.
Evidence reviewed

PR surface:

Source +672, Tests +758, Docs +1, Config +4, Other +1. Total +1436 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 3 799 127 +672
Tests 3 764 6 +758
Docs 1 1 0 +1
Config 1 4 0 +4
Generated 0 0 0 0
Other 1 1 0 +1
Total 9 1569 133 +1436

What I checked:

  • Root and scoped repo policy read: Root AGENTS.md plus scoped extensions/, src/plugin-sdk/, src/agents/, src/agents/tools/, src/channels/, docs/, and scripts/ guidance were read and applied; the plugin/SDK boundary guidance is relevant because this PR promotes channel metadata through a public SDK subpath instead of importing core internals from the extension. (AGENTS.md:1, 296cd8c91292)
  • Current main can emit marker-free envelopes: formatAgentEnvelope only includes elapsed, host, IP, and timestamp when inputs/options provide them, so formatInboundEnvelope can emit [<channel> <from>] <body> without marker fields. (src/auto-reply/envelope.ts:174, 296cd8c91292)
  • Current main lacks envelope-sludge memory filtering: Current main's memory-lancedb capture gate has prompt-injection and generic system-content checks but no looksLikeEnvelopeSludge/sanitization path before memory-trigger evaluation. (extensions/memory-lancedb/index.ts:633, 296cd8c91292)
  • PR head adds canonical channel-prefix detection: The PR builds INBOUND_ENVELOPE_KNOWN_CHANNEL_PREFIX_RE from BUNDLED_CHAT_CHANNEL_ENVELOPE_PREFIXES and uses it alongside the marker-aware envelope regex. (extensions/memory-lancedb/index.ts:806, ba5e3bf8bcd6)
  • PR head filters capture and auto-recall paths: sanitizeForMemoryCapture strips envelope/context metadata before auto-capture, and before_prompt_build overfetches, filters contaminated recall results, then caps clean injected memories. (extensions/memory-lancedb/index.ts:1077, ba5e3bf8bcd6)
  • Regression coverage exists for the central shape: The PR adds tests for marker-free [channel from] detection, sanitization, false-positive guards, sender-label stripping gates, and sanitize-then-capture behavior. (extensions/memory-lancedb/index.test.ts:3043, ba5e3bf8bcd6)

Likely related people:

  • steipete: Peter Steinberger appears in current-main blame for the relevant memory/envelope code in this shallow checkout, requested changes on an earlier head, approved a maintainer-fixup head, and authored later PR-head fixups in memory-lancedb, plugin-sdk, and cron schema paths. (role: recent area contributor and reviewer; confidence: high; commits: 4932391e8a78, 3d0e4429eae4, 5b9df9bff862; files: extensions/memory-lancedb/index.ts, extensions/memory-lancedb/index.test.ts, src/plugin-sdk/chat-channel-ids.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels May 31, 2026
@openclaw-barnacle openclaw-barnacle Bot added triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: mock-only-proof Candidate: PR proof only shows tests, mocks, snapshots, lint, typecheck, or CI. triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 31, 2026
@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. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels May 31, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 1, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 1, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 1, 2026
@amittell

amittell commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

Addressed every actionable ClawSweeper P1 and Copilot inline finding in bb76178ec1.

P1.1 (ClawSweeper) -- DM body corruption
Gated the sender-prefix strip in sanitizeForMemoryCapture. Both envelope regexes (INBOUND_ENVELOPE_PREFIX_RE, INBOUND_ENVELOPE_KNOWN_CHANNEL_PREFIX_RE) now capture the inside-bracket text; the new stripEnvelopeBodySenderPrefix helper only removes a leading <X>: when X equals the literal (self) sentinel (the direct fromMe contract from src/auto-reply/envelope.ts:215) or matches a whitespace-separated token of the captured envelope header. Legitimate TODO: fix this / FIXME: ... DM bodies are preserved verbatim. New tests at extensions/memory-lancedb/index.test.ts:3103-3132 cover DM TODO:, DM FIXME:, group body whose Name: does not match envelope tokens, and DM + (self): strip.

P1.2 (ClawSweeper) -- Public SDK subpath
Documented the new openclaw/plugin-sdk/chat-channel-ids subpath in docs/plugins/sdk-subpaths.md:79 (Channel subpaths accordion). The extensions boundary in extensions/CLAUDE.md:25-31 forbids importing from src/** or src/plugin-sdk-internal/**, so a public Plugin SDK subpath is the correct seam; documenting it makes it a tracked contract. pnpm plugin-sdk:api:check is clean against the existing baseline (the subpath was already in scripts/lib/plugin-sdk-entrypoints.json:183 and package.json:808).

C1 (Copilot) -- Empty channel list guard
ENVELOPE_KNOWN_CHANNEL_PATTERN joins on |; an empty BUNDLED_CHAT_CHANNEL_IDS would make the alternation (?:) and match every [...] prefix as an envelope. INBOUND_ENVELOPE_KNOWN_CHANNEL_PREFIX_RE is now RegExp | null, constructed only when the pattern is non-empty; both looksLikeEnvelopeSludge and sanitizeForMemoryCapture short-circuit when the regex is null. extensions/memory-lancedb/index.ts:763-776.

C2 (Copilot) -- Sentinel loop ordering
The old loop iterated each INBOUND_META_SENTINELS entry and acted on its first match independently. That left a later-declared (but earlier-positioned) sentinel intact in the kept-prefix range, preserving metadata that belonged to an outer sentinel's plain-text body. The rewrite at extensions/memory-lancedb/index.ts:912-952 picks the EARLIEST line-anchored sentinel across the WHOLE list each pass, then either truncates at it (if user content precedes) and exits, or strips the header line and loops to handle back-to-back sentinels at the very start. The bounded retry cap (INBOUND_META_SENTINELS.length + 1) rules out pathological inputs. New regression test at extensions/memory-lancedb/index.test.ts:3306-3324 covers the two-sentinel earliest-match case.

C3 (Copilot) -- Named constants
Extracted DEFAULT_AUTO_RECALL_OVERFETCH_LIMIT = 10 and DEFAULT_AUTO_RECALL_RESULT_CAP = 3 at extensions/memory-lancedb/index.ts:203-211 with a comment that documents the over-fetch vs cap relationship. Call sites at extensions/memory-lancedb/index.ts:1575 and :1585 reference the named constants instead of bare literals.

C4 (Copilot) -- already fixed in e3091d21d2; no further action.

Verification

  • node scripts/run-vitest.mjs run extensions/memory-lancedb -> 113 pass (10 new tests added)
  • node scripts/run-oxlint-shards.mjs --only=extensions --threads=4 -> exit 0
  • pnpm build -> green
  • pnpm plugin-sdk:api:check -> baseline unchanged
  • ./node_modules/.bin/oxfmt --check -> all three files formatted
  • Trailer scan: git log --format=%B upstream/main..HEAD | grep -ciE 'claude|co-authored-by:.*claude' -> 0

@clawsweeper clawsweeper Bot added 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. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jun 1, 2026
amittell and others added 15 commits June 1, 2026 05:28
…sentinel ordering

Address ClawSweeper P1 plus Copilot P2 findings on PR openclaw#88806.

- P1.1: gate sender-prefix strip in sanitizeForMemoryCapture so we only
  remove a leading `<X>: ` from the envelope body when X equals the
  literal `(self)` sentinel (direct fromMe contract) or matches a
  whitespace-separated token of the captured envelope header. Prevents
  legitimate DM bodies like `TODO: fix this` from being truncated to
  `fix this`. Both INBOUND_ENVELOPE_PREFIX_RE patterns now capture the
  inside-bracket text so the gate has the contract data it needs.
- P1.2: document the new `openclaw/plugin-sdk/chat-channel-ids` subpath
  in docs/plugins/sdk-subpaths.md (Channel subpaths accordion). The
  extensions boundary forbids extensions from importing core internals,
  so a public Plugin SDK subpath is the right seam; documenting it makes
  it a tracked contract.
- C1: guard the marker-free known-channel detector against an empty
  BUNDLED_CHAT_CHANNEL_IDS list so the alternation cannot degenerate
  into `(?:)` and flag every `[...]` prefix as an envelope.
- C2: pick the EARLIEST line-anchored sentinel across the whole
  INBOUND_META_SENTINELS list each pass instead of acting on each
  sentinel's first match independently. Removes the order-dependent
  preservation of metadata that belonged to an outer sentinel's
  plain-text body. Bounded retry loop preserves prior behavior of
  stripping back-to-back sentinels at the very start.
- C3: extract DEFAULT_AUTO_RECALL_OVERFETCH_LIMIT and
  DEFAULT_AUTO_RECALL_RESULT_CAP from the inline literals so the
  over-fetch vs cap relationship is documented at the constant
  declaration.

Tests:
- node scripts/run-vitest.mjs run extensions/memory-lancedb (113 pass)
- node scripts/run-oxlint-shards.mjs --only=extensions --threads=4 (clean)
- pnpm build (green)
- pnpm plugin-sdk:api:check (clean)
@steipete
steipete force-pushed the fix/memory-lancedb-envelope-sludge branch from bcb42b3 to ba5e3bf Compare June 1, 2026 04:37
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. labels Jun 1, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 1, 2026
@steipete

steipete commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Land-ready after maintainer fixups.

Summary:

  • Sanitizes memory-lancedb auto-capture/recall against inbound metadata, pending history wrappers, current-message reply context, message-tool delivery hints, media annotations, and marker-free channel envelopes.
  • Adds the plugin SDK chat-channel ID/prefix subpath so sanitizer channel-envelope matching follows the bundled channel catalog.
  • Refactors cron tool schemas to fresh factory instances while preserving runtime nullable clears and provider-facing OpenAPI projection.

Verification:

  • git diff --check origin/main...HEAD
  • ./node_modules/.bin/oxfmt --check src/plugin-sdk/chat-channel-ids.ts src/plugin-sdk/chat-channel-ids.test.ts extensions/memory-lancedb/index.ts extensions/memory-lancedb/index.test.ts src/agents/tools/cron-tool.ts src/agents/tools/cron-tool.schema.test.ts
  • pnpm plugin-sdk:api:check
  • node scripts/run-vitest.mjs run src/plugin-sdk/chat-channel-ids.test.ts extensions/memory-lancedb src/agents/tools/cron-tool.schema.test.ts src/agents/tools/cron-tool.test.ts --reporter=dot
  • pnpm lint:extensions --threads=8
  • .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main
  • GitHub checks on 62d1da1257d3df808db113572f3778a92da54434: 139 pass, 0 pending, 0 fail, 22 skipped.

@steipete
steipete merged commit 945faf8 into openclaw:main Jun 1, 2026
161 of 162 checks passed
@steipete

steipete commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Follow-up landed on main as 1d4c1ba.

I could not push the fixups back to the contributor branch because the fork rejected maintainer pushes (maintainerCanModify=false / permission denied), so I applied the reviewed fixup directly on main with contributor credit preserved.

Proof run after the fixup:

  • git diff --check
  • ./node_modules/.bin/oxfmt ... --check
  • pnpm plugin-sdk:api:check
  • node scripts/run-vitest.mjs run extensions/memory-lancedb src/auto-reply/envelope.test.ts src/auto-reply/reply/mentions.test.ts src/channels/ids.test.ts src/plugins/official-external-plugin-catalog.test.ts src/plugins/contracts/package-manifest.contract.test.ts
  • .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main
  • pnpm build

Thanks @amittell. For future PRs, enabling “Allow edits by maintainers” lets us push small fixups directly to the PR branch before merge.

@steipete

steipete commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Follow-up CI fix landed on main as 07a425a.

This preserves clean colon-delimited slash commands like /reset: soft and /compact: focus on decisions while still stripping envelope sender labels, including slash-like display labels after an envelope bracket.

Additional proof:

  • node scripts/run-vitest.mjs run src/auto-reply/reply/commands-compact.test.ts src/auto-reply/reply/session.test.ts src/auto-reply/reply/mentions.test.ts
  • .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main
  • GitHub CI on 07a425a: checks-node-auto-reply-reply-commands and checks-node-auto-reply-reply-session are green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation extensions: memory-lancedb Extension: memory-lancedb merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P1 High-priority user-facing bug, regression, or broken workflow. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XL 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.

3 participants