fix(ci): use require.resolve() in smoke_test_exports — fixes #755 - #759
Conversation
…orts [#755] Issue #755: Node 24 was surfacing ERR_USE_AFTER_CLOSE on readline close in non-TTY GitHub runners. The CLI loads fine — banner ("Installer v5.2.7") prints before the close fires — but the after-close error kills the exit code, making the job report a false positive. The intent of smoke_test_exports is to validate that `bin/aiox.js` is reachable through the package-exports gate, not to execute the wizard. require.resolve() triggers the same gate (ERR_PACKAGE_PATH_NOT_EXPORTED on exports drift) without loading the module, so the readline lifecycle never runs. Closes #755 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe npm-publish workflow's exports smoke test is updated to validate the package exports field using ChangesExports validation workflow update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📊 Coverage ReportCoverage report not available
Generated by PR Automation (Story 6.1) |
…orts [SynkraAI#755] (SynkraAI#759) Issue SynkraAI#755: Node 24 was surfacing ERR_USE_AFTER_CLOSE on readline close in non-TTY GitHub runners. The CLI loads fine — banner ("Installer v5.2.7") prints before the close fires — but the after-close error kills the exit code, making the job report a false positive. The intent of smoke_test_exports is to validate that `bin/aiox.js` is reachable through the package-exports gate, not to execute the wizard. require.resolve() triggers the same gate (ERR_PACKAGE_PATH_NOT_EXPORTED on exports drift) without loading the module, so the readline lifecycle never runs. Closes SynkraAI#755 Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Replaces
node -e "require('@aiox-squads/core/bin/aiox.js')"withrequire.resolve()in thesmoke_test_exportsjob of.github/workflows/npm-publish.yml. Eliminates a Node 24 false positive (ERR_USE_AFTER_CLOSE on readline close in non-TTY runners) while preserving the original intent of the gate — validating thatbin/aiox.jsis reachable through the package-exports field.Why
ERR_PACKAGE_PATH_NOT_EXPORTEDif bin/* is not declared in exports —require.resolve()triggers the same check.require()also loads and executes the module, which boots the CLI's readline interface; in non-TTY runners on Node 24 this surfacesERR_USE_AFTER_CLOSEafter the banner already prints, killing the exit code with a misleading error.smoke_test_exports (Node 24)reported failure even though the banner "Installer v5.2.7" printed correctly. CLI loaded fine — the readline lifecycle in non-interactive context was the culprit, not exports drift.Test plan
act --list)smoke_test_exportsmatrix Node 20/22/24 all pass GREENpackage.json,ERR_PACKAGE_PATH_NOT_EXPORTEDstill surfaces (verified by tracing Node's resolution algorithm —require.resolve()follows the samepkg.exportswalk asrequire()up to the load step)Issue
Closes #755
🤖 Generated with Claude Code
Summary by CodeRabbit