ibexharness
DocsBlogReleasesRoadmap
GitHub
ibexharness

Documentation

Architecture Decision RecordsADR-0002: Repository foundation bootstrapADR-0003: Branch protection and merge policyADR-0004: Protobuf and code generation policyADR-0005: Postgres migration strategyADR-0006: Auth protobuf contract (`ibex.auth.v1`)ADR-0007: Auth token validation implementationADR-0008: Security scanning and CI quality gatesADR-0009: Permission bitmap layoutADR-0010: Cryptography policyADR-0011: Proxy auth gRPC client and middlewareADR-0012: Proxy request normalization (OpenAI chat)ADR-0013: Proxy input validation and stable error envelopeADR-0014: Core domain migration sequencingADR-0015: Proxy rate limit skeleton (Phase 1)ADR-0016: Proxy agent identity verification (Phase 1)ADR-0017: Request ID and trace context strategy (Phase 1)ADR-0018: Graceful shutdown contract (Phase 1)ADR-0019: OpenTelemetry provider configuration (Phase 1)ADR-0020: Shared package boundaries — `packages/config` and `packages/apierror`ADR-0021: Prometheus Metric Catalog (Phase 1)ADR-0022: Health check contract (Phase 1)ADR-0023: Docs site architecture (Phase 1.5)
ADRs›ADR-0003: Branch protection and merge policy
ADRs

ADR-0003: Branch protection and merge policy

Architecture decision record 0003.

ADR-0003: Branch protection and merge policy

  • Status: Accepted
  • Date: 2026-05-30
  • Authors: IBEX Harness team

Context

Foundation bootstrap (ADR-0002) added CI (repo guards, markdownlint, gitleaks) but main remained unprotected. Direct pushes were still possible. GitHub branch protection requires stable status check context names; job display names were normalized to repo-guards, markdownlint, and gitleaks.

The repository is maintained solo today but must scale to team review without re-architecting policy.

Decision

Stable required status checks

CI job idStatus check context (branch protection)
repo-guardsrepo-guards
markdownmarkdownlint
secretsgitleaks
analyze (codeql.yml)CodeQL
trivytrivy
osv-scanosv-scan
semgrep (semgrep.yml)semgrep
golangci-lintgolangci-lint
banditbandit
hadolinthadolint

See ADR-0008 for failure thresholds and non-gated workflows (scorecard, sbom).

Solo mode (active now)

Apply to branch main after the governance PR merges:

SettingValue
Require pull request before mergeYes
Required approving review count0 (author cannot self-approve on GitHub)
Require CODEOWNERS reviewNo
Required status checksrepo-guards, markdownlint, gitleaks, CodeQL, trivy, osv-scan, semgrep, golangci-lint, bandit, hadolint
Require branches up to dateYes (strict)
Require conversation resolutionYes
Allow force pushesNo
Allow branch deletionNo
Include administratorsYes (enforce_admins: true)

Rationale for zero approvals: Requiring ≥1 approval blocks a solo maintainer from merging their own PRs. Self-review happens in the PR description and checklist until additional reviewers exist.

Rationale for enforce_admins: true: Avoids a bypass habit; hotfixes use hotfix/* + PR like any other change.

Team mode (upgrade later)

When multiple reviewers exist:

SettingValue
Required approving review count1 (docs/chore) / 2 (features) per DEVELOPMENT_GUIDE.md §7.3
Require CODEOWNERS reviewYes
Dismiss stale reviews on pushYes
Required status checksUnchanged (repo-guards, markdownlint, gitleaks)
Other solo settingsUnchanged

Split approval rules by path or label may require GitHub rulesets in a follow-up ADR.

Governance files

  • .github/CODEOWNERS — default * @Rick1330
  • CONTRIBUTING.md — PR workflow and local checks
  • .github/SECURITY.md — vulnerability reporting pointer

Consequences

Positive

  • main stays releasable; all changes are traceable via PRs.
  • CI check names are stable for branch protection configuration.
  • Clear upgrade path to team-scale review.

Negative

  • Solo workflow adds PR overhead vs direct push (intentional).
  • Branch protection must be applied on GitHub after merge (not encoded in git).

Apply branch protection (GitHub)

After merge, register check names on a PR, then apply via Settings → Branches or:

bash
gh api --method PUT \
  repos/Rick1330/ibex-harness/branches/main/protection \
  --input .github/branch-protection-main.json

Payload: .github/branch-protection-main.json (solo mode: PR required, 0 approvals, security CI checks per ADR-0008, enforce_admins: true).

References

  • CONTRIBUTING.md
  • DEVELOPMENT_GUIDE.md §6.3, §7
  • .github/workflows/ci.yml

Was this page helpful?

Edit on GitHub

Last updated on

PreviousADR-0002: Repository foundation bootstrapNextADR-0004: Protobuf and code generation policy

On this page

  • Context
  • Decision
  • Stable required status checks
  • Solo mode (active now)
  • Team mode (upgrade later)
  • Governance files
  • Consequences
  • Positive
  • Negative
  • Apply branch protection (GitHub)
  • References
0%