← All entries
/v0.3.2 /Frontend

Frontend Backend Contract Drift Fixed

Reconciled a mismatch that had existed between the frontend and backend from the start.

Project: Inter-Forge Version: v0.3.2 Area: Frontend

The art style IDs in the frontend ART_STYLES array did not match the backend STYLE_MODIFIERS keys. Both sides had been written independently and never properly reconciled, which meant the UI and backend were speaking slightly different dialects of the same idea.

The fix was to make the backend the source of truth. That removes one class of silent mismatch and reduces the chance that future frontend additions invent names the backend does not actually understand.

This pass also removed a dead svg_ready SSE handler still hanging around in Prospecting. SVG generation had already moved to Smelting in a previous session, but the frontend listener had never been cleaned up. The SVG regeneration path was also corrected to use the absolute disk path stored in the job result rather than trying to derive it from the served URL.

Why This Drift Matters

Contract drift is the kind of bug that keeps producing low-confidence behavior even when nothing is crashing. If the frontend names a style one way and the backend expects a different key, the interface can look valid while still sending the wrong intent into the system.

Making the backend the source of truth was the right move because the backend owns the actual modifiers. Cleaning out the dead svg_ready path matters for the same reason. The application should only listen for events that still exist in the real pipeline.

Diff Log: Source of Truth

The bug was contract drift between frontend and backend naming. The fix was to stop letting both sides define style identifiers independently and make the backend the source of truth.

Bug / Fix

- frontend ART_STYLES ids != backend STYLE_MODIFIERS keys
+ frontend reads and aligns to backend style identifiers

- dead svg_ready SSE listener still active in Prospecting
+ remove svg_ready listener and regenerate SVG from stored absolute path
← All entries