Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{
"name": "autodev",
"description": "Autonomous development workflow skills for coding agents",
"version": "6.0.2",
"version": "6.0.3",
"source": "./",
"author": {
"name": "Jon Langevin",
Expand Down
2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "autodev",
"description": "Autonomous development workflow skills for coding agents: design, review, planning, execution, monitoring, and retrospectives",
"version": "6.0.2",
"version": "6.0.3",
"author": {
"name": "Jon Langevin",
"email": "jon@gocodealone.com"
Expand Down
2 changes: 1 addition & 1 deletion .cursor-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "autodev",
"displayName": "Autonomous Dev Kit",
"description": "Autonomous development workflow skills for coding agents",
"version": "6.0.2",
"version": "6.0.3",
"author": {
"name": "Jon Langevin",
"email": "jon@gocodealone.com"
Expand Down
11 changes: 11 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Autonomous Dev Kit Release Notes

## v6.0.3 (2026-05-26)

### Hook JSON reliability

- Normalized unavailable `C.UTF-8` locale settings in the shared hook wrapper
before launching hook scripts. This prevents bash locale warnings on stderr
from corrupting strict hook JSON parsing on systems such as macOS.
- Added a hook-contract regression that runs through `hooks/run-hook.cmd` with
`LC_ALL=C.UTF-8`, `LANG=C.UTF-8`, and `LC_CTYPE=C.UTF-8` and verifies the
wrapper emits valid JSON with no stderr noise.

## v6.0.2 (2026-05-26)

### Marketplace rename
Expand Down
12 changes: 12 additions & 0 deletions hooks/run-hook.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,16 @@ CMDBLOCK
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
SCRIPT_NAME="$1"
shift

# Some hosts start hooks with C.UTF-8 even on systems where that locale is not
# installed (notably macOS). Bash then writes a locale warning to stderr before
# the hook can emit its JSON response, which makes strict hook parsers reject the
# output. Preserve valid locales, but fall back to C when C.UTF-8 is unavailable.
if { [ "${LC_ALL:-}" = "C.UTF-8" ] || [ "${LC_CTYPE:-}" = "C.UTF-8" ] || [ "${LANG:-}" = "C.UTF-8" ]; } &&
! LC_ALL=C locale -a 2>/dev/null | grep -Eiq '^(C\.UTF-8|C\.utf8)$'; then
[ "${LC_ALL:-}" = "C.UTF-8" ] && export LC_ALL=C
[ "${LC_CTYPE:-}" = "C.UTF-8" ] && export LC_CTYPE=C
[ "${LANG:-}" = "C.UTF-8" ] && export LANG=C
fi

exec bash "${SCRIPT_DIR}/${SCRIPT_NAME}" "$@"
28 changes: 28 additions & 0 deletions tests/hook-contracts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ run_hook() {
printf '%s' "$payload" | "hooks/${hook}"
}

run_hook_wrapper() {
local hook="$1"
local payload="$2"
local stdout_file="$3"
local stderr_file="$4"
env LC_ALL=C.UTF-8 LANG=C.UTF-8 LC_CTYPE=C.UTF-8 \
hooks/run-hook.cmd "$hook" >"$stdout_file" 2>"$stderr_file" <<<"$payload"
}

assert_hook_context_json() {
local name="$1"
local event="$2"
Expand Down Expand Up @@ -57,6 +66,24 @@ test_session_start_json() {
assert_hook_context_json "session-start" "SessionStart" "$output"
}

test_wrapper_suppresses_unavailable_c_utf8_locale_noise() {
local tmp stdout_file stderr_file stderr_text stdout_text
tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' RETURN
stdout_file="$tmp/stdout.json"
stderr_file="$tmp/stderr.txt"

run_hook_wrapper session-start '{"source":"startup","cwd":"'"$REPO_ROOT"'"}' "$stdout_file" "$stderr_file"
stdout_text="$(cat "$stdout_file")"
stderr_text="$(cat "$stderr_file")"

if [ -n "$stderr_text" ]; then
fail "run-hook.cmd: expected no stderr for unsupported C.UTF-8 locale, got: ${stderr_text}"
return
fi
assert_hook_context_json "run-hook.cmd session-start" "SessionStart" "$stdout_text"
}

test_prompt_strict_json() {
local tmp
tmp="$(mktemp -d)"
Expand Down Expand Up @@ -361,6 +388,7 @@ JSONL

require_jq
test_session_start_json
test_wrapper_suppresses_unavailable_c_utf8_locale_noise
test_prompt_strict_json
test_prompt_strict_no_output_without_trigger
test_pretool_pr_review_json
Expand Down
Loading