Skip to content

ci(ui-approval): carry an approval to a descendant head with no UI change (R29) - #25860

Merged
Git-on-my-level merged 1 commit into
mainfrom
ui-approval-carry-r29
Nov 20, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
ui-approval-carry-r29

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Summary

This implements David's R29 ruling (2026-11-20, omi-workspace 2a41cff). An /approve-ui approval now stays valid on a later head when that head only adds commits on top of the approved one and none of them touch UI. Today every new head clears the approval. On #25771 that meant two hand re-approvals after backend-only fix rounds (SCA-3062/SCA-3063).

An approval carries forward only when all three conditions hold:

  • Newest command is an approval: the newest approver command on the PR is /approve-ui for an earlier head, and no command names the current head. Any later /reject-ui withdraws it.
  • Descendant head: the approved head is an ancestor of the current head (compare status ahead or identical). The compared range is then exactly approved..current.
  • No UI change: that range touches no UI path. This includes renamed paths and Swift UI detected by file contents, using the same evidence() reads as the main check.

Anything else still needs a fresh approval: a rebase, a force-push, a UI change, a truncated or unreadable range, or a newer command on the current head. The bot notice is now posted only while approval is actually missing.

Tests

  • node --test .github/scripts/tests/ui-author-approval.test.cjs: 23 pass, 5 of them new. The new tests cover the carry candidate rules, how decision() treats a carried approval, an end-to-end carry, refusals (UI, renamed UI, rebase, behind, truncated range, later reject) and the Swift content scan inside the range.
  • scripts/pr-preflight: 14 checks pass.

Risk and rollback

The gate is not loosened for UI changes. The workflow runs the script from github.workflow_sha (main), so this takes effect for every PR once merged. Rollback is reverting this commit.

🤖 Generated with Claude Code

…ange (R29)

David ruled 2026-11-20 (R29) that /approve-ui stays valid across heads when the
UI did not change. #25771 needed two hand re-approvals after backend-only fix
rounds. The carry applies only when:

- the newest approver command on the PR approves an earlier head, and no
  command names the current head (any later /reject-ui withdraws it);
- the approved head is an ancestor of the current head (compare status
  ahead/identical), so the compared range is exactly approved..current; and
- that range touches no UI path, including Swift UI found by content.

A rebase, force-push, UI change, truncated range or read failure still needs a
fresh approval. The bot notice is posted only when approval is still missing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T11:06:50.491658Z 5dcbdda PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Git-on-my-level
Git-on-my-level merged commit c8fc754 into main Nov 20, 2026
57 checks passed
@Git-on-my-level
Git-on-my-level deleted the ui-approval-carry-r29 branch November 20, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant