#6418·webstudio

fix: handle invalid font metadata during project load

Author: webstudio-issue-reporter[bot]Created Sep 19, 2026Updated Sep 19, 2026

User story

As a Webstudio user, I want projects with malformed font metadata to remain diagnosable and recoverable.

Summary

Multiple MCP reads fail while loading project data because font metadata fails schema validation.

What the agent tried

  1. Check project session status and load page records.
  2. Run the project audit and request fonts, assets, and a raw build snapshot.

Expected behavior

MCP identifies the invalid font record and reports a recoverable validation diagnostic while allowing unrelated project reads.

Actual result

Page and project settings reads succeeded. Audit, font listing, asset listing, snapshot, and the underlying build data load returned INTERNAL_SERVER_ERROR with an invalid font metadata union: family was missing and required style/weight or variationAxes fields were absent.

Recovery attempts

  1. Retried the asset list and snapshot using focused MCP operations; both failed at the same build.loadData validation.

User impact

The project reports a validation alert on load, and asset inspection and project audit through MCP are blocked.

Technical context

The failure originates in server-side build.loadData validation of a font metadata union. No project identifiers, asset identifiers, URLs, names, or raw project content are included.

Agent environment

  • Client: Codex
  • Provider: unknown
  • Model: unknown
  • Reasoning effort: unknown
  • Trigger: automatic-friction
  • Category: tool-failure

Technical runtime

  • CLI: 0.0.0-webstudio-version
  • Node.js: 22.22.1
  • Operating system: darwin 24 (arm64)
  • Execution mode: mcp
  • API contract: public-api:1shmyoc
  • Bundle contract: bundle-1x6rafk
  • Session namespace issues: stale=none; missing=instances,props,styles,styleSources,styleSourceSelections,dataSources,resources,assets,assetFolders,breakpoints,marketplaceProduct; invalidated=none
  • Preview: stale=true; rendered=false; version matches session=unknown

Acceptance criteria

  1. Identify the malformed font record and its safe metadata path in the returned diagnostic.
  2. Keep unrelated MCP project reads usable when one asset record is invalid.
  3. Add a regression test for build loading with malformed font metadata.