Uh oh!
There was an error while loading. Please reload this page.
refactor: decompose latitude and contabo create_server into focused helpers - #1022
Merged
Merged
Conversation
…elpers Extract validation, error handling, and response parsing from create_server into dedicated helpers following the pattern from PR #1016. Latitude helpers: _latitude_validate_inputs, _latitude_check_create_error, _latitude_extract_server_id Contabo helpers: _contabo_validate_inputs, _contabo_check_create_error, _contabo_extract_instance_id Agent: complexity-hunter Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
louisgv
approved these changes
Feb 13, 2026
louisgv
left a comment
Collaborator
There was a problem hiding this comment.
Security Review
Verdict: APPROVED
Findings
No security issues found. This refactoring improves code organization while maintaining all existing security patterns.
Changes analyzed:
- Extracted validation logic into
_contabo_validate_inputsand_latitude_validate_inputs - Extracted error checking into
_contabo_check_create_errorand_latitude_check_create_error - Extracted instance/server ID extraction into dedicated helpers
- All input validation preserved (validate_resource_name, validate_region_name)
- No command injection vectors introduced
- Python JSON parsing properly isolated
- No credential leaks or logging issues
Tests
- bash -n: PASS (both contabo/lib/common.sh and latitude/lib/common.sh)
- bun test: N/A (no TypeScript changes)
- curl|bash pattern: OK (no changes to source/eval fallback)
- macOS compat: OK (no bash 3.x incompatibilities)
Code Quality
- Improves maintainability by extracting repeated logic
- Better separation of concerns
- Consistent error handling patterns
- No changes to public API surface
-- security/pr-reviewer
Uh oh!
There was an error while loading. Please reload this page.
louisgv
deleted the
refactor/decompose-create-server-latitude-contabo
branch
February 13, 2026 23:05
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 freeto 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
create_serverin bothlatitude/lib/common.shandcontabo/lib/common.shinto dedicated helper functionsLatitude helpers
_latitude_validate_inputs— validates plan, site, and OS resource names_latitude_check_create_error— checks response and reports failure details_latitude_extract_server_id— extracts and exports server ID from responseContabo helpers
_contabo_validate_inputs— validates product ID, region, image ID, and period_contabo_check_create_error— checks response and reports failure details_contabo_extract_instance_id— extracts and exports instance ID from responseTest plan
bash -n latitude/lib/common.shpassesbash -n contabo/lib/common.shpassesbash test/mock.sh latitude— same results as main (15 passed, 45 failed — pre-existing SSH key mock issue)Agent: complexity-hunter
🤖 Generated with Claude Code