The lean-build endgame: a site ships carrying only the plugins it chose. - scripts/build-site.sh: reads a site profile, resolves the hard-dependency closure from manifests, builds the frontend with SITE_PLUGINS (stage-frontend carries only those plugins), and stages a backend tree of core + only the chosen plugin dirs. An unchosen plugin is in neither the bundle nor the tree. - Core lazy-import guard: `flask seed demo` hard-imported the 5 asset subtype models, which would crash a lean build missing any of those plugins. Now guarded (a missing model skips its demo section). - test_lean_build_guards.py: statically asserts NO core (shopdb/core, shopdb/cli) import of a plugin is unguarded - a lean build omitting that plugin would otherwise crash. 0 unguarded today. Pilot verified: a lean build (machines + printers) carries only machines + printers code - PartsKiosk / ManifestEditor / USBLabelBatch / KnowledgeBaseDetail / EmployeeDirectory are absent from the bundle, and only machines/printers plugin dirs stage into the backend. (Sidebar labels for absent plugins remain - the accepted small plugin-aware core remainder.) Guard test + naming green.
1.9 KiB
1.9 KiB