Skip to content

ADR 0019: resolve the platform-runtime package-size checkpoint #1704

Description

@thymikee

Context

ADR 0019 checkpoint PR #1703 records revise: the substrate and complete devices, logs, and network cutovers pass their architecture, parity, lifetime, laziness, startup, and coupling gates, but the published package exceeds every hard +3% size threshold. Broader command migration remains prohibited.

Controlled same-host comparison from 44c298d7f to 99f5af1b7:

Metric Baseline Checkpoint Change Excess beyond +3%
Raw JavaScript 2,036,067 B 2,121,980 B +4.22% 24,831 B
Gzipped JavaScript 659,646 B 690,882 B +4.74% 11,447 B
npm tarball 797,027 B 851,261 B +6.80% 30,324 B
npm unpacked 2,781,186 B 2,913,110 B +4.74% 48,489 B

Slice attribution identifies logs as the main increase: inventory +10,398/+4,581 raw/gzip, logs +69,775/+23,407, network +5,740/+3,248. Source-map review found no duplicate module emission. The obvious private Limrun declaration cleanup saves unpacked/compressed declaration bytes but cannot close the raw/gzip gaps.

Decision required

Choose and document an architecture-honest distribution/budget direction, for example:

  • make platform/provider runtime implementations optional install-time packages or otherwise exclude unselected implementations from the core published artifact; or
  • accept a reviewed replacement size budget based on measured distribution/startup cost and explain why the previous +3% threshold is no longer the right constraint.

Do not satisfy the checkpoint by removing frozen platform/provider behavior, weakening exact recovery, making implementations eager, or silently loosening thresholds.

Acceptance criteria

  • The packaging/budget decision is recorded in ADR 0019 or a superseding ADR.
  • Six-family/provider parity, fail-closed ownership, exact recovery, and metadata-eager/implementation-lazy loading remain intact.
  • Clean same-host base/head runs use pnpm build and node scripts/size-report.mjs --startup-runs 15.
  • Every package/startup metric passes the accepted reviewed bound.
  • ADR 0019 checkpoint is rerun and its Status changes from revise to continue or stop.
  • No broader command migration starts before that result.

Umbrella: #1696. Implementation stack: #1699#1701#1702#1703.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions