Skip to content

fix(governance): accept self-approval for downstream feature exceptions - #34

Merged
joeshull merged 2 commits into
internal/mainfrom
fix-self-approval
Aug 22, 2026
Merged

fix(governance): accept self-approval for downstream feature exceptions#34
joeshull merged 2 commits into
internal/mainfrom
fix-self-approval

Conversation

@joeshull

Copy link
Copy Markdown

Downstream governance: true

Summary

resolveApproval in scripts/check-upstream-provenance.mjs required a downstream-feature exception's APPROVED review to come from someone other than the PR author. This fork has exactly one human maintainer, so that requirement was permanently unsatisfiable — PR #30 is blocked on it right now.

Change

  • Drop the non-author exclusion in resolveApproval; any human APPROVED review of the current head (self or otherwise) now satisfies the downstream-feature exception. All other checks are unchanged: state must be APPROVED, reviewer must be a User (not a bot), commit SHA must match the current head exactly, and a newer commit still invalidates prior approval.
  • Updated scripts/check-upstream-provenance.test.mjs to match: renamed the coverage test, added a case proving self-approval is now accepted, dropped the now-removed third resolveApproval argument across all call sites.
  • Updated docs/fork-governance.md wording accordingly.

Verification

  • node --test scripts/check-upstream-provenance.test.mjs — 11/11 passed
  • npm run lint / npm run format on changed files
  • npm run typecheck

A single-maintainer fork has no second human to approve a PR, so the
non-author requirement was unsatisfiable by construction. Approval now
just requires an APPROVED review of the current head, author or not.
@joeshull
joeshull merged commit bab2be7 into internal/main Aug 22, 2026
20 checks passed
@joeshull
joeshull deleted the fix-self-approval branch August 22, 2026 16:34
joeshull added a commit that referenced this pull request Aug 22, 2026
GitHub refuses to let a PR author approve their own pull request, so
the self-approval fix in #34 was necessary but not sufficient: a
solo-maintainer PR could still never produce an APPROVED review,
which permanently deadlocked the required reconcile status check.
Provenance metadata is the audit trail now; no mode asserts a review.
joeshull added a commit that referenced this pull request Aug 22, 2026
* feat(governance): add downstream sync provenance mode

Conflicted main -> internal/main sync pull requests had no resolution
route that could satisfy the required reconcile check.

* fix(governance): gate downstream sync on merge shape and render its summary

Review found the mode could not pass CI at all: writeEvidence fell through
to the upstream-import renderer and dereferenced mergeParents. It also found
the ahead/identical containment check was satisfied by any branch that merges
main, leaving one approval to authorise unrestricted paths.

* fix(governance): drop the human-review requirement entirely

GitHub refuses to let a PR author approve their own pull request, so
the self-approval fix in #34 was necessary but not sufficient: a
solo-maintainer PR could still never produce an APPROVED review,
which permanently deadlocked the required reconcile status check.
Provenance metadata is the audit trail now; no mode asserts a review.

* docs(governance): state what the sync merge shape does not prove

* docs(governance): warn against unrelated edits in a sync merge
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