Repository navigation
Set app bundle budgets to 10% headroom - #2081
Conversation
|
🚨 SLOP COP 🚨 · I am the Slop Cop. I am reviewing this pull request for security, code quality, performance, architecture, and user behavior. |
eb73e7a to
43aab9e
Compare
There was a problem hiding this comment.
🚨 SLOP COP 🚨 · review
Plain-English summary
This pull request first moved an expensive failure prompt out of the normal thread load.
The author replaced that change during this review. The merged version only gives the app bundle more size headroom.
Finding
Medium — The 10% bundle limit weakens the size check.
The prior 3% rule would stop bundle growth sooner. The new rule permits about 110 KB more boot code and 161 KB more route code.
The named package rules do not catch an unlisted large package or steady general growth.
Please keep the 3% limit. Another option is a separate check that limits each pull request's bundle increase.
Other review results
I found no security issue.
The replaced prompt code had two medium issues. It held the error toast and Git queue while the optional module loaded.
It also loaded Handlebars for workspace_unavailable, which cannot create an agent prompt. The force-push removed both issues.
The architecture scan found no duplicate production prompt loader. It found no stale prompt names or stale 3% text in the requested revision.
Verification
- I reviewed requested SHA
eb73e7a8c73886b9937312955a01be8f490dbcc6. - The app type check passed.
- The production build passed.
- The bundle check passed at 1,530.6 KB boot raw and 2,251.6 KB route raw.
- Eight focused bundle tests passed.
git diff --checkpassed.- GitHub CI passed.
- The full local app run passed 3,112 tests and failed 10 tests under heavy machine load. GitHub passed the same full suite.
- A doobie browser test forced a signed commit failure. The error appeared after 2.4 seconds and showed no agent action.
The browser response omitted structured failure details. Thus, the old lazy prompt module did not load. The merged revision removed that unreachable flow.
GitHub changed the head to 43aab9e8d35f638ccdd6c6556f8e9248afa6d797 and merged it during this review. The bundle finding also applies to that revision.
What was wrong
The app bundle ratchets were set only 3% above a measured production build, leaving too little room for normal feature work and build variation. The intended policy is 10% headroom for both the boot payload and the first-paint thread-route closure.
What changed
How you verified
pnpm exec turbo run build typecheck --filter=@bb/app --cache-dir=.turbo/cache --output-logs=new-onlypnpm exec turbo run test --filter=@bb/app --cache-dir=.turbo/cache --output-logs=new-only— 404 files and 3,122 tests passed; 3 skipped.node apps/app/scripts/check-bundle-budget.mjs— both measured closures pass their exact 10% ratchets.git diff --checkFixes: N/A — performance maintenance requested directly.