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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
test: bind the queue's client lane derivation to the server classifier (#6292)
[._.]/ Adam Eivy5584a4af6ef5
diff --git a/client/src/components/media/MediaJobsQueue.test.jsx b/client/src/components/media/MediaJobsQueue.test.jsxindex 7d04bca042..3958160bb3 100644--- a/client/src/components/media/MediaJobsQueue.test.jsx+++ b/client/src/components/media/MediaJobsQueue.test.jsx@@ -205,8 +205,9 @@ describe('MediaJobsQueue — video render lanes', () => {});it('derives the lane from mode + renderer when the response predates executionLane', async () => {- // A peer still running an older build projects no lane at all; the queue- // must not fall back to filing every cloud render under Local machine.+ // A rebuilt bundle can be served briefly by a server process that has not+ // restarted onto the new projection yet; the queue must not fall back to+ // filing every cloud render under Local machine while that window is open.listMediaJobs.mockResolvedValue([{id: 'legacylocal01',diff --git a/client/src/lib/imageGenModes.js b/client/src/lib/imageGenModes.jsindex 4f6124f871..8276115dc1 100644--- a/client/src/lib/imageGenModes.js+++ b/client/src/lib/imageGenModes.js@@ -227,8 +227,11 @@ export const I2I_CAPABLE_MODES = Object.freeze([export const isI2iCapableMode = (mode) => I2I_CAPABLE_MODES.includes(mode);// Backward-compatibility read of a media job's execution lane for a queue-// response projected by a server that predates the `executionLane` envelope-// field (server/lib/generationModes.js#mediaJobExecutionLane). A federated job+// response carrying no `executionLane` (server/lib/generationModes.js#+// mediaJobExecutionLane). The bundle is served by the same install whose API it+// calls, so this is not routine version skew — it covers the window where a+// rebuilt client is already being served by a server process that has not+// restarted yet, and a replayed/hand-edited response. A federated job// is already identifiable from `renderer`; otherwise the cloud alphabets// decide, and every remaining mode — including local video's semantic// text/image/fflf values, which are not backend names at all — is a local GPUdiff --git a/server/lib/renderTargets.parity.test.js b/server/lib/renderTargets.parity.test.jsindex 90dee98813..22f6fa5946 100644--- a/server/lib/renderTargets.parity.test.js+++ b/server/lib/renderTargets.parity.test.js@@ -16,7 +16,10 @@import { describe, it, expect } from 'vitest';import { RENDER_TARGET, RENDER_TARGETS, RENDER_TARGET_BACKEND_AUTO } from './renderTargets.js';-import { CLOUD_IMAGE_GEN_MODES, IMAGE_GEN_MODES } from './generationModes.js';+import {+ CLOUD_IMAGE_GEN_MODES, IMAGE_GEN_MODES, VIDEO_GEN_MODES,+ CLOUD_VIDEO_GEN_MODES, MEDIA_JOB_EXECUTION_LANES, mediaJobExecutionLane,+} from './generationModes.js';import { EDIT_INCAPABLE_IMAGE_MODES } from '../services/imageGen/modes.js';import { cloudPromptRequired, maxInputImages } from '../services/imageGen/cloudProviderConfig.js';// Import the node-safe leaf, NOT imageGenBackends.js — that module imports@@ -29,6 +32,9 @@ import {I2I_CAPABLE_MODES as CLIENT_I2I_CAPABLE,MAX_INPUT_IMAGES as CLIENT_MAX_INPUT_IMAGES,cloudPromptRequired as clientCloudPromptRequired,+ CLOUD_VIDEO_RENDER_MODES as CLIENT_CLOUD_VIDEO_MODES,+ MEDIA_JOB_LANES as CLIENT_MEDIA_JOB_LANES,+ fallbackExecutionLane as clientFallbackExecutionLane,} from '../../client/src/lib/imageGenModes.js';// Targets the Settings UI deliberately does NOT list — a pin nobody's@@ -121,3 +127,34 @@ describe('cloud input-image capability client mirror parity', () => {}});});++/**+ * The Render Queue groups rows by the lane the scheduler actually chose, and+ * derives it client-side when a response carries no `executionLane`. That+ * derivation is a second copy of the rule, and a second copy nothing binds to+ * the first is exactly how fal.ai and Reactor video renders came to be filed+ * under "Local machine" (#6292). Bind it here: adding a cloud backend+ * server-side now fails this suite until the client mirror follows.+ */+describe('media-job execution-lane client mirror parity', () => {+ it('mirrors the cloud video alphabet and the lane vocabulary', () => {+ expect([...CLIENT_CLOUD_VIDEO_MODES].sort()).toEqual([...CLOUD_VIDEO_GEN_MODES].sort());+ expect([...CLIENT_MEDIA_JOB_LANES].sort()).toEqual([...MEDIA_JOB_EXECUTION_LANES].sort());+ });++ it('derives the same lane as the scheduler for every kind/mode/remote combination', () => {+ // 'text' stands in for the semantic (non-backend) modes a local video+ // render carries; an unknown value stands in for a backend this build has+ // never heard of. Both must resolve to the GPU lane.+ const modes = [...new Set([...IMAGE_GEN_MODES, ...VIDEO_GEN_MODES, 'text', 'unknown-future-backend', undefined])];+ for (const kind of ['image', 'video', 'training', 'audio']) {+ for (const mode of modes) {+ for (const remote of [false, true]) {+ expect(clientFallbackExecutionLane({ kind, mode, renderer: remote ? 'remote' : 'local' }),+ `client fallbackExecutionLane(${kind}, ${mode}, remote=${remote}) disagrees with the scheduler`)+ .toBe(mediaJobExecutionLane({ kind, mode, remote }));+ }+ }+ }+ });+});