AI agent getting started? Read Agents: start here first.
Protection controls how a change reaches a branch. Use branch rules for team review policies and object locks when a particular record needs additional protection. You still need write access to the affected projects.
Choose what to protect
Section titled “Choose what to protect”| Need | Control |
|---|---|
| Review changes before accepting them | Require a proposal and approvals on the target branch |
| Keep one project’s accepted data under review | A project rule with extent rows on main |
| Protect the organisation trunk | An organisation rule with extent ref on main |
| Preserve a fixed snapshot | A read-only baseline |
| Prevent changes to one object | An object lock |
Several rules can match a branch. Each applies unless you qualify for that rule’s bypass. Bypass does not grant project access or override a frozen object.
Set rules in the workspace
Section titled “Set rules in the workspace”Open Admin, then Project branch rules for a project’s rules or Organisation branch rules for the organisation’s. Everyone who reads the project sees its rules; a person with administer projects can change them.
To add a rule, complete its three sections:
- Branches: choose the data covered and the branch pattern.
- Changes: choose the update rule, proposal requirement and required approvals. Set a minimum approver role or named approvers. Project rules covering entire branches can also restrict deletion.
- Who can skip this rule: choose the roles, people, service identities or apps that may bypass this rule.
Choose Edit on a row to change its settings in a dialog; the pattern and what the rule covers cannot change. When the host refuses a rule, the refusal appears in the field it names, such as the branch pattern or the approvals needed, and the form keeps your values. Adding a rule the project already has returns the existing rule.
Configure rules with the CLI
Section titled “Configure rules with the CLI”For example, require review for one project’s rows on main, then require two approvals:
openeng rules add --project <id> --extent rows --pattern main --consequence merge-onlyopeneng rules list --project <id> --jsonopeneng rules update --project <id> --rule-id <rule-id> --required-approvals 2Replace the identifiers with values from your instance. You need administer projects to change these rules. An agent-mode update waits for your browser confirmation.
See Branch rule reference for all flags, defaults, bypass entries and refusals.
Type rules and instance locks
Section titled “Type rules and instance locks”A type can be direct (directly editable), immutable or owned (writable only by its designated connector). An immutable type can be set at first publication or tightened later, but never relaxed. Updates and deletes are refused. An owned type can only be written by its designated connector integration.
A person with the lock objects capability can set an object-level edit restriction (instance lock) to frozen or merge-only. A frozen object cannot be changed. These rules can result in immutable, owned or frozen refusals.
Merge and schema updates
Section titled “Merge and schema updates”Merge changes into any writable branch. If a project branch needs an operator update to its database schema, the platform returns branch-needs-schema-update and asks you to update this branch’s schema.
The CLI commands for branch rules are openeng rules add, openeng rules update,
openeng rules list and openeng rules remove. Organisation branches and baselines use openeng org-refs create,
openeng org-refs list, openeng org-refs delete and openeng org-refs mark-read-only.
Set an object’s lock with openeng locks set --project <id> --ref <ref> --object <objectId> --lock <none|merge-only|frozen> --reason <text>. Use --lock none to lift the lock. The --reason flag is required: write it like a commit message, as Propose, compare and merge teaches. The platform writes it first in the commit message. The --ref flag takes a branch name.
- Request a branch schema update with
openeng schema-update request --ref <ref>. This records a request for your platform operator; you cannot execute the update yourself as a customer. When the operator runs the update, it merges the organisation trunk into the branch only if the branch lacks the trunk’s latest schema change, bringing both the schema and rows saved on the trunk since the branch was cut. - Read the request’s state with
openeng schema-update show --ref <ref>. If the branch and trunk changed the same row, the request endsfailedwithmerge-conflict, the branch stays unchanged, and the next update tries again.
The --ref flag of both commands takes a branch name.
Run openeng help <command> for exact flags. See Refusals for
each refusal and its remedy.
Patterns
Section titled “Patterns”See the exact patterns.