Skip to content

memory-lancedb: fix TypeBox Optional+enum schema typecheck on main#13897

Merged
joshp123 merged 1 commit intomainfrom
fix/memory-lancedb-typebox-optional-schema
Feb 11, 2026
Merged

memory-lancedb: fix TypeBox Optional+enum schema typecheck on main#13897
joshp123 merged 1 commit intomainfrom
fix/memory-lancedb-typebox-optional-schema

Conversation

@joshp123
Copy link
Contributor

@joshp123 joshp123 commented Feb 11, 2026

Human written summary:

The intent of this change is, as written by a human:

but where did it come from? lets just bundle in our PR. can you bisect or whatever to find where it originateD?

The rest of this PR was written by GPT-5-default, running in the pi harness. Full environment + prompt history appear at the end.

Changes

  • Replace Type.Optional(stringEnum(MEMORY_CATEGORIES)) in extensions/memory-lancedb/index.ts with a local Type.Unsafe<MemoryCategory> enum schema.
  • Remove the stringEnum import from openclaw/plugin-sdk in that extension to avoid cross-module TypeBox schema type incompatibility.

Tests

  • pnpm check

Risks

  • Low: schema construction remains equivalent (type: "string", enum over MEMORY_CATEGORIES) and change is scoped to one extension tool parameter.

Follow-ups

  • None.

Prompt History

Environment

Harness: pi
Model: GPT-5
Thinking level: default
Terminal: zsh (pi harness)
System: Darwin 25.1.0 arm64

Prompts

ISO-8601 Prompt
2026-02-10T21:16:00-08:00 - pnpm check ❌ (unrelated pre-existing TS error in extensions/memory-lancedb/index.ts:320) -> whats goin on on main?
2026-02-10T21:18:00-08:00 but where did it come from? lets just bundle in our PR. can you bisect or whatever to find where it originateD?

Greptile Overview

Greptile Summary

Fixes TypeBox schema type incompatibility by inlining enum schema construction in the memory-lancedb extension. The change removes the stringEnum import from openclaw/plugin-sdk and replaces it with a local Type.Unsafe<MemoryCategory> construction that uses the extension's own TypeBox instance.

Root cause: Extensions with their own @sinclair/typebox dependency (even at the same version) create separate TypeBox instances, causing TypeScript type incompatibility when wrapping schemas from different instances.

Changes:

  • Removed stringEnum helper import from openclaw/plugin-sdk
  • Inlined equivalent schema: Type.Unsafe<MemoryCategory>({ type: "string", enum: [...MEMORY_CATEGORIES] })
  • Schema behavior remains identical (same JSON schema output)
  • Type safety preserved via generic parameter

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is a straightforward fix for a TypeBox schema type incompatibility. The inlined schema construction is functionally identical to the helper it replaces, maintaining the same JSON schema output while resolving cross-module TypeScript type issues. Tests pass (pnpm check ✅), the change is scoped to a single tool parameter, and there are no other extensions using stringEnum, eliminating any ripple effects
  • No files require special attention

@joshp123 joshp123 merged commit aade133 into main Feb 11, 2026
10 checks passed
@openclaw-barnacle openclaw-barnacle bot added the extensions: memory-lancedb Extension: memory-lancedb label Feb 11, 2026
@joshp123 joshp123 deleted the fix/memory-lancedb-typebox-optional-schema branch February 11, 2026 05:28
@openclaw-barnacle openclaw-barnacle bot added the maintainer Maintainer-authored PR label Feb 11, 2026
Patrick3131 added a commit to Patrick3131/openclaw that referenced this pull request Feb 11, 2026
* main: (936 commits)
  fix: use configured base URL for Ollama model discovery (openclaw#14131)
  docs: modernize gateway configuration page (Phase 1) (openclaw#14111)
  docs(skills): update mintlify skill to reference docs/ directory (openclaw#14125)
  chore: update AGENTS.md and add mintlify skill (openclaw#14123)
  chore(irc): sync plugin version to 2026.2.10
  fix(cli): drop logs --localTime alias noise
  fix(config): avoid redacting maxTokens-like fields (openclaw#14006)
  feat: Add --localTime option to logs command for local timezone display (openclaw#13818)
  fix: don't lowercase Slack channel IDs (openclaw#14055)
  fix(plugins): ignore install scripts during plugin/hook install
  fix(gateway): default-deny missing connect scopes
  fix(web-search): handle xAI Responses API format in Grok provider
  Feat/litellm provider (openclaw#12823)
  docs: start 2026.2.10 changelog section
  chore: bump version to 2026.2.10
  docs: remove outdated pricing information
  docs: add Terraform IaC approach to Hetzner guide
  fix(ui): coerce form values to schema types before config.set (openclaw#13468)
  chore: make merge PR comment mandatory + skill name fix
  🤖 memory-lancedb: avoid plugin-sdk enum helper in local TypeBox schema (openclaw#13897)
  ...
GoddessSerenity pushed a commit to GoddessSerenity/openclaw that referenced this pull request Feb 12, 2026
dbachelder pushed a commit to dbachelder/openclaw that referenced this pull request Feb 13, 2026
skyhawk14 pushed a commit to skyhawk14/openclaw that referenced this pull request Feb 13, 2026
cloud-neutral pushed a commit to cloud-neutral-toolkit/openclawbot.svc.plus that referenced this pull request Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: memory-lancedb Extension: memory-lancedb maintainer Maintainer-authored PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments