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
refactor: build the image-to-3D degraded-install projection in one place (#4741)
[._.]/ Adam Eivy58948cae4b95
diff --git a/server/routes/imageTo3d.test.js b/server/routes/imageTo3d.test.jsindex 4e2997d838..63186d7711 100644--- a/server/routes/imageTo3d.test.js+++ b/server/routes/imageTo3d.test.js@@ -39,7 +39,7 @@ vi.mock('../services/imageTo3d/targets.js', async (importOriginal) => ({}));vi.mock('../services/imageTo3d/trellis2.js', async (importOriginal) => ({- // Pure formatters (`missingBakeModulesLabel`) come through REAL — the adapter's+ // Pure formatters (`degradedInstall.js`) come through REAL — the adapter's// `degraded.detail` is asserted below, so stubbing them would test the stub....(await importOriginal()),isTrellis2Installed: vi.fn(() => false),diff --git a/server/services/imageTo3d/adapters.js b/server/services/imageTo3d/adapters.jsindex f804285777..99f6122501 100644--- a/server/services/imageTo3d/adapters.js+++ b/server/services/imageTo3d/adapters.js@@ -32,9 +32,11 @@* - `describeInstallState?()` — optional extra per-target diagnostics: async,* returns `{ warnings?: string[], fields?: object }`. `warnings` are generic* user-facing strings the route can surface (e.g. on an "already installed"- * short-circuit) without knowing what they're about; `fields` are extra keys- * merged onto the target in `GET /targets` (e.g. TRELLIS.2's texture-bake- * quality). Omit when a target has nothing extra to report.+ * short-circuit) without knowing what they're about — replayed into a `verify`+ * stage that renders ONE prose string per frame, so anything a warning needs to+ * say has to fit in the sentence; `fields` are extra keys merged onto the target+ * in `GET /targets` (e.g. TRELLIS.2's texture-bake quality). Omit when a target+ * has nothing extra to report.** **A degraded-but-working install reports `fields.degraded`**:* `{ label, help, repairable, detail? }`. This is the ONE shape the client renders,@@ -43,8 +45,15 @@* button is offered. `detail` is an optional short line naming the *specific* thing* that is missing (`Missing: o_voxel`) — `help` says which remedy to run, `detail`* says what is actually broken, so a user whose Repair keeps failing has something- * to act on instead of the same generic sentence. Omit it entirely rather than- * emitting an empty label when the probe could not determine anything.+ * to act on instead of the same generic sentence.+ *+ * **`help` carries the remedy and NOTHING ELSE** — never the culprit names, even+ * though it reads fine on its own that way: the card renders both, so interpolating+ * them into the sentence prints them twice on one target and styles them on the+ * next (#4741). Build both halves with `describeDegradedInstall` from+ * `degradedInstall.js` rather than assembling the object here — it applies the+ * omit-`detail`-when-there-is-nothing-to-name rule (an empty label must never+ * render) and produces the matching `warnings` sentence in one place.** A target may also return its own narrow diagnostic field, but keep it small and* keep the UI off it. `trellis2` still returns `textureBake` with **no in-repo@@ -59,8 +68,6 @@ import {runTrellis2Generate,probeTrellis2TextureBake,probeMetalToolchain,- missingBakeModulesLabel,- appendMissingBakeModules,resolveDegradedBakeRemedy,} from './trellis2.js';import {@@ -73,8 +80,9 @@ import {installPixal3dCuda,runPixal3dCudaGenerate,probePixal3dModules,+ PIXAL3D_INCOMPLETE_INSTALL_HELP,} from './pixal3dCuda.js';-import { missingModulesLabel, appendMissingModules } from './missingModules.js';+import { describeDegradedInstall } from './degradedInstall.js';import { detectCudaComputeCapability } from '../../lib/cudaCapability.js';export const TARGET_ADAPTERS = Object.freeze({@@ -100,7 +108,6 @@ export const TARGET_ADAPTERS = Object.freeze({async describeInstallState() {const bake = await probeTrellis2TextureBake();const degradedBake = bake.quality === 'fallback';- const missingModules = missingBakeModulesLabel(bake);const toolchain = degradedBake ? await probeMetalToolchain() : null;// A degraded bake has two very different remedies, and the card must not offer// the wrong one: when the Metal Toolchain is merely missing, Repair install@@ -109,35 +116,29 @@ export const TARGET_ADAPTERS = Object.freeze({// install's own `verify` frame resolves it through the SAME helper, so the two// lanes cannot name different fixes for one host state (#4742).const textureBake = { ...bake, ...(resolveDegradedBakeRemedy(bake, toolchain) ?? {}) };+ // Which modules failed to build is kept on the toolchain-`blocker` path too, where+ // `help` becomes the Xcode hint but WHICH modules failed is still the useful half.+ // `degradedQuality` is deliberately NOT passed: `flex_gemm` lowers bake quality+ // without forcing the fallback baker, so naming it would blame it for a confetti+ // surface it did not cause.+ const projection = degradedBake ? describeDegradedInstall({+ label: 'degraded textures',+ help: textureBake.help,+ repairable: textureBake.repairable !== false,+ missing: bake.missing,+ }) : null;return {fields: {textureBake,// Normalized degraded-state projection — see the `degraded` note in this// file's adapter contract. The client renders THIS, not `textureBake`, so a// target with a different kind of degradation needs no new UI branch.- ...(degradedBake ? {- degraded: {- label: 'degraded textures',- help: textureBake.help,- repairable: textureBake.repairable !== false,- // Which module actually failed to build. `help` names the remedy; without- // this the card can only repeat that remedy, so a Repair that keeps- // failing looks like an unbounded loop (#4636). Shares one formatter with- // the install's `verify` frame so the two lanes cannot drift. Kept on the- // toolchain-`blocker` path too, where `help` becomes the Xcode hint but- // WHICH modules failed is still the useful half. The emptiness guard is- // defensive only: a real probe reports `fallback` exactly when `missing`- // is non-empty, and the `quality: 'unknown'` case never reaches here — the- // outer `degradedBake` gate drops the whole `degraded` key first.- ...(missingModules ? { detail: missingModules } : {}),- },- } : {}),+ ...(projection ? { degraded: projection.degraded } : {}),},// Replayed verbatim into the install route's `verify` stage on the// already-installed short-circuit — the SAME stage the install's own verify- // hook writes. Carry the module names here too, or one condition emits two- // different frames depending on which path the caller took (#4636).- warnings: degradedBake ? [appendMissingBakeModules(textureBake.help, bake)] : [],+ // hook writes.+ warnings: projection?.warnings ?? [],};},}),@@ -204,26 +205,15 @@ export const TARGET_ADAPTERS = Object.freeze({const nafFallback = probe.naf === 'unavailable';// An incomplete install outranks a NAF fallback — it is the more severe problem,// and the same Repair action addresses both, so only the worse one is reported.- const degraded = incomplete- ? {+ const projection = incomplete+ ? describeDegradedInstall({label: 'incomplete install',- // `help` is the remedy ONLY. Which extensions failed goes in `detail`, the same- // split `trellis2` uses (#4741) — the card renders that as its own line, so- // interpolating the names into this sentence too would bury the one actionable- // half in prose for one target and style it for the other.- help: 'Pixal3D is installed but a required CUDA extension did not build, so renders '- + 'will fail in the mesh exporter. Repair install rebuilds the CUDA extensions; '- + 'your downloaded models are kept.',- repairable: true,- // Shares one formatter with the MPS lane so the two cannot word the same- // condition differently. No emptiness guard is needed: `incomplete` is the- // non-empty-or-null narrowing above, so this branch always has names.- detail: missingModulesLabel(incomplete),- }+ help: PIXAL3D_INCOMPLETE_INSTALL_HELP,+ missing: incomplete,+ }): nafFallback- // No module list to name — NAF is absent as a whole, not half-built — so this- // branch stays `detail`-less rather than emitting an empty label.- ? { label: 'NAF fallback', help: probe.help, repairable: true }+ // No module list to name — NATTEN is absent as a whole, not half-built.+ ? describeDegradedInstall({ label: 'NAF fallback', help: probe.help }): null;return {fields: {@@ -231,12 +221,12 @@ export const TARGET_ADAPTERS = Object.freeze({// `target.modules.modules` (a raw find_spec map) with no consumer.naf: probe.naf,// The normalized shape the client renders — see the adapter contract above.- ...(degraded ? { degraded } : {}),+ ...(projection ? { degraded: projection.degraded } : {}),},// Replayed into the install route's `verify` stage on the already-installed- // short-circuit, which has one prose string and no second line — so the module- // names are appended here instead of dropped with the `help` interpolation.- warnings: degraded?.help ? [appendMissingModules(degraded.help, incomplete)] : [],+ // short-circuit, which renders one prose string and has no second line for+ // `detail` — so the module names ride along in the sentence there.+ warnings: projection?.warnings ?? [],};},}),diff --git a/server/services/imageTo3d/degradedInstall.js b/server/services/imageTo3d/degradedInstall.jsnew file mode 100644index 0000000000..be08f1c880--- /dev/null+++ b/server/services/imageTo3d/degradedInstall.js@@ -0,0 +1,76 @@+/**+ * Image-to-3D — the one builder for a degraded-but-working install's projection.+ *+ * Two lanes report a half-built install: TRELLIS.2's texture-bake backends (`.metal`+ * sources that `setup.sh` compiles while still exiting 0) and Pixal3D's CUDA extensions+ * (same failure mode, different toolchain). Both surface the same two halves — the+ * remedy to run, and WHICH compiled modules are missing — through the same two+ * consumers: the card's `degraded` projection, which has a second line for the culprits,+ * and the install `verify` frame, which has one prose string and no second line.+ *+ * So the split lives here rather than in either lane. `describeDegradedInstall` assembles+ * both consumers from one description, which is what keeps `help` free of the module+ * names (the card would otherwise print them twice, and in two different wordings) while+ * the prose frame still carries them.+ *+ * Pure, and deliberately shaped around a plain `string[]` rather than either lane's probe+ * result: the caller does the `.missing` lookup, so a probe growing a second list of+ * names can format it through the same helpers.+ */++/**+ * A standalone card line naming the modules (`Missing: o_voxel, flex_gemm`).+ *+ * Punctuation-free — a card line wants none, so the terminal period is+ * `appendMissingModules`'s job. Returning `''` rather than a bare "Missing:" is what+ * lets `describeDegradedInstall` omit the key entirely: a degradation with nothing to+ * name (Pixal3D's NAF fallback — NATTEN is absent as a whole, not half-built) must not+ * render an empty detail line.+ *+ * @param {string[]|undefined} missing module names the probe found absent+ * @returns {string}+ */+export function missingModulesLabel(missing) {+ return missing?.length ? `Missing: ${missing.join(', ')}` : '';+}++/**+ * Remedy prose with the culprit modules appended as a closing sentence+ * (`… models are kept. Missing: o_voxel.`), for the lanes that can only emit one string+ * and have no second line to put a label on.+ *+ * @param {string} help the remedy prose (already ends in its own punctuation)+ * @param {string[]|undefined} missing module names the probe found absent+ * @returns {string}+ */+export function appendMissingModules(help, missing) {+ const label = missingModulesLabel(missing);+ return label ? `${help} ${label}.` : help;+}++/**+ * Both consumers of one degraded install state, from one description.+ *+ * `degraded` is the normalized card projection every target shares (see the adapter+ * contract in `adapters.js`); `warnings` is the prose the install route replays into its+ * `verify` stage. Assembling them per-adapter instead is how the two drift: one target+ * ends up interpolating the module names into `help` and the other styling them as a+ * line, for one condition (#4741).+ *+ * @param {object} args+ * @param {string} args.label short badge text (`incomplete install`)+ * @param {string} args.help the remedy, and ONLY the remedy — never the culprit names+ * @param {boolean} [args.repairable=true] can re-running install fix it?+ * @param {string[]} [args.missing] module names the probe found absent, when it knows+ * @returns {{degraded: {label: string, help: string, repairable: boolean, detail?: string},+ * warnings: string[]}}+ */+export function describeDegradedInstall({ label, help, repairable = true, missing }) {+ const detail = missingModulesLabel(missing);+ return {+ degraded: { label, help, repairable, ...(detail ? { detail } : {}) },+ // A degradation whose probe produced no prose has nothing to say in a stage that+ // renders only prose — an empty list, never a `[undefined]` frame.+ warnings: help ? [appendMissingModules(help, missing)] : [],+ };+}diff --git a/server/services/imageTo3d/degradedInstall.test.js b/server/services/imageTo3d/degradedInstall.test.jsnew file mode 100644index 0000000000..62774cc982--- /dev/null+++ b/server/services/imageTo3d/degradedInstall.test.js@@ -0,0 +1,73 @@+import { describe, expect, it } from 'vitest';+import {+ missingModulesLabel,+ appendMissingModules,+ describeDegradedInstall,+} from './degradedInstall.js';++// Both image-to-3D install lanes report "these compiled modules did not build" — the MPS+// texture-bake backends and the Pixal3D CUDA extensions — so one builder owns the split+// between the remedy and the culprits, and neither lane re-assembles it (#4741).+describe('missingModulesLabel', () => {+ it('names every module, comma-separated and punctuation-free', () => {+ // Punctuation-free on purpose: this is `degraded.detail`, a standalone card line.+ expect(missingModulesLabel(['o_voxel', 'flex_gemm'])).toBe('Missing: o_voxel, flex_gemm');+ });++ it('yields nothing to render for an empty or absent list', () => {+ // A bare "Missing:" would read as a determined verdict with the culprit lost.+ expect(missingModulesLabel([])).toBe('');+ expect(missingModulesLabel(undefined)).toBe('');+ });+});++describe('appendMissingModules', () => {+ it('closes the remedy prose with the module sentence', () => {+ expect(appendMissingModules('Repair install rebuilds them.', ['o_voxel']))+ .toBe('Repair install rebuilds them. Missing: o_voxel.');+ });++ it('returns the prose untouched when there is nothing to name', () => {+ // A degradation with no module list must not gain a dangling sentence.+ expect(appendMissingModules('NATTEN is missing.', [])).toBe('NATTEN is missing.');+ expect(appendMissingModules('NATTEN is missing.', undefined)).toBe('NATTEN is missing.');+ });+});++describe('describeDegradedInstall', () => {+ it('splits the remedy from the culprits for the card, and rejoins them for the prose frame', () => {+ // The card has a second line for `detail`; the `verify` stage has one string, so the+ // same condition has to survive both without being worded twice.+ const { degraded, warnings } = describeDegradedInstall({+ label: 'incomplete install', help: 'Repair install rebuilds them.', missing: ['o_voxel'],+ });+ expect(degraded).toEqual({+ label: 'incomplete install',+ help: 'Repair install rebuilds them.',+ repairable: true,+ detail: 'Missing: o_voxel',+ });+ expect(warnings).toEqual(['Repair install rebuilds them. Missing: o_voxel.']);+ });++ it('omits detail entirely when the probe has nothing to name', () => {+ // Omitting beats an empty string: the client renders `detail` whenever it is present.+ const { degraded } = describeDegradedInstall({ label: 'NAF fallback', help: 'Repair it.' });+ expect(degraded).toEqual({ label: 'NAF fallback', help: 'Repair it.', repairable: true });+ expect(degraded).not.toHaveProperty('detail');+ });++ it('carries an unrepairable degradation through rather than defaulting it away', () => {+ // `repairable: false` is what hides the Repair button; defaulting it to true would+ // offer an action that cannot work.+ const { degraded } = describeDegradedInstall({+ label: 'degraded textures', help: 'Install Xcode.', repairable: false, missing: ['o_voxel'],+ });+ expect(degraded.repairable).toBe(false);+ });++ it('warns about nothing when the degradation produced no prose', () => {+ // A `[undefined]` frame would render as the literal string "undefined" in the log.+ expect(describeDegradedInstall({ label: 'NAF fallback', help: undefined }).warnings).toEqual([]);+ });+});diff --git a/server/services/imageTo3d/missingModules.js b/server/services/imageTo3d/missingModules.jsdeleted file mode 100644index 5e05d742d3..0000000000--- a/server/services/imageTo3d/missingModules.js+++ /dev/null@@ -1,45 +0,0 @@-/**- * Image-to-3D — the one wording for "these compiled modules did not build".- *- * Two lanes report a half-built install: TRELLIS.2's texture-bake backends- * (`.metal` sources that `setup.sh` compiles while still exiting 0) and Pixal3D's- * CUDA extensions (same failure mode, different toolchain). Both surface the culprit- * module names, in the card's `degraded.detail` line AND in the prose the install's- * `verify` frame prints — so the string lives here rather than in either lane, and- * one condition cannot read two different ways depending on which target hit it.- *- * Pure, and deliberately shaped around a plain `string[]` rather than either lane's- * probe result: the caller does the `.missing` lookup, so a probe growing a second- * list of names can format it through the same helper.- */--/**- * A standalone card line naming the modules (`Missing: o_voxel, flex_gemm`).- *- * Punctuation-free — a card line wants none, so the terminal period is- * `appendMissingModules`'s job.- *- * Returning `''` rather than a bare "Missing:" is defensive depth, not the thing that- * keeps an indeterminate probe quiet: every caller gates on its own degraded signal- * first, and a real probe reports that exactly when the list is non-empty.- *- * @param {string[]|undefined} missing module names the probe found absent- * @returns {string}- */-export function missingModulesLabel(missing) {- return missing?.length ? `Missing: ${missing.join(', ')}` : '';-}--/**- * Remedy prose with the culprit modules appended as a closing sentence- * (`… models are kept. Missing: o_voxel.`), for the lanes that can only emit one- * string and have no second line to put `detail` on.- *- * @param {string} help the remedy prose (already ends in its own punctuation)- * @param {string[]|undefined} missing module names the probe found absent- * @returns {string}- */-export function appendMissingModules(help, missing) {- const label = missingModulesLabel(missing);- return [help, label && `${label}.`].filter(Boolean).join(' ');-}diff --git a/server/services/imageTo3d/missingModules.test.js b/server/services/imageTo3d/missingModules.test.jsdeleted file mode 100644index dbfc8114ef..0000000000--- a/server/services/imageTo3d/missingModules.test.js+++ /dev/null@@ -1,32 +0,0 @@-import { describe, expect, it } from 'vitest';-import { missingModulesLabel, appendMissingModules } from './missingModules.js';--// Both image-to-3D install lanes report "these compiled modules did not build" — the MPS-// texture-bake backends and the Pixal3D CUDA extensions — so one wording lives here and-// neither lane re-assembles it (#4741).-describe('missingModulesLabel', () => {- it('names every module, comma-separated and punctuation-free', () => {- // Punctuation-free on purpose: this is `degraded.detail`, a standalone card line.- expect(missingModulesLabel(['o_voxel', 'flex_gemm'])).toBe('Missing: o_voxel, flex_gemm');- });-- it('yields nothing to render for an empty or absent list', () => {- // A bare "Missing:" would read as a determined verdict with the culprit lost.- expect(missingModulesLabel([])).toBe('');- expect(missingModulesLabel(undefined)).toBe('');- expect(missingModulesLabel(null)).toBe('');- });-});--describe('appendMissingModules', () => {- it('closes the remedy prose with the module sentence', () => {- expect(appendMissingModules('Repair install rebuilds them.', ['o_voxel']))- .toBe('Repair install rebuilds them. Missing: o_voxel.');- });-- it('returns the prose untouched when there is nothing to name', () => {- // The NAF-fallback lane has no module list; it must not gain a dangling sentence.- expect(appendMissingModules('NATTEN is missing.', [])).toBe('NATTEN is missing.');- expect(appendMissingModules('NATTEN is missing.', undefined)).toBe('NATTEN is missing.');- });-});diff --git a/server/services/imageTo3d/pixal3dCuda.js b/server/services/imageTo3d/pixal3dCuda.jsindex e32fc82468..4082afbfea 100644--- a/server/services/imageTo3d/pixal3dCuda.js+++ b/server/services/imageTo3d/pixal3dCuda.js@@ -382,6 +382,16 @@ export const PIXAL3D_REQUIRED_MODULES = ['o_voxel', 'flex_gemm'];/** NATTEN backs the NAF upsampler. Absent ⇒ renders take upstream's fallback path. */export const PIXAL3D_NAF_MODULES = ['natten'];+/**+ * The remedy for a REQUIRED extension that did not build — and only the remedy: which+ * extensions failed rides the `degraded.detail` line the adapter builds (#4741). Lives+ * next to its NAF sibling rather than inlined at the registry so both readings of a+ * half-built install come from one place.+ */+export const PIXAL3D_INCOMPLETE_INSTALL_HELP = 'Pixal3D is installed but a required CUDA '+ + 'extension did not build, so renders will fail in the mesh exporter. Repair install '+ + 'rebuilds the CUDA extensions; your downloaded models are kept.';+export const PIXAL3D_NAF_FALLBACK_HELP = 'Pixal3D is installed, but NATTEN is missing, '+ 'so its NAF refinement step falls back to DINO projection features — slower, and '+ 'geometry/texture detail is a notch lower than upstream. Repair install rebuilds 'diff --git a/server/services/imageTo3d/trellis2.js b/server/services/imageTo3d/trellis2.jsindex b8abf50e31..daf0991eaa 100644--- a/server/services/imageTo3d/trellis2.js+++ b/server/services/imageTo3d/trellis2.js@@ -32,7 +32,7 @@ import {probePythonModules,} from './laneRunner.js';import { renderOptionArgs } from './renderOptions.js';-import { missingModulesLabel, appendMissingModules } from './missingModules.js';+import { appendMissingModules } from './degradedInstall.js';import {selectTrellis2DecimationTarget,trellis2MeshQualityArgs,@@ -189,45 +189,6 @@ export async function probeTrellis2TextureBake({};}-/**- * The culprit modules from a bake probe, as one short human-readable label- * (`Missing: o_voxel, mtlbvh`) — or `''` when there is nothing to name.- *- * The `degraded.detail` field is exactly this label, and the prose lanes get it through- * `appendMissingBakeModules` below rather than re-assembling the sentence. The wording- * itself lives in `missingModules.js`, shared with the Pixal3D CUDA lane, which reports- * the same "these compiled modules did not build" condition (#4741) — this wrapper only- * binds it to a bake probe's shape.- *- * `degradedQuality` is deliberately NOT passed through: `flex_gemm` lowers bake quality- * without forcing the fallback baker, so naming it here would read as a cause of the- * confetti surface when it isn't.- *- * @param {{missing?: string[]}} bake a result from `probeTrellis2TextureBake`- * @returns {string}- */-export function missingBakeModulesLabel(bake) {- return missingModulesLabel(bake?.missing);-}--/**- * A prose help string with the culprit modules appended as a closing sentence- * (`… models are kept. Missing: o_voxel.`).- *- * Both server lanes that report a degraded bake in prose go through this: the install's- * own `verify` hook, and the adapter `warnings` the install route replays into that- * SAME `verify` stage on the already-installed short-circuit. Assembling the sentence- * at each call site instead would let one condition emit two differently-worded frames- * depending on which path the caller took.- *- * @param {string} help the remedy prose (already ends in its own punctuation)- * @param {{missing?: string[]}} bake a result from `probeTrellis2TextureBake`- * @returns {string}- */-export function appendMissingBakeModules(help, bake) {- return appendMissingModules(help, bake?.missing);-}-/*** Which remedy a degraded texture bake actually has, given the host's toolchain state.*@@ -238,8 +199,8 @@ export function appendMissingBakeModules(help, bake) {* offered at all. Both server lanes that report a degraded bake resolve it HERE — the* card/short-circuit projection in `adapters.js`, and the install's own `verify` frame —* so the two cannot promise different fixes for the same host state (#4742). Same- * one-place-only reasoning as `appendMissingBakeModules` above, which fixed the- * module-name half of that parity.+ * one-place-only reasoning as `degradedInstall.js`, which fixed the module-name half+ * of that parity.** @param {{quality?: string, help?: string}} bake a result from `probeTrellis2TextureBake`* @param {{blocker?: string, hint?: string}|null} [toolchain] a result from `probeMetalToolchain`@@ -815,7 +776,7 @@ export function installTrellis2({emit({type: 'log',stage: 'verify',- message: `⚠️ ${appendMissingBakeModules(remedy.help, bake)}`,+ message: `⚠️ ${appendMissingModules(remedy.help, bake.missing)}`,});} else if (bake.quality === 'metal') {emit({ type: 'log', stage: 'verify', message: '✅ Metal texture baking is available.' });diff --git a/server/services/imageTo3d/trellis2.test.js b/server/services/imageTo3d/trellis2.test.jsindex ce635bd416..559b4c6d08 100644--- a/server/services/imageTo3d/trellis2.test.js+++ b/server/services/imageTo3d/trellis2.test.js@@ -28,7 +28,6 @@ import {TRELLIS2_METAL_BAKE_MODULES,TRELLIS2_BAKE_QUALITY_MODULES,TRELLIS2_FALLBACK_BAKE_HELP,- missingBakeModulesLabel,resolveDegradedBakeRemedy,TRELLIS2_METAL_TOOLCHAIN_HINT,TRELLIS2_REQUIRES_XCODE_HINT,@@ -424,27 +423,15 @@ describe('probeTrellis2TextureBake', () => {expect(resolveDegradedBakeRemedy(undefined, null)).toBeNull();});});- // #4636: one formatter feeds both the install's verify frame and the card's- // `degraded.detail`, so the two lanes cannot drift on the wording.- describe('missingBakeModulesLabel', () => {- it('names every missing Metal bake module', () => expect(- missingBakeModulesLabel({ missing: ['o_voxel', 'mtlbvh'] }),- ).toBe('Missing: o_voxel, mtlbvh'));-- it('is empty when nothing is missing, so no bare "Missing:" can render', () => {- expect(missingBakeModulesLabel({ missing: [] })).toBe('');- expect(missingBakeModulesLabel({})).toBe('');- expect(missingBakeModulesLabel(undefined)).toBe('');- });-- // `flex_gemm` lowers bake quality without forcing the fallback baker, so naming it- // here would blame it for the confetti surface it does not cause.- it('does not conflate degradedQuality with missing', async () => {- const result = await probeTrellis2TextureBake({- base: BASE, exists: () => true, execFileImpl: fakeExec({ ...allPresent, flex_gemm: false }),- });- expect(missingBakeModulesLabel(result)).toBe('');+ // `flex_gemm` lowers bake quality without forcing the fallback baker, so it must not+ // reach `missing` — naming it there would blame it for the confetti surface it does+ // not cause (#4636). The wording of the label itself is `degradedInstall.test.js`'s.+ it('does not conflate degradedQuality with missing', async () => {+ const result = await probeTrellis2TextureBake({+ base: BASE, exists: () => true, execFileImpl: fakeExec({ ...allPresent, flex_gemm: false }),});+ expect(result.missing).toEqual([]);+ expect(result.degradedQuality).toEqual(['flex_gemm']);});it('reports unknown — NOT fallback — when the probe itself fails', async () => {