Skip to content

test(api): guard public export surface - #96

Merged
steipete merged 1 commit into
mainfrom
fix/export-surface
Aug 2, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/export-surface

Conversation

@steipete

@steipete steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • inspect every package.json export through the packed tarball installed in a clean temporary project
  • pin runtime exports, exported type names, published subpaths, and exported *ErrorCode string unions in a reviewed manifest
  • provide pnpm public-api:update as the explicit blessing path for deliberate compatibility changes

The guard reports each appeared or vanished symbol with its subpath and explains whether the API widened or existing consumers may break. It runs inside the existing pack verification, after the archive has been installed and imported exactly as a consumer would use it.

Proof

  • pnpm check (675 passed, 32 skipped)
  • pnpm test:security (64 passed)
  • pnpm pack:check
  • git diff --check
  • Codex autoreview: clean, no accepted/actionable findings

A temporary export const __publicApiGuardProbe = true in the published ./path module failed with:

Public API surface changed:
- runtime export appeared at ./path: __publicApiGuardProbe (the public API widened)
Remove accidental changes. If every change is deliberate, run `pnpm public-api:update` and review test/public-api.json before committing it.

The probe was removed before commit. A temporary expected-only symbol also verified the inverse diagnostic for a vanished export.

No changelog entry: this changes repository tests and release verification only, not package behavior.

@steipete
steipete requested a review from a team as a code owner August 2, 2026 22:12
@clawsweeper

clawsweeper Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: test(api): guard public export surface This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@steipete
steipete merged commit ffb84da into main Aug 2, 2026
22 checks passed
@steipete
steipete deleted the fix/export-surface branch August 2, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant