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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tj4SF2BGFxgoRYrCAzNpDb
This commit is contained in:
Claude 2026-09-30 20:17:35 +00:00
parent 8c5c0fa3a0
commit 72b159c997
No known key found for this signature in database

View file

@ -45,7 +45,17 @@ if ! unzip -q "$manager_zip" -d "$stage_dir"; then
exit 1 exit 1
fi 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=$? status=$?
echo "$output" echo "$output"