Skip to content

Memory health tells the user to set a flag the app cannot set #5417

Description

@yh928

Summary

When "Build Summary Trees" has no summarization provider, the memory health panel renders a remediation that says to set memory_tree.cloud_summarization_opt_in=true. There is no control anywhere in the app that sets it. Add the toggle so the remediation names something the user can actually do.

Problem

tree_runtime::ops::create_provider resolves the summarizer in three steps:

  1. local_ai.runtime_enabled = true → local Ollama
  2. else memory_tree.cloud_summarization_opt_in = true → the configured cloud provider
  3. else → error, and the tree stops growing

Step 3 is what a default headless install lands on. The panel then renders memory.health.remediation.summarizer_unavailable, which in all 14 locales says some form of:

Enable local AI (Ollama), or set memory_tree.cloud_summarization_opt_in=true and configure an LLM provider in Connections → API keys → LLM.

Neither branch is reachable from the app on a remote/headless instance:

  • Local AI has a real toggle (config_update_local_ai_settingsruntime_enabled + opt_in_confirmed), but flipping it on a machine with no Ollama binary and nothing on :11434 makes summarizer_available report true while every call fails at connect.
  • Cloud opt-in has no control at all. cloud_summarization_opt_in appears in the frontend only inside those remediation strings — no component reads or writes it. MemorySettingsPatch carries backend, auto_save, embedding_provider, embedding_model, embedding_dimensions, memory_window, and not this. There is no generic config setter either; config/tools.rs states the config_update_* mutators are deliberately unexposed.

So the only ways to set it are an env var (OPENHUMAN_MEMORY_TREE_CLOUD_SUMMARIZATION) or hand-editing config.toml — both requiring shell access to the host the app is supposed to manage.

Observed on a live instance: the tree's newest chunk is 22 days old and frozen at 620, while the base namespace keeps ingesting (a mail from 8 days ago is queryable). The doctor's summary_tree stage reports summarizer_unavailable, the config confirms local_ai.runtime_enabled = false and cloud_summarization_opt_in = false, and there is nothing the user can press.

Solution

Add the setting to the surface that already reports the problem.

  • Carry cloud_summarization_opt_in on MemorySettingsPatch / the config_update_memory_settings RPC, and apply it in apply_memory_settings.
  • Expose the current value on the memory-tree status payload so the control reflects real state rather than guessing.
  • Render a toggle in MemoryTreeStatusPanel, beside the existing auto-sync toggle so it stays reachable after it has been turned on (a control that only appears while the error is live cannot be undone).
  • The copy must say what the toggle does — memory summaries leave the machine for the configured provider. That is why the setting is opt-in, and the UI should not lose that.

Deliberately out of scope: installing or provisioning Ollama from the app. The local-AI path stays as-is.

Acceptance criteria

  • The flag is settable over RPCconfig_update_memory_settings accepts and persists cloud_summarization_opt_in.
  • The panel shows real state — the toggle reflects the stored value, not a default.
  • The toggle is reversible — it is reachable whether or not the summarizer is currently unavailable.
  • Consent is legible — the label/description states that summaries are sent to the configured cloud provider.
  • Turning it on clears the cause — with a summarization provider configured, summary_tree stops reporting summarizer_unavailable.
  • Diff coverage ≥ 80% — the implementing PR meets the changed-lines coverage gate.

Related

  • src/openhuman/memory/tree/tree_runtime/ops.rscreate_provider / summarizer_available, the three-step resolution.
  • src/openhuman/config/ops/model.rsMemorySettingsPatch / apply_memory_settings.
  • app/src/components/intelligence/MemoryTreeStatusPanel.tsx — renders the remediation and the existing auto-sync toggle.
  • app/src/lib/i18n/*.tsmemory.health.remediation.summarizer_unavailable, the string that names the unreachable flag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions