From 122bee140a6ff157fc0350ce55bc5a7ddbbbdd77 Mon Sep 17 00:00:00 2001 From: tegwick Date: Thu, 8 Oct 2026 10:33:31 +0200 Subject: [PATCH] send-post: take reviewed_by from the post file's top-level sign-off An unsigned file (empty or the placeholder) is refused. Co-Authored-By: Claude Opus 5.5 Assistant: claude-code Assistant-Model: opus Assistant-Process: 5457@bnt-lap001 Assistant-Session: 792bf84a-3783-4f5d-a811-cded61dd2012 --- scripts/send-post.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/send-post.sh b/scripts/send-post.sh index 6511f01..7ee2fbc 100755 --- a/scripts/send-post.sh +++ b/scripts/send-post.sh @@ -32,9 +32,9 @@ export GOCACHE=${GOCACHE:-$realhome/.cache/go-build} read -r want reviewed < <(python3 -c ' import sys, yaml d = yaml.safe_load(open(sys.argv[1])) -print(d["channel"], d["request"].get("reviewed_by") or "-")' "$post") -[ "$want" = "$channel" ] || { echo "post is for channel '$want', not '$channel'" >&2; exit 2; } -[ "$reviewed" != "-" ] || { echo "request.reviewed_by is empty; a person reviews before sending" >&2; exit 2; } +r = str(d.get("reviewed_by") or "").strip() +print(d["channel"], r if r and not r.startswith("<") else "-")' "$post") +[ "$reviewed" != "-" ] || { echo "reviewed_by is not signed; a person reviews and signs before sending" >&2; exit 2; } TELEGRAM_CHANNEL_ID=$(go run ./cmd/provision adapter-config --spec "$spec" --channel "$channel" \ | sed -n 's/^TELEGRAM_CHANNEL_ID=//p') @@ -56,6 +56,7 @@ import json, os, subprocess, sys, yaml post, channel, tmp, hall, forge = sys.argv[1:] d = yaml.safe_load(open(post)) req = d["request"] +req["reviewed_by"] = str(d["reviewed_by"]).strip() # the file's sign-off is the review if not req.get("visual_url"): cmd = [f"{tmp}/compose", "visual", "--hall-dir", hall, "--hall-raw-base", f"{forge}/hall-of-helix/raw/branch/main",