@@ -54,18 +54,34 @@ Any code push after a prior Codex approval invalidates that approval. A material
5454PR-body edit should restart the loop for the description, but it does not
5555invalidate the code-head review unless it changes the scope being reviewed.
5656
57- Check the PR body reactions first, and verify the reacting actor:
57+ Check the PR body reactions first, and verify both the reacting actor and the
58+ reaction's freshness for the current head. The status rollup is scoped to the
59+ current head SHA, so its earliest start time provides a post-push lower bound:
5860
5961``` bash
62+ head_started_at=" $(
63+ gh pr view < number> --json headRefOid,statusCheckRollup \
64+ --jq ' [.statusCheckRollup[] | .startedAt // empty] | min // empty'
65+ ) "
66+ if [ -z " $head_started_at " ]; then
67+ echo " Cannot prove when current-head activity started; body reaction is not approval."
68+ exit 1
69+ fi
70+
6071gh api " repos/<owner>/<repo>/issues/<number>/reactions" --paginate --slurp \
6172 -H " Accept: application/vnd.github+json" \
62- | jq ' [.[][] | select(.user.login == "chatgpt-codex-connector[bot]")
73+ | jq --arg head_started_at " $head_started_at " \
74+ ' [.[][]
75+ | select(.user.login == "chatgpt-codex-connector[bot]"
76+ and .created_at >= $head_started_at)
6377 | {content, created_at, user: .user.login}]'
6478```
6579
6680` gh pr view --json reactionGroups ` is useful for counts, but it does not show
6781which user reacted. Use the REST reactions endpoint above to prove Codex left
68- the thumbs-up on the PR body.
82+ the thumbs-up on the PR body after current-head activity began. If the current
83+ head has no timestamped status/check activity, require a Codex review or issue
84+ comment that names the current head instead of trusting a body reaction alone.
6985
7086Then check Codex issue comments and confirm the latest "Reviewed commit" matches
7187the current head prefix:
0 commit comments