Encapsulation remediation (2026-08)
Follow-ups from the monorepo encapsulation / coverage review.
Done
- SYS_ENV —
nuxt.config.tsimportsnormalizeSysEnv/SysEnvfromcore/web/server/db/sys-env.ts(single switch). - Accents —
shared/personalization.tsownsACCENT_PRESETS+buildPersonalizationFoucScript(); FOUC head script and--portfolio-coral/ brand CSS vars consume that map (ember/crimson). 2b. Site person —content/profile.json+shared/site-profile.tsown names, contact, portrait, downloads, and copyright;useSiteProfile()and#shared/site-personre-exports wire UI andnuxt.configdefaults. - Docker —
docker/Dockerfile.app+ Compose build args replace duplicateDockerfile.api/Dockerfile.web(ports 4100/4200). - Admin layer — host
server/plugins/admin-blog.tsinjectsevent.context.adminBlog; layer handlers no longer import~~/server/**. Blog entity types live in@tgmc/web-layer-admin/shared/blog-types. - Tests —
blog-postgres/blog-dynamodbadapter specs; admin-handler + thin Nitro route wiring specs. - Coverage — Vitest thresholds on
@tgmc/utilities(80/80/70/80) and@tgmc/webserver db/api + personalization (70/65/55/70); CI runs both with--coverage. Also runssam-deploy-flow.test.mjsin the deployable gate job.
Verify
npm test
npx vitest run --coverage --config packages/utilities/vitest.config.mts
npx vitest run --coverage --config core/web/vitest.config.ts