-
Notifications
You must be signed in to change notification settings - Fork 63
fix(*): make everos ownership explicit and stop memory failures from stalling a session #310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
1696262
e11684b
2873d36
d4013d4
14a24b1
0420eb2
9dfa793
0c30de6
41c23e3
d6dd110
824470b
f0b9a26
2c4e0d6
b68b1ae
3aac624
9cbe02e
bb236a4
f9a2939
6d1a6b3
a0c9a26
6d751ea
68efb58
16bf8e2
9ea2611
d66de3b
e72ca87
340f40b
d629bba
8263119
ba2d4f9
850e218
74e02a5
dcb3cfa
e97a7da
d6d3a95
aa59b3d
a51c181
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -72,6 +72,9 @@ class MemoryInfo: | |
| """ | ||
|
|
||
| backend: Optional[str] = None | ||
| root: Optional[str] = None | ||
| owned: bool = True | ||
| address: Optional[str] = None | ||
| server_running: bool = False | ||
| reports_capabilities: bool = False | ||
| configured: list[str] = field(default_factory=list) | ||
|
|
@@ -223,14 +226,22 @@ def _probe_memory(config: "RavenConfig") -> MemoryInfo: | |
| info = MemoryInfo(backend=backend) | ||
| if backend != "everos": | ||
| return info | ||
| from raven.config.update_everos import everos_role_configured | ||
| from raven.config.update_everos import everos_owned, everos_role_configured, everos_root | ||
| from raven.plugin.memory.everos._health import ( | ||
| DEGRADING_SECTIONS, | ||
| REQUIRED_SECTIONS, | ||
| configured_base_url, | ||
| probe_capabilities, | ||
| ) | ||
|
|
||
| # Which memories, and whose. Neither was reachable from any command before: | ||
| # the wizard printed the path once while converging and nothing showed it | ||
| # again, so "where are my memories" had no answer short of reading | ||
| # config.json by hand. This is the place that question gets asked. | ||
| info.root = str(everos_root()) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [blocker, unresolved from the 20:23 review] For a self-managed install (
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [blocker] For a self-managed install this prints a root Raven has nothing to do with, and then reports the user's server as having no roles configured.
Reproduced on this branch, with a config written exactly the way that path writes it: So Three things are wrong at once, and the second is worse than the path:
The two tests covering this stub A fix that matches the design: make the recorded slice the source of truth here ( |
||
| info.owned = everos_owned() | ||
| info.address = configured_base_url(config) | ||
|
|
||
| info.configured = [s for s in (*REQUIRED_SECTIONS, *DEGRADING_SECTIONS) if everos_role_configured(s)] | ||
| # Recall quality is decided by the embedding role in the user-level | ||
| # everos.toml: with it recall matches meaning, without it only keywords. | ||
|
|
@@ -261,6 +272,10 @@ def _render_memory_capabilities(memory: MemoryInfo) -> None: | |
|
|
||
| if memory.backend != "everos": | ||
| return | ||
| console.print(f" Memories: {memory.root}") | ||
| if not memory.owned: | ||
| console.print(" [dim]Managed by you -- Raven reads this one and never writes or restarts it.[/dim]") | ||
| console.print(f" Address: {memory.address}") | ||
| if not memory.server_running: | ||
| console.print(" Server: [dim]not running (starts on demand)[/dim]") | ||
| if memory.configured: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[blocker]
raven doctorfabricates a memory root path for the new self-managed EverOS setup._use_self_managed_everos()(raven/cli/onboard_everos.py:1374) deliberately records only{"owned": False, "base_url": ...}— noroot— for exactly this reason (its own docstring,onboard_everos.py:1346): "Without a root there is no path on disk a later change could write to by accident."But
everos_root()(raven/config/update_everos.py:129) always returns a path — when norootis recorded it falls back tofallback_everos_root(), i.e.<data dir>/everosor the legacy~/.everos/raven.info.root = str(everos_root())here has no guard for the "owned=False, no root recorded" case, so for a self-managed setup it prints a fabricated, unrelated local path next to "Managed by you -- Raven reads this one and never writes or restarts it" (raven/cli/doctor_commands.py:272-274). That directory typically doesn't even exist (it's never created for an unowned root), and it has nothing to do with where the user's actual EverOS data lives — the opposite of what this PR's self-managed path promises.Repro:
raven onboard-> step 4 -> "I run my own EverOS" -> a reachable address ->raven doctor.Memories:prints the default/legacy raven-owned path even though nothing was ever recorded there.Confirmed this combination has no test coverage: both new doctor tests (
tests/test_cli_doctor_commands.py::test_doctor_answers_where_the_memories_areand::test_doctor_says_when_the_memories_are_not_ravens_to_touch) stubeveros_rootdirectly to a fake path in both the owned and unowned cases, so neither exerciseseveros_root()'s real fallback behavior when a self-managed slice has norootkey at all.Fix direction: in
_probe_memory, only setinfo.rootwhen a root is actually recorded (e.g.everos_owned() or "root" in <raw slice>), and have_render_memory_capabilitiesdescribe the unowned-no-root case by address only (which it already prints viainfo.address) instead of a fabricated "Memories:" path.Fix this →