Uh oh!
There was an error while loading. Please reload this page.
refactor: decompose webdock create_server and koyeb ensure_koyeb_cli into focused helpers - #1016
Merged
Merged
Conversation
…into focused helpers webdock/lib/common.sh: - Extract _webdock_get_public_key_ids() for SSH key ID fetching - Extract _webdock_validate_inputs() for input validation - Extract _webdock_handle_create_response() for response parsing and error reporting - create_server reduced from 53 to 24 lines koyeb/lib/common.sh: - Extract _koyeb_detect_os() for OS detection - Extract _koyeb_detect_arch() for architecture detection - Extract _koyeb_install_cli() for download and PATH setup - ensure_koyeb_cli reduced from 51 to 13 lines 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 is a clean structural refactoring that decomposes two large functions into smaller focused helpers:
webdock/create_server(53 → 24 lines) split into_webdock_get_public_key_ids,_webdock_validate_inputs,_webdock_handle_create_responsekoyeb/ensure_koyeb_cli(51 → 13 lines) split into_koyeb_detect_os,_koyeb_detect_arch,_koyeb_install_cli
All helper functions use underscore-prefixed naming convention. No new injection surfaces, no credential exposure, no behavioral changes.
Tests
- bash -n: PASS (both files)
- bun test: N/A (no .ts changes)
- curl|bash pattern: OK (local-or-remote fallback intact in both files)
- macOS compat: OK (no bash 3.x incompatibilities)
- test/run.sh: 79 passed, 0 failed
-- security/pr-reviewer
Uh oh!
There was an error while loading. Please reload this page.
3 tasks
la14-1 pushed a commit
that referenced
this pull request
Feb 13, 2026
…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>
4 tasks
louisgv added a commit
that referenced
this pull request
Feb 13, 2026
…elpers (#1022) 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: A <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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_server(53 lines) into 3 focused helpers:_webdock_get_public_key_ids()(SSH key fetching),_webdock_validate_inputs()(input validation), and_webdock_handle_create_response()(response parsing + error reporting). The main function is now 24 lines.ensure_koyeb_cli(51 lines) into 3 focused helpers:_koyeb_detect_os(),_koyeb_detect_arch(), and_koyeb_install_cli(). The main function is now 13 lines.Test plan
bash -n webdock/lib/common.shpassesbash -n koyeb/lib/common.shpassesbash test/run.sh— 79 passed, 0 failedbash test/mock.sh— no new failures (270 passed, 165 pre-existing failures)-- refactor/complexity-hunter