Skip to content

Degraded TRELLIS.2 install frame promises a Repair that cannot work on a Command-Line-Tools-only host #4742

Description

@atomantic

Problem

A degraded TRELLIS.2 texture bake is reported through two lanes that write the same verify stage, and they disagree about which remedy to name on a host that has only the Command Line Tools active:

  • server/services/imageTo3d/adapters.jsdescribeInstallState substitutes textureBake.help with toolchain.hint ("install Xcode…") when toolchain.blocker is set, and sets repairable: false. The card and the route's already-installed short-circuit both read that.
  • server/services/imageTo3d/trellis2.js — the install's own verify hook always emits bake.help, i.e. TRELLIS2_FALLBACK_BAKE_HELP, which says "Repair install fetches the missing build dependencies and rebuilds the Metal backends".

So on a blocker host, finishing an install prints advice that Repair provably cannot honor — the very same state for which the card correctly hides the Repair button. The user is told to run a fix the UI has already decided not to offer.

This predates #4636; that issue fixed only the module-name half of the parity (both lanes now name the culprit modules through appendMissingBakeModules).

Decision (chosen approach — do not re-litigate)

Make the install's verify hook resolve the remedy the same way the adapter does, rather than duplicating the branch:

  1. In installTrellis2's verify, when bake.quality === 'fallback', probe the toolchain (probeMetalToolchain, already injectable-adjacent in this module) and prefer toolchain.hint over bake.help when toolchain.blocker is set — mirroring adapters.js.
  2. Better still if it reads cleanly: extract that "which remedy applies" decision into one exported helper in trellis2.js and have adapters.js call it too, so the branch exists once. appendMissingBakeModules is the precedent for a shared formatter across both lanes.
  3. Keep TRELLIS2_FALLBACK_BAKE_HELP byte-identical — tests assert on it as a stable constant.
  4. Keep the probe injectable so the suite never touches the host toolchain (the existing probeBake option is the pattern).

Acceptance criteria

  • On a blocker host, the install's verify frame names the Xcode remedy, not "Repair install fetches…".
  • On a non-blocker degraded host, the frame is unchanged.
  • The already-installed short-circuit and the post-install frame say the same thing for the same host state.
  • The verify hook still spawns no toolchain probe on a healthy (metal) or unknown bake.

Affected files

  • server/services/imageTo3d/trellis2.js
  • server/services/imageTo3d/adapters.js
  • server/services/imageTo3d/trellis2.test.js, server/services/imageTo3d/adapters.degraded.test.js

Related to #4636.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingeffort:lowDispatch reasoning effort: lowmodel:lightDispatch capability: cheapest capable coding modelplanTracked by /do:replan

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions