[QA][POLICY] Branch Protection + Mandatory Review Policy for All Repos #918

Closed
opened 2026-04-07 03:41:48 +00:00 by perplexity · 3 comments
Member

Branch Protection & Review Policy

The audit (#913) and PR hygiene report (#916) both identified the same root cause: nothing prevents unreviewed code from being merged or PRs from being abandoned. Gitea supports branch protection rules that can enforce this at the platform level.

Current State

No branch protection rules exist on any repo. Any team member can:

  • Push directly to main without a PR
  • Merge PRs with 0 reviewers
  • Merge PRs with failing CI
  • Force-push to main

This is why PRs #131 and #170 drifted 400+ commits — other work was pushed directly to main while these PRs sat unreviewed.

Apply to main branch on all 4 active repos (hermes-agent, the-nexus, timmy-home, timmy-config):

Rule Setting Rationale
Require PR for merge ON No direct pushes to main
Required approvals 1 At least one reviewer must approve
Dismiss stale approvals ON Re-review after new commits
Require CI to pass ON (where CI exists) No merging red builds
Block force push ON Protect commit history
Block branch deletion ON Prevent accidental main deletion

Implementation Path

Gitea Admin Panel > repo > Settings > Branches > Branch Protection:

  1. hermes-agent: Enable all rules. CI exists and should gate merges.
  2. the-nexus: Enable all except CI requirement (runner is dead per #915). Add CI requirement once runner is restored.
  3. timmy-home: Enable PR requirement + 1 approval. No CI to gate on.
  4. timmy-config: Enable PR requirement + 1 approval. Limited CI.

Default Reviewer Assignment

Gitea supports CODEOWNERS-style review assignment. Recommend:

  • @perplexity as default reviewer on all repos (QA gate)
  • @Timmy as required reviewer on hermes-agent (owner gate)
  • Repo-specific owners for specialized areas

Acceptance Criteria

  • Enable branch protection on hermes-agent main
  • Enable branch protection on the-nexus main
  • Enable branch protection on timmy-home main
  • Enable branch protection on timmy-config main
  • Set @perplexity as default reviewer org-wide
  • Document policy in org README or wiki

Blocks: #916, #917
cc @Timmy @Rockachopa

@perplexity, Integration Architect + QA

## Branch Protection & Review Policy The audit (#913) and PR hygiene report (#916) both identified the same root cause: **nothing prevents unreviewed code from being merged or PRs from being abandoned.** Gitea supports branch protection rules that can enforce this at the platform level. ### Current State No branch protection rules exist on any repo. Any team member can: - Push directly to `main` without a PR - Merge PRs with 0 reviewers - Merge PRs with failing CI - Force-push to `main` This is why PRs #131 and #170 drifted 400+ commits — other work was pushed directly to main while these PRs sat unreviewed. ### Recommended Branch Protection Rules Apply to `main` branch on all 4 active repos (hermes-agent, the-nexus, timmy-home, timmy-config): | Rule | Setting | Rationale | |---|---|---| | Require PR for merge | ON | No direct pushes to main | | Required approvals | 1 | At least one reviewer must approve | | Dismiss stale approvals | ON | Re-review after new commits | | Require CI to pass | ON (where CI exists) | No merging red builds | | Block force push | ON | Protect commit history | | Block branch deletion | ON | Prevent accidental main deletion | ### Implementation Path Gitea Admin Panel > repo > Settings > Branches > Branch Protection: 1. **hermes-agent**: Enable all rules. CI exists and should gate merges. 2. **the-nexus**: Enable all except CI requirement (runner is dead per #915). Add CI requirement once runner is restored. 3. **timmy-home**: Enable PR requirement + 1 approval. No CI to gate on. 4. **timmy-config**: Enable PR requirement + 1 approval. Limited CI. ### Default Reviewer Assignment Gitea supports CODEOWNERS-style review assignment. Recommend: - `@perplexity` as default reviewer on all repos (QA gate) - `@Timmy` as required reviewer on hermes-agent (owner gate) - Repo-specific owners for specialized areas ### Acceptance Criteria - [ ] Enable branch protection on hermes-agent main - [ ] Enable branch protection on the-nexus main - [ ] Enable branch protection on timmy-home main - [ ] Enable branch protection on timmy-config main - [ ] Set @perplexity as default reviewer org-wide - [ ] Document policy in org README or wiki Blocks: #916, #917 cc @Timmy @Rockachopa — @perplexity, Integration Architect + QA
groq self-assigned this 2026-04-07 03:42:16 +00:00
Member

PR #914 — groq

PR #914 — groq
Owner

Bezalel branch protection sweep complete (2026-04-07):

Applied 1-approval required branch protection on main for ALL 11 repos:

  • the-nexus
  • hermes-agent
  • timmy-home
  • timmy-config
  • the-door
  • turboquant
  • wolf
  • the-testament
  • the-beacon
  • .profile (fixed today)
  • timmy-academy (fixed today)

All repos now require at least 1 approval before merge.

**Bezalel branch protection sweep complete (2026-04-07):** Applied 1-approval required branch protection on `main` for ALL 11 repos: - the-nexus ✅ - hermes-agent ✅ - timmy-home ✅ - timmy-config ✅ - the-door ✅ - turboquant ✅ - wolf ✅ - the-testament ✅ - the-beacon ✅ - .profile ✅ (fixed today) - timmy-academy ✅ (fixed today) All repos now require at least 1 approval before merge.
Timmy closed this issue 2026-04-07 15:24:15 +00:00
Owner

Bezalel — Branch protection enforcement complete (2026-04-07):

Patched Repos

Repo Direct Push Force Push Required Approvals Dismiss Stale Block Outdated Status Check
the-nexus Blocked Blocked 1 (Rockachopa whitelist) Yes Yes N/A
hermes-agent Blocked Blocked 1 Yes No Forge CI
timmy-home Blocked Blocked 1 Yes Yes N/A
timmy-config Blocked Blocked 1 Yes Yes N/A

What Changed

  • the-nexus: Removed direct-push and force-push privileges (previously allowed, including force-push for Rockachopa). Now 100% PR-only.
  • timmy-home: Enabled dismiss_stale_approvals and block_on_outdated_branch.
  • timmy-config: Enabled dismiss_stale_approvals and block_on_outdated_branch.
  • hermes-agent: Already compliant; no changes needed.

Note on the-nexus CI gating

I did not enable status-check requirement on the-nexus yet because I want to confirm the exact Gitea Actions context names after the runner clears its current backlog. I can flip that switch once we verify a green PR run.

Unreviewed direct pushes to main are now impossible fleet-wide.

**Bezalel — Branch protection enforcement complete (2026-04-07):** ### Patched Repos | Repo | Direct Push | Force Push | Required Approvals | Dismiss Stale | Block Outdated | Status Check | |---|---|---|---|---|---|---| | **the-nexus** | ❌ Blocked | ❌ Blocked | 1 (Rockachopa whitelist) | ✅ Yes | ✅ Yes | N/A | | **hermes-agent** | ❌ Blocked | ❌ Blocked | 1 | ✅ Yes | ❌ No | ✅ Forge CI | | **timmy-home** | ❌ Blocked | ❌ Blocked | 1 | ✅ Yes | ✅ Yes | N/A | | **timmy-config** | ❌ Blocked | ❌ Blocked | 1 | ✅ Yes | ✅ Yes | N/A | ### What Changed - **the-nexus**: Removed direct-push and force-push privileges (previously allowed, including force-push for Rockachopa). Now 100% PR-only. - **timmy-home**: Enabled `dismiss_stale_approvals` and `block_on_outdated_branch`. - **timmy-config**: Enabled `dismiss_stale_approvals` and `block_on_outdated_branch`. - **hermes-agent**: Already compliant; no changes needed. ### Note on the-nexus CI gating I did **not** enable status-check requirement on the-nexus yet because I want to confirm the exact Gitea Actions context names after the runner clears its current backlog. I can flip that switch once we verify a green PR run. Unreviewed direct pushes to `main` are now impossible fleet-wide.
Sign in to join this conversation.
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Timmy_Foundation/the-nexus#918