[PR #8930] [MERGED] Let a stale built-in decision model be reinstalled #8886

Closed
opened 2026-11-07 17:40:28 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8930
Author: @kolacheee
Created: 11/7/2026
Status: ✅ Merged
Merged: 11/7/2026
Merged by: @kolacheee

Base: staging ← Head: claude/project-thread-xkx89o


📝 Commits (2)

  • 040e41c Let a stale built-in decision model be reinstalled
  • d47464b Repair every reason the built-in decision model cannot start

📊 Changes

10 files changed (+142 additions, -20 deletions)

View changed files

📝 docs/connections/decision-models.md (+1 -0)
📝 packages/client/src/components/connections/ConnectionDefaults.tsx (+23 -7)
📝 packages/client/src/components/modals/DecisionModelModal.tsx (+64 -6)
📝 packages/client/src/components/modals/create-connection/CreateConnectionModalContent.tsx (+1 -1)
📝 packages/client/src/hooks/use-decision-sidecar.ts (+2 -0)
📝 packages/client/src/lib/add-connection.ts (+10 -2)
📝 packages/client/src/localization/locales/en.json (+6 -0)
📝 packages/server/src/routes/decision.routes.ts (+6 -0)
📝 packages/server/src/services/sidecar/decision-preflight.ts (+12 -4)
📝 scripts/regressions/decision-sidecar-runtime.regression.ts (+17 -0)

📄 Description

Linked issue

Closes #8929

Why this change

When an update pins a different decision runtime (here uv 0.12.0 to 0.13.5), the installed Open-Jev model can no longer start. The Built-in model (decisions) window still marked it Installed and disabled the install button, so the only way out in the UI was Remove files, which re-downloads 4.6 GB of weights. The Decision row only said "Unavailable" and offered no fix.

What changed

  • DecisionModelModal: when the installed model cannot start (stale runtime or missing weights), the catalog row reads Needs reinstall, and a warning box with a Reinstall button appears. This also covers a pasted model. A catalog model goes through /sidecar/install with its id. A pasted model goes back through the repository route at the commit it was installed from. Files that are already whole are kept.
  • decision-preflight: weights and runtime are judged separately. When the weights are kept, a reinstall needs only the runtime's share of the disk (diskBytes - downloadSizeBytes), and an unreadable compute capability no longer refuses it. Before, the preflight counted the kept weights as still to download.
  • GET /decision/sidecar adds installedModelDownloaded, for the installed (catalog or pasted) model.
  • ConnectionDefaults: when the Decision job uses the built-in decision model and it is off or not installed, the row says so, shows Not set up, and its Set up fix opens that window. The primary-slot case is unchanged.
  • add-connection / CreateConnectionModalContent: the Add window can open straight on the built-in decision model (decision-builtin → decision_builtin) without treating it as an API provider.
  • docs/connections/decision-models.md: one bullet on Reinstall. Translations: #8931.
  • en.json: 6 new keys.

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

  • decision-sidecar-runtime regression adds a stale-stamp case with kept weights. It fails on the old preflight (kept weights are not counted as still to download) and passes with this change.
  • Client and server tsc --noEmit, client eslint on the changed files, check-locales.mjs, and the static JSX localization check pass. CI runs the full pnpm check.
  • The bug was reproduced on a real install. The stamp on disk had uv 0.12.0, the manifest pinned 0.13.5, and the Decision row showed "Not available right now". Calling the same install route by hand rebuilt the runtime, kept the weights, and the row went back to "Built-in model (decisions) — Open-Jev 2B". The new button has not been clicked in a browser yet.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README) 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)

UI evidence (if applicable)

None yet.


🔄 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/8930 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 11/7/2026 **Status:** ✅ Merged **Merged:** 11/7/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `claude/project-thread-xkx89o` --- ### 📝 Commits (2) - [`040e41c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/040e41cb6b0b660c3ffd0494222aee21a4a6b980) Let a stale built-in decision model be reinstalled - [`d47464b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d47464bab9e51dbd39430e072355cb3257a5d7c0) Repair every reason the built-in decision model cannot start ### 📊 Changes **10 files changed** (+142 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `docs/connections/decision-models.md` (+1 -0) 📝 `packages/client/src/components/connections/ConnectionDefaults.tsx` (+23 -7) 📝 `packages/client/src/components/modals/DecisionModelModal.tsx` (+64 -6) 📝 `packages/client/src/components/modals/create-connection/CreateConnectionModalContent.tsx` (+1 -1) 📝 `packages/client/src/hooks/use-decision-sidecar.ts` (+2 -0) 📝 `packages/client/src/lib/add-connection.ts` (+10 -2) 📝 `packages/client/src/localization/locales/en.json` (+6 -0) 📝 `packages/server/src/routes/decision.routes.ts` (+6 -0) 📝 `packages/server/src/services/sidecar/decision-preflight.ts` (+12 -4) 📝 `scripts/regressions/decision-sidecar-runtime.regression.ts` (+17 -0) </details> ### 📄 Description ## Linked issue Closes #8929 ## Why this change When an update pins a different decision runtime (here uv 0.12.0 to 0.13.5), the installed Open-Jev model can no longer start. The **Built-in model (decisions)** window still marked it **Installed** and disabled the install button, so the only way out in the UI was **Remove files**, which re-downloads 4.6 GB of weights. The Decision row only said "Unavailable" and offered no fix. ## What changed - `DecisionModelModal`: when the installed model cannot start (stale runtime or missing weights), the catalog row reads **Needs reinstall**, and a warning box with a **Reinstall** button appears. This also covers a pasted model. A catalog model goes through `/sidecar/install` with its id. A pasted model goes back through the repository route at the commit it was installed from. Files that are already whole are kept. - `decision-preflight`: weights and runtime are judged separately. When the weights are kept, a reinstall needs only the runtime's share of the disk (`diskBytes - downloadSizeBytes`), and an unreadable compute capability no longer refuses it. Before, the preflight counted the kept weights as still to download. - `GET /decision/sidecar` adds `installedModelDownloaded`, for the installed (catalog or pasted) model. - `ConnectionDefaults`: when the Decision job uses the built-in decision model and it is off or not installed, the row says so, shows **Not set up**, and its **Set up** fix opens that window. The primary-slot case is unchanged. - `add-connection` / `CreateConnectionModalContent`: the Add window can open straight on the built-in decision model (`decision-builtin` → `decision_builtin`) without treating it as an API provider. - `docs/connections/decision-models.md`: one bullet on **Reinstall**. Translations: #8931. - `en.json`: 6 new keys. ## 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 - `decision-sidecar-runtime` regression adds a stale-stamp case with kept weights. It fails on the old preflight (`kept weights are not counted as still to download`) and passes with this change. - Client and server `tsc --noEmit`, client eslint on the changed files, `check-locales.mjs`, and the static JSX localization check pass. CI runs the full `pnpm check`. - The bug was reproduced on a real install. The stamp on disk had uv 0.12.0, the manifest pinned 0.13.5, and the Decision row showed "Not available right now". Calling the same install route by hand rebuilt the runtime, kept the weights, and the row went back to "Built-in model (decisions) — Open-Jev 2B". The new button has not been clicked in a browser yet. ## Docs and release impact - [ ] No docs changes needed - [x] Updated docs (README / CONTRIBUTING / android/README) as needed - [x] 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) ## UI evidence (if applicable) None yet. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 17:40:28 +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#8886
No description provided.