chore: inline details around exit codes#6455
Closed
thisislawatts wants to merge 3 commits intomainfrom
Closed
Conversation
Contributor
9a4c853 to
7581bb9
Compare
8139143 to
f1b601a
Compare
f1b601a to
2747df4
Compare
Contributor
|
Your PR has not had any activity for 30 days. In 2 days I'll close it. Make some activity to remove this. |
Contributor
|
Your PR has now been stale for 2 days. I'm closing 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.
Pull Request Submission Checklist
What does this PR do?
This PR introduces comprehensive inline documentation for the CLI exit code strategy. It establishes a formal "Source of Truth" within the codebase regarding the design philosophy, technical constraints (8-bit limits), and the nature of exit codes as a stable public API contract.
Key additions include:
constantspackage to the implementation logic inbehavior.Where should the reviewer start?
Start with
cliv2/cmd/cliv2/behavior/maperrortoexitcode.goto review the design philosophy and constraints added to theMapErrorCatalogToExitCodefunction. Then verify the cross-reference incliv2/internal/constants/constants.go.How should this be manually tested?
This is a documentation-only change to existing files. Verify that the comments are correctly picked up by
go doc:What's the product update that needs to be communicated to CLI users?
No functional change to the product; this PR improves internal maintainability and contributor alignment with Snyk's public API stability standards.
Risk assessment (Low | Medium | High)?
Low. This PR adds documentation/comments only and does not modify the execution logic of the mapping function or the value of the constants.
Any background context you want to provide?
As the CLI matures, it is essential to prevent "exit code sprawl." By documenting that exit codes are a stable contract and suggesting JSON for granular details, we reduce the likelihood of accidental breaking changes and maintain a clean interface for CI/CD automation.