Skip to content

Commit e0c808a

Browse files
solomonneascodex
andauthored
docs(contributing): document enforced merge grading gate (#667)
* docs(contributing): document mechanical merge gate Co-Authored-By: Codex <codex@openai.com> * docs(contributing): name the formal review gate --------- Co-authored-by: Codex <codex@openai.com>
1 parent a9038fe commit e0c808a

1 file changed

Lines changed: 29 additions & 1 deletion

File tree

CONTRIBUTING.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Brigade is the local-first operator CLI for agent memory, handoffs, and reviewab
2020

2121
- Personal details, hostnames, IPs, account IDs, or live auth profiles in templates or tests. The whole point of this kit is to keep that stuff out of public repos. The `content-guard` job in CI will fail if it finds any.
2222
- Cron jobs or hooks that post or call out to the network without explicit opt-in.
23-
- Commits must use conventional commits. In-house commits in escoffier-labs organizations and original solomonneas repositories should include a co-author trailer for a coding agent that did substantial work; external repositories and upstream third-party PRs remain trailer-free.
23+
- Commits must use conventional commits. In-house commits in escoffier-labs organizations and original solomonneas repositories should include a co-author trailer for a coding agent that did substantial work. External repositories and upstream third-party PRs remain trailer-free.
2424

2525
## Planning artifacts
2626

@@ -47,6 +47,34 @@ python -m brigade init --target "$target" --depth workspace --harnesses claude,c
4747
python -m brigade doctor --target "$target"
4848
```
4949

50+
## Pull requests
51+
52+
`main` is branch-protected. A dispatched session cannot supply the review artifact required by its own pull request, and GitHub enforces the gate regardless of the dispatch prompt.
53+
54+
The current rule set requires all of the following before a pull request can merge:
55+
56+
- All 22 required GitHub Actions checks pass. The checks are pinned to GitHub Actions app id 15368, and the branch must be up to date with `main`.
57+
- A current formal `APPROVED` review exists from a non-author reviewer.
58+
- All review conversations are resolved.
59+
- The approval was recorded after the last push. New commits dismiss stale approvals.
60+
61+
The pull request author cannot approve their own pull request. `gh pr review --approve` fails with "Can not approve your own pull request" when the author and reviewer share one GitHub identity.
62+
63+
CodeRabbit is the current external review identity. Its green commit status is not the grading artifact because the status can be green while the formal GitHub review is still `CHANGES_REQUESTED`. The artifacts that count are a current formal non-author `APPROVED` review and all required checks passing.
64+
65+
Inspect the gate before attempting a merge:
66+
67+
```bash
68+
gh pr checks <number> --required
69+
gh pr view <number> --json reviewDecision,mergeStateStatus
70+
```
71+
72+
`reviewDecision` reports `REVIEW_REQUIRED`, `CHANGES_REQUESTED`, or `APPROVED`. `mergeStateStatus` reports states such as `CLEAN`, `BLOCKED`, and `BEHIND`.
73+
74+
Those CLI fields do not expose unresolved review conversations. Separately check the pull request's **Files changed** review panel in GitHub and confirm that no conversation remains unresolved.
75+
76+
Dispatched sessions should open the pull request, run local verification, and push commits. After the final push, comment `@coderabbitai full review`. The `coderabbitai[bot]` identity records the formal GitHub review. Wait for its current `APPROVED` review before merging. A green CodeRabbit commit status alone does not satisfy this gate.
77+
5078
## Adding a harness
5179

5280
A harness is a manifest under `src/brigade/templates/harnesses/<id>.json` plus any template files it references. The manifest declares `role: "writer"` (gets an inbox) or `role: "reader"` (gets adapter fragments).

0 commit comments

Comments
 (0)