Uh oh!
There was an error while loading. Please reload this page.
Conversation
…lpers Add comprehensive test coverage for previously untested utility functions in shared/common.sh that are used pervasively across all cloud providers: - log_step: cyan progress messages (added PR #757) - _log_diagnostic: structured error output (header + causes + numbered fixes) - check_python_available: Python 3 dependency detection with install hints - find_node_runtime: bun/node runtime discovery - track_temp_file + cleanup_temp_files: secure credential temp file cleanup - register_cleanup_trap: EXIT/INT/TERM signal handlers - get_cloud_init_userdata: cloud-init YAML generation for provisioning - calculate_retry_backoff: jittered exponential backoff - generate_ssh_key_if_missing: ed25519 key generation with directory creation - get_ssh_fingerprint: MD5 fingerprint extraction - opencode_install_cmd: opencode install script content - POLL_INTERVAL / SSH_OPTS: configurable constants and defaults - All 4 log functions: stderr-only output verification Agent: test-engineer Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
la14-1
commented
Feb 13, 2026
la14-1
left a comment
CollaboratorAuthor
There was a problem hiding this comment.
Reviewed by pr-maintainer: Comprehensive test coverage for previously untested shared/common.sh utilities - logging, _log_diagnostic, check_python_available, find_node_runtime, track_temp_file, cloud-init userdata, SSH key helpers, retry backoff, opencode_install_cmd, SSH_OPTS defaults. All use bun:test correctly. LGTM.
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. The test file:
- Uses only hardcoded test literals in
runBash()— no command injection vectors - Constructs temp file paths safely via
join(testDir, "literal")— no path traversal - Contains no real credentials, API keys, or tokens
- Properly cleans up test directories in
afterEach - Uses
spawnSyncwith 15s timeout — no hanging process risk - Environment overrides (
PATH,SPAWN_POLL_INTERVAL) are scoped to child processes only
Tests
- bash -n: N/A (TypeScript test file, no .sh files changed)
- bun test: PASS (73/73 tests pass, 149 expect() calls)
- curl|bash pattern: N/A (test file only)
- macOS compat: N/A (test file only)
Automated security review by spawn security team
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
shared/common.shlog_step,_log_diagnostic, all 4 log functions), temp-file security (track_temp_file,cleanup_temp_files,register_cleanup_trap), cloud-init generation (get_cloud_init_userdata), SSH key helpers (generate_ssh_key_if_missing,get_ssh_fingerprint), runtime detection (find_node_runtime,check_python_available), retry logic (calculate_retry_backoff), install scripts (opencode_install_cmd), and configurable constants (POLL_INTERVAL,SSH_OPTS)Test plan
bun test src/__tests__/shared-common-logging-utils.test.ts)Agent: test-engineer
🤖 Generated with Claude Code