[PR #6987] [MERGED] fix(decision): Choice on strict System One servers, keep the decision model on runtime cleanup, say Decision model not Jev #7417

Closed
opened 2026-10-23 04:19:34 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6987
Author: @kolacheee
Created: 10/2/2026
Status: ✅ Merged
Merged: 10/2/2026
Merged by: @kolacheee

Base: staging ← Head: fix/decision-choice-and-runtime-prune


📝 Commits (3)

  • 3497092 fix(decision): Choice on strict System One servers, keep the decision model on runtime cleanup, drop "Jev" from the UI
  • 1f4d23f fix(decision): remove only llama.cpp's own downloads, and rename the memory guide's decision heading
  • 2c1ac24 test(e2e): match the new Decision model labels, and the per-turn limit notice's current text

📊 Changes

13 files changed (+126 additions, -27 deletions)

View changed files

📝 CHANGELOG.md (+6 -0)
📝 docs/FAQ.md (+1 -1)
📝 docs/agents/memory.md (+3 -3)
📝 docs/chats/peek-prompt.md (+1 -1)
📝 docs/connections/decision-models.md (+23 -4)
📝 e2e/advanced-memory.e2e.ts (+2 -2)
📝 e2e/agent-activation-questions.e2e.ts (+1 -1)
📝 e2e/decision-peek-report.e2e.ts (+2 -2)
📝 packages/client/src/localization/locales/en.json (+4 -4)
📝 packages/server/src/services/decision/system-one.client.ts (+5 -3)
📝 packages/server/src/services/sidecar/sidecar-runtime.service.ts (+16 -6)
📝 scripts/regressions/decision-conditionals.regression.ts (+4 -0)
➕ scripts/regressions/sidecar-runtime-cleanup.regression.ts (+58 -0)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #6981
Closes #6982
Closes #6983

Why this change

Three Decision model problems that should not reach the release:

  • Choice statements get no answer from stricter System One servers (#6981). Marinara sends each Choice option's description as null. Strands decider 2B, a new open decision model that speaks System One, accepts only strings and refuses the whole request (HTTP 422), so every decision_choice: comparison reads as no. TypeSafe's spec allows null, so Marinara was within it, but an empty string is valid for both and costs nothing.
  • Reinstalling or updating the local model runtime deletes the installed decision model (#6982). The llama.cpp runtime cleanup removes every folder in <data>/sidecar-runtime/ except mlx. The Decision sidecar keeps its whole runtime and weights in sidecar-runtime/decision/ (about 10 GB for Open-Jev 2B, 25 GB for 9B), so Reinstall runtime, installing the local model's runtime after the decision model, and the next llama.cpp update all delete it silently.
  • The UI calls the Decision model "Jev" (#6983). A beta tester asked what "Jev" was after seeing Use Decision model (Jev) in Advanced Memory. Jev is one hosted model a Decision connection can use; the settings work with any of them.

What changed

  • system-one.client.ts: a Choice option is sent with an empty description instead of null. The added "none of these" option keeps its description.
  • sidecar-runtime.service.ts: the cleanup removes only llama.cpp runtime folders (always named <release tag>-<variant>, such as b10188-linux-x64-vulkan) and its own download leftovers. mlx, decision and any future sibling are left alone, which also makes the old mlx / server.log special case unnecessary.
  • en.json: "Use Decision model (Jev)" → "Use Decision model", "Use this key for decisions (Jev)" → "Use this key for decisions", and the Advanced Memory help text and Decision diagnostics empty state no longer mention Jev. No community locale translates these keys yet. Model names such as "Open-Jev 2B" stay.
  • Docs: docs/connections/decision-models.md gains Run Strands decider yourself (install, start, Custom System One connection, threshold, measured accuracy, speed and memory, switching). The labels quoted in docs/FAQ.md, docs/agents/memory.md, docs/chats/peek-prompt.md and the Decision Models guide match the new UI text.
  • Regressions: a new sidecar-runtime-cleanup.regression.ts pins that an update and Reinstall runtime remove old runtimes and leftovers but keep decision and mlx; decision-conditionals.regression.ts now asserts every Choice option is sent with a text description.
  • e2e: advanced-memory, agent-activation-questions and decision-peek-report match the new labels. decision-peek-report also expected "past the per-turn limit, read as no", which bb7c394ab reworded to "over the per-turn limit (counted as no)"; it failed the same way on unmodified staging and now passes.
  • CHANGELOG.md: three entries.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

Done by the agent (the boxes above are left for a human):

  • pnpm check, pnpm localization:check and pnpm regression:node (493/493) on this branch. Local CodeRabbit: the first review raised two findings, both fixed (download leftovers now also need llama.cpp's own names; the memory guide's "Optional Jev decisions" heading renamed with its links), and the second review found none. A Sonnet bug sweep while CodeRabbit was rate-limited found the e2e specs still matching the old labels and two wording points; all fixed.

  • Each fix was put back one piece at a time and the matching regression failed: null descriptions; the old "every folder but mlx" cleanup; leftovers no longer removed; old runtimes no longer removed.

  • Choice, against real servers, 18 labelled roleplay Choice turns through Marinara's own askNoulQuestions:

    staging (null) this branch ("")
    Strands decider 2B (strands-decider 0.1.0) 0/18, all rejected (HTTP 422) 16/18, no errors
    Open-Jev 2B (Decision sidecar) 18/18 18/18, no answer changed, largest probability shift 0.06

    Sending the option's own name as its description instead changed one Open-Jev answer, so the empty string was chosen.

  • Cleanup: before the fix, resetRuntime() on a throwaway data folder holding b10188-linux-x64-vulkan, decision and mlx left only mlx.

  • Strands as a Decision connection on a real install: a Custom System One connection to a locally served Strands decider passed Test (probability 0.91, 174 ms), and switching Decision model between it and the Decision sidecar worked both ways.

  • e2e on desktop Chromium: OpenRouter decision shortcut… and both Peek Prompt decision diagnostics themes pass. Advanced Memory Decision connection is optional and persists for its chat fails locally at the same line (advanced-memory.e2e.ts:1411, reopening Memory Recall after a reload) on this branch and on unmodified staging a4c32dfbe, so it is not caused by this PR; the renamed toggle at line 1400 is found and clicked.

For a human to verify:

  • Manually verify in the browser that Advanced Memory (Chat Settings → Memory Recall) shows Use Decision model and its help text no longer mentions Jev.
  • Manually verify that an OpenRouter connection's editor offers Use this key for decisions.
  • With a TypeSafe or OpenRouter key, manually verify a decision_choice: statement still gets an answer from hosted Jev; empty descriptions were not tested there (no key was used).

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

Translated docs: #6986 (the new batch for Decision model guides) tracks docs/connections/decision-models.md, docs/FAQ.md, docs/agents/memory.md and docs/chats/peek-prompt.md.

UI evidence (if applicable)

Text-only change: the four strings listed under What changed. The original report's screenshot shows Use Decision model (Jev) in Advanced Memory.

Summary by CodeRabbit

  • Bug Fixes

    • Improved compatibility with System One servers that require descriptions for every decision option, while preserving tested answer choices.
    • Runtime cleanup now preserves installed decision models and unrelated runtime files.
  • Updates

    • Replaced “Jev” with “Decision model” in interface labels and help text.
    • Added guidance for configuring and running Strands decider locally as a Custom System One connection.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/6987 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 10/2/2026 **Status:** ✅ Merged **Merged:** 10/2/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `fix/decision-choice-and-runtime-prune` --- ### 📝 Commits (3) - [`3497092`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3497092787d444177c62bfc3a93afc9495fe636b) fix(decision): Choice on strict System One servers, keep the decision model on runtime cleanup, drop "Jev" from the UI - [`1f4d23f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1f4d23f64048627c5248cbb4b2804888183787d5) fix(decision): remove only llama.cpp's own downloads, and rename the memory guide's decision heading - [`2c1ac24`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2c1ac24cedacfb70d2f5b33b0d3de66e48d03382) test(e2e): match the new Decision model labels, and the per-turn limit notice's current text ### 📊 Changes **13 files changed** (+126 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+6 -0) 📝 `docs/FAQ.md` (+1 -1) 📝 `docs/agents/memory.md` (+3 -3) 📝 `docs/chats/peek-prompt.md` (+1 -1) 📝 `docs/connections/decision-models.md` (+23 -4) 📝 `e2e/advanced-memory.e2e.ts` (+2 -2) 📝 `e2e/agent-activation-questions.e2e.ts` (+1 -1) 📝 `e2e/decision-peek-report.e2e.ts` (+2 -2) 📝 `packages/client/src/localization/locales/en.json` (+4 -4) 📝 `packages/server/src/services/decision/system-one.client.ts` (+5 -3) 📝 `packages/server/src/services/sidecar/sidecar-runtime.service.ts` (+16 -6) 📝 `scripts/regressions/decision-conditionals.regression.ts` (+4 -0) ➕ `scripts/regressions/sidecar-runtime-cleanup.regression.ts` (+58 -0) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue Closes #6981 Closes #6982 Closes #6983 ## Why this change Three Decision model problems that should not reach the release: - **Choice statements get no answer from stricter System One servers (#6981).** Marinara sends each Choice option's description as `null`. [Strands decider 2B](https://huggingface.co/StrandsAgents/strands-decider-2B-hobson-v19), a new open decision model that speaks System One, accepts only strings and refuses the whole request (HTTP 422), so every `decision_choice:` comparison reads as no. TypeSafe's spec allows `null`, so Marinara was within it, but an empty string is valid for both and costs nothing. - **Reinstalling or updating the local model runtime deletes the installed decision model (#6982).** The llama.cpp runtime cleanup removes every folder in `<data>/sidecar-runtime/` except `mlx`. The Decision sidecar keeps its whole runtime and weights in `sidecar-runtime/decision/` (about 10 GB for Open-Jev 2B, 25 GB for 9B), so **Reinstall runtime**, installing the local model's runtime after the decision model, and the next llama.cpp update all delete it silently. - **The UI calls the Decision model "Jev" (#6983).** A beta tester asked what "Jev" was after seeing **Use Decision model (Jev)** in Advanced Memory. Jev is one hosted model a Decision connection can use; the settings work with any of them. ## What changed - `system-one.client.ts`: a Choice option is sent with an empty description instead of `null`. The added "none of these" option keeps its description. - `sidecar-runtime.service.ts`: the cleanup removes only llama.cpp runtime folders (always named `<release tag>-<variant>`, such as `b10188-linux-x64-vulkan`) and its own download leftovers. `mlx`, `decision` and any future sibling are left alone, which also makes the old `mlx` / `server.log` special case unnecessary. - `en.json`: "Use Decision model (Jev)" → "Use Decision model", "Use this key for decisions (Jev)" → "Use this key for decisions", and the Advanced Memory help text and Decision diagnostics empty state no longer mention Jev. No community locale translates these keys yet. Model names such as "Open-Jev 2B" stay. - Docs: `docs/connections/decision-models.md` gains **Run Strands decider yourself** (install, start, Custom System One connection, threshold, measured accuracy, speed and memory, switching). The labels quoted in `docs/FAQ.md`, `docs/agents/memory.md`, `docs/chats/peek-prompt.md` and the Decision Models guide match the new UI text. - Regressions: a new `sidecar-runtime-cleanup.regression.ts` pins that an update and **Reinstall runtime** remove old runtimes and leftovers but keep `decision` and `mlx`; `decision-conditionals.regression.ts` now asserts every Choice option is sent with a text description. - e2e: `advanced-memory`, `agent-activation-questions` and `decision-peek-report` match the new labels. `decision-peek-report` also expected "past the per-turn limit, read as no", which `bb7c394ab` reworded to "over the per-turn limit (counted as no)"; it failed the same way on unmodified staging and now passes. - `CHANGELOG.md`: three entries. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes Done by the agent (the boxes above are left for a human): - `pnpm check`, `pnpm localization:check` and `pnpm regression:node` (493/493) on this branch. Local CodeRabbit: the first review raised two findings, both fixed (download leftovers now also need llama.cpp's own names; the memory guide's "Optional Jev decisions" heading renamed with its links), and the second review found none. A Sonnet bug sweep while CodeRabbit was rate-limited found the e2e specs still matching the old labels and two wording points; all fixed. - Each fix was put back one piece at a time and the matching regression failed: `null` descriptions; the old "every folder but `mlx`" cleanup; leftovers no longer removed; old runtimes no longer removed. - **Choice, against real servers**, 18 labelled roleplay Choice turns through Marinara's own `askNoulQuestions`: | | staging (null) | this branch (`""`) | | --- | --- | --- | | Strands decider 2B (`strands-decider` 0.1.0) | 0/18, all rejected (HTTP 422) | 16/18, no errors | | Open-Jev 2B (Decision sidecar) | 18/18 | 18/18, no answer changed, largest probability shift 0.06 | Sending the option's own name as its description instead changed one Open-Jev answer, so the empty string was chosen. - **Cleanup:** before the fix, `resetRuntime()` on a throwaway data folder holding `b10188-linux-x64-vulkan`, `decision` and `mlx` left only `mlx`. - **Strands as a Decision connection on a real install:** a Custom System One connection to a locally served Strands decider passed **Test** (probability 0.91, 174 ms), and switching **Decision model** between it and the Decision sidecar worked both ways. - e2e on desktop Chromium: `OpenRouter decision shortcut…` and both `Peek Prompt decision diagnostics` themes pass. `Advanced Memory Decision connection is optional and persists for its chat` fails locally at the same line (`advanced-memory.e2e.ts:1411`, reopening Memory Recall after a reload) on this branch and on unmodified staging `a4c32dfbe`, so it is not caused by this PR; the renamed toggle at line 1400 is found and clicked. For a human to verify: - Manually verify in the browser that Advanced Memory (Chat Settings → Memory Recall) shows **Use Decision model** and its help text no longer mentions Jev. - Manually verify that an OpenRouter connection's editor offers **Use this key for decisions**. - With a TypeSafe or OpenRouter key, manually verify a `decision_choice:` statement still gets an answer from hosted Jev; empty descriptions were not tested there (no key was used). ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) Translated docs: #6986 (the new batch for Decision model guides) tracks `docs/connections/decision-models.md`, `docs/FAQ.md`, `docs/agents/memory.md` and `docs/chats/peek-prompt.md`. ## UI evidence (if applicable) Text-only change: the four strings listed under **What changed**. The original report's screenshot shows **Use Decision model (Jev)** in Advanced Memory. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved compatibility with System One servers that require descriptions for every decision option, while preserving tested answer choices. * Runtime cleanup now preserves installed decision models and unrelated runtime files. * **Updates** * Replaced “Jev” with “Decision model” in interface labels and help text. * Added guidance for configuring and running Strands decider locally as a Custom System One connection. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:19:34 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#7417
No description provided.