Skip to content

fix(database): report disabled memory search after a port - #202630

Merged
VACInc merged 1 commit into
openclaw:mainfrom
VACInc:port-disabled-memory
Nov 20, 2026
Merged

VACInc merged 1 commit into
openclaw:mainfrom
VACInc:port-disabled-memory

Conversation

@VACInc

@VACInc VACInc commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Summary

High Level TLDR

A successful database port reports disabled when an agent has memory search turned off. The terminal and JSON output omit the retry warning for that agent.

What Problem This Solves

With memory.search.enabled: false, the port completed with exit 0 but printed Memory index (main): failed. It advised running openclaw memory index --agent main, which exited 0 and printed Memory search disabled.

User Impact

Terminal output and --json distinguish disabled memory search from an index failure that needs attention.

Why This Change Was Made

The port uses the memory runtime’s acquisition result to distinguish disabled search from a real failure. Real failures still get retry guidance.

Root Cause

Memory Core returns a null manager without an error for disabled search. The port used only the manager field and treated all null managers as unavailable plugins. The regression reached a completed PostgreSQL port on the baseline and received failed plus retry guidance where it expected disabled. The port now reads the acquisition error and still reports real failures with the existing warning.

Real behavior proof

RAN on Linux, Node 26.13.1 and disposable PostgreSQL 17.12 over a private Unix socket. Seeded an agent SQLite store with Memory Core selected and memory.search.enabled: false. Built the runtime and ran these commands with isolated state.

Command Baseline Fixed
node openclaw.mjs database port --family agent --to postgres Exit 0, Memory index (main): failed. and a retry warning Exit 0, Memory index (main): disabled. and no rebuild warning
node openclaw.mjs memory index --agent main Exit 0, Memory search disabled. Exit 0, Memory search disabled.
node openclaw.mjs database port --family agent --to sqlite --json Exit 0, phase: complete, status: failed, and a warning Exit 0, phase: complete, status: disabled, and no warning

What was not tested

  • Paid model calls, live embedding providers, a running Gateway, and stable-release upgrades.
  • Port throughput was not measured. The change only reports the outcome of manager acquisition.

Evidence

The existing mixed-engine round-trip now checks both port directions with the real bundled memory runtime and search disabled. It asserts the full per-agent result, including the absence of retry guidance. It also checks that the seeded agent row survives and the unrelated Workboard database stays unchanged.

Autoreview covered the full diff from the base through the candidate at priorities P0 through P3. It found no actionable defects. The committed diff matches the reviewed snapshot.

Verification

  • The candidate applies cleanly to current main.

  • pnpm build:runtime passed on the baseline and fixed source.

  • git diff --check and focused formatting passed.

  • node scripts/test-database-conformance.mjs --engine postgres --connection "$DISPOSABLE_PG_DSN" -- src/infra/database-engine/port-command.mixed.integration.test.ts --maxWorkers=1. The agent round-trip failed on the baseline with failed plus retry guidance. All 8 tests passed with the fix (267 seconds wall time). The regression adds assertions to the existing round-trip and adds no port operations.

  • pnpm test src/commands/doctor-database-port-memory.test.ts --maxWorkers=1 passed (6 tests, 116 seconds wall time).

  • pnpm tsgo:core and focused node scripts/run-oxlint.mjs --tsconfig tsconfig.json passed.

  • Repeated the focused agent round-trip on current main with a disposable PostgreSQL 17 cluster and the CI extensions. Main failed with status: failed and retry guidance. Applying the candidate to the same main revision passed both port directions. An initial local setup lacked unaccent and stopped before the assertion.

@clawsweeper

clawsweeper Bot commented Nov 20, 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 docs Improvements or additions to documentation gateway Gateway runtime commands Command implementations size: XS labels Nov 20, 2026
@VACInc
VACInc marked this pull request as ready for review November 20, 2026 17:37
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 20, 2026
@clawsweeper

clawsweeper Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

The PR reports disabled memory search separately from post-port indexing failures in terminal and JSON output.

Example: Port agent main to PostgreSQL with memory.search.enabled set to false.

  • Before: The successful port reports failed and recommends running memory index, which reports that search is disabled.
  • After: The port reports disabled without a retry warning.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, correct fix supported by concrete shipped-CLI results and an existing production-path regression; no stored format, migration, or configuration behavior changes.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The PR's public before-and-after CLI output covers disabled Memory Core search after SQLite-to-PostgreSQL terminal output and PostgreSQL-to-SQLite JSON output on isolated state, showing disabled results without retry warnings.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Operators receive a false memory-index failure and ineffective retry guidance after a successful port when memory search is intentionally disabled.
Reason: The maintainer-authored direction restores accurate diagnostics using the memory owner's existing contract without adding configuration or changing indexing policy.

Merge readiness

✅ Ready for maintainer review

This maintainer-authored PR fixes a current-main diagnostic bug with a focused change; no actionable code defects were found.

Priority: P3
Reviewed head: 8d3222dbc6cca5920c1366756829780792c8f22c

Before merge

None.

Findings

None.

Agent review details

How this fits together

After an agent database port publishes its stores, the command acquires the selected memory plugin under fresh offline ownership and returns per-agent results to the terminal and JSON renderers.

flowchart TD
  A[Database port completes] --> B[Acquire offline memory owner]
  B --> C[Selected memory plugin]
  C --> D[Manager available]
  C --> E[No manager]
  D --> F[Rebuild result]
  E --> G[Disabled or failed result]
  F --> H[Terminal and JSON output]
  G --> H
Loading

Technical review

Best possible solution:

Use the existing memory acquisition result to report disabled search while preserving retry guidance for actual errors.

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

Current-main source deterministically misclassifies disabled search, and the PR supplies matching baseline CLI results and a red-to-green PostgreSQL regression; this review executed no target code.

Is this the best way to solve the issue?

The patch is the smallest complete fix: it consumes the existing acquisition contract, reuses the current renderers, and extends the existing round-trip test without adding port operations.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Post-port memory result classification keeps the original intent (215cb73: Rebuild memory under fresh offline ownership after publication and warn without failing a completed port when rebuilding fails.)
  • Concurrent rebuild results and PostgreSQL documentation keeps the original intent (e41fa08: Reduce multi-agent downtime with bounded concurrency while preserving per-agent results and failure isolation.)
  • Mixed-engine round-trip test keeps the original intent (8a2935f: Verify family-scoped ports preserve unrelated stores and publish the correct engine configuration.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 215cb73 adds src/commands/doctor-database-port-memory.ts:122 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 215cb73bea18; files: src/commands/doctor-database-port-memory.ts)
  • Mitchell Etzel: Raw commit e41fa08 adds src/commands/doctor-database-port-memory.ts:84 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e41fa08f57ca; files: src/commands/doctor-database-port-memory.ts)

PR surface

Source +2, Tests +6, Docs +1. Total +9 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 5 3 +2
Tests 1 8 2 +6
Docs 1 3 2 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 16 7 +9

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P3: This corrects misleading diagnostics in an advanced database maintenance workflow; the port already succeeds and preserves data.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This corrects misleading diagnostics in an advanced database maintenance workflow; the port already succeeds and preserves data.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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 execution lanes are retired.

Reviewed November 20, 2026, 12:56 PM ET / 17:56 UTC.

@VACInc
VACInc merged commit 49f0740 into openclaw:main Nov 20, 2026
218 checks passed
@VACInc

VACInc commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

Merged via squash.

@VACInc
VACInc deleted the port-disabled-memory branch November 20, 2026 22:39
vincentkoc added a commit that referenced this pull request Nov 20, 2026
…202654

* origin/main: (34 commits)
  fix(ui): restore Skills first-visit asset limits (#202694)
  fix: restore Skills discovery recovery checks (#202747)
  fix(database): report disabled memory after a port (#202630)
  test(ui): settle live event imports before cursor assertions (#202752)
  fix: keep installed plugins in the Featured list instead of hiding them
  fix: keep PostgreSQL transcript and health totals numeric (#202629)
  fix(ui): show only SKILL.md in plugin skill previews
  fix: preserve the running installation when an agent updates its Gateway (#201570)
  chore(ui): refresh control ui locales (#202744)
  fix: show saved child results when idle delivery expires (#202732)
  perf(state): adopt producer-owned read commands (#202731)
  fix(cli): restore dashboard Gateway start and install recovery (#202085)
  fix: make plugin catalog artwork easier to recognize
  fix: restore queued compaction writer-fence coverage (#202709)
  fix(ui): remove resting chrome from Customize settings gears
  chore(ui): refresh control ui locales (#202734)
  fix: distinguish a recovered gateway from its failed update checks
  fix(ui): keep known plugin details visible while loading
  fix(cli): connect through gateway.remote.edgeAuth without a Gateway token
  fix: make the Plugins catalog clear when disconnected
  ...
vincentkoc added a commit that referenced this pull request Nov 21, 2026
)

* feat(gateway): add restricted writer transport and steer discovery

* refactor(gateway): retain publication owner across writer expansion

* feat: prepare restricted connections for Session Share steering

OpenClaw-Publication: d030c287-b7c5-8326-aa7e-a2b07b373ac6

* fix(gateway): distinguish disabled publication purposes at handshake

* Publish openclaw/cool-shrimp

OpenClaw-Publication: 096bcc30-6af3-892d-a6b9-456f24a4f5ba

* merge: bring main into the steering transport branch and regenerate the config baseline

* Merge remote-tracking branch 'origin/main' into land/steer-transport-202654

* origin/main: (34 commits)
  fix(ui): restore Skills first-visit asset limits (#202694)
  fix: restore Skills discovery recovery checks (#202747)
  fix(database): report disabled memory after a port (#202630)
  test(ui): settle live event imports before cursor assertions (#202752)
  fix: keep installed plugins in the Featured list instead of hiding them
  fix: keep PostgreSQL transcript and health totals numeric (#202629)
  fix(ui): show only SKILL.md in plugin skill previews
  fix: preserve the running installation when an agent updates its Gateway (#201570)
  chore(ui): refresh control ui locales (#202744)
  fix: show saved child results when idle delivery expires (#202732)
  perf(state): adopt producer-owned read commands (#202731)
  fix(cli): restore dashboard Gateway start and install recovery (#202085)
  fix: make plugin catalog artwork easier to recognize
  fix: restore queued compaction writer-fence coverage (#202709)
  fix(ui): remove resting chrome from Customize settings gears
  chore(ui): refresh control ui locales (#202734)
  fix: distinguish a recovered gateway from its failed update checks
  fix(ui): keep known plugin details visible while loading
  fix(cli): connect through gateway.remote.edgeAuth without a Gateway token
  fix: make the Plugins catalog clear when disconnected
  ...

* merge: bring main into the steering transport branch and regenerate the config baseline

* merge: bring main into the steering transport branch and regenerate the config baseline

* merge: bring main into the steering transport branch and regenerate protocol output

Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 21, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 21, 2026
…claw#202654)

* feat(gateway): add restricted writer transport and steer discovery

* refactor(gateway): retain publication owner across writer expansion

* feat: prepare restricted connections for Session Share steering

OpenClaw-Publication: d030c287-b7c5-8326-aa7e-a2b07b373ac6

* fix(gateway): distinguish disabled publication purposes at handshake

* Publish openclaw/cool-shrimp

OpenClaw-Publication: 096bcc30-6af3-892d-a6b9-456f24a4f5ba

* merge: bring main into the steering transport branch and regenerate the config baseline

* Merge remote-tracking branch 'origin/main' into land/steer-transport-202654

* origin/main: (34 commits)
  fix(ui): restore Skills first-visit asset limits (openclaw#202694)
  fix: restore Skills discovery recovery checks (openclaw#202747)
  fix(database): report disabled memory after a port (openclaw#202630)
  test(ui): settle live event imports before cursor assertions (openclaw#202752)
  fix: keep installed plugins in the Featured list instead of hiding them
  fix: keep PostgreSQL transcript and health totals numeric (openclaw#202629)
  fix(ui): show only SKILL.md in plugin skill previews
  fix: preserve the running installation when an agent updates its Gateway (openclaw#201570)
  chore(ui): refresh control ui locales (openclaw#202744)
  fix: show saved child results when idle delivery expires (openclaw#202732)
  perf(state): adopt producer-owned read commands (openclaw#202731)
  fix(cli): restore dashboard Gateway start and install recovery (openclaw#202085)
  fix: make plugin catalog artwork easier to recognize
  fix: restore queued compaction writer-fence coverage (openclaw#202709)
  fix(ui): remove resting chrome from Customize settings gears
  chore(ui): refresh control ui locales (openclaw#202734)
  fix: distinguish a recovered gateway from its failed update checks
  fix(ui): keep known plugin details visible while loading
  fix(cli): connect through gateway.remote.edgeAuth without a Gateway token
  fix: make the Plugins catalog clear when disconnected
  ...

* merge: bring main into the steering transport branch and regenerate the config baseline

* merge: bring main into the steering transport branch and regenerate the config baseline

* merge: bring main into the steering transport branch and regenerate protocol output

Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
maplel pushed a commit to maplel/openclaw that referenced this pull request Nov 24, 2026
…law#194384)

* docs: clarify PostgreSQL conformance coverage

* fix(cron): keep one-shot finalization working on PostgreSQL 16

* test(database): reuse cron conformance for JSON conversion regression

* test(postgres): accept fractional explain row counts

(cherry picked from commit 7ab0143)

Release adaptation: Only engine-owned jsonValue and retained cron enabled JSON replacement; preserve native boolean type with PG16 explicit ::json and SQLite json(). Omit unrelated PG docs/EXPLAIN test edits; retained one-shot enabled-transition caller present on baseline.

Follow-up dispositions: e029e18 docs: document isolated PostgreSQL restore drills (openclaw#202704); 49f0740 fix(database): report disabled memory after a port (openclaw#202630); a80b564 fix: keep database workers healthy after silent connection loss (openclaw#201856); 3d91af2 fix(config): reject reserved PostgreSQL schema prefixes (openclaw#202097); 835d722 fix: catch incompatible ownership before porting to SQLite (openclaw#202101); 67796a6 fix: keep scheduled Git backups current on PostgreSQL (openclaw#201870); cc849dd fix: recover lease heartbeats after a PostgreSQL connection loss (openclaw#201858); 6594caf fix: prepare macOS runtime pins without the PostgreSQL secret (openclaw#202102); 6ca56cd docs: clarify PostgreSQL storage and backup coverage (openclaw#202086); a079190 fix(postgres): chat history slows under concurrent reads (openclaw#190129); 2ff4256 feat(database): keep PostgreSQL rollback captures in PostgreSQL (openclaw#196236); 96c685b feat(backup): restore PostgreSQL stores into a staging database for restore drills (openclaw#194808); fb83d65 fix: reduce transcript allocation when preparing native context seeds; 71ec4d2 fix(config): keep Workboard PostgreSQL upgrades readable (openclaw#194648); b6ed907 perf(sessions): persist active transcript facts for hydration (openclaw#193682)

Validation: Baseline cron generated json(bound text) on PostgreSQL where json(text) is unavailable; helper and focused boolean regression retained. Exact PostgreSQL16 server proof unavailable; focused SQLite/helper tests queued. diff check passed.

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 38fdd9b52704d588d9ca24ef8e391d644961c985)
(cherry picked from commit fb935e6912388314851b05cb698ef038b83bbd07)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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.

1 participant