Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
d1b3102
admin: add protect-next ruleset spec
primeinc May 11, 2026
5dde047
admin: add protect-main-release-only ruleset spec
primeinc May 11, 2026
cc06c87
admin: set github app as sole next ruleset bypass actor
primeinc May 11, 2026
64082a5
admin: remove hardcoded app bypass actor from next ruleset spec
primeinc May 11, 2026
140251e
admin: add main release branch guard
primeinc May 11, 2026
c9b060a
admin: add github app ruleset check and upsert workflow
primeinc May 11, 2026
30d9c57
admin: add DoNotMergeYet pull request gate
primeinc May 11, 2026
e152ebe
ci: run gate checks for next branch
primeinc May 11, 2026
727b8a4
ci: run web gate for next branch
primeinc May 11, 2026
d148f4e
admin: require DoNotMergeYet label gate on next
primeinc May 11, 2026
cdab840
admin: require DoNotMergeYet label gate on main
primeinc May 11, 2026
49b0b60
admin: harden ruleset workflow lookups and dispatch guard
primeinc May 11, 2026
9db6f0e
admin: add GitHub API next sync workflow
primeinc May 11, 2026
d866363
admin: require explicit approval gate for ruleset upsert
primeinc May 11, 2026
d4a8be7
admin: add repository code owners
primeinc May 11, 2026
db31fd8
admin: require code owner review on next ruleset
primeinc May 11, 2026
e080ac5
admin: require code owner review on main ruleset
primeinc May 11, 2026
1d54bb2
admin: protection-stage rework — drop CODEOWNERS, native bypass, behi…
primeinc May 11, 2026
b23f57e
admin: pin ghapp/repo-admin as the canonical control-plane lane
primeinc May 11, 2026
f19b3ab
admin: address PR #81 review comments — FF semantics, FD3 stderr, gen…
primeinc May 11, 2026
86461c9
admin: split 00e into check + upsert jobs (Copilot review on 00e:36)
primeinc May 11, 2026
52e73f3
admin: 00g-verify-app-credentials.yml — one-shot diagnostic to prove …
primeinc May 11, 2026
49489a4
admin: drop refs/heads/main guard from 00g — diagnostic is read-only
primeinc May 11, 2026
2001765
admin: fold App-creds verification into 00d, delete 00g
primeinc May 11, 2026
720efb7
admin: rename workflow + job names for text-message-style UI clarity
primeinc May 11, 2026
941717a
admin: rename Lane Check -> Branch Source / Allowed into main
primeinc May 11, 2026
6ee5cac
admin: rename to Protected Branch / Src branch allowed (UI dispo)
primeinc May 11, 2026
49e160d
admin: split admin-lane guard into 3 checks with dependency-surface s…
primeinc May 11, 2026
b9d55e4
admin: workflow-triggers doctrine + concurrency on all 10 protection …
primeinc May 11, 2026
79d687e
admin: fix 00e bootstrap deadlock + 00f next FF parity
primeinc May 11, 2026
1104121
admin: 00e self-bootstraps on push to main; drop empty environment ref
primeinc May 11, 2026
e4f5478
admin: PR #81 review — env gate, read-only check, install probe, doc …
Copilot May 11, 2026
b1450ca
admin: fix 00i install probe — installation token can't call /repos/{…
Copilot May 11, 2026
bf83ed7
Update protect-main-release-only.json
primeinc May 11, 2026
3c1dbe6
Update protect-next.json
primeinc May 11, 2026
a6e5b1e
admin: address PR #81 bot reviews — URL-encode lanes, line numbers, d…
primeinc May 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"name": "protect-main-release-only",
"target": "branch",
"enforcement": "active",
"conditions": {
"ref_name": {
"include": [
"refs/heads/main"
],
"exclude": []
}
},
"rules": [
{
"type": "pull_request",
"parameters": {
"allowed_merge_methods": [
"squash",
"rebase"
],
"dismiss_stale_reviews_on_push": true,
"require_code_owner_review": false,
"require_last_push_approval": false,
"required_approving_review_count": 0,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Setting required_approving_review_count to 0 effectively disables mandatory peer reviews for the main branch. For a production-critical branch, it is highly recommended to require at least one approval to ensure code quality and prevent accidental or malicious unreviewed changes.

Suggested change
"required_approving_review_count": 0,
"required_approving_review_count": 1,

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brief explicitly says: "No require_code_owner_review unless a real separate reviewer/team exists. It does not." The repo is solo-owner with no team layer. With one actor, required_approving_review_count: 1 is unsatisfiable (the PR author can't self-approve), so a value of 1 would block every merge. The brief-aligned shape is review_count=0; merge-time governance comes from required_status_checks (gate, build, workflow-lint, do-not-merge-yet, main-release-guard, admin-branch-sync-guard) plus the App's bypass_actor for the few cases that need it. Not changing. Leaving open for human review.

Comment thread
primeinc marked this conversation as resolved.
"required_review_thread_resolution": true
}
},
{
"type": "required_status_checks",
"parameters": {
"strict_required_status_checks_policy": true,
"required_status_checks": [
{
"context": "head matches main"
},
{
"context": "only allowed files"
},
{
"context": "token + install"
},
{
"context": "src branch allowed"
},
{
"context": "DoNotMergeYet absent"
},
{
"context": "all gates pass"
},
{
"context": "workflows valid"
},
{
"context": "build succeeds"
}
]
}
},
{
"type": "required_linear_history"
},
{
"type": "non_fast_forward"
},
{
"type": "deletion"
}
],
"bypass_actors": []

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The PR description mentions an "App bypass" and provides a specific App ID (3663316), but the bypass_actors array is currently empty. If this ruleset is intended to be the source of truth for the GitHub App's bypass permissions, the actor should be added here.

  "bypass_actors": [
    {
      "actor_id": 3663316,
      "actor_type": "Integration",
      "bypass_mode": "always"
    }
  ]

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brief explicitly says: "Tracked JSON must not hardcode numeric App IDs." Bypass actor is rendered at runtime from vars.GH_APP_ID in 00e-branch-rulesets.yml's render_spec function (see bypass_mode: "pull_request" injection). Tracked specs MUST stay with empty bypass_actors so the canonical surface for the App ID lives in repo vars, not in committed JSON. Hardcoding 3663316 would break this invariant. Not changing. Leaving open for human review.

}
59 changes: 59 additions & 0 deletions .github-stars/control-plane/rulesets/protect-next.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"name": "protect-next",
"target": "branch",
"enforcement": "active",
"conditions": {
"ref_name": {
"include": [
"refs/heads/next"
],
"exclude": []
}
},
"rules": [
{
"type": "pull_request",
"parameters": {
"allowed_merge_methods": [
"squash",
"rebase"
],
"dismiss_stale_reviews_on_push": true,
"require_code_owner_review": false,
"require_last_push_approval": false,
"required_approving_review_count": 0,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to the main ruleset, requiring 0 approvals for the next integration branch reduces the effectiveness of the protection. Requiring at least one approval is a best practice for shared integration branches.

Suggested change
"required_approving_review_count": 0,
"required_approving_review_count": 1,

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as protect-main:24 — brief says solo-owner; review_count=0 is correct. See reply on PRRT_kwDOPMjo5M6A9i1m. Not changing. Leaving open for human review.

Comment thread
primeinc marked this conversation as resolved.
"required_review_thread_resolution": true
}
},
{
"type": "required_status_checks",
"parameters": {
"strict_required_status_checks_policy": true,
"required_status_checks": [
{
"context": "DoNotMergeYet absent"
},
{
"context": "all gates pass"
},
{
"context": "workflows valid"
},
{
"context": "build succeeds"
}
]
}
},
{
"type": "required_linear_history"
},
{
"type": "non_fast_forward"
},
{
"type": "deletion"
}
],
"bypass_actors": []

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The bypass_actors list is empty. If the GitHub App (ID 3663316) is intended to manage or sync the next branch automatically, it should be added to the bypass list to avoid being blocked by these rules once enforcement is enabled.

  "bypass_actors": [
    {
      "actor_id": 3663316,
      "actor_type": "Integration",
      "bypass_mode": "always"
    }
  ]

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as protect-main:64 — brief says "Tracked JSON must not hardcode numeric App IDs." Bypass actor rendered at runtime in 00e. See reply on PRRT_kwDOPMjo5M6A9i1r. Not changing. Leaving open for human review.

}
Loading
Loading