Skip to content

Commit 90d1ce8

Browse files
gloryfromcaclaude
andcommitted
fix(*): anchor the chooser term, show an env-sourced key on the card, stop waiting on the probe
CONTEXT.md's memory backend chooser entry named the function the branch had renamed; it now anchors to _choose_memory_backend, the plan and the design sketch follow, and the EverOS entry counts the cloud plugin among the distributed members. The settings page no longer waits on the cloud probe (up to five seconds against a slow service): the card shows its checking state until the answer lands. The card says when the key comes from EVEROS_CLOUD_API_KEY. The spec and acceptance rows for an oversize message say the slice lands with a warning, and the add row records the retry memo. Co-authored-by: Claude (claude-fable-5-1) <noreply@anthropic.com>
1 parent c09c42b commit 90d1ce8

10 files changed

Lines changed: 46 additions & 20 deletions

File tree

‎CONTEXT.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,8 +1126,8 @@ and injects into the main agent's system prompt so evicted facts stay present.
11261126
Raven's default memory-backend plugin (`everos-memory`; ships enabled, works out of
11271127
the box). Its own distribution rather than part of the raven wheel, found through the
11281128
`raven.plugins` entry-point group. (`plugins-dist/ppt-engine/` and
1129-
`plugins-dist/design-engine/` ship the same way -- the group's other two
1130-
distributed members, contributing a deck-building toolchain and a visual-design
1129+
`plugins-dist/design-engine/` and `plugins-dist/everos-cloud-memory/` ship the same way -- the group's other
1130+
distributed members, contributing a deck-building toolchain, a visual-design
11311131
engine rather than memory.) Provides dual-track semantic recall — the user track (episodes/profiles,
11321132
injected into the `# Memory` segment) and the agent track (skills/cases, one of
11331133
SkillForge's three sources at RRF weight 0.9). The name refers to the external package
@@ -1153,7 +1153,7 @@ search and the `sender_id` of a stored user message. The same two values on two
11531153
machines sharing one cloud key name one memory.
11541154
_Avoid_: owner identity (the older wording in `raven/contracts/plugin_surface.py`).
11551155

1156-
**memory backend chooser** (`cli/onboard_commands.py:_choose_memory_screen`):
1156+
**memory backend chooser** (`cli/onboard_commands.py:_choose_memory_backend`):
11571157
The `raven onboard` question asked only when more than one memory plugin is
11581158
installed: which backend's screen to run. Off writes `memory.backend = null`; a
11591159
dismissed question exits the wizard and writes nothing.

‎docs/plans/2026-10-08-everos-cloud-memory.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,12 +317,12 @@ uv build --wheel plugins-dist/everos-cloud-memory -o $SCRATCH/dist && ls $SCRATC
317317
**Delivers**: A1, A3, A8, A9, A29, A38 (contract level; A1/A3/A8/A9/A29/A38 real-host halves in Task 10).
318318

319319
**Files**:
320-
- modify: `raven/cli/onboard_commands.py:2010-2026` (`_step4_memory`'s loop) and a new `_choose_memory_screen(steps) -> str | None` beside `_memory_steps` (`:1929`)
320+
- modify: `raven/cli/onboard_commands.py:2010-2026` (`_step4_memory`'s loop) and a new `_choose_memory_backend(steps) -> str | None` beside `_memory_steps` (`:1929`)
321321
- modify: `tests/test_cli_onboard_commands.py` (append; AGENTS 5.4: no new file)
322322

323323
**Interfaces**:
324324
- consumes `_memory_steps()`, `_selected_backend()`, `_require_questionary()`, `RAVEN_STYLE`, `_QMARK`, `t`, `set_memory_backend`.
325-
- produces `_choose_memory_screen(steps: list[tuple[str, OnboardStep]]) -> str | None`: `questionary.select(t("Which memory backend?"), choices=[Choice(name, value=name) for name in names] + [Choice(t("Off"), value=_MEMORY_OFF)], default=current if current in names else None, style=RAVEN_STYLE, qmark=_QMARK).ask()`; `None` from `.ask()` (Esc / Ctrl-C) -> `raise typer.Exit(1)`; `_MEMORY_OFF` -> return `None`; else the name. `_MEMORY_OFF = object()` module constant.
325+
- produces `_choose_memory_backend(steps: list[tuple[str, OnboardStep]]) -> str | None`: `questionary.select(t("Which memory backend?"), choices=[Choice(name, value=name) for name in names] + [Choice(t("Off"), value=_MEMORY_OFF)], default=current if current in names else None, style=RAVEN_STYLE, qmark=_QMARK).ask()`; `None` from `.ask()` (Esc / Ctrl-C) -> `raise typer.Exit(1)`; `_MEMORY_OFF` -> return `None`; else the name. `_MEMORY_OFF = object()` module constant.
326326

327327
- [ ] **Step 1: tests first** (append to `tests/test_cli_onboard_commands.py`; the file already stubs `questionary.select` at `:306-319` -- copy that pattern):
328328
`test_two_memory_screens_ask_which_backend_and_run_only_the_chosen_one` (A1: fake steps `[("everos", s1), ("everos-cloud", s2)]`, select returns `"everos-cloud"`, only `s2.run` called, `set_memory_backend("everos-cloud")`), `test_choosing_off_writes_null_and_runs_no_screen` (A3), `test_one_memory_screen_runs_without_a_question` (A8: `questionary.select` patched to raise if called), `test_a_cancelled_choice_exits_one_and_writes_nothing` (A38: select returns `None` -> `typer.Exit` with code 1, `set_memory_backend` not called), `test_non_interactive_with_two_screens_never_asks` (A29).
@@ -333,7 +333,7 @@ uv build --wheel plugins-dist/everos-cloud-memory -o $SCRATCH/dist && ls $SCRATC
333333

334334
Run: `uv run --frozen pytest tests/test_cli_onboard_commands.py -q -p no:cacheprovider`
335335
Expected: `353 passed` (348 + 5; if `test_onboard_cli_writes_the_keys_passed_as_flags` is red, rerun it alone per D1 and record both outputs).
336-
Mutation: make `_choose_memory_screen` return `None` on `.ask() is None` instead of raising -> `test_a_cancelled_choice_exits_one_and_writes_nothing` fails; restore.
336+
Mutation: make `_choose_memory_backend` return `None` on `.ask() is None` instead of raising -> `test_a_cancelled_choice_exits_one_and_writes_nothing` fails; restore.
337337
Edit check for A9: `git -C /Users/admin/Raven-b diff 3632e6040 -- tests/test_cli_onboard_commands.py` changes only `test_step4_memory_first_configured_wins`, `test_step4_memory_all_disabled_clears_backend` and `test_step4_memory_back_returns_sentinel_without_writing` (they pinned the retired run-every-screen behaviour with two fake plugins; deviations.md D2) and adds tests; no other existing test body changes.
338338

339339
- [ ] **Step 4: record** -- nothing expected.
@@ -510,7 +510,7 @@ screenshots, the G4 package.
510510

511511
1. Coverage: A1-A39 each appear in a task's Delivers (A1 A3 A8 A9 A29 A38 -> 4; A2 A4 A5 A6 A7 A27 A28 -> 2 + 10; A10-A18 A33 A34 -> 2 + 10; A19 A20 A21 A36 A37 -> 5 + 10; A22 A24 A26 -> 7 + 10; A23 A25 A35 A39 -> 6 + 10; A30 A31 -> 3; A32 -> 9). C1-C3 -> Task 3 and Task 2's discover tests; C4-C8, C10 -> Task 2; C9 -> Tasks 4-7 zero-edit checks; C11-C12 -> Tasks 7, 8; C13 -> Task 3; C14-C18 -> Task 9.
512512
2. Placeholders: none of the patterns the plan template forbids; expected outputs that can be measured today are the measured numbers above; the rest are counts the step defines (N added tests) and are to be replaced by the actual line in `run.md`.
513-
3. Names: `resolve_api_key`, `DEFAULT_BASE_URL`, `make_backend`, `_auth_headers`, `_choose_memory_screen`, `_MEMORY_OFF`, `settings_everos_cloud`, `settings.everosCloud`, `reason`, `EverosCloudCard`, `everosCloud` are spelled the same in every task that uses them.
513+
3. Names: `resolve_api_key`, `DEFAULT_BASE_URL`, `make_backend`, `_auth_headers`, `_choose_memory_backend`, `_MEMORY_OFF`, `settings_everos_cloud`, `settings.everosCloud`, `reason`, `EverosCloudCard`, `everosCloud` are spelled the same in every task that uses them.
514514
4. Ponytail ladder per task: Task 1 exists because every later test needs a counterparty and no real one is reachable; Task 2 copies rather than re-derives; Task 3 is three one-line edits; Task 4 is the smallest change that keeps one plugin's path identical; Task 5 keeps `_cfg`'s shape to leave 17 tests untouched; Task 6 adds one generic arm instead of a per-plugin setter; Task 7 reuses `KeyRow`, `Card`, `Chip`; Task 8 and 9 are the minimum the spec promises.
515515
5. Authorization and caps are in the header.
516516
6. `deviations.md` exists with D1.

‎docs/specs/2026-10-08-everos-cloud-memory-acceptance.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ code.
240240
| T16.1 <- A16 | contract | Importer-shaped calls: three `store` with `{"bulk": True, "is_final": False}` then one with `is_final: True`: four `/add`, one `/flush` after the fourth add, none earlier. | a flush after a non-final batch; none after the final | today: `raven/importer/orchestrator.py:253` metadata shape; new: spec "explicit end" | process, rerunnable |
241241
| T16.2 <- A16 | real | `$HOME/.claude/projects/ecm-proj/one.jsonl` (a 30-message Claude Code transcript fixture); `raven import run --platform claude_code --tier full --yes` (`full`: the `memory_files` tier keeps only memory files, `raven/importer/types.py:85-89`, and this fixture is a conversation). Ledger for that session id: three `/add` (10 messages each, `_BATCH_MSG_LIMIT = 10`), then exactly one `/flush`, as the last request for the session; the command exits 0. | zero or several flushes; a flush before the last add | today: `import run` subcommand with `--platform/--tier/--yes` (`raven/cli/import_commands.py:512-516`; the group is `import`, `raven/cli/commands.py:218`), scanner root (`claude_code.py:194-196`), `_BATCH_MSG_LIMIT = 10` (`orchestrator.py:30`) | trigger, process, rerunnable |
242242
| T17.1 <- A17 | contract | A 600-message `store`: two `/add` (500 + 100), both `mode: "agent"`. A slice whose JSON is 400 KB of 40 messages: adds split at a message boundary, each body < 250 KB. | one request; a split inside a message | new: spec C10, `ADD_MAX_MESSAGES`, `ADD_MAX_BYTES` | process, rerunnable |
243-
| T17.2 <- A17 | contract | A slice with one 300 KB message and four small ones: the four go out in one `/add`; `store` returns `False`; caplog has a warning naming the session id and the message index. | the big message is sent; the small ones are dropped; `True` | new: spec failure row "request body" | process, rerunnable |
243+
| T17.2 <- A17 | contract | A slice with one 300 KB message and four small ones: the four go out in one `/add`; `store` returns `True` (the dropped message cannot be retried into fitting, and a `False` would have both callers re-store the four); caplog has a warning naming the session id and the message index. | the big message is sent; the small ones are dropped; `True` | new: spec failure row "request body" | process, rerunnable |
244244
| T17.3 <- A17 | real | `raven agent --message-file $SCRATCH/big.txt` where the file holds 300 KB of text. Ledger: the turn's `/add` carries the assistant message and not the 300 KB user message (no body in the slice exceeds 250 KB); the log has the warning naming the session and message index; the run exits 0. The ledger is the counterparty's: a 300 KB body would be in it. | a body over 250 KB in the ledger; no warning; the assistant message also missing | today: `--message-file` (`agent_commands.py:223`); new: spec failure row "request body" | trigger, process (ledger, log), rerunnable |
245245
| T18.1 <- A18 | contract | Plain stores on `s1`, `s2`, `s3`; explicit-end store on `s2`; `stop()`: ledger gains exactly `/flush s1` and `/flush s3` (any order), then the client is closed (`client.is_closed`). With the fake hanging on `/flush`, `stop()` returns within 5.5 s and caplog names the sessions left. | `s2` flushed again; a session missing; `stop()` past 5.5 s | new: spec backend `stop`, `SHUTDOWN_FLUSH_BUDGET_S = 5.0` (copied from `_SHUTDOWN_FLUSH_BUDGET_S`, `raven_everos/backend.py:159`) | process, rerunnable |
246246
| T18.2 <- A18 | real | The T14.3 run has two sessions in one process: the main turn (plain adds, never flushed) and the sub-agent's (explicit end, flushed). At exit the ledger gains exactly one more `/flush`, for the main session, and none for the sub-agent's; the plugin's stop-sweep line, `flushed 1 session(s) at stop` (spec backend sketch), is INFO on a standard-library logger, which `raven agent --logs` does not bridge (only WARNING and above reach the terminal); it is read in T34.2's `import.log`, where the importer installs the bridge. Two sessions with different histories give the sweep a way to be wrong; the sweep line is the plugin's own account of what it did. | the sub-agent session flushed twice; the main session not flushed; a sweep line naming two | today: `backend.stop()` at one-shot exit (`raven/cli/agent_commands.py:512`); new: spec backend `stop` and its log line | trigger, process (ledger, log), rerunnable |

0 commit comments

Comments
 (0)