Merge policies
By the end of this chapter you will know how to inspect a repository’s merge policies, adjust a policy safely in Git, and promote a shadow policy to live.
A MergePolicy defines a class of change the factory’s merge gate can evaluate, and each Repository binds the policies it uses with a mode (live, shadow, or disabled). Every served repository starts with Maku’s shipped catalog (docs-links, deps-patch, and docs) in shadow mode, so humans review every pull request until a maintainer explicitly promotes a policy.
Full field schemas, guardrails, and worked YAML recipes live in Merge policies reference and Reference › Web UI reference and settings.
Inspect policies on the Policies page
Open Policies (/policies) in the rooms web UI to see every policy bound to your repositories, its current mode, its conditions, and the shadow evidence it has collected.

Change a policy safely
Policies are managed as code — either in your cluster’s Repository / MergePolicy manifests or, once policyManagement.stage: manage is active, in .github/agent-factory.yaml inside the target repository:
- Edit the binding or policy. Narrow
allowedFiles, tighten line/file caps, or disable a catalog policy (mode: disabled). CentralmergeGuardrailsalways cap what a repository binding can ask for. - Validate before pushing. Use the Policies editor’s check button or run
maku config validate --config FILE MANIFEST...ormaku policy validatelocally so typos or guardrail violations fail fast before review.maku policy explain owner/name POLICYthen shows what a live policy merges and what blocks its promotion. - Simulate against past pull requests. Check how the edited policy would have classified recent pull requests before switching it on.
- Open a pull request. A maintainer reviews and merges the policy change; agents are forbidden from modifying policy files or protected paths.
Promote a policy
A shadow policy becomes live through a pull request that changes its binding’s mode from shadow to live.
- Check evidence on the Policies page. A policy is eligible once it has enough agreed shadow decisions (pull requests the gate would have merged that a maintainer merged unchanged at the same head) and the repository has passed a rollback drill.
- Use Promote to live (or open the PR by hand). When eligible and
Factory.spec.gitopspoints at the repository’s manifest, the Policies page offers Promote to live, which opens a pull request containing the one-linemode: livediff. - Review and merge the pull request. Nothing merges a promotion automatically. Once merged, unattended merges under that policy are guarded by the daily cap, required CI checks, the post-merge monitor, and the regression breaker.
See Merge policies reference › Promotion for every eligibility threshold and rollback step.
Holds, agreed, signal-checked
A policy decides one thing: whether a pull request holds, meaning every row of the gate passes
on one head and the change stays inside the policy. Holding does not mean the change is right. What
can check that is a correctness signal: something independent of the author that checks what
the change means. After a merge, the monitor hears only loud trouble: a merge it watched to the end
with no revert, no regression and no follow-up is quiet, not right. Every count on the Policies
pages, in maku policy and in the comments names who judged it: a signal, a maintainer, or nobody.
| Word | Means | Does not mean | Wire name, unchanged |
|---|---|---|---|
| holds | Every row of the gate passes on one head: the change is inside the policy | The change is right | decision=arm, shadow_would_arm |
| correctness signal | Something independent of the author that checks what the change means, from the closed list below | A green check | signal= |
| signal-checked | A decision a correctness signal judged, and passed | Proven correct | signal=<kind>:ok |
| unchecked | A decision nothing judged for meaning. Also a policy with no correctness signal | Wrong | signal=none |
| agreed | A maintainer merged a shadow decision unchanged, at the judged head | The maintainer read every line | clean, mergedUnchanged |
| quiet | The monitor’s window ended with no revert, no regression, no follow-up | Right | verdict=healthy |
| regression | A monitor signal turned bad inside the window | Every bad merge | verdict=regression |
| wrong call | A merge under a policy later found wrong | A drill | bad |
“Verified” is never shown alone: merged_verified reads “main stayed green”, and the monitor’s
verified reads “RunLore: resolved”.
flowchart TD
PR["Pull request, head reported"] --> BASE{"Fixed base<br/>CI, fence"}
BASE -- red --> H["Waits for a maintainer"]
BASE -- ok --> HOLDS{"A policy holds?<br/>files, caps, reviewer, holdouts"}
HOLDS -- no --> H
HOLDS -- yes --> SIG{"Correctness signal?"}
SIG -- "shape, oracle<br/>or contract: ok" --> CHK["signal-checked"]
SIG -- none --> UNC["unchecked"]
CHK --> MODE{"Mode"}
UNC --> MODE
MODE -- shadow --> REC["Would-merge record"]
MODE -- live --> MERGE["Merged by the policy"]
REC --> HUM{"Maintainer merges it unchanged?"}
HUM -- yes --> AGREED["agreed"]
MERGE --> MON{"Monitor window"}
MON -- "revert, regression, follow-up" --> WRONG["wrong call"]
MON -- nothing --> QUIET["quiet"]
AGREED --> EV["Evidence"]
QUIET --> EV
WRONG --> EV
WRONG --> BRK["Breaker: the policy goes back to a maintainer"]
EV --> PROMO["Promotion, by a maintainer's merge"]
The correctness-signals design
also describes rules this page does not: an unchecked policy kept in shadow, an audit of live prose,
the factory/wrong label and sensitive kinds. The gate does not enforce them yet, and no page or
comment promises them.
What checks the meaning
The signal comes from fields the policy already has. Nobody declares it twice.
| Signal | Derived from | Establishes | Leaves open |
|---|---|---|---|
| Determining shape | diffShape: links-only, semver-patch, semver-minor (and docs-links’ built-in shape) | Every changed line has one mechanical meaning | The target: the new page’s words, the upstream release |
| Oracle | oracle | A detector outside the pull request named the defect, and the diff removes exactly that | The detector’s own errors |
| Contract | requires holds both plan and tests, and the task ran under a test contract | A test written before the change, from a plan a maintainer approved, is red at the base and green at the head | Behaviour the plan did not name |
These are bounds or supporting evidence, never a signal:
| What | Why not |
|---|---|
allowedFiles, caps, modifyOnly, protectedFiles | They say where and how much, not what |
diffShape: added-entry | Structure only: the entry’s words are free |
holdoutChecks, required CI | They say something still works, and can pass without reading the changed lines |
| A reviewer’s verdict | A veto, not an approval |
Monitor: main’s CI, Flux, RunLore’s resolved | Loud breakage only; a silenced alert also resolves |
A policy whose every allowedFiles pattern ends in \.md$, \.mdx?$, \.rst$, \.txt$ or
\.adoc$ is prose: nothing checks its meaning, and the pages say so.
Each decision that holds records its signal: signal=links-only:ok, signal=contract:ok, or
signal=none. A refusal records none. The same one sentence about a policy, built by one function,
appears on its Policies page, in maku policy explain, in the promotion pull request and in the
decision comments. For docs-links bound live with a holdout, under the repository’s default
verifyFor and revertWindow:
Merges without you when an agent changes only link targets in Markdown, at most 20 lines, and
Check the documentation links 🔗passes. Meaning checked by thelinks-onlyshape: every changed line is a link target on the same host. Not checked: what the new page says. After the merge Maku watches main for 30 minutes and opens a revert on red. Undo:factory/revertwithin 7 days.
Reference and recipes
- Merge policies reference: catalog definitions, field tiers, worked examples, repository binding recipes, CLI simulation/promotion workflows, decision reasons, rollback, and troubleshooting.
- The merge gate: fixed base, decision records, adopted classes, and post-merge monitoring.