AtlatestRepositorycourier
1
#!/usr/bin/env bash2
# Entry point for the single-poller + honest-send harness.3
#4
# Everything runs against repro/mock_telegram.py. NOTHING reaches real5
# Telegram: every courier started here has COURIER_TELEGRAM_API_URL pointed6
# at the local mock, which both the send and the poll path honour.7
#8
# The pre-fix CONTROL is not optional in spirit: case 1 asserts ZERO 409s,9
# and an absence assertion is worth nothing until the instrument has been10
# shown to detect the thing when it IS present. Build one with:11
#12
# git worktree add /tmp/courier-control <pre-fix-sha>13
# (cd /tmp/courier-control && sigil deps install && sigil build)14
# COURIER_CONTROL_BIN=/tmp/courier-control/build/dev/bin/courier \15
# repro/repro-single-poller.sh16
#17
# Without it the harness reports the control as FAILED rather than quietly18
# passing, because "we did not check" must not read as "it is fine".19
set -u21
HERE="$(cd "$(dirname "$0")" && pwd)"22
BIN="${COURIER_BIN:-$HERE/../build/dev/bin/courier}"23
PY="${PYTHON:-python3}"25
if [ ! -x "$BIN" ]; then26
echo "FATAL: courier binary not found at $BIN (run 'sigil build' first)"27
exit 228
fi30
exec "$PY" "$HERE/single_poller_harness.py" --bin "$BIN" "$@"