Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:A5c ai Babysitter Published Consumer Validation

From Leeroopedia
Knowledge Sources
Domains Release_Pipeline, Consumer_Validation
Last Updated 2026-10-23 00:00 GMT

Overview

A practice of validating published npm packages by installing them as a consumer and verifying importability, subpath exports, and binary smoke tests.

Description

Published Consumer Validation is the principle of testing a published package exactly as a downstream consumer would: install it from npm, import it, run its binaries, and verify all export paths resolve. This catches issues that local builds miss — incorrect exports maps, missing files in the published tarball, broken bin entries.

The validation produces structured evidence (checks.json, summary.json) that is consumed by the promotion gate. The gate refuses to promote a version where any check fails.

Usage

Use this principle when designing release pipelines where promotion to production channels must be gated on consumer-side validation evidence.

Theoretical Basis

The validation runs four checks per package:

1. package-install: npm install <pkg>@<version> in temp dir
2. root-import: require/import the package entry point
3. subpath-import: require/import every subpath in the exports map
4. bin-smoke: run each bin entry with safe args, check exit code

Key property: Validation is performed against the published artifact, not the local build. This catches packaging issues (files missing from tarball, incorrect files field in package.json).

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment