Two bugs caused the post-Phase-3c APK build to ship from the wrong source:
1. The remote script hardcoded `feat/android-voip-client` as the branch
to pull — not the current working branch. It was never updated when
we moved to android-rewrite and then opus-DRED.
2. `git reset --hard origin/feat/android-voip-client 2>/dev/null || true`
silently swallowed the reset failure when that branch didn't exist on
the remote's origin, leaving the tree on whatever branch was there
from a previous session. In our case that was feat/desktop-audio-rewrite
at d0c1731 — the android-rewrite baseline, missing every Phase 0-4
commit. The ntfy notification even included the stale commit hash
d0c1731 but nobody noticed because the hash wasn't being cross-checked
against the branch the script claimed to be building.
Fix:
Local side (scripts/build-and-notify.sh):
- Auto-detect the current local branch via `git branch --show-current`
- Accept `--branch NAME` override for explicit control
- Pass the branch as a third positional arg to the remote build script
- Abort early if we can't determine a branch (detached HEAD)
- Updated usage docs to reflect the "build whatever I'm working on"
default
Remote side (embedded heredoc):
- Read BRANCH from $3 and abort if empty
- `git fetch origin "$BRANCH"` — no piping to /dev/null, errors surface
- `git reset --hard "origin/$BRANCH"` — no `|| true`, failures abort
- Print the resolved commit hash + subject line immediately after reset
so logs cross-reference the source clearly
- Started/done ntfy notifications now include the branch name alongside
the commit hash: "WZP Android [opus-DRED @ 953ab71] done! APK: ..."
Result: next build will (a) actually fetch the requested branch from the
remote's gitea origin, (b) fail loudly if the branch doesn't exist or
the reset fails, and (c) surface the branch in the ntfy notifications so
future "wait, which build is this?" confusion is impossible.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
git pull fails when refs are stale from concurrent builds. Switch to
git gc + git fetch + git reset --hard origin/branch for robustness.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Cargo.lock changes from Docker builds caused pull conflicts. Now uses
reset --hard + clean -fd to guarantee clean state before pulling.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Dedup key now includes source peer fingerprint hash, preventing
packets from different senders with same room+seq from being dropped
as duplicates (was silently killing all multi-hop audio)
- Build scripts default to --pull (use --no-pull to skip)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ntfy messages now show: "WZP Linux [abc1234] ready!" and
"WZP Android [abc1234] done! APK: url" so you can verify which
commit was built without checking relay version remotely.
Also added PRD-mtu-discovery.md for QUIC Path MTU Discovery.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
cargo-ndk doesn't always copy libc++_shared.so into jniLibs. The
build script now finds it in the NDK and copies it manually if
missing, preventing the build check from failing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Both Android and Linux build scripts now send ntfy notification
when build fails, not just on success.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>