Skip to content

codex: retain topic approvals and close published reviews - #42

Draft
ttaylorr-oai wants to merge 1 commit into
metafrom
ttaylorr/codex-topic-review-lifecycle
Draft

codex: retain topic approvals and close published reviews#42
ttaylorr-oai wants to merge 1 commit into
metafrom
ttaylorr/codex-topic-review-lifecycle

Conversation

@ttaylorr-oai

Copy link
Copy Markdown
Collaborator

Why

Codex topic PRs are review-only, but plan admission currently discards an
otherwise valid approval whenever the topic head moves. Reviewers must approve
the same PR repeatedly even though GitHub still considers the earlier review
effective.

Those PRs also remain open after publication when the controller rebases their
source commits: the generated lane contains the rewritten commit, not the PR
head, and pinned-plan publication intentionally leaves source refs unchanged.

Changes

  • Accept a repository writer's latest effective topic approval across later
    pushes while still freezing the exact current source head and rejecting
    self-reviews, outside reviewers, dismissals, and requests for changes.
  • Keep the stricter exact-head policy for the separate legacy merge-admission
    path.
  • After successful operator-controlled publication, close only review-only PRs
    whose trusted plan, published source pin, generated output, and current PR
    identity still agree.
  • Preserve immutable topic refs, never close from staging, and treat closure
    failures as warnings after an otherwise successful publication. GitHub marks
    these review-only PRs closed, not merged.
  • Document the topic lifecycle and cover approval persistence, publisher
    behavior, and false-positive closure cases in the controller tests.

Validation

  • sh -n .github/workflows/codex-branch.sh t/t9905-codex-branch.sh
  • git diff --check
  • Focused t/t9905-codex-branch.sh approval, immutable-pin, publication, and
    post-publication closure coverage.

Topic pull requests are review-only, but plan admission currently
requires an independent approval at the exact current source commit.
Every subsequent push therefore forces the reviewer to approve again,
even though GitHub still considers the earlier review effective.

Retain the latest effective approval from an independent repository
writer while continuing to freeze the exact source admitted into the
plan. Keep the stricter exact-head check for legacy merge admission.

After either publication path succeeds, inspect trusted plan history
and close only topic pull requests whose current head matches the
published source, generated output, and live repository refs. Leave
source refs untouched, and make closure failures non-fatal after an
otherwise successful publication.
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