From 1db669119631c8ac286caee8f7052f4fc7e7e484 Mon Sep 17 00:00:00 2001 From: Don Petry <36422719+don-petry@users.noreply.github.com> Date: Wed, 28 Oct 2026 18:18:54 -0500 Subject: [PATCH 1/4] Muse's three minors on #364, and the App script reads its pushed head and its token as window 2 found GitHub sends them - tools/trial_p52_pause.sh leaves a token a refused mint carried to its trap, which revokes it and says so; the test reads the revocation. - roles/pr-review.json's create_check_run is held by a test and a mutant. - tools/trial_as_app.sh says the head its push made, reading the pull request until GitHub moves it there, and reads the mint's token after the last status line's headers, as GitHub pretty-prints an empty list across a blank line; a test and a mutant each. The third minor, P-39's reach read against the grants read, waits on the Maintainer's run of tools/trial_p39_reach.sh and goes with P-39's re-read. Co-Authored-By: Claude Opus 5.5 --- tests/test_tools.py | 41 +++++++++++++++++++++++++++++++++++++--- tools/mutants.py | 13 +++++++++++++ tools/trial_as_app.sh | 27 +++++++++++++++++++------- tools/trial_p52_pause.sh | 2 +- 4 files changed, 72 insertions(+), 11 deletions(-) diff --git a/tests/test_tools.py b/tests/test_tools.py index fb8f79ec8..c71cf1fb3 100644 --- a/tests/test_tools.py +++ b/tests/test_tools.py @@ -860,6 +860,11 @@ def test_an_owner_owns_what_the_authority_table_names_and_each_category_has_one( self.assertTrue(caught(self.team({"pr-review": self.review(), "pr-review-two": twin}), "security is owned by ['pr-review', 'pr-review-two']")) + def test_the_review_role_permits_its_check_run_now_its_app_is_granted_it(self): # decision 0059, Muse on #364 + manifest = json.loads((ROOT / "roles" / "pr-review.json").read_text()) + review = next(i for i in manifest["intents"] if i["name"] == "review-change") + self.assertEqual(review["permitted_effects"], ["submit_review", "create_check_run"]) + def test_each_permitted_effect_is_within_the_ceiling_of_its_roles_own_app(self): # section 5.4, decision 0005 wide = self.review(intents=[dict(self.review()["intents"][0], permitted_effects=["submit_review", "create_check_run"])]) @@ -4884,12 +4889,18 @@ def answer(status, body): answer(200, {"full_name": repo, "default_branch": "main"}) if path.endswith("/git/ref/heads/main"): answer(200, {"object": {"sha": "a" * 40}}) -if path.endswith("/git/refs") or "/contents/" in path: +if path.endswith("/git/refs"): answer(201, {"ok": True}) +if "/contents/" in path: + # The commit the push makes; GitHub then reads the pull request's head as the old one once, as it did in window 2. + state["pushed"] = True + answer(201, {"commit": {"sha": "b" * 40}}) if path.endswith("/pulls") and method == "POST": answer(201, {"number": 7}) if path.endswith("/pulls/7") and method == "GET": - answer(200, {"number": 7, "state": "open", "head": {"sha": "b" * 40, "ref": "trial/p-threads", "repo": {"full_name": repo}}}) + stale = state.get("pushed") and not state.get("moved") + state["moved"] = bool(state.get("pushed")) + answer(200, {"number": 7, "state": "open", "head": {"sha": ("c" if stale else "b") * 40, "ref": "trial/p-threads", "repo": {"full_name": repo}}}) if path.endswith("/pulls/7/reviews"): state["reviews"] += 1 answer(200, {"id": state["reviews"]}) @@ -4937,9 +4948,28 @@ def run_threads(self, **extra) -> tuple: capture_output=True, text=True, env=env, timeout=120, stdin=subprocess.DEVNULL) return bin_, ran + def test_the_token_is_read_after_the_last_status_lines_headers(self): + # The mint's answer as curl -i prints it: through a proxy a block of its own comes first, and GitHub + # pretty-prints an empty list across a blank line, which once hid the window's token, unread and unrevoked. + token = "ghs_" + "Q" * 36 + body = json.dumps({"token": token, "repositories": [], "permissions": {"contents": "write"}}, indent=2) + script = self.SCRIPT.read_text() + parse = re.search(r"/access_tokens\" \|\n python3 -I -c '\n(.*?)' \"\$raw\"\)", script, re.S).group(1) + for answer in ("HTTP/2 201 \r\ncontent-type: application/json\r\n\r\n" + body.replace("[]", "[\n\n ]"), + "HTTP/1.1 200 Connection established\r\n\r\nHTTP/2 201 \r\nx: y\r\n\r\n" + body): + kept = pathlib.Path(tempfile.mkdtemp(dir=SCRATCH.name)) / "02.raw" + ran = subprocess.run([sys.executable, "-I", "-c", parse, str(kept)], input=answer, capture_output=True, + text=True, timeout=60) + self.assertEqual((ran.returncode, ran.stdout), (0, token), answer[:40]) + self.assertNotIn(token, kept.read_text()) + def test_the_app_opens_resolves_and_deletes_and_revokes_its_token(self): bin_, ran = self.run_threads() self.assertEqual(ran.returncode, 0, ran.stderr) + # The head it says is the commit its push made, read again until GitHub moved the pull request to it (window 2 + # printed the head before the push). + self.assertIn("head " + "b" * 40, ran.stdout) + self.assertNotIn("still read", ran.stderr) self.assertNotIn(self.TOKEN, ran.stdout + ran.stderr) calls = [json.loads(line) for line in (bin_ / "calls").read_text().splitlines()] curl_calls = [json.loads(line) for line in (bin_ / "curl-calls").read_text().splitlines()] @@ -5850,7 +5880,12 @@ def test_a_mint_refused_reads_nothing(self): out, ran = self.run_script(folder) self.assertEqual(ran.returncode, 1) self.assertIn("no token was minted", ran.stderr) - self.assertEqual(len(self.calls(folder)), 1) + # The stand-in's refusal carries a token all the same, and the trap revokes it before the script ends; nothing + # else is asked. + said = self.calls(folder) + self.assertEqual(len(said), 2, said) + self.assertIn("installation/token", json.dumps(said[1])) + self.assertIn("stopped with a token live", ran.stderr) self.assertFalse((out / "token.json").exists()) def test_a_revocation_refused_stops_it_and_says_so(self): diff --git a/tools/mutants.py b/tools/mutants.py index 6954a1aec..73f8f5485 100644 --- a/tools/mutants.py +++ b/tools/mutants.py @@ -5197,6 +5197,19 @@ def moved_before(rel: str, block: str, anchor: str) -> tuple: ("the redaction writes in the locale's encoding", "tools/redact_trial.py", ' target = getattr(stdout, "buffer", None)\n', ' target = None\n', ("tests.test_tools.Redaction.test_it_opens_no_path_it_is_given",)), + ("the App reads the token after the last blank line", "tools/trial_as_app.sh", + 'cut = text.find("\\n\\n", starts[-1]) if starts else -1', 'cut = text.rfind("\\n\\n")', + ("tests.test_tools.AppThreads.test_the_token_is_read_after_the_last_status_lines_headers",)), + ("the App says the head before its push moved it", "tools/trial_as_app.sh", + ' [ "$read_head" = "$pushed" ] && break\n', ' break\n', + ("tests.test_tools.AppThreads.test_the_app_opens_resolves_and_deletes_and_revokes_its_token",)), + ("P-52 forgets a token its refused mint carried", "tools/trial_p52_pause.sh", + ' # A token the refusal carried all the same is left for the trap, which revokes it and says so (Muse on #364).\n', + ' token=""\n', + ("tests.test_tools.PauseReadTrial.test_a_mint_refused_reads_nothing",)), + ("the review Role does not permit its check run", "roles/pr-review.json", + '"submit_review",\n "create_check_run"\n', '"submit_review"\n', + ("tests.test_tools.Authority.test_the_review_role_permits_its_check_run_now_its_app_is_granted_it",)), ("the App's failed redaction leaves its partial clean file", "tools/trial_as_app.sh", ' rm -f "${1%.raw}.clean"\n', '', ("tests.test_tools.Redaction.test_it_opens_no_path_it_is_given",)), # Issue 282: the App's review threads, run against a stand-in gh, curl and openssl. diff --git a/tools/trial_as_app.sh b/tools/trial_as_app.sh index 4e19ca324..d29a5c000 100644 --- a/tools/trial_as_app.sh +++ b/tools/trial_as_app.sh @@ -52,7 +52,7 @@ root=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P) out=$(cd "$(mktemp -d)" && pwd -P) case "$out/" in "$root"/*) echo "the scratch directory is inside the repo" >&2; exit 2 ;; esac -jwt="" token="" n=0 id="" raw="" +jwt="" token="" n=0 id="" raw="" pushed="" read_head="" # The value at a dotted path of the JSON body of a redacted capture. value() { @@ -237,11 +237,14 @@ token=$(printf 'Authorization: Bearer %s\n' "$jwt" | curl -q -sS -i --fail-with-body -X POST -H @- -H "Accept: $ACCEPT" -H "X-GitHub-Api-Version: $VERSION" \ "$API/app/installations/$installation/access_tokens" | python3 -I -c ' -import json, sys +import json, re, sys text = sys.stdin.read().replace("\r\n", "\n") -# The last blank line ends the headers: a proxy prints its own "Connection established" block before the one -# from GitHub, and a JSON body holds no blank line. -head, gap, body = text.rpartition("\n\n") +# The headers are the block of the last status line: a proxy prints its own "Connection established" block before +# the one from GitHub, and GitHub prints an empty list in its JSON across a blank line, so neither the first blank +# line nor the last ends the headers. +starts = [m.start(1) for m in re.finditer(r"(?:\A|\n\n)(HTTP/[0-9.]+ [0-9]{3})", text)] +cut = text.find("\n\n", starts[-1]) if starts else -1 +head, body = (text[:cut], text[cut + 2:]) if cut >= 0 else (text, "") try: data = json.loads(body) except ValueError: @@ -266,6 +269,7 @@ if [ "$action" = open ] || [ "$action" = threads ]; then as_installation POST "repos/$repo/git/refs" "$(object "ref=refs/heads/$branch" "sha=$sha")" as_installation PUT "repos/$repo/contents/$file" \ "$(object "message=Trial: $file, added by the trial-author App" "content=$content" "branch=$branch")" + pushed=$(value "$out/$id.clean" commit.sha) as_installation POST "repos/$repo/pulls" "$(object "title=Trial: $branch, opened by the trial-author App" \ "head=$branch" "base=$base" "body=A platform trial. It is approved by the machine user alone, and read.")" pr=$(value "$out/$id.clean" number) @@ -277,9 +281,18 @@ else branch=$(value "$out/$id.clean" head.ref) as_installation PUT "repos/$repo/contents/$file" \ "$(object "message=Trial: $file, pushed by the trial-author App" "content=$content" "branch=$branch")" + pushed=$(value "$out/$id.clean" commit.sha) fi -as_installation GET "repos/$repo/pulls/$pr" -echo "Pull request $pr, branch $branch, head $(value "$out/$id.clean" head.sha)" +# GitHub moves a pull request's head after the push that moves it, so the head is read until it is the commit the +# push made, a few times, and said as it was last read. +for attempt in 1 2 3 4 5; do + as_installation GET "repos/$repo/pulls/$pr" + read_head=$(value "$out/$id.clean" head.sha) + [ "$read_head" = "$pushed" ] && break + sleep 2 +done +echo "Pull request $pr, branch $branch, head $read_head" +[ "$read_head" = "$pushed" ] || echo "trial_as_app: the push made $pushed, and the pull request still read $read_head" >&2 if [ "$action" = threads ]; then # The first thread: the App opens it, resolves it, and reads it as itself. diff --git a/tools/trial_p52_pause.sh b/tools/trial_p52_pause.sh index 8884af914..9fcf36fbf 100755 --- a/tools/trial_p52_pause.sh +++ b/tools/trial_p52_pause.sh @@ -115,7 +115,7 @@ import json, sys answer = json.load(sys.stdin) print(answer.get("token") or "" if isinstance(answer, dict) else "")' 2>/dev/null || true) if [ "$minted_status" != 201 ] || [ -z "$token" ]; then - token="" + # A token the refusal carried all the same is left for the trap, which revokes it and says so (Muse on #364). minted="" echo "trial_p52_pause: $slug: no token was minted for installation $installation (status ${minted_status:-none});" \ "nothing read" >&2 From 74eee7ea928901bebb6dc7a79dd9be483a48a0d3 Mon Sep 17 00:00:00 2001 From: Don Petry <36422719+don-petry@users.noreply.github.com> Date: Wed, 28 Oct 2026 18:32:26 -0500 Subject: [PATCH 2/4] The review's minors: the mint's capture starts at GitHub's own status line, a head that never moves is said, and a refused mint says so Co-Authored-By: Claude Opus 5.5 --- tests/test_tools.py | 23 ++++++++++++++++++++--- tools/mutants.py | 3 +++ tools/trial_as_app.sh | 4 ++-- tools/trial_p52_pause.sh | 2 +- 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/tests/test_tools.py b/tests/test_tools.py index c71cf1fb3..5bf64e213 100644 --- a/tests/test_tools.py +++ b/tests/test_tools.py @@ -4898,7 +4898,7 @@ def answer(status, body): if path.endswith("/pulls") and method == "POST": answer(201, {"number": 7}) if path.endswith("/pulls/7") and method == "GET": - stale = state.get("pushed") and not state.get("moved") + stale = os.environ.get("STANDIN_STALE") == "always" or (state.get("pushed") and not state.get("moved")) state["moved"] = bool(state.get("pushed")) answer(200, {"number": 7, "state": "open", "head": {"sha": ("c" if stale else "b") * 40, "ref": "trial/p-threads", "repo": {"full_name": repo}}}) if path.endswith("/pulls/7/reviews"): @@ -4948,6 +4948,13 @@ def run_threads(self, **extra) -> tuple: capture_output=True, text=True, env=env, timeout=120, stdin=subprocess.DEVNULL) return bin_, ran + def test_a_head_github_never_moves_is_read_five_times_and_said_so(self): + bin_, ran = self.run_threads(STANDIN_STALE="always") + calls = [json.loads(line) for line in (bin_ / "calls").read_text().splitlines()] + reads = [c for c in calls if any(a.endswith("/pulls/7") for a in c["argv"]) and "GET" in c["argv"]] + self.assertEqual(len(reads), 5) + self.assertIn("the push made " + "b" * 40 + ", and the pull request still read " + "c" * 40, ran.stderr) + def test_the_token_is_read_after_the_last_status_lines_headers(self): # The mint's answer as curl -i prints it: through a proxy a block of its own comes first, and GitHub # pretty-prints an empty list across a blank line, which once hid the window's token, unread and unrevoked. @@ -4962,6 +4969,7 @@ def test_the_token_is_read_after_the_last_status_lines_headers(self): text=True, timeout=60) self.assertEqual((ran.returncode, ran.stdout), (0, token), answer[:40]) self.assertNotIn(token, kept.read_text()) + self.assertTrue(kept.read_text().startswith("HTTP/2 201"), kept.read_text()[:40]) def test_the_app_opens_resolves_and_deletes_and_revokes_its_token(self): bin_, ran = self.run_threads() @@ -5805,6 +5813,8 @@ def status(name, default): code = status("mint", 201) body = {"token": "''' + "ghs_" + "P" * 36 + r'''", "expires_at": "2026-10-22T19:00:00Z", "permissions": {"actions_variables": "read", "issues": "write", "metadata": "read"}, "repository_selection": "selected"} + if (here / "status-notoken").exists(): + body.pop("token") print(json.dumps(body) + "\n" + str(code), end="") sys.exit(0) if method == "DELETE": @@ -5879,14 +5889,21 @@ def test_a_mint_refused_reads_nothing(self): folder = self.stand_in(mint=403) out, ran = self.run_script(folder) self.assertEqual(ran.returncode, 1) - self.assertIn("no token was minted", ran.stderr) + self.assertIn("the mint was refused", ran.stderr) # The stand-in's refusal carries a token all the same, and the trap revokes it before the script ends; nothing - # else is asked. + # else is asked, and the token is said nowhere. said = self.calls(folder) self.assertEqual(len(said), 2, said) self.assertIn("installation/token", json.dumps(said[1])) self.assertIn("stopped with a token live", ran.stderr) self.assertFalse((out / "token.json").exists()) + self.assertNotIn("ghs_", ran.stdout + ran.stderr) + self.assertFalse(any("ghs_" in f.read_text() for f in out.rglob("*") if f.is_file()) if out.exists() else False) + # A refusal that carries no token revokes nothing: one call, the mint. + folder = self.stand_in(mint=403, notoken=1) + out, ran = self.run_script(folder) + self.assertEqual(ran.returncode, 1) + self.assertEqual(len(self.calls(folder)), 1) def test_a_revocation_refused_stops_it_and_says_so(self): folder = self.stand_in(revoke=500) diff --git a/tools/mutants.py b/tools/mutants.py index 73f8f5485..211f2ce56 100644 --- a/tools/mutants.py +++ b/tools/mutants.py @@ -5210,6 +5210,9 @@ def moved_before(rel: str, block: str, anchor: str) -> tuple: ("the review Role does not permit its check run", "roles/pr-review.json", '"submit_review",\n "create_check_run"\n', '"submit_review"\n', ("tests.test_tools.Authority.test_the_review_role_permits_its_check_run_now_its_app_is_granted_it",)), + ("the App says nothing of a head that never moved", "tools/trial_as_app.sh", + '[ "$read_head" = "$pushed" ] || echo "trial_as_app: the push made', '[ "$read_head" = "$pushed" ] || true "trial_as_app: the push made', + ("tests.test_tools.AppThreads.test_a_head_github_never_moves_is_read_five_times_and_said_so",)), ("the App's failed redaction leaves its partial clean file", "tools/trial_as_app.sh", ' rm -f "${1%.raw}.clean"\n', '', ("tests.test_tools.Redaction.test_it_opens_no_path_it_is_given",)), # Issue 282: the App's review threads, run against a stand-in gh, curl and openssl. diff --git a/tools/trial_as_app.sh b/tools/trial_as_app.sh index d29a5c000..dc188269b 100644 --- a/tools/trial_as_app.sh +++ b/tools/trial_as_app.sh @@ -244,7 +244,7 @@ text = sys.stdin.read().replace("\r\n", "\n") # line nor the last ends the headers. starts = [m.start(1) for m in re.finditer(r"(?:\A|\n\n)(HTTP/[0-9.]+ [0-9]{3})", text)] cut = text.find("\n\n", starts[-1]) if starts else -1 -head, body = (text[:cut], text[cut + 2:]) if cut >= 0 else (text, "") +head, body = (text[starts[-1]:cut], text[cut + 2:]) if cut >= 0 else (text, "") try: data = json.loads(body) except ValueError: @@ -289,7 +289,7 @@ for attempt in 1 2 3 4 5; do as_installation GET "repos/$repo/pulls/$pr" read_head=$(value "$out/$id.clean" head.sha) [ "$read_head" = "$pushed" ] && break - sleep 2 + if [ "$attempt" -lt 5 ]; then sleep 2; fi done echo "Pull request $pr, branch $branch, head $read_head" [ "$read_head" = "$pushed" ] || echo "trial_as_app: the push made $pushed, and the pull request still read $read_head" >&2 diff --git a/tools/trial_p52_pause.sh b/tools/trial_p52_pause.sh index 9fcf36fbf..41ba6e471 100755 --- a/tools/trial_p52_pause.sh +++ b/tools/trial_p52_pause.sh @@ -117,7 +117,7 @@ print(answer.get("token") or "" if isinstance(answer, dict) else "")' 2>/dev/nul if [ "$minted_status" != 201 ] || [ -z "$token" ]; then # A token the refusal carried all the same is left for the trap, which revokes it and says so (Muse on #364). minted="" - echo "trial_p52_pause: $slug: no token was minted for installation $installation (status ${minted_status:-none});" \ + echo "trial_p52_pause: $slug: the mint was refused for installation $installation (status ${minted_status:-none});" \ "nothing read" >&2 exit 1 fi From 80d0bd61680c3b617e2bc4e8a8ba8a841cd8a286 Mon Sep 17 00:00:00 2001 From: Don Petry <36422719+don-petry@users.noreply.github.com> Date: Wed, 28 Oct 2026 18:41:25 -0500 Subject: [PATCH 3/4] The P-52 test reads the files its script keeps by name, never by walking the tree Co-Authored-By: Claude Opus 5.5 --- tests/test_tools.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_tools.py b/tests/test_tools.py index 5bf64e213..39289aa7d 100644 --- a/tests/test_tools.py +++ b/tests/test_tools.py @@ -5898,7 +5898,8 @@ def test_a_mint_refused_reads_nothing(self): self.assertIn("stopped with a token live", ran.stderr) self.assertFalse((out / "token.json").exists()) self.assertNotIn("ghs_", ran.stdout + ran.stderr) - self.assertFalse(any("ghs_" in f.read_text() for f in out.rglob("*") if f.is_file()) if out.exists() else False) + for kept in ("token.json", "requests.json", "ran_at"): + self.assertFalse((out / kept).exists() and "ghs_" in (out / kept).read_text(), kept) # A refusal that carries no token revokes nothing: one call, the mint. folder = self.stand_in(mint=403, notoken=1) out, ran = self.run_script(folder) From 15db036b0cb16ef8b609b28ad4ac019b8fcaca58 Mon Sep 17 00:00:00 2001 From: Don Petry <36422719+don-petry@users.noreply.github.com> Date: Wed, 28 Oct 2026 19:06:24 -0500 Subject: [PATCH 4/4] The App script's three new tests use bash's [[ ]], as Sonar asks (S7688) Co-Authored-By: Claude Opus 5.5 --- tools/mutants.py | 4 ++-- tools/trial_as_app.sh | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/mutants.py b/tools/mutants.py index 9ac819870..eaaafd0f7 100644 --- a/tools/mutants.py +++ b/tools/mutants.py @@ -5201,7 +5201,7 @@ def moved_before(rel: str, block: str, anchor: str) -> tuple: 'cut = text.find("\\n\\n", starts[-1]) if starts else -1', 'cut = text.rfind("\\n\\n")', ("tests.test_tools.AppThreads.test_the_token_is_read_after_the_last_status_lines_headers",)), ("the App says the head before its push moved it", "tools/trial_as_app.sh", - ' [ "$read_head" = "$pushed" ] && break\n', ' break\n', + ' [[ "$read_head" = "$pushed" ]] && break\n', ' break\n', ("tests.test_tools.AppThreads.test_the_app_opens_resolves_and_deletes_and_revokes_its_token",)), ("P-52 forgets a token its refused mint carried", "tools/trial_p52_pause.sh", ' # A token the refusal carried all the same is left for the trap, which revokes it and says so (Muse on #364).\n', @@ -5211,7 +5211,7 @@ def moved_before(rel: str, block: str, anchor: str) -> tuple: '"submit_review",\n "create_check_run"\n', '"submit_review"\n', ("tests.test_tools.Authority.test_the_review_role_permits_its_check_run_now_its_app_is_granted_it",)), ("the App says nothing of a head that never moved", "tools/trial_as_app.sh", - '[ "$read_head" = "$pushed" ] || echo "trial_as_app: the push made', '[ "$read_head" = "$pushed" ] || true "trial_as_app: the push made', + '[[ "$read_head" = "$pushed" ]] || echo "trial_as_app: the push made', '[[ "$read_head" = "$pushed" ]] || true "trial_as_app: the push made', ("tests.test_tools.AppThreads.test_a_head_github_never_moves_is_read_five_times_and_said_so",)), ("the App's failed redaction leaves its partial clean file", "tools/trial_as_app.sh", ' rm -f "${1%.raw}.clean"\n', '', ("tests.test_tools.Redaction.test_it_opens_no_path_it_is_given",)), diff --git a/tools/trial_as_app.sh b/tools/trial_as_app.sh index dc188269b..4ce7e353f 100644 --- a/tools/trial_as_app.sh +++ b/tools/trial_as_app.sh @@ -288,11 +288,11 @@ fi for attempt in 1 2 3 4 5; do as_installation GET "repos/$repo/pulls/$pr" read_head=$(value "$out/$id.clean" head.sha) - [ "$read_head" = "$pushed" ] && break - if [ "$attempt" -lt 5 ]; then sleep 2; fi + [[ "$read_head" = "$pushed" ]] && break + if [[ "$attempt" -lt 5 ]]; then sleep 2; fi done echo "Pull request $pr, branch $branch, head $read_head" -[ "$read_head" = "$pushed" ] || echo "trial_as_app: the push made $pushed, and the pull request still read $read_head" >&2 +[[ "$read_head" = "$pushed" ]] || echo "trial_as_app: the push made $pushed, and the pull request still read $read_head" >&2 if [ "$action" = threads ]; then # The first thread: the App opens it, resolves it, and reads it as itself.