Repository navigation
fix(database): report disabled memory search after a port - #202630
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThe 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.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete 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 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherAfter 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
Technical reviewBest 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
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +2, Tests +6, Docs +1. Total +9 across 3 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 20, 2026, 12:56 PM ET / 17:56 UTC. |
|
Merged via squash.
|
…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 ...
) * 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]>
Co-authored-by: VACInc <[email protected]>
…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]>
…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)
Summary
High Level TLDR
A successful database port reports
disabledwhen 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 printedMemory index (main): failed.It advised runningopenclaw memory index --agent main, which exited 0 and printedMemory search disabled.User Impact
Terminal output and
--jsondistinguish 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
failedplus retry guidance where it expecteddisabled. 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.node openclaw.mjs database port --family agent --to postgresMemory index (main): failed.and a retry warningMemory index (main): disabled.and no rebuild warningnode openclaw.mjs memory index --agent mainMemory search disabled.Memory search disabled.node openclaw.mjs database port --family agent --to sqlite --jsonphase: complete,status: failed, and a warningphase: complete,status: disabled, and no warningWhat was not tested
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:runtimepassed on the baseline and fixed source.git diff --checkand 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 withfailedplus 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=1passed (6 tests, 116 seconds wall time).pnpm tsgo:coreand focusednode scripts/run-oxlint.mjs --tsconfig tsconfig.jsonpassed.Repeated the focused agent round-trip on current main with a disposable PostgreSQL 17 cluster and the CI extensions. Main failed with
status: failedand retry guidance. Applying the candidate to the same main revision passed both port directions. An initial local setup lackedunaccentand stopped before the assertion.