mirror of
https://github.com/instructkr/claw-code.git
synced 2026-05-18 21:41:26 +08:00
cargo build without GIT_SHA env var → option_env!("GIT_SHA") = None
→ version JSON returns git_sha:null → dogfood-build.sh fails its own
provenance check every time.
Fix: pass GIT_SHA=$(git rev-parse --short HEAD) to cargo build.
The script now:
1. Sets GIT_SHA to current HEAD before cargo build
2. Reads git_sha from the built binary
3. Compares against HEAD — fails if still null or mismatched
Also adds latency note: cargo run = ~1s overhead/invocation vs 7ms
for pre-built binary; pre-built is recommended for dogfood loops.
Closes the broken provenance check introduced in the initial
dogfood-build.sh commit.