Repository navigation
fix(server): reject malformed startup environment defaults - #454
Merged
Merged
Conversation
Return parse errors for term, coverage and analytics enablement before initializing external dependencies. Preserve unset defaults and valid values, including disabled analytics and zero coverage. Closes #236
Contributor
|
Warning Review limit reached
This review includes 4 billable files and costs up to $1.00.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 36 minutes for your next included review. View limit detailsLimit details: You’ve used the included review currently available. Your 68 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Review configuration: ⚙️ Run configurationConfiguration used: Repository: LeanerCloud/cloud-commitments-platform/.coderabbit.yaml Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (4)
Comment |
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.
Malformed
DEFAULT_TERM,DEFAULT_COVERAGE, orANALYTICS_COLLECTION_ENABLEDnow stops startup with an error naming the setting, before external initialization. Previously, inputs such as3y,80%, andnosilently became the built-in defaults. Both configuration loaders return parse errors directly. Unset defaults, accepted boolean spellings, zero coverage, and disabled analytics retain their behavior.Closes #236.
Validation on macOS with Go 1.26.6:
NewApplicationregression cases fail against the original source and pass with the fix. An emptyDB_HOSTprevents the original path from reaching cloud services, and assertions require the malformed setting's name.internal/server,internal/database,internal/purchase,cmd/server, andcmd/lambda.Independent gpt-6-astra review used the user-authorized substitution for unavailable Opus, with two clean source passes and independent original-source red/fixed-source green execution. Final verdict: PUBLICATION APPROVED for
6fc436c95de3e5163fe8c575e7c443d0d515322d, following a complete committed-diff reread and fresh startup/config/analytics race tests (exit 0, 3.321s).No cloud operations, purchases, or deployments were performed.