Skip to content

[codex] Fix packed export validation in CI#1107

Merged
willgriffin merged 4 commits intomainfrom
codex/fix-pack-exports-ci
Apr 8, 2026
Merged

[codex] Fix packed export validation in CI#1107
willgriffin merged 4 commits intomainfrom
codex/fix-pack-exports-ci

Conversation

@willgriffin
Copy link
Copy Markdown
Contributor

Summary

  • validate packed package exports during publish dry-run and release safety checks
  • remove stale @happyvertical/smrt-svelte subpath exports that pointed at files that are not published
  • restore ./utils build outputs for smrt-places and smrt-profiles
  • teach the packed-export verifier to handle wildcard exports and type-only imports inside shipped .svelte files

Root cause

The current CI path was proving that packages could be built from workspace source, but it was not proving that the packed artifacts matched each package's published export map. That allowed stale export declarations to ship green. While tightening that check, the verifier also exposed a false positive for type-only imports inside shipped .svelte files.

Validation

  • pnpm exec node scripts/verify-package-types-exports.js packages/smrt-svelte
  • pnpm exec node scripts/verify-package-types-exports.js packages/places
  • pnpm exec node scripts/verify-package-types-exports.js packages/profiles
  • pnpm exec node scripts/verify-package-types-exports.js packages/products
  • pnpm exec node scripts/verify-package-types-exports.js packages/core
  • pnpm exec node scripts/verify-package-types-exports.js packages/secrets
  • pnpm exec node scripts/verify-package-types-exports.js packages/tenancy
  • yamllint .github/workflows/publish.yml
  • actionlint .github/workflows/publish.yml
  • git push pre-push hooks (format-check, workflow validation)

Notes

  • A full node scripts/validate-publish-packages.js sweep is still useful as the final repo-wide proof and the PR CI will now enforce that path directly.
  • products also exposed untracked generated vite.config.js artifacts locally; those were local shadow files rather than repo changes, so they are not part of this PR.

@willgriffin willgriffin marked this pull request as ready for review April 8, 2026 20:20
Copilot AI review requested due to automatic review settings April 8, 2026 20:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR strengthens release safety checks by validating that each package’s packed (publishable) artifact matches its declared package.json export surface, preventing CI from passing on workspace-only builds that don’t reflect what gets published.

Changes:

  • Run packed export verification for publishable packages during release safety checks and the publish dry-run sweep.
  • Move the packed export verifier implementation into the CLI package (and make the root script a thin delegator).
  • Clean up/align package build + export surfaces (remove stale smrt-svelte exports; restore ./utils build outputs for places/profiles).

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
scripts/verify-package-types-exports.js Replaces the root verifier implementation with a delegator to the CLI-bundled verifier.
scripts/validate-publish-packages.js Adds packed export verification after npm pack --dry-run for each publishable package.
pnpm-lock.yaml Locks acorn and updates transitive acorn-* snapshot resolutions.
packages/smrt-svelte/package.json Removes stale subpath exports pointing at non-published artifacts.
packages/profiles/vite.config.ts Restores utils as an additional build entry via the shared package Vite config.
packages/places/vite.config.ts Switches to shared package Vite config and restores utils build entry.
packages/cli/src/commands/utilities.ts Extends doctor to run packed publish artifact verification when a package appears publishable.
packages/cli/src/commands/tests/utilities.test.ts Adds a test ensuring doctor reports broken packed artifacts for publishable packages.
packages/cli/scripts/verify-package-types-exports.js Introduces the new packed export verifier implementation (wildcards + .svelte type-only import handling).
packages/cli/package.json Publishes the scripts/ folder with the CLI package.
package.json Adds acorn at the repo root.
.github/workflows/publish.yml Runs node scripts/validate-publish-packages.js as part of release safety checks.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e7ab65b922

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@willgriffin willgriffin merged commit db643cf into main Apr 8, 2026
12 checks passed
@willgriffin willgriffin deleted the codex/fix-pack-exports-ci branch April 8, 2026 20:53
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.

2 participants