Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/added-repo-policy-overrides-write.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- **An owner can set, change and clear one repository's Sentinel sensitive-path list and workflow fence scope without editing hive.yaml** (refs #17547). Settings → Features → Auto Merge → **Workflow fence scope per repository** and Settings → Security → Suspicious Activity → **Sensitive files per repository** list every watched repository with its value; choosing the hive-wide value clears the override. The same writes go through `PUT /api/config/auto-merge` (`contributor_lane.workflow_fence_scope_repos`) and `PUT /api/config/governor/security` (`sentinel.repoSensitivePaths`), owner only, as `{owner/repo: value}` maps where `null` clears, and through the admin MCP `auto_merge.update` and `sentinel.settings` operations, whose previews name what loosens in each repository ("workflow edits outside human-merge paths in org/a merge without an owner Approve", "Sentinel stops flagging Justfile in org/a"), remind that a repository with no `human_merge_paths` entry keeps the full fence, and refuse a stale confirm. A write changes only the repositories it names, never the hive-wide value or a policy's other fields, is validated as hive.yaml is (plus malformed globs), and is recorded in the audit log per repository. Requests without the new keys behave as before. An explicit empty per-repository Sentinel list (`[]`, flag no path) now also survives a save; before, the next save wrote it out as unset, so it came back as the hive-wide list. See [hive-merge.md](src/docs/hive-merge.md#contributor-lane-auto-merge).
35 changes: 29 additions & 6 deletions src/docs/admin-mcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -755,10 +755,16 @@ other role.
- `sentinel.settings` changes Sentinel's `sensitive_paths`,
`disabled_behaviors`, `exempt_logins` and `trusted_authors_block`. A
repository with its own list
(`project.repo_policies[].sentinel_sensitive_paths`, set in hive.yaml)
keeps it: the preview names those repositories and the hive-wide globs
their lists leave out, and does not change them. A per-repository list
added or changed after the preview refuses the confirm.
(`project.repo_policies[].sentinel_sensitive_paths`) keeps it when
`sensitive_paths` changes: the preview names those repositories and the
hive-wide globs their lists leave out. A per-repository list added or
changed after the preview refuses the confirm.
- `sentinel.settings` also sets one repository's own list, with
`repo_sensitive_paths`: `{"owner/repo": [every glob for it]}`. `[]` flags
no path there, and `null` removes the repository's list so it uses the
hive-wide list again. Only the repositories you name change; the
hive-wide list does not. A blank or malformed glob, or a repository that
is not in `project.repos`, is refused.

Each list takes a change, not a new list: `{"add": [...], "remove": [...]}`,
or `{"clear": true}` to empty it first. For example, to turn reporter trust on
Expand All @@ -785,7 +791,9 @@ The preview says plainly when a change lets more through:
a triage label.
- **Fewer pull requests flagged by Sentinel:** sensitive paths removed, a
behavior disabled, an exempt login added, or `trusted_authors_block` turned
off. The preview names the pull requests that would no longer be held.
off. The preview names the pull requests that would no longer be held. For
a repository's own list it names the globs per repository, for example
`Sentinel stops flagging Justfile, **/requirements*.txt in org/a`.

On a hive managed by a hub, the issue filter preview also says the change may
be overwritten. If the hub's record for the hive carries an issue filter, the
Expand Down Expand Up @@ -863,6 +871,14 @@ only.
"trusted_authors": [...]}`; `null` removes it. An enabled exception needs
`human_merge_paths` for the repository, set already or in the same change.
An unknown field is refused.
- **One repository's workflow fence scope:**
`{"contributor_lane": {"workflow_fence_scope_repos": {"org/a": "human_merge_paths"}}}`
gives `org/a` its own scope (`project.repo_policies[].workflow_fence_scope`,
`all` or `human_merge_paths`); `null` removes it so the repository uses the
hive-wide `workflow_fence_scope` again. The endpoint takes this map per
repository, so the preview sends only the repositories that change; the
hive-wide scope is never changed. A hive too old to take it says so, and
the preview is refused.
- **Entries you do not name are kept.** The endpoint replaces each list and
map it is sent, so the preview reads the current settings and sends the
merged whole value. It shows every change before and after.
Expand All @@ -876,7 +892,14 @@ only.
a pin-only exception on, or giving it more paths, kinds or trusted authors,
is widening too, and the preview names what merges as a result, for example
"pin bumps (action-sha) to .github/workflows/*.yml in org/a by renovate[bot]
will merge without a hand merge". Removing any of those is not.
will merge without a hand merge". Removing any of those is not. A
repository whose fence scope becomes `human_merge_paths` (its own, or the
hive-wide one after its own is removed) is named: "workflow edits outside
human-merge paths in org/a merge without an owner Approve". The preview
also reminds that a repository with no `human_merge_paths` entry keeps the
full fence, and names the repositories in the change that have none. The
hive-wide scope and the human-merge paths it read are part of the stale
check.
- It never merges a pull request.

`decisions.delegate_settings` changes the "Let hive decide" settings
Expand Down
4 changes: 2 additions & 2 deletions src/docs/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ History point limits, timestamp cutoffs, incremental cost reads and ETag/304 beh
| `GET` | `/api/config/governor/general-advanced` | Owner only | Governor General Advanced Get | `pkg/dashboard/api.go:263` |
| `PUT` | `/api/config/governor/general-advanced` | Owner only | Governor General Advanced Set | `pkg/dashboard/api.go:264` |
| `GET` | `/api/config/auto-merge` | Owner only | Auto-Merge Config Get | `pkg/dashboard/api.go:268` |
| `PUT` | `/api/config/auto-merge` | Owner only | Auto-Merge Config Set; `human_merge_pin_only` replaces the whole pin-only map (`{}` clears it), and an invalid entry is a 400 with nothing changed | `pkg/dashboard/api.go:269` |
| `PUT` | `/api/config/auto-merge` | Owner only | Auto-Merge Config Set; `human_merge_pin_only` replaces the whole pin-only map (`{}` clears it), and an invalid entry is a 400 with nothing changed; `contributor_lane.workflow_fence_scope_repos` (`{owner/repo: "all", "human_merge_paths" or null}`) sets or clears single repositories' own workflow fence scope (`project.repo_policies[].workflow_fence_scope`) and leaves repositories it does not name, and the hive-wide scope, unchanged; a repository outside `project.repos` or another value is a 400 with nothing changed, and a change is audited per repository | `pkg/dashboard/api.go:269` |
| `GET` | `/api/config/convergence` | Owner only | Convergence Config Get | `pkg/dashboard/api.go:275` |
| `PUT` | `/api/config/convergence` | Owner only | Convergence Config Set | `pkg/dashboard/api.go:277` |
| `GET` | `/api/config/governor/advisory` | Owner only | Governor Advisory Get | `pkg/dashboard/api.go:281` |
Expand All @@ -227,7 +227,7 @@ History point limits, timestamp cutoffs, incremental cost reads and ETag/304 beh
| `PUT` | `/api/config/decisions/delegate` | Owner only | Change `decisions.delegate`: `enabled`, `repos` (the full override map when sent; an entry with `enabled: null` is dropped; a new key must be in `project.repos`), `llm.enabled`, `llm.model` (a model name; a key-like value is refused) and `effect_timeout`. Unknown fields and invalid values are 400 with nothing changed. Saved, audited as `config_decisions_delegate` with the actor and each change before and after, and applied without a restart. Starts no decision and merges nothing | `pkg/dashboard/api_config_decisions_delegate.go` |
| `GET` | `/api/config/governor/work-source` | Owner only | Governor Work Source Get (Jira secrets/TLS fields reported as set/unset only) | `pkg/dashboard/api.go:294` |
| `PUT` | `/api/config/governor/work-source` | Owner only | Governor Work Source Set (including Jira Data Center TLS settings) | `pkg/dashboard/api.go:295` |
| `PUT` | `/api/config/governor/security` | Owner only | Governor Security | `pkg/dashboard/api.go:296` |
| `PUT` | `/api/config/governor/security` | Owner only | Governor Security; `sentinel.repoSensitivePaths` (`{owner/repo: [globs] or null}`) sets or clears single repositories' own Sentinel list (`project.repo_policies[].sentinel_sensitive_paths`; `[]` flags no path, `null` returns to the hive-wide list) and leaves repositories it does not name, and the hive-wide `sensitivePaths`, unchanged; a blank or malformed glob or a repository outside `project.repos` is a 400 with nothing changed, and a change is audited per repository | `pkg/dashboard/api.go:296` |
| `GET` | `/api/config/governor/project-observability` | Owner only | Governor Project Observability Get | `pkg/dashboard/api.go:298` |
| `PUT` | `/api/config/governor/project-observability` | Owner only | Governor Project Observability Set | `pkg/dashboard/api.go:299` |
| `GET` | `/api/config/governor/inference-auth` | Owner only | Governor Inference Auth Get | `pkg/dashboard/api.go:314` |
Expand Down
4 changes: 2 additions & 2 deletions src/docs/api-reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Part of the [Dashboard REST API reference](../api-reference.md); see that page f
| `GET` | `/api/config/governor/general-advanced` | Owner only | Governor General Advanced Get | `pkg/dashboard/api.go:263` |
| `PUT` | `/api/config/governor/general-advanced` | Owner only | Governor General Advanced Set | `pkg/dashboard/api.go:264` |
| `GET` | `/api/config/auto-merge` | Owner only | Auto-Merge Config Get | `pkg/dashboard/api.go:268` |
| `PUT` | `/api/config/auto-merge` | Owner only | Auto-Merge Config Set; `human_merge_pin_only` replaces the whole pin-only map (`{}` clears it), and an invalid entry is a 400 with nothing changed | `pkg/dashboard/api.go:269` |
| `PUT` | `/api/config/auto-merge` | Owner only | Auto-Merge Config Set; `human_merge_pin_only` replaces the whole pin-only map (`{}` clears it), and an invalid entry is a 400 with nothing changed; `contributor_lane.workflow_fence_scope_repos` (`{owner/repo: "all", "human_merge_paths" or null}`) sets or clears single repositories' own workflow fence scope (`project.repo_policies[].workflow_fence_scope`) and leaves repositories it does not name, and the hive-wide scope, unchanged; a repository outside `project.repos` or another value is a 400 with nothing changed, and a change is audited per repository | `pkg/dashboard/api.go:269` |
| `PATCH` | `/api/config/auto-merge` | Owner only | Partially update auto-merge settings, including nested `merge_train`; omitted fields stay unchanged; returns effective settings and bot-author metadata | `pkg/dashboard/api_config_automerge.go` |
| `GET` | `/api/config/convergence` | Owner only | Convergence Config Get | `pkg/dashboard/api.go:275` |
| `PUT` | `/api/config/convergence` | Owner only | Convergence Config Set | `pkg/dashboard/api.go:277` |
Expand All @@ -114,7 +114,7 @@ Part of the [Dashboard REST API reference](../api-reference.md); see that page f
| `PUT` | `/api/config/decisions/delegate` | Owner only | Change `decisions.delegate`: `enabled`, `repos` (the full override map when sent; an entry with `enabled: null` is dropped; a new key must be in `project.repos`), `llm.enabled`, `llm.model` (a model name; a key-like value is refused) and `effect_timeout`. Unknown fields and invalid values are 400 with nothing changed. Saved, audited as `config_decisions_delegate` with the actor and each change before and after, and applied without a restart. Starts no decision and merges nothing | `pkg/dashboard/api_config_decisions_delegate.go` |
| `GET` | `/api/config/governor/work-source` | Owner only | Governor Work Source Get (Jira secrets/TLS fields reported as set/unset only) | `pkg/dashboard/api.go:294` |
| `PUT` | `/api/config/governor/work-source` | Owner only | Governor Work Source Set (including Jira Data Center TLS settings) | `pkg/dashboard/api.go:295` |
| `PUT` | `/api/config/governor/security` | Owner only | Governor Security | `pkg/dashboard/api.go:296` |
| `PUT` | `/api/config/governor/security` | Owner only | Governor Security; `sentinel.repoSensitivePaths` (`{owner/repo: [globs] or null}`) sets or clears single repositories' own Sentinel list (`project.repo_policies[].sentinel_sensitive_paths`; `[]` flags no path, `null` returns to the hive-wide list) and leaves repositories it does not name, and the hive-wide `sensitivePaths`, unchanged; a blank or malformed glob or a repository outside `project.repos` is a 400 with nothing changed, and a change is audited per repository | `pkg/dashboard/api.go:296` |
| `GET` | `/api/config/governor/project-observability` | Owner only | Governor Project Observability Get | `pkg/dashboard/api.go:298` |
| `PUT` | `/api/config/governor/project-observability` | Owner only | Governor Project Observability Set | `pkg/dashboard/api.go:299` |
| `GET` | `/api/config/governor/inference-auth` | Owner only | Governor Inference Auth Get | `pkg/dashboard/api.go:314` |
Expand Down
7 changes: 5 additions & 2 deletions src/docs/design/admin-mcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ start-up script, its process launch, PIDs, signal handling and exit codes are un
| plan propose | `POST /api/plan/from-issue` | **deliberately not owner** — ioscan + ACMM L5 floor |
| plan approve / reject | `POST /api/plan/{epicID}/approve`, `.../reject` | `requireOwnerRole` |
| feature settings | `PUT /api/config/governor/features` | `requireOwnerRole`; pointer fields, nil means unchanged |
| merge settings | `PATCH /api/config/auto-merge` | `requireOwnerRole` on the read and the write; every list and map is a full replace |
| merge settings | `PATCH /api/config/auto-merge` | `requireOwnerRole` on the read and the write; every list and map is a full replace, except `contributor_lane.workflow_fence_scope_repos`, which is per repository (`null` clears) |
| Let hive decide settings | `PUT /api/config/decisions/delegate` | `requireOwnerRole` on the read and the write; `repos` is a full replace, the op sends the merged map |
| repository pause / resume | `POST /api/repos/pause`, `/api/repos/resume` | `requireRepoPausePermission` → `canToggleRepoHold` |
| item hold | `POST /api/repos/{owner}/{repo}/items/{number}/hold` | `canToggleRepoHold` |
Expand Down Expand Up @@ -634,7 +634,10 @@ Phase 5 registers the fleet-level write operations under that contract:
it read, so a change made between preview and confirm refuses the confirm
(`ErrConfirmationStale`) instead of being overwritten. A change that admits more issues without triage, or
that makes Sentinel flag fewer pull requests, is disclosed as widening, and the Sentinel
disclosure names the pull requests that would no longer be held.
disclosure names the pull requests that would no longer be held. `sentinel.settings` also
takes `repo_sensitive_paths`, one repository's own list, which the endpoint takes per
repository (`sentinel.repoSensitivePaths`, `null` clears), so the op sends only the
repositories that change.
- `agent.cadences` and `writeback.kind_policy` wrap `PUT /api/config/agent/{name}/cadences` and
`PUT /api/config/governor/features` (its `writebackKinds` field) for two settings that had no
operation: one agent's per-mode cadences and the write-back gate's per-kind overrides. They use
Expand Down
15 changes: 13 additions & 2 deletions src/docs/hive-merge.md
Original file line number Diff line number Diff line change
Expand Up @@ -1127,8 +1127,19 @@ A PR merges through this tier only when all of the following hold:
repository that has its own. A repository with `human_merge_paths` scope
but no `human_merge_paths` entry still keeps the full fence. An invalid
value stops the config from loading, and the running hive ignores one
that gets through and uses the hive-wide value. The overrides are set in
hive.yaml; Settings and `settings_read` list them.
that gets through and uses the hive-wide value.

An owner can set, change and clear either override without editing
hive.yaml. In Settings, use **Workflow fence scope per repository**
(Features → Auto Merge) and **Sensitive files per repository**
(Security → Suspicious Activity); choosing the hive-wide value clears the
override. The same writes go through `PUT /api/config/auto-merge`
(`contributor_lane.workflow_fence_scope_repos`) and
`PUT /api/config/governor/security` (`sentinel.repoSensitivePaths`), or
the admin MCP `auto_merge.update` and `sentinel.settings` operations,
whose previews name what each change loosens in each repository. Each
write changes only the repositories it names, never the hive-wide value,
and is recorded in the audit log. `settings_read` lists the overrides.

```yaml
project:
Expand Down
Loading
Loading