#43499·frappe

Desk v2 guardrails: CI structure checks for layers, loops and concepts

Author: shariquerikCreated Sep 28, 2026Updated Sep 29, 2026
Labelswayfinder:task

Child of #43426 (Desk v2 — the architecture). Raised 2026-09-28 from the guardrails ruling.

Question

Build the CI structure checks: layers, folder loops, the concept list, and the server layer test.

Done when, in the "Frontend / Unit Tests" workflow and the Python tests:

  1. Layer check. Reads the layer file and one import graph (start from build-graph.mjs on the structure research branch). Fails on an import to a layer the file does not allow, including ui/ importing desk code. Today's 5 frontend breaks are listed in the layer file with the cut ticket that removes each.
  2. Loop check. Fails when a new group of folders importing each other appears, or when one of today's 7 groups grows.
  3. Concept check. Fails when a name exported across a folder boundary is missing from its layer's concept table in frontend/ARCHITECTURE.md.
  4. Server layer test. Fails when code in frappe/ outside frappe/shell/ imports frappe.shell. Baseline: frappe/utils/data.py and frappe/bundler.py.
  5. CI prints the files each flow's entry file reaches (boot, open a list, open a record, save, load a script), without failing.

Waits on the diagram prototype, which owns the layer file's format.

Rulings not to re-open (guardrails Q1, Q4, Q5, Q7, Q13): baseline ratchet; no line counts; the concept check covers exported names only; no concept-count limit; files per flow is printed, never failed.