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
fix: file fal.ai and Reactor video renders under the cloud queue lane (#6292)
[._.]/ Adam Eivy463fada6a1e9
diff --git a/client/src/components/media/MediaJobsQueue.jsx b/client/src/components/media/MediaJobsQueue.jsxindex 46223bbb44..0be8a275b5 100644--- a/client/src/components/media/MediaJobsQueue.jsx+++ b/client/src/components/media/MediaJobsQueue.jsx@@ -7,7 +7,7 @@ import { FormField } from '../ui/FormField';import AutoSizeTextarea from '../ui/AutoSizeTextarea';import { listMediaJobs, cancelMediaJob, cancelQueuedMediaJobs, deleteMediaJob, retryMediaJob, runMediaJobNow } from '../../services/apiMediaJobs.js';import { listLoraTrainingCheckpoints } from '../../services/apiLoraTraining.js';-import { isCloudCliMode, IMAGE_GEN_MODE, CODEX_IMAGEGEN_DEFAULT_EFFORT, supportsCloudModelOverride, modeLabel } from '../../lib/imageGenBackends';+import { isCloudCliMode, IMAGE_GEN_MODE, CODEX_IMAGEGEN_DEFAULT_EFFORT, supportsCloudModelOverride, modeLabel, mediaJobLane, isCloudVideoMode } from '../../lib/imageGenBackends';import { ANTIGRAVITY_CONFIGURED_DEFAULT, CODEX_EFFORT_LEVELS, isConfiguredDefaultModel } from '../../utils/providers';import { lossSparklineGeometry } from '../../lib/lossSparkline';import {@@ -46,21 +46,17 @@ const KIND_ICON = { video: Film, image: ImageIcon, training: Cpu };// Video jobs are scheduled by the server into independent execution lanes.// Keep the UI labels aligned with the user-facing targets rather than exposing-// implementation names such as "gpu" and "cloud". Remote jobs are already-// projected with renderer="remote"; Grok video jobs carry the Grok mode while-// local video jobs carry their pipeline mode (text/image/etc.).+// implementation names such as "gpu" and "cloud". The lane a row belongs to is+// the server's own scheduling decision, read via `mediaJobLane` — the queue+// must never keep a second list of cloud backends, which is exactly how fal.ai+// and Reactor renders ended up filed under Local machine. The three cloud+// providers share one scheduler lane, so they share one section.const VIDEO_QUEUE_LANES = Object.freeze([- { id: 'local', label: 'Local machine', description: 'Local GPU renders run one at a time.' },- { id: 'grok', label: 'Grok', description: 'Grok renders use a cloud lane in parallel with local work.' },+ { id: 'gpu', label: 'Local machine', description: 'Local GPU renders run one at a time.' },+ { id: 'cloud', label: 'Cloud renders', description: 'Cloud provider renders share a lane that runs in parallel with local work.' },{ id: 'remote', label: 'Remote machines', description: 'Each selected peer owns the queue for work it receives.' },]);-const videoQueueLane = (job) => {- if (job?.renderer === 'remote') return 'remote';- if (job?.kind === 'video' && job.params?.mode === IMAGE_GEN_MODE.GROK) return 'grok';- return 'local';-};-// Creative Director scene renders use the same durable media queue as manual// Video Gen renders, but carry an owner tag so the orchestrator can reconcile// completion. Keep that ownership visible in the shared queue: otherwise an@@ -112,6 +108,15 @@ function modelLabel(params, renderer) {? `agy / ${model}`: 'agy / configured default';}+ if (renderer !== 'remote' && isCloudVideoMode(params.mode)) {+ // fal.ai / Reactor renders happen in the provider's cloud on a model id the+ // provider owns, so the row must name the provider rather than fall through+ // to the local-engine badge below (grok video is caught by the mode branch+ // above, which adds its aspect ratio).+ const cloudModel = (params.modelId || '').trim();+ const provider = modeLabel(params.mode);+ return cloudModel ? `${provider} / ${cloudModel}` : provider;+ }const id = (params.modelId || '').trim();// A federated render ran on a peer, so it must not wear the local badge. The// server projects `job.renderer` (and rebuilds `modelId` off the wire request)@@ -186,7 +191,7 @@ export default function MediaJobsQueue({ kind, recentLimit = 10, className = ''const videoLanes = useMemo(() => {if (kind !== 'video') return [];return VIDEO_QUEUE_LANES- .map((lane) => ({ ...lane, jobs: live.filter((job) => videoQueueLane(job) === lane.id) }))+ .map((lane) => ({ ...lane, jobs: live.filter((job) => mediaJobLane(job) === lane.id) })).filter((lane) => lane.jobs.length > 0);}, [kind, live]);diff --git a/client/src/components/media/MediaJobsQueue.test.jsx b/client/src/components/media/MediaJobsQueue.test.jsxindex c293d1c16f..7d04bca042 100644--- a/client/src/components/media/MediaJobsQueue.test.jsx+++ b/client/src/components/media/MediaJobsQueue.test.jsx@@ -127,12 +127,15 @@ describe('MediaJobsQueue — Creative Director renders', () => {});describe('MediaJobsQueue — video render lanes', () => {- it('shows local, Grok, and remote work in separate queues', async () => {+ it('files each job under the lane the server scheduled it into', async () => {+ // The lane comes from the server's own classifier (`executionLane`), so a+ // cloud backend the client has never heard of still lands in Cloud renders.listMediaJobs.mockResolvedValue([{id: 'localvideo0001',kind: 'video',status: 'running',+ executionLane: 'gpu',queuedAt: '2026-06-19T10:00:00Z',params: { prompt: 'an invented local shot', mode: 'text', modelId: 'local-video' },},@@ -140,27 +143,100 @@ describe('MediaJobsQueue — video render lanes', () => {id: 'grokvideo0001',kind: 'video',status: 'running',+ executionLane: 'cloud',queuedAt: '2026-06-19T10:01:00Z',- params: { prompt: 'an invented cloud shot', mode: 'grok' },+ params: { prompt: 'an invented grok shot', mode: 'grok' },+ },+ {+ id: 'falvideo00001',+ kind: 'video',+ status: 'running',+ executionLane: 'cloud',+ queuedAt: '2026-06-19T10:01:30Z',+ params: { prompt: 'an invented fal shot', mode: 'fal', modelId: 'provider/video-model' },+ },+ {+ id: 'reactorvideo01',+ kind: 'video',+ status: 'queued',+ executionLane: 'cloud',+ queuedAt: '2026-06-19T10:01:45Z',+ params: { prompt: 'an invented reactor shot', mode: 'reactor' },},{id: 'remotevideo001',kind: 'video',status: 'queued',- queuedAt: '2026-06-19T10:02:00Z',+ executionLane: 'remote',renderer: 'remote',+ queuedAt: '2026-06-19T10:02:00Z',params: { prompt: 'an invented peer shot', mode: 'text', modelId: 'peer-video' },},]);render(<MediaJobsQueue kind="video" />);- expect(await screen.findByRole('region', { name: 'Local machine video queue' })).toHaveTextContent('an invented local shot');- expect(screen.getByRole('region', { name: 'Grok video queue' })).toHaveTextContent('an invented cloud shot');+ const local = await screen.findByRole('region', { name: 'Local machine video queue' });+ expect(local).toHaveTextContent('an invented local shot');+ expect(local).not.toHaveTextContent('an invented fal shot');++ const cloud = screen.getByRole('region', { name: 'Cloud renders video queue' });+ expect(cloud).toHaveTextContent('an invented grok shot');+ expect(cloud).toHaveTextContent('an invented fal shot');+ expect(cloud).toHaveTextContent('an invented reactor shot');+expect(screen.getByRole('region', { name: 'Remote machines video queue' })).toHaveTextContent('an invented peer shot');- expect(screen.getByRole('heading', { name: 'Local machine' })).toBeInTheDocument();- expect(screen.getByRole('heading', { name: 'Grok' })).toBeInTheDocument();- expect(screen.getByRole('heading', { name: 'Remote machines' })).toBeInTheDocument();+ });++ it('badges a cloud provider render with its provider, not the local engine', async () => {+ listMediaJobs.mockResolvedValue([{+ id: 'falvideo00001',+ kind: 'video',+ status: 'running',+ executionLane: 'cloud',+ queuedAt: '2026-06-19T10:00:00Z',+ params: { prompt: 'an invented fal shot', mode: 'fal', modelId: 'provider/video-model' },+ }]);++ render(<MediaJobsQueue kind="video" />);++ expect(await screen.findByTitle('provider/video-model')).toHaveTextContent('fal.ai / provider/video-model');+ expect(screen.queryByText(/local \//)).not.toBeInTheDocument();+ });++ 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.+ listMediaJobs.mockResolvedValue([+ {+ id: 'legacylocal01',+ kind: 'video',+ status: 'running',+ queuedAt: '2026-06-19T10:00:00Z',+ params: { prompt: 'an invented legacy local shot', mode: 'text', modelId: 'local-video' },+ },+ {+ id: 'legacyfal0001',+ kind: 'video',+ status: 'running',+ queuedAt: '2026-06-19T10:01:00Z',+ params: { prompt: 'an invented legacy fal shot', mode: 'fal' },+ },+ {+ id: 'legacyremote1',+ kind: 'video',+ status: 'queued',+ renderer: 'remote',+ queuedAt: '2026-06-19T10:02:00Z',+ params: { prompt: 'an invented legacy peer shot', mode: 'text', modelId: 'peer-video' },+ },+ ]);++ render(<MediaJobsQueue kind="video" />);++ expect(await screen.findByRole('region', { name: 'Local machine video queue' })).toHaveTextContent('an invented legacy local shot');+ expect(screen.getByRole('region', { name: 'Cloud renders video queue' })).toHaveTextContent('an invented legacy fal shot');+ expect(screen.getByRole('region', { name: 'Remote machines video queue' })).toHaveTextContent('an invented legacy peer shot');});});diff --git a/client/src/lib/README.md b/client/src/lib/README.mdindex 3720974533..f0e6d17a7c 100644--- a/client/src/lib/README.md+++ b/client/src/lib/README.md@@ -69,7 +69,7 @@ grep -i "what you want to do" client/src/lib/README.md| `reverseOutlineGrid.js` | `buildPlotlineGrid` (reverse-outline scenes + plotlines → plotline-by-sequence grid rows/cells) + `sceneComponentCount`. Used by the Reverse Outline page. || `wrImageDefaults.js` | Writers Room per-scene image-gen defaults + style discriminators. || `imageGenBackends.js` | Icon metadata, `deriveAvailableBackends`, and `imageGenReadiness(status)` — a compatibility-safe `ready` / `unavailable` / `unknown` read of image-gen status responses; re-exports everything from `imageGenModes.js` so consumers keep one import site. |-| `imageGenModes.js` | Node-safe (dependency-free) image/video backend constants + pure helpers: `IMAGE_GEN_MODE`, render-target mirror (`RENDER_TARGET_OPTIONS`, `normalizeRenderPinValue`, `applyRecordRenderPin` — fold a record's `imageMode`/`imageModelId` pin over a settings-derived cfg), `VIDEO_RENDER_MODES`, `modeLabel`, cloud/model-override/i2i capability gating. Imported by the server-side parity suite — must stay importable without client packages. |+| `imageGenModes.js` | Node-safe (dependency-free) image/video backend constants + pure helpers: `IMAGE_GEN_MODE`, render-target mirror (`RENDER_TARGET_OPTIONS`, `normalizeRenderPinValue`, `applyRecordRenderPin` — fold a record's `imageMode`/`imageModelId` pin over a settings-derived cfg), `VIDEO_RENDER_MODES`/`isCloudVideoMode`, `modeLabel`, `mediaJobLane` (a projected media job's scheduler lane, with a `fallbackExecutionLane` derivation for responses predating the server's `executionLane` field), cloud/model-override/i2i capability gating. Imported by the server-side parity suite — must stay importable without client packages. || `imageGenDefaults.js` | Shared `DEFAULT_NEGATIVE_PROMPT` used by the Image Gen form and quick-submit entry points. Mirrors server-side default. || `imageGenResolutions.js` | Shared resolution presets for image generation. || `imageTo3dReasons.js` | Client mirror of the image-to-3D unavailable-reason labels in `server/services/imageTo3d/targets.js`: `UNAVAILABLE_REASONS` (reason code → user-facing label), `UNAVAILABLE_REASON_FALLBACK`, and `unavailableReasonLabel(code, fallback?)`, plus `isTargetReady(target)` — the shared readiness predicate (`installed` is tri-state: `null` = a hosted lane with no install concept, ready as soon as it is available). Use these anywhere a target's `unavailableReason` or readiness is rendered — never re-declare the codes or re-derive readiness from `target.installed` truthiness. Parity + code coverage enforced by `server/services/imageTo3d/unavailableReasons.parity.test.js`. |diff --git a/client/src/lib/imageGenModes.js b/client/src/lib/imageGenModes.jsindex 2f8811e51f..4f6124f871 100644--- a/client/src/lib/imageGenModes.js+++ b/client/src/lib/imageGenModes.js@@ -73,6 +73,18 @@ export const RENDER_TARGET_OPTIONS = Object.freeze([// `settings.videoGen.mode` pin.export const VIDEO_RENDER_MODES = Object.freeze(['local', 'grok', 'fal', 'reactor']);+// Client mirror of the server's CLOUD_VIDEO_GEN_MODES (lib/generationModes.js)+// — the video backends that render in a provider's cloud rather than on the+// local accelerator. 'local' is the only non-cloud entry of VIDEO_RENDER_MODES.+export const CLOUD_VIDEO_RENDER_MODES = Object.freeze(+ VIDEO_RENDER_MODES.filter((mode) => mode !== IMAGE_GEN_MODE.LOCAL),+);+export const isCloudVideoMode = (mode) => CLOUD_VIDEO_RENDER_MODES.includes(mode);++// Client mirror of the server's MEDIA_JOB_EXECUTION_LANES+// (server/lib/generationModes.js) — the lanes the media-job scheduler runs in.+export const MEDIA_JOB_LANES = Object.freeze(['gpu', 'cloud', 'remote']);+// Client mirror of the server's normalizeRenderPinValue// (server/lib/renderTargets.js) — THE one render-pin normalization rule: trim;// the 'auto' sentinel and blank strings collapse to null ("no pin").@@ -214,6 +226,29 @@ export const I2I_CAPABLE_MODES = Object.freeze([// True when a mode can run image-to-image.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+// 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 GPU+// render. Never call this when `executionLane` is present: the server's own+// classification is authoritative.+export const fallbackExecutionLane = ({ kind, mode, renderer } = {}) => {+ if (renderer === 'remote') return 'remote';+ if (kind === 'image' && isCloudCliMode(mode)) return 'cloud';+ if (kind === 'video' && isCloudVideoMode(mode)) return 'cloud';+ return 'gpu';+};++// THE one lane read for a projected media job: the server's classification when+// it is there, the compatibility derivation when it isn't.+export const mediaJobLane = (job) => (+ MEDIA_JOB_LANES.includes(job?.executionLane)+ ? job.executionLane+ : fallbackExecutionLane({ kind: job?.kind, mode: job?.params?.mode, renderer: job?.renderer })+);+// Pick the best available i2i backend from a list of `{ id }` backends,// preferring local (its form exposes strength + LoRAs), then codex, grok, agy.// Returns null when none is installed.diff --git a/server/lib/README.md b/server/lib/README.mdindex a987f9f6d9..88070ef794 100644--- a/server/lib/README.md+++ b/server/lib/README.md@@ -31,7 +31,7 @@ The barrel `server/lib/index.js` is a machine-checkable enumeration of every pub| `validation.js` | Catch-all Zod schemas (app/process/provider, social accounts, GitHub, backup/sharing, document/legacy-export) + the `validateRequest` middleware + shared helpers (`optionalBooleanMap`, `isSafeRecordId`, `parseIndexParam`, `parsePagination`). Re-exports the per-domain validation files below so existing deep imports keep working. || `taskDataInputCatalog.js` | Pure catalog and persisted ids for deterministic context sources that scheduled agent tasks can preload before dispatch. || `sharedSchemas.js` | Cross-domain Zod fragments that `validation.js` and the per-domain `*Validation.js` files both need, kept in a leaf module so the domain files never import back through `validation.js` (its hoisted `export * from` lines would TDZ). `grokVideoDurationSchema` (grok clip-length union), `cloudModelIdString(message)` (cloud-CLI model-id charset/bounds), `recordRenderPinFields` (the `imageMode`/`imageModelId` per-record render pin pair), and `isSafeSubdirFilter(v)` (relative path with no wildcard, `..` segment, or leading `/`), and `csvIdsParam({ max, maxIdLength, truncate })` (the `?ids=a,b,c` batch-by-id query param: trims, drops empties, reads all-blank as absent, and either 400s or silently slices an over-cap batch). |-| `generationModes.js` | Shared immutable image/video render-backend alphabets (`IMAGE_GEN_MODE[S]`, `QUEUEABLE_IMAGE_MODES`, `VIDEO_GEN_MODE[S]`, and cloud subsets), kept below both validation and generation services so schemas never import orchestration modules. |+| `generationModes.js` | Shared immutable image/video render-backend alphabets (`IMAGE_GEN_MODE[S]`, `QUEUEABLE_IMAGE_MODES`, `VIDEO_GEN_MODE[S]`, and cloud subsets) plus `mediaJobExecutionLane({ kind, mode, remote })` / `MEDIA_JOB_EXECUTION_LANES` — THE media-queue lane rule the scheduler and the public job projection share, kept below both validation and generation services so schemas never import orchestration modules. || `fableLoomLimits.js` | FableLoom record caps (`LOOM_LIMITS`) — the single source of truth shared by the route schemas and the record sanitizer. A leaf module, below both. || `fableLoomCameraMovements.js` | Shared FableLoom camera-movement registry for generated cut direction and the manual scene editor selector. || `fableLoomPlayback.js` | FableLoom node playback modes (`cut` auto-advances; `decision` loops while awaiting input), with the backward-compatible default. |diff --git a/server/lib/generationModes.js b/server/lib/generationModes.jsindex 788ed02204..189a0d4898 100644--- a/server/lib/generationModes.js+++ b/server/lib/generationModes.js@@ -47,3 +47,26 @@ export const VIDEO_GEN_MODES = Object.freeze(Object.values(VIDEO_GEN_MODE));export const CLOUD_VIDEO_GEN_MODES = Object.freeze([VIDEO_GEN_MODE.GROK, VIDEO_GEN_MODE.FAL, VIDEO_GEN_MODE.REACTOR,]);++/**+ * THE media-queue execution-lane rule, shared by the scheduler and the public+ * job projection so the UI can never drift from how a job is actually run.+ *+ * `remote` wins outright — a federated job is executed by a peer whatever+ * backend it names. Otherwise the cloud alphabets above decide: a cloud-CLI+ * image or video backend shells out to an external provider and runs in the+ * parallel cloud lane, while everything else (local video's text/image/fflf+ * semantic modes included) serializes on the local accelerator.+ *+ * Kept here rather than in mediaJobQueue so a light consumer — sanitizeJob, a+ * route handler, a client mirror's counterpart test — can classify a job+ * without importing the queue.+ */+export const MEDIA_JOB_EXECUTION_LANES = Object.freeze(['gpu', 'cloud', 'remote']);++export const mediaJobExecutionLane = ({ kind, mode, remote } = {}) => {+ if (remote) return 'remote';+ if (kind === 'image' && CLOUD_IMAGE_GEN_MODES.includes(mode)) return 'cloud';+ if (kind === 'video' && CLOUD_VIDEO_GEN_MODES.includes(mode)) return 'cloud';+ return 'gpu';+};diff --git a/server/services/mediaJobQueue/index.js b/server/services/mediaJobQueue/index.jsindex f1838f7225..696d7fd07e 100644--- a/server/services/mediaJobQueue/index.js+++ b/server/services/mediaJobQueue/index.js@@ -45,7 +45,7 @@ import { trainingEvents } from '../loraTraining/events.js';import { audioGenEvents } from '../audioGen/events.js';import { getSettings } from '../settings.js';import { IMAGE_GEN_MODE, CLOUD_IMAGE_GEN_MODES } from '../imageGen/modes.js';-import { VIDEO_GEN_MODE, CLOUD_VIDEO_GEN_MODES } from '../../lib/generationModes.js';+import { VIDEO_GEN_MODE, CLOUD_VIDEO_GEN_MODES, mediaJobExecutionLane } from '../../lib/generationModes.js';import { REMOTE_MEDIA_MODULES, isRemoteMediaJob } from './remoteMediaJob.js';import { routedJobParams } from '../federatedMedia/routedJobParams.js';@@ -57,8 +57,7 @@ import { routedJobParams } from '../federatedMedia/routedJobParams.js';// under the codex name for backward compat — it now bounds every cloud CLI// renders combined).const isCloudImageJob = (j) =>- (j.kind === 'image' && CLOUD_IMAGE_GEN_MODES.includes(j.params?.mode))- || (j.kind === 'video' && CLOUD_VIDEO_GEN_MODES.includes(j.params?.mode));+ mediaJobExecutionLane({ kind: j.kind, mode: j.params?.mode }) === 'cloud';// The federated-kind map and its predicate live in ./remoteMediaJob.js so light// consumers (sanitizeJob, route handlers) can ask "is this routed?" without@@ -66,11 +65,11 @@ const isCloudImageJob = (j) =>// always found it.export { isRemoteMediaJob };-const jobLane = (job) => {- if (isRemoteMediaJob(job)) return 'remote';- if (isCloudImageJob(job)) return 'cloud';- return 'gpu';-};+const jobLane = (job) => mediaJobExecutionLane({+ kind: job.kind,+ mode: job.params?.mode,+ remote: isRemoteMediaJob(job),+});// Boot restoration is the second way a job enters the queue, so it needs the// same routed-job normalization enqueueJob applies (#4683). A job written by adiff --git a/server/services/mediaJobQueue/sanitizeJob.js b/server/services/mediaJobQueue/sanitizeJob.jsindex e6e525507a..ef9f06553f 100644--- a/server/services/mediaJobQueue/sanitizeJob.js+++ b/server/services/mediaJobQueue/sanitizeJob.js@@ -1,5 +1,6 @@import { effectiveJobPrompt } from '../../lib/federatedMediaWire.js';import { isRemoteMediaJob } from './remoteMediaJob.js';+import { mediaJobExecutionLane } from '../../lib/generationModes.js';// Public projection of a media job. Keep worker-only paths and subprocess// details out of both the queue API and the processing dashboard.@@ -90,6 +91,12 @@ export function sanitizeJob(job) {// an exact description of what a projected `params` can contain. The UI// needs it because a peer render must not wear the local model badge.renderer: routed ? 'remote' : 'local',+ // Which of the scheduler's execution lanes actually runs this job, from the+ // SAME classifier mediaJobQueue schedules with — so the Render Queue can+ // never re-derive a stale backend list of its own. `renderer` above stays+ // exactly what it was (routed vs not); this is the finer local-GPU vs+ // cloud-provider split it cannot express.+ executionLane: mediaJobExecutionLane({ kind: job.kind, mode: job.params?.mode, remote: routed }),owner: job.owner,status: job.status,queuedAt: job.queuedAt,diff --git a/server/services/mediaJobQueue/sanitizeJob.test.js b/server/services/mediaJobQueue/sanitizeJob.test.jsindex 2d37e79979..a5ef4b452b 100644--- a/server/services/mediaJobQueue/sanitizeJob.test.js+++ b/server/services/mediaJobQueue/sanitizeJob.test.js@@ -200,4 +200,28 @@ describe('sanitizeJob', () => {// The marker must not rewrite a local training job's model either.expect(sanitized.params.modelId).toBe('dev');});+ it('projects the scheduler execution lane for every video backend, with remote winning', () => {+ const laneOf = (job) => sanitizeJob({ id: 'job', status: 'running', ...job }).executionLane;++ // Local video's mode is a semantic pipeline value, not a backend name.+ expect(laneOf({ kind: 'video', params: { mode: 'text' } })).toBe('gpu');+ expect(laneOf({ kind: 'video', params: { mode: 'grok' } })).toBe('cloud');+ // fal/Reactor were the drift: shipped cloud backends the UI filed as local.+ expect(laneOf({ kind: 'video', params: { mode: 'fal' } })).toBe('cloud');+ expect(laneOf({ kind: 'video', params: { mode: 'reactor' } })).toBe('cloud');+ expect(laneOf({ kind: 'image', params: { mode: 'codex' } })).toBe('cloud');+ expect(laneOf({ kind: 'image', params: { mode: 'local' } })).toBe('gpu');+ // A routed job runs on a peer whatever backend it names.+ expect(laneOf({+ kind: 'video',+ params: { mode: 'fal', remoteMedia: { wireVersion: 1, request: { modelId: 'peer-model' } } },+ })).toBe('remote');+ });++ it('keeps the renderer field alongside the new lane so an older client still reads it', () => {+ const sanitized = sanitizeJob({ id: 'job-fal', kind: 'video', status: 'running', params: { mode: 'fal', modelId: 'provider/video' } });++ expect(sanitized.renderer).toBe('local');+ expect(sanitized.executionLane).toBe('cloud');+ });});