Repository navigation
🌱 chore: Add unit tests for ws channel shell helpers (shellQuote, shellJoin, currentBranch) - #56
hivecommons-hive[bot] wants to merge 1 commit into
Conversation
Covers shellQuote, shellJoin, and currentBranch in internal/ws/channel.go and shell.go, which previously had 0% test coverage despite being used to build shell commands sent to local, podman, and remote workspaces. shellQuote is the escaping primitive relied on for shell-injection safety (see channel_data.go, shell.go), so its quoting behavior for single quotes and shell metacharacters is round-tripped through a real shell in addition to exact-match assertions. Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
Important Held for human review by the hive's ACMM level gate. This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Agent PRs are held at ACMM L3–L5; an Hive will keep the |
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
Test Improvement
Adds
internal/ws/channel_shell_test.gocoveringshellQuote,shellJoin, andcurrentBranchininternal/ws/channel.goandinternal/ws/shell.go, which had 0% test coverage.shellQuoteis the escaping primitive relied on for shell-injection safety when building remote commands (used bychannel_data.goandshell.go), so tests assert exact quoting output for edge cases (embedded single quotes, shell metacharacters) and also round-trip escaped output through a realshto confirm injection safety.currentBranchgets success/error-path tests against a throwaway git repo.buildExtKubectlURL/buildExtPodmanURLin the same file are already covered bychannel_git_test.go; this PR does not touch or duplicate those.Related Issue
Closes #55
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-sonnet-5 copilot=1.0.88