Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: tighten MTPLX start review coverage

[._.]/ Adam Eivye9635eabe53c
diff --git a/client/src/components/settings/MtplxServerCard.test.jsx b/client/src/components/settings/MtplxServerCard.test.jsx
index 3ebf3201a5..8fc00c7b59 100644
--- a/client/src/components/settings/MtplxServerCard.test.jsx
+++ b/client/src/components/settings/MtplxServerCard.test.jsx
@@ -146,10 +146,12 @@ describe('MtplxServerCard', () => {
});
it('says MTPLX starts on demand while offering an explicit Start button', async () => {
- const handlers = await renderCard({ installed: true, running: false, supported: true, cachedModels: ['Example/Qwen-MTP'] });
+ const handlers = await renderCard({ installed: true, running: false, supported: true, cachedModels: ['Example/Qwen-MTP', 'Example/Other-MTP'] });
expect(screen.getByText(/starts on demand/i)).toBeInTheDocument();
+ fireEvent.change(screen.getByLabelText('Checkpoint'), { target: { value: 'Example/Other-MTP' } });
+ fireEvent.change(screen.getByLabelText('Port'), { target: { value: '8010' } });
fireEvent.click(screen.getByRole('button', { name: /^Start MTPLX/ }));
- expect(handlers.onStart).toHaveBeenCalledWith({ model: null });
+ expect(handlers.onStart).toHaveBeenCalledWith({ model: 'Example/Other-MTP', port: 8010 });
});
it('will not offer to stop a server started outside PortOS', async () => {
diff --git a/server/services/promptRunner.js b/server/services/promptRunner.js
index 5d77e5e163..c7984cd846 100644
--- a/server/services/promptRunner.js
+++ b/server/services/promptRunner.js
@@ -1247,7 +1247,9 @@ async function executeProviderRunOnce({
// (above) and any retry-fallback. This is the single chokepoint the
// module comment promises: gating the *requested* provider at the call
// site missed a remote/CLI primary that swaps/fails over to a local
- // backend, defeating the VRAM/OOM serialization. No-op for cloud/CLI/TUI.
+ // backend, defeating the VRAM/OOM serialization. Non-local CLI/TUI providers
+ // remain unconstrained.
+ const attemptStartedAt = Date.now();
return withLocalConcurrencyGate(effectiveProvider, async () => {
// API providers run through the shared toolkit readiness hook. TUI
// providers spawn OpenCode directly, so they need the same hook here or
@@ -1265,7 +1267,7 @@ async function executeProviderRunOnce({
exitCode: 1,
success: false,
error: message,
- startTime: Date.now(),
+ startTime: attemptStartedAt,
});
const error = new Error(message);
error.effectiveProvider = effectiveProvider;