Skip to content

Add CI budget gate on WASM bundle size before mainnet release #1184

Description

@Gbangbolaoluwagbemiga

Overview

Add a CI check that fails the build if tooling/sanctifier-wasm's compiled bundle size exceeds a defined budget, protecting the dashboard/extension load-time experience for mainnet users.

Background / Context

tooling/sanctifier-wasm/pkg is consumed by the frontend and browser extension; an earlier wave covered WASM bundle-size verification/optimization (closed issue history), but this issue makes the check a hard, enforced budget gate specifically ahead of the mainnet-freeze tag.

Goal

CI fails if the WASM bundle exceeds a defined size budget (e.g. current size + 10% headroom), with the budget documented and revisitable.

Scope of Work

  1. Measure current WASM bundle size and set a documented budget.
  2. Add a CI step comparing the built bundle against the budget on every PR touching tooling/sanctifier-wasm.
  3. Document the process for revisiting the budget if a legitimate feature requires growth.

Out of Scope

  • Further bundle-size optimization work — gate enforcement only.

Acceptance Criteria

  • CI fails on a synthetic bundle-size-over-budget test case.
  • Budget documented in tooling/sanctifier-wasm/README.md.

Files & Pointers

  • tooling/sanctifier-wasm/
  • .github/workflows/wasm-bundlers.yml

Dependencies / Related

None blocking.

Difficulty & Estimated Effort

Easy — ~1 day.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component:wasmtooling/sanctifier-wasm (WASM package)difficulty:easySmall/safe changemainnetTouches mainnet launch readiness worknext-waveScoped for the next contributor wavepriority:p3Low priority / nice-to-havetype:perfPerformance / efficiency improvements

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions