Skip to content

ci(publish): fix smoke test for object sentinel exports - #377

Merged
codewizdave merged 1 commit into
mainfrom
fix/release-gating
Aug 3, 2026
Merged

ci(publish): fix smoke test for object sentinel exports#377
codewizdave merged 1 commit into
mainfrom
fix/release-gating

Conversation

@martyy-code

Copy link
Copy Markdown
Contributor

Summary

Fixes the smoke test step in publish.yml so it accepts both functions and object sentinels when checking exports. The none export is export const none: None = { ... } (an object), but the smoke test was asserting typeof === 'function', which rejected it.

Why

After #376 was merged and the e2e test was re-triggered, the release job progressed past the anti-republish guard but failed at the smoke test:

Error: expected export missing: none

none is correctly exported, but it's an object, not a function. The smoke test incorrectly assumed every expected export was a function constructor.

Changes

.github/workflows/publish.yml: both smoke test occurrences (release and hotfix) now accept either function or object types. Sentinel constants like none are now validated.

The first commit on this branch (#376, already merged) removed the check-release gate from the release job. This commit adds the smoke test fix on top.

Test plan

  • pnpm turbo type-check passes.
  • pnpm turbo lint passes.
  • Post-merge: re-trigger Publish on main → release job progresses through smoke test, publishes @1.0.2 on npm @latest.

Risk

Very low. Loosens a check from "must be function" to "must be function or object". Catches fewer false positives.

Rollback

Revert the merge commit. Smoke test fails again on object exports.

🤖 Generated with Claude Code

The smoke test asserted typeof m[name] === 'function' for every
named export. This was wrong for 'none', which is exported as
'export const none: None = { ... }' — a runtime sentinel object,
not a function constructor. The smoke test failed on a real
release because 'none' is an 'object', not a 'function'.

Fix: accept either 'function' (ok/err/some/maybe) or 'object'
(none, sentinels). Same logic in release and hotfix jobs.

Observed on the e2e test (run 30816144216 after PR #376 merge):
release job passed anti-republish guard, build, test, then
failed at the smoke test step with:
  Error: expected export missing: none

The publish itself never happened because the smoke test gate
is positioned before 'pnpm changeset publish' in the job
sequence.
@codewizdave
codewizdave merged commit 0a1ff87 into main Aug 3, 2026
4 checks passed
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