Skip to content

ci: harden PR-size exception governance against self-expansion #625

Description

@qnbs

Finding

PR #596 exposed a separate PR-size governance integrity class that is not owned by #510. The existing exception mechanism must not allow a governed pull request to become larger or less reviewable than the repository's absolute authority while it is in progress.

This issue owns the #596-class exception controls:

  • an exception's governed semantic scope must not exceed the absolute tier;
  • a governed PR must not self-expand or retroactively elevate its own exception;
  • effective ceilings must be authorized from the base-side governance state;
  • exception paths must remain inside an explicit allowlist;
  • the embedded reason must be short and practical, with durable rationale referenced from an issue/doc/PR instead of an unbounded essay.

Relationship to #510

#510 owns the distinct write-scoped trust boundary where pr-size and workflow-policy execute enforcement/commenting code from PR-controlled checkout content. This issue does not duplicate that finding and does not choose its trusted-workflow architecture. The two controls are complementary and both remain required.

Required hardening

Add regression coverage for:

  • files over the absolute ceiling → reject;
  • commits over the absolute ceiling → reject;
  • governed meaningful lines over the authorized exception ceiling → reject;
  • self-expansion or retroactive exception elevation from the governed PR → reject;
  • a changed path outside the exception allowlist → reject;
  • a valid narrow, base-authorized exception → pass;
  • an explicitly allowed supplemental generated/normative artifact → pass only under the narrow supplemental rule.

The implementation must preserve the ordinary absolute tier as the upper authority. It must not reopen or rewrite PR #596; use that PR as regression/postmortem evidence.

Scheduling gate

This is a prerequisite before:

  1. any new PR-size exception is relied upon; and
  2. R-15 implementation starts.

A small ordinary #553 PR that stays within the absolute tier may continue independently. If a future #553 slice needs an exception, this issue must be completed first.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions