Repository navigation
feat(cli): argument errors, run timeout, signal cancellation, and version resolution - #137
Merged
udoyechinenyevictoria merged 2 commits intoOct 22, 2026
Conversation
…olution Resolve issues Esureorg#54, Esureorg#55, Esureorg#56, and Esureorg#57 in the ESURE CLI: - Return structured JSON error envelopes on stderr for CLI argument errors - Add bounded --timeout-ms option wired to gateway execution via AbortSignal - Gracefully handle SIGINT and SIGTERM with documented exit codes 130 and 143 - Dynamically resolve package version from package.json metadata
|
@linesofcodes0-cloud Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
@linesofcodes0-cloud is attempting to deploy a commit to the Favour Chigozirim's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request addresses issues #54, #55, #56, and #57 in
esure-cli:Structured JSON Argument Errors (CLI: make argument errors conform to JSON output mode #54):
{"error": {"code": "INVALID_ARGUMENT", "message": "..."}}) onstderrwhen--output jsonor-o jsonis requested.Bounded Overall Run Timeout (CLI: add a bounded overall run timeout #55):
--timeout-ms <ms>option with a default of 120,000ms and bounded between 1ms and 600,000ms.AbortSignalto gateway execution to cancel pending work on timeout.RUN_TIMEOUTerror in JSON and human modes, and ensures timeout timers are cleaned up on all exit paths.Graceful SIGINT and SIGTERM Cancellation (CLI: handle SIGINT and SIGTERM with graceful run cancellation #56):
AbortSignaland emits concise cancellation output without leaking raw errors.finallyblocks to prevent listener leaks.Package Metadata Version Resolution (CLI: derive --version from package metadata #57):
--versionresolves the version dynamically by locating the nearest@esure/clipackage.jsonmetadata relative to module location.Closes #54
Closes #55
Closes #56
Closes #57