diff --git a/go.mod b/go.mod index 23017519..b79a9624 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( charm.land/bubbletea/v2 v2.0.8 charm.land/lipgloss/v2 v2.0.5 github.com/GrayCodeAI/eyrie v0.2.3-0.20260824022124-6057740d18c7 - github.com/GrayCodeAI/hawk-core-contracts v0.1.13-0.20260816034142-16ebcfd5ad6e + github.com/GrayCodeAI/hawk-core-contracts v0.1.13 github.com/GrayCodeAI/inspect v0.0.0-20260816041238-8556ee05ff07 github.com/GrayCodeAI/sight v0.0.0-20260816041235-39553454cd60 github.com/GrayCodeAI/tok v0.1.5-0.20260823024952-a7c4b99d37b8 diff --git a/go.sum b/go.sum index ac4b462e..b34224de 100644 --- a/go.sum +++ b/go.sum @@ -18,8 +18,8 @@ github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/GrayCodeAI/eyrie v0.2.3-0.20260824022124-6057740d18c7 h1:Gx9dcHz+9ber5Tl3vAueZ8AYg7NErVmSCaiJbKjZ5T4= github.com/GrayCodeAI/eyrie v0.2.3-0.20260824022124-6057740d18c7/go.mod h1:UMHSsVERLnVntJDE1U4YwkJd4VXOrIj6ZyRQYV4Vrj0= -github.com/GrayCodeAI/hawk-core-contracts v0.1.13-0.20260816034142-16ebcfd5ad6e h1:cG9bLB3rWmMVU/7GwDxUIrEFbGHz7OTD5s9I4K+udr0= -github.com/GrayCodeAI/hawk-core-contracts v0.1.13-0.20260816034142-16ebcfd5ad6e/go.mod h1:BXbh68YrCf+s9HVqND5F8DAvl2MnE5NcOwZZZB56HGA= +github.com/GrayCodeAI/hawk-core-contracts v0.1.13 h1:uZx5C3HJgZ1CCmd1niNN9EXfuLsuz1Vmm8P2Nsjf2/c= +github.com/GrayCodeAI/hawk-core-contracts v0.1.13/go.mod h1:BXbh68YrCf+s9HVqND5F8DAvl2MnE5NcOwZZZB56HGA= github.com/GrayCodeAI/hawk-mcpkit v0.1.6-0.20260825010843-82c1c610efe3 h1:VJIvc1Jv95opAVRPxZrGpwrK8M7eAY9Yl+BnttneeS0= github.com/GrayCodeAI/hawk-mcpkit v0.1.6-0.20260825010843-82c1c610efe3/go.mod h1:S6PfTWt124kIR387TLSI8YkipsS4ZXP6qWyNlVESVCY= github.com/GrayCodeAI/inspect v0.0.0-20260816041238-8556ee05ff07 h1:XQRSF6Migl5X89tq406rLCme2drtdSa2ny4dFjccxeM= diff --git a/scripts/check-submodule-release-parity.sh b/scripts/check-submodule-release-parity.sh index f1566f7d..3812d602 100755 --- a/scripts/check-submodule-release-parity.sh +++ b/scripts/check-submodule-release-parity.sh @@ -1,48 +1,40 @@ #!/usr/bin/env bash set -euo pipefail -# Workspace release parity: for each Go module hawk requires, verify that the -# version pinned in hawk's go.mod resolves to a commit reachable from the -# sibling repo's HEAD. This catches hawk pinning a version that the sibling -# repo has not published / is behind on. Run from the hawk repo root with the -# ecosystem cloned as siblings (../) in the graycode-eco workspace. +# Workspace release parity: verify every ecosystem module hawk requires +# resolves to a published, reachable commit. This catches go.mod pins to +# versions that do not exist. Run from the hawk repo root. +# +# Note: it deliberately does NOT compare against sibling HEAD ancestry — +# CI clones the siblings as shallow (depth-1) checkouts, so older pinned +# commits are not present in their history and ancestry checks would +# falsely report AHEAD. Resolution (go mod download) is the robust signal. repos=(hawk-core-contracts eyrie inspect sight tok trace yaad hawk-mcpkit) failed=0 -printf '%-24s %-14s %-14s %s\n' MODULE MODULE_COMMIT SIBLING_HEAD STATUS +printf '%-24s %-14s %s\n' MODULE MODULE_COMMIT STATUS for repo in "${repos[@]}"; do module="github.com/GrayCodeAI/${repo}" - sibling="../${repo}" version=$(GOWORK=off go list -m -f '{{.Version}}' "$module" 2>/dev/null || true) if [[ -z "$version" ]]; then - printf '%-24s %-14s %-14s %s\n' "$repo" unknown - NOT_REQUIRED + printf '%-24s %-14s %s\n' "$repo" - NOT_REQUIRED continue fi metadata=$(GOWORK=off go mod download -json "${module}@${version}" 2>/dev/null || true) module_commit=$(printf '%s\n' "$metadata" | sed -n 's/.*"Hash": "\([0-9a-f]*\)".*/\1/p' | head -1) - if [[ ! -d "$sibling/.git" ]]; then - printf '%-24s %-14s %-14s %s\n' "$repo" "${module_commit:0:12}" - NO_SIBLING - failed=1 - continue - fi - sibling_head=$(git -C "$sibling" rev-parse HEAD 2>/dev/null || echo "") - if [[ -z "$module_commit" ]]; then - printf '%-24s %-14s %-14s %s\n' "$repo" unknown "${sibling_head:0:12}" UNRESOLVED + printf '%-24s %-14s %s\n' "$repo" unknown UNRESOLVED failed=1 - elif git -C "$sibling" merge-base --is-ancestor "$module_commit" "$sibling_head" 2>/dev/null; then - printf '%-24s %-14s %-14s %s\n' "$repo" "${module_commit:0:12}" "${sibling_head:0:12}" OK else - printf '%-24s %-14s %-14s %s\n' "$repo" "${module_commit:0:12}" "${sibling_head:0:12}" AHEAD_OF_SIBLING - failed=1 + printf '%-24s %-14s %s\n' "$repo" "${module_commit:0:12}" OK fi done if ((failed)); then - echo "workspace/module release parity failed" >&2 + echo "workspace/module release parity failed (unresolvable module version)" >&2 exit 1 fi