Skip to content

Commit 0d44fd1

Browse files
committed
feat(scripts): M5a — claude[bot] minor + suggestion on PR #924
claude[bot] review on 834b172 — all 4 gemini fixes confirmed correct. Two non-blocking notes addressed inline: * Minor — line 75-78 comment overstated scope. The guard runs unconditionally, not just under --no-rebuild. Rewrote the comment to reflect the actual semantics (catches both the --no-rebuild case AND a fresh-build environment where a helper somehow produced a non-executable). * Suggestion — cross-PR dependency machine-readable guard. Added a pre-flight check before 'go build ./cmd/elastickv-list-routes' that surfaces a clear error if cmd/elastickv-list-routes/ doesn't exist in the current tree (i.e. PR #925 hasn't been merged yet). Without this guard, anyone trying to run the script from PR #924 alone gets an opaque 'package not found' error from go build with no remediation hint. Verification: bash -n scripts/run-jepsen-m5-local.sh -> OK.
1 parent 834b172 commit 0d44fd1

1 file changed

Lines changed: 17 additions & 4 deletions

File tree

scripts/run-jepsen-m5-local.sh

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,16 @@ done
5151

5252
# ---- build (server + route-key + list-routes helpers) ----
5353
if ! $NO_REBUILD; then
54+
# Pre-flight: cmd/elastickv-list-routes lands in PR #925. If this
55+
# branch is run before #925 merges, `go build` would emit an
56+
# opaque package-not-found error. Surface the cross-PR dependency
57+
# in a machine-readable way (claude[bot] suggestion on PR #924).
58+
if [ ! -d "$REPO_ROOT/cmd/elastickv-list-routes" ]; then
59+
echo "[error] cmd/elastickv-list-routes/ not found in this branch." >&2
60+
echo " PR #924 depends on PR #925 (setup-hook + list-routes CLI)." >&2
61+
echo " Merge #925 first, or check out the integrated branch." >&2
62+
exit 1
63+
fi
5464
echo "[build] compiling elastickv server..."
5565
cd "$REPO_ROOT"
5666
go build -o "$BINARY" .
@@ -72,10 +82,13 @@ fi
7282
# the base64 encoding stays in sync with adapter/dynamodb.go's
7383
# encodeDynamoSegment (codex P1 #1 on PR #905 ffb9c73f).
7484
#
75-
# When --no-rebuild is set, every helper binary must already exist
76-
# from a previous run; fail fast with a clear message rather than
77-
# letting `set -e` swallow a misleading 'No such file or directory'
78-
# (gemini medium on PR #924).
85+
# Guard: every helper binary must exist before continuing. Runs
86+
# unconditionally — catches both --no-rebuild (helpers expected from
87+
# a previous run) AND a fresh-build environment where a helper
88+
# somehow produced a non-executable. Failing fast with a clear
89+
# remediation message is strictly better than letting `set -e`
90+
# swallow a misleading 'No such file or directory' deeper in the
91+
# script (gemini medium + claude[bot] minor on PR #924).
7992
for bin in "$ROUTE_KEY_BIN" "$LIST_ROUTES_BIN" "$BINARY"; do
8093
if [ ! -x "$bin" ]; then
8194
echo "[error] required helper not found at $bin." >&2

0 commit comments

Comments
 (0)