From 5be8116607ac62c7db1681c6ee86adb641952c1a Mon Sep 17 00:00:00 2001 From: Ilia Denisov Date: Mon, 27 Jul 2026 19:21:20 +0200 Subject: [PATCH] docs(agent): note the UI job's bundle-size gate as a local pre-push step --- .claude/CLAUDE.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index b79e242..6b3fe4c 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -23,6 +23,13 @@ on it**, and prefer the authoritative docs where they overlap. Add to this file prod bump goes through a solver **PR → master + a published tag**, not a local replace. - **Run the whole CI suite locally before pushing** — unit + integration (`//go:build integration`, Postgres) + the UI job + codegen check. Do not lean on CI to catch what a local run would. +- **The UI job's last step is a size gate, not a test:** `cd ui && node scripts/bundle-size.mjs` + (gzip budgets per entry, `BUDGET` in that file). `pnpm build` succeeding says nothing about it, and + the app entry usually sits within a few hundred bytes of its cap, so *any* feature touching an + always-loaded screen can fail CI green-on-everything-else. Run it, and **rebuild first** — the + script measures whatever is in `dist/`, so a stale build silently measures the wrong branch. Put + new logic behind an existing lazy import where it belongs; raising `BUDGET` is allowed but the + file's header comment records the reason for every past raise — keep that up, and ask the owner. - **CI runner shares this host's `/tmp` as a different user.** In workflow steps, write artifacts to `${GITHUB_WORKSPACE}`, never a fixed `/tmp/...` path (cross-user permission failures otherwise). - **pnpm corepack pre-flight flakes.** `pnpm exec` / `pnpm check` occasionally abort on a corepack