From 72b159c997cd7c99f44ba1a8a1bc88a0116f7e5e Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 30 Sep 2026 20:17:35 +0000 Subject: [PATCH] Fix check-schema-diff.sh: manager.zip nests under manager/, not flat The webapp project's real manager-zip target (seen for the first time this round) zips "manager/**/*" out of its build dir, so manager-exec.sh/manager.conf/model/libs all live under one manager/ prefix inside the zip - not at its root. check-schema-diff.sh did "cd $stage_dir && bash manager-exec.sh", which only worked against my own hand-built test fixture because I'd zipped that one flat by mistake; against a real manager.zip it would have failed to find manager-exec.sh at all. Fixed to cd into $stage_dir/manager, with a defensive check that fails loudly (rather than a bare "No such file or directory" from cd) if that layout is ever wrong. Re-verified all four check-schema-diff.sh scenarios (clean/dirty/ broken/missing) against a correctly-nested fixture this time, plus the new defensive check against a deliberately flat/malformed zip. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01Tj4SF2BGFxgoRYrCAzNpDb --- check-schema-diff.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/check-schema-diff.sh b/check-schema-diff.sh index 699785e..b6faad5 100755 --- a/check-schema-diff.sh +++ b/check-schema-diff.sh @@ -45,7 +45,17 @@ if ! unzip -q "$manager_zip" -d "$stage_dir"; then exit 1 fi -output=$(cd "$stage_dir" && bash manager-exec.sh diff-meta 2>&1) +# manager.zip's own build target (the webapp project's manager-zip, which +# zips "manager/**/*" out of its build dir) nests everything under one +# manager/ directory - manager-exec.sh, manager.conf, model/, and libs/ all +# live there, not at the zip's root. +if [ ! -f "$stage_dir/manager/manager-exec.sh" ]; then + echo "ERROR: $manager_zip didn't unzip to the expected manager/manager-exec.sh - has its layout changed?" >&2 + rm -rf "$stage_dir" + exit 1 +fi + +output=$(cd "$stage_dir/manager" && bash manager-exec.sh diff-meta 2>&1) status=$? echo "$output"