asks: the live acceptance says when a new link can approve, and asks through mesh-cli
mesh/merge-gate pass: the change touches no module of the mesh's graph
mesh/repo-check pass: THE CHANGE ALTERS ITS OWN CHECK (merge-check.sh): main's version judged it; the change's judges the pull requests after it merges; it…
mesh/delivery superseded: a newer head of the same pull request
mesh/merge-gate pass: the change touches no module of the mesh's graph
mesh/repo-check pass: THE CHANGE ALTERS ITS OWN CHECK (merge-check.sh): main's version judged it; the change's judges the pull requests after it merges; it…
mesh/delivery superseded: a newer head of the same pull request
Step 3 stopped silently 16 minutes later when the Telegram account was linked less than an hour before; it now says that approvals start at the local time the router gives. The script reaches the controller through mesh-cli, the controller's terminal on the control node (hq ADR 0272).
This commit is contained in:
+12
-2
@@ -13,7 +13,9 @@
|
||||
# through which channel, with which proofs.
|
||||
set -eu
|
||||
|
||||
mc=${MESH_CONTROLLER:-mesh-controller}
|
||||
# mesh-cli asks the controller; on the control node, from the operator's own account, a line is the
|
||||
# controller's terminal (ADR 0272). `nox` is its interactive alias; a script says mesh-cli.
|
||||
mc=${MESH_CLI:-mesh-cli}
|
||||
stop() { echo "NOT ACCEPTED: $*"; exit 1; }
|
||||
|
||||
echo "1. Nothing open says the router's or Telegram's machine is not root-free (root-not-free, agent-root)."
|
||||
@@ -24,12 +26,20 @@ fi
|
||||
|
||||
echo "2. The Telegram channel holds a working bot token and its updates arrive."
|
||||
tg=$($mc ask telegram telegram_status) || stop "the telegram module does not answer"
|
||||
echo "$tg" | grep -q '"can_send": *true' || { echo "$tg"; stop "Telegram cannot send now (why_not above): give the bot token again, at this terminal: $mc secret accept <node> telegram telegram-token, then push <node>"; }
|
||||
echo "$tg" | grep -q '"can_send": *true' || { echo "$tg"; stop "Telegram cannot send now (why_not above): give the bot token again at the controller's terminal (hq ADR 0259, the operator's steps), then push the control node"; }
|
||||
|
||||
echo "3. One Telegram account is linked as the operator, and its hour has passed."
|
||||
ids=$($mc ask messenger messenger_identities) || stop "the router does not answer"
|
||||
echo "$ids"
|
||||
echo "$ids" | grep -q '"telegram"' || stop "no Telegram account is linked: send /start to the bot, then the code from the desk"
|
||||
# The router answers approvals from a new link only an hour after it was made (ADR 0259 §7): said here, with the
|
||||
# time, rather than seen as a rehearsal nobody's approval reaches.
|
||||
from=$(echo "$ids" | tr -d '\n ' | grep -o '"kind":"telegram"[^}]*' | grep -o '"approve-from":"[^"]*"' | cut -d'"' -f4 | head -n 1)
|
||||
[ -n "$from" ] || stop "the router's word on the Telegram account says no time it can approve from"
|
||||
starts=$(date -d "$from" +%s 2>/dev/null) || stop "the time the Telegram account can approve from is not a time: $from"
|
||||
if [ "$(date +%s)" -lt "$starts" ]; then
|
||||
stop "the Telegram account was linked less than an hour ago — approvals start at $(date -d "$from" '+%H:%M') (local time); run this again then"
|
||||
fi
|
||||
|
||||
echo "4. The rehearsal: a question on your phone. Approve it there within 15 minutes."
|
||||
said=$($mc rehearse --for 15m) || stop "the rehearsal could not be asked"
|
||||
|
||||
Reference in New Issue
Block a user