Skip to content

✨ feat(settings): set per-repository Sentinel paths and workflow fence scope from the dashboard and admin MCP - #17556

Merged
hivecommons-hive[bot] merged 3 commits into
hivecommons:v6from
Danathar:feat/repo-policy-overrides-write
Nov 10, 2026
Merged

hivecommons-hive[bot] merged 3 commits into
hivecommons:v6from
Danathar:feat/repo-policy-overrides-write

Conversation

@Danathar

Copy link
Copy Markdown
Contributor

Summary

An owner can now set, change and clear one repository's Sentinel sensitive-path list and contributor-lane workflow fence scope from Settings and through the admin MCP, without editing hive.yaml. Refs #17547, which added these two per-repository keys but left them hive.yaml-only. A hub-managed hive like knuckle cannot edit its YAML by hand. Every change is per repository and additive. A request without the new keys behaves exactly as before. The hive-wide values and a policy's other fields are never touched.

Why

The owner wants the fence scope at human_merge_paths on three repositories only (dakota-iso, finpilot, testsuite). They also want Sentinel to stop flagging lockfiles, requirements and the Justfile only in repositories whose maintainer agrees. utah and utah-packages stay on the hive-wide values. #17547 can express that. Until now, nobody could set it on a hosted hive.

What changes

  • Endpoints.
    • PUT/PATCH /api/config/auto-merge takes contributor_lane.workflow_fence_scope_repos: {owner/repo: "all" | "human_merge_paths" | null}.
    • PUT /api/config/governor/security takes sentinel.repoSensitivePaths: {owner/repo: [globs] | null}. [] means flag no path in that repository.
    • null clears an override, so the repository uses the hive-wide value again. A repository that is not named stays as it is.
    • Owner only. The request is checked before anything changes: the repository must be watched, the loader's rules apply, and malformed globs are refused. A refused request changes nothing.
    • Each change is audited per repository: myorg/a: hive-wide → human_merge_paths.
    • Both GET responses now report a …Settable: true flag, so the admin MCP can tell this build from one that only reads the overrides.
  • Settings. Auto Merge gets a Workflow fence scope per repository table: repository, scope, and whether it has human-merge paths. Security → Suspicious Activity gets Sensitive files per repository, where each repository uses the hive-wide list, its own list, or flags no paths. Choosing the hive-wide value clears the override. Both tables carry help marks.
  • Admin MCP. auto_merge.update and sentinel.settings take the same keys and send only the repositories that change.
    • Widening is named per repository, for example "workflow edits outside human-merge paths in org/a merge without an owner Approve" or "Sentinel stops flagging Justfile in org/a".
    • The fence preview reminds you that a repository with no human_merge_paths entry keeps the full fence, and names which of the repositories in the change have none.
    • The stale check also covers the hive-wide scope and the human-merge paths the disclosure read.
    • A hive whose GET does not say the key is settable is refused, so a newer MCP never silently no-ops against an older hive.
  • YAML persistence fix. sentinel_sensitive_paths is omitempty, so on tip a saved [] (flag no path) came back as unset (the hive-wide list) after the next reload. That also applies to a hand-written [] after any dashboard save. RepoPolicy.MarshalYAML now keeps an explicit empty list. Every other policy marshals unchanged.

Files

  • src/pkg/config/repo_policy_sentinel_fence_write.go: the two batch setters, glob normalization, MarshalYAML.
  • src/pkg/dashboard/api_config_automerge.go, api_governor_security.go: request keys, validation, audit detail, …Settable flags.
  • src/pkg/adminmcp/tools_automerge_fence_repos.go, tools_sentinel_repo_paths_write.go, plus small hooks in tools_automerge_ops.go and tools_config_surface_ops.go.
  • static-src/js/config-features.js, config-helpers.js, config-watchdog-security.js. static/index.html was regenerated by concatenating manifest.txt in order, and is byte-identical to that output.
  • Docs: admin-mcp.md, hive-merge.md, the API reference (both copies), operator-reference, design/admin-mcp.md. Changelog fragment.

Tests

None were run locally; CI is the verdict.

  • config: set and clear per repository for both keys. Other fields on the entry survive, and an entry that only has forge_url survives a clear. An empty entry is pruned. The hive-wide values stay as they are. A bad scope, a blank glob or a malformed glob refuses the whole batch. An explicit [] survives a YAML round trip.
  • dashboard: both endpoints set and clear, keep auto_merge on the same entry, and write the audit detail. They refuse an unknown or empty scope, an unwatched repository, a repository named twice, blank and malformed globs, and a non-owner, and a refused request changes nothing. A request without the new keys leaves the policies and the audit detail as they were.
  • admin MCP: each op sends only the changed repositories and names the widening and the "no human_merge_paths" repositories. Clearing reads as narrowing or widening depending on the hive-wide value. The ops refuse a bad value, an unwatched repository, clearing something that was never set, a no-op, and an older hive. They also cover a stale preview (override, hive-wide scope or paths changed) and a non-owner.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1

…e scope from the dashboard and admin MCP

hivecommons#17547 added project.repo_policies[].sentinel_sensitive_paths and
workflow_fence_scope, but they could only be set by editing hive.yaml,
which a hub-managed hive cannot do. This adds the write surface:

- PUT/PATCH /api/config/auto-merge takes
  contributor_lane.workflow_fence_scope_repos ({owner/repo: "all" |
  "human_merge_paths" | null}) and PUT /api/config/governor/security takes
  sentinel.repoSensitivePaths ({owner/repo: [globs] | null}). Per
  repository: null clears, an absent repository is untouched, the
  hive-wide value and the policy's other fields never change. Owner only,
  validated before anything changes (watched repo, the loader's rules plus
  malformed globs), audited per repository. Requests without the keys
  behave as before.
- Settings gets a per-repository table in Auto Merge and in Security →
  Suspicious Activity, with help marks; static/index.html regenerated by
  the manifest concatenation.
- auto_merge.update and sentinel.settings take the two keys, send only the
  changed repositories, name what loosens per repository, remind that a
  repository without human_merge_paths keeps the full fence, fingerprint
  what the disclosure read, and refuse a hive whose GET does not report
  the write as settable.
- RepoPolicy.MarshalYAML keeps an explicit empty sentinel_sensitive_paths,
  which omitempty dropped, so a saved "flag no path" no longer comes back
  as the hive-wide list after a reload.

Refs hivecommons#17547

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 10, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kellyaa for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Nov 10, 2026
@hivecommons-hive

hivecommons-hive Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

@Danathar this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Review asks:

  • the review swarm requested changes

Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path.

Queued in your relay fix queue (3 waiting): fixes are handed out before new work as soon as you have capacity.

…o settings search resolves it

The read-only overrides note from hivecommons#17547 and the new per-repository table
both carried yamlHint('project.repo_policies[].workflow_fence_scope'), so
TestSettingsSearchIndexResolvesToControls found two innermost rows. The
note keeps its text; the table row keeps the key. static/index.html edited
identically (manifest concatenation cmp-identical).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Signed-off-by: Danathar <Danathar@users.noreply.github.com>

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intent-alignment review (head 3ca85d6, read the diff plus api_governor_security.go, api_config_automerge.go, repo_policy.go, repo_policy_sentinel_fence.go at head).

The PR delivers what the title and body describe: both endpoints take the new keys, validate watched repos / scopes / globs, audit per repository, expose the …Settable flags, and the MCP ops gate on them. repoPolicyHasNoOverrides is nil-aware (repo_policy.go:428), so the explicit [] override survives the prune in editRepoSentinelFencePolicyLocked. The MarshalYAML fix is tightly coupled to the [] semantics and not scope creep. One gap against the stated contract:

1. Security endpoint: "a refused request changes nothing" does not hold for repoSensitivePaths (in-scope, medium)

api_governor_security.go:183-193 applies cfg.SetRepoSentinelSensitivePaths first, with the comment "they are the only write here that can still be refused". But two pre-existing refusals sit after it in the apply phase: invalid agentSandboxRuntime (:276-281) and sandbox timeouts must be >= 0 (:284-287). A single Security-page save that carries a valid per-repo list and, say, a negative sandbox timeout returns 400 while the in-memory cfg.Project.RepoPolicies already holds the new Sentinel list — and that is the config Config.RepoSentinelSensitivePaths (repo_policy_sentinel_fence.go:29-35) reads live. Nothing is persisted and no audit line is written, so the running hive silently diverges from hive.yaml until the next reload. The other writes in that block have the same pre-existing partial-apply shape, but this PR's body and comment explicitly promise atomicity for the new key, and the new tests do not exercise a mixed request.

Smallest fix: hoist the two sandbox checks into the validate phase (before cfg := s.deps.Config at :182) so the setter really is the last possible refusal.

@@ api_governor_security.go (validate phase, before `cfg := s.deps.Config`)
+	if rt := body.SandboxRuntime; rt != nil {
+		if v := strings.TrimSpace(*rt); v != "" && !config.ValidSandboxRuntimes[v] {
+			http.Error(w, "invalid agentSandboxRuntime", http.StatusBadRequest)
+			return
+		}
+	}
+	if body.SandboxTimeoutS != nil && *body.SandboxTimeoutS < 0 || body.SandboxJobTTLSeconds != nil && *body.SandboxJobTTLSeconds < 0 {
+		http.Error(w, "sandbox timeouts must be >= 0", http.StatusBadRequest)
+		return
+	}
 
 	cfg := s.deps.Config
@@ apply phase
 	if rt := body.SandboxRuntime; rt != nil {
-		v := strings.TrimSpace(*rt)
-		if v != "" && !config.ValidSandboxRuntimes[v] {
-			http.Error(w, "invalid agentSandboxRuntime", http.StatusBadRequest)
-			return
-		}
-		cfg.AgentSandbox.Runtime = v
+		cfg.AgentSandbox.Runtime = strings.TrimSpace(*rt)
 	}
-	if body.SandboxTimeoutS != nil && *body.SandboxTimeoutS < 0 || body.SandboxJobTTLSeconds != nil && *body.SandboxJobTTLSeconds < 0 {
-		http.Error(w, "sandbox timeouts must be >= 0", http.StatusBadRequest)
-		return
-	}

A test pairing sentinel.repoSensitivePaths with agentSandboxJobTtlSeconds: -1 and asserting RepoPolicies is unchanged would pin it. The auto-merge handler has no such post-apply refusal (api_config_automerge.go:366-373 onward), so the fence-scope path is fine.

— hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@github-actions

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v6

This PR conflicts with v6 itself. Rebase it first: until it merges cleanly into the base, conflicts with other open PRs cannot be told apart from base drift, so only same-file overlaps are listed.

Conflicts are checked with every PR merged onto the current tip of v6, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#17506 🌱 Top up v6 with v5 (durable hosted hive.yaml, shared-CI deferral naming and 118 more) same files src/docs/hive-merge.md
src/docs/operator-reference/README.md
src/docs/operator-reference/sweeps-and-operations.md
src/pkg/dashboard/static/index.html

Keep both admin-mcp design notes: sentinel.settings' repo_sensitive_paths
and hivecommons#17555's agent.cadences / writeback.kind_policy bullet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Signed-off-by: Danathar <Danathar@users.noreply.github.com>

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read the config setters, both dashboard handlers and their callers at the PR head (0e227fe) against v6 merge-base 33d4832. This looks correct to me.

Verified

  • src/pkg/config/repo_policy_sentinel_fence_write.go:150-175 — editRepoSentinelFencePolicyLocked follows the existing repoPolicyHasNoOverrides prune pattern at repo_policy.go:390-415 and holds repoPauseMu the same way; an entry with only forge/forge_url survives a clear.
  • repo_policy_sentinel_fence_write.go:191-208 — RepoPolicy.MarshalYAML fires on Config.Save (config/save.go:110 is gopkg.in/yaml.v3), and the plain alias avoids recursion. yaml.v3 decodes [] into a non-nil empty slice, so the explicit-empty round trip the PR describes holds.
  • Both handlers are owner-gated (api_config_automerge.go:140, api_governor_security.go:20), validate the full batch before mutating, and apply the per-repo write first so a refused request changes nothing.
  • api_config_automerge.go:510-516 rolls the policies back on a persist failure. The security handler does not (api_governor_security.go:331-333), but that matches the pre-existing behaviour of every other field in that handler, so I am not counting it as a defect.
  • Body claims match the diff; Refs #17547 is appropriate since #17547 is the PR that added the keys, not an open issue.

One low-severity edge (suggestion, not a blocker)

src/pkg/dashboard/static-src/js/config-helpers.js:177 — in the Sensitive-files-per-repository row, mode own with an empty textarea sends [], which the server stores as "flag no path in this repository" — the same widening as choosing flag no paths, but without the user having picked it. An owner who switches to own list, gets distracted, and saves would silently disable Sentinel path checks for that repo. Either treat own + empty as "not staged yet" (skip the key) or have the row refuse to stage until a glob is entered.

Nothing else I could verify.

— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

hivecommons-hive Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

Review findings from adjudicator (folded here because this head already carries its hive review):

Correctness re-review at 407dd29 (delta since 3ca85d6: one branch commit 0e227fe plus a merge of origin/v6; the merged files — cadence write-back ops, DCO workflow — are v6 content, not this PR's).

Still present — PUT /api/config/governor/security can refuse after the per-repository Sentinel write has already landed in live config.

src/pkg/dashboard/api_governor_security.go

  • L182 cfg := s.deps.Config — Dependencies.Config is *config.Config, so this is the live config, not a copy.
  • L188 cfg.SetRepoSentinelSensitivePaths(repoSensitivePaths) mutates cfg.RepoPolicies in place.
  • L279 invalid agentSandboxRuntime and L285 sandbox timeouts must be >= 0 both return after that write and before s.saveConfig() at L332.

So a body with valid sentinel.repoSensitivePaths plus a bad agentSandboxRuntime (or a negative sandbox timeout) is refused with 400, yet the in-memory per-repo overrides are already applied: Sentinel uses them immediately, nothing is audited, and the next unrelated save persists them. The comment at L183–185 ("they are the only write here that can still be refused") is not accurate; the PR body's "A refused request changes nothing" does not hold for this combination. The pre-existing ioscan/intent mutations share the ordering problem, but this PR adds the first write with real policy effect and explicitly promises atomicity.

Fix: hoist the two sandbox checks into the validation block that already runs before any mutation (next to the ReviewMaxParallel check, ~L177), and drop them from the mutation section:

@@ src/pkg/dashboard/api_governor_security.go
 	if body.ReviewMaxParallel != nil && (*body.ReviewMaxParallel < 0 || *body.ReviewMaxParallel > 64) {
 		jsonError(w, "review max_parallel_reviews must be between 0 and 64", http.StatusBadRequest)
 		return
 	}
+	if rt := body.SandboxRuntime; rt != nil {
+		if v := strings.TrimSpace(*rt); v != "" && !config.ValidSandboxRuntimes[v] {
+			http.Error(w, "invalid agentSandboxRuntime", http.StatusBadRequest)
+			return
+		}
+	}
+	if body.SandboxTimeoutS != nil && *body.SandboxTimeoutS < 0 || body.SandboxJobTTLSeconds != nil && *body.SandboxJobTTLSeconds < 0 {
+		http.Error(w, "sandbox timeouts must be >= 0", http.StatusBadRequest)
+		return
+	}
 
 	cfg := s.deps.Config
@@
 	if rt := body.SandboxRuntime; rt != nil {
-		v := strings.TrimSpace(*rt)
-		if v != "" && !config.ValidSandboxRuntimes[v] {
-			http.Error(w, "invalid agentSandboxRuntime", http.StatusBadRequest)
-			return
-		}
-		cfg.AgentSandbox.Runtime = v
+		cfg.AgentSandbox.Runtime = strings.TrimSpace(*rt)
 	}
-	if body.SandboxTimeoutS != nil && *body.SandboxTimeoutS < 0 || body.SandboxJobTTLSeconds != nil && *body.SandboxJobTTLSeconds < 0 {
-		http.Error(w, "sandbox timeouts must be >= 0", http.StatusBadRequest)
-		return
-	}

A test in api_repo_policy_overrides_write_test.go that sends repoSensitivePaths together with agentSandboxRuntime: "bogus" and asserts RepoPolicies is unchanged would lock this in.

The branch-only delta (0e227fe: single yamlHint on the per-repo fence-scope control in config-features.js L694 / index.html L67170) is fine.

Review findings from reviewer (folded here because this head already carries its hive review):

Read the new config setters, both dashboard handlers, and their callers at v6 merge-base. The config layer and the auto-merge handler look correct to me; one ordering gap in the security handler is worth fixing before this lands.

Finding (medium) — src/pkg/dashboard/api_governor_security.go:188 writes before two validations that can still refuse the request.

The new block applies cfg.SetRepoSentinelSensitivePaths(...) at line 188 under the comment "they are the only write here that can still be refused, and a refusal must leave every setting as it was". That is not true for this handler: two pre-existing validations run after it and return 400 without rollback —

  • api_governor_security.go:279 invalid agentSandboxRuntime
  • api_governor_security.go:285 sandbox timeouts must be >= 0

Mechanism: a request carrying a valid sentinel.repoSensitivePaths together with, say, a negative sandboxTimeoutS mutates cfg.Project.RepoPolicies in memory, then returns 400 before s.saveConfig() (line 332) and before the audit line. Sentinel reads that field live from the same *config.Config (cmd/hive/main_sweeps.go:1410 → cfg.RepoSentinelSensitivePaths), so the override is in effect immediately, is not audited, and is persisted by the next unrelated save. The pre-existing Ioscan/Review fields have the same shape of problem, but this PR adds a Sentinel-coverage change to it and the PR body says "A refused request changes nothing."

The auto-merge handler does not have this gap — I checked api_config_automerge.go between the apply block and saveConfig and found no early returns, and the rollback at the persist-failure branch restores previousRepoPolicies.

Fix is small: hoist the two sandbox checks above cfg := s.deps.Config, or move the SetRepoSentinelSensitivePaths call to just before if nextSentinel != nil (line ~329). Either keeps the comment honest. A test sending repoSensitivePaths plus an invalid agentSandboxRuntime and asserting the policy is unchanged would pin it.

Verified correct, for the record:

  • repo_policy_sentinel_fence_write.go editRepoSentinelFencePolicyLocked prunes on repoPolicyHasNoOverrides and keeps forge/forge_url-only entries — stricter than the existing SetSelfAuthorizationHoldForRepoAndSave (repo_policy.go:399), which prunes on overrides alone. Not a regression.
  • Lock order holds: the setters take only repoPauseMu; saveMu is taken later by saveConfig, matching the saveMu → repoPauseMu rule in repo_pause.go:63.
  • RepoPolicy.MarshalYAML will fire: save.go:110 uses yaml.v3 Marshal, and Config.MarshalYAML encodes via node.Encode(out) so nested marshalers run. type plain RepoPolicy avoids recursion.
  • Both routes are behind requireOwnerRole (api_governor_security.go:19, api_config_automerge.go:140).

I did not read the admin MCP ops or the JS/index.html closely; CI covers those tests. No duplicate of this change in the current queue.

Review findings from adjudicator-2 (folded here because this head already carries its hive review):

Security re-review at 407dd29 (delta from 3ca85d6).

The PR's own delta is one line in src/pkg/dashboard/static-src/js/config-features.js:694 (drops a duplicate yamlHint) plus the regenerated static/index.html. The other 11 files in the compare (.github/workflows/dco-post-merge.yml, tools_cadence_writeback_ops*.go, docs) come from merging origin/v6 (#17510, #17555) and are not this PR's contribution. Nothing new from a security angle in the delta.

Prior finding still present — src/pkg/dashboard/api_governor_security.go:188. cfg is *config.Config, so SetRepoSentinelSensitivePaths mutates the live Sentinel per-repo lists at :188, but the pre-existing sandbox refusals at :279 (invalid agentSandboxRuntime) and :285 (sandbox timeouts must be >= 0) return 400 after that. Result on a refused request: the running Sentinel already uses the loosened path list, nothing is saved (:332), and no audit line is written (:344) — the PR body's "A refused request changes nothing" does not hold for that combination. Fix: hoist both checks into the validate-before-write block above :182:

@@ -177,6 +177,15 @@
 	if body.ReviewMaxParallel != nil && (*body.ReviewMaxParallel < 0 || *body.ReviewMaxParallel > 64) {
 		jsonError(w, "review max_parallel_reviews must be between 0 and 64", http.StatusBadRequest)
 		return
 	}
+	if rt := body.SandboxRuntime; rt != nil {
+		if v := strings.TrimSpace(*rt); v != "" && !config.ValidSandboxRuntimes[v] {
+			http.Error(w, "invalid agentSandboxRuntime", http.StatusBadRequest)
+			return
+		}
+	}
+	if body.SandboxTimeoutS != nil && *body.SandboxTimeoutS < 0 || body.SandboxJobTTLSeconds != nil && *body.SandboxJobTTLSeconds < 0 {
+		http.Error(w, "sandbox timeouts must be >= 0", http.StatusBadRequest)
+		return
+	}

and delete the two return-ing checks at :276-281 and :284-287 (keep the cfg.AgentSandbox.Runtime = v assignment).

Review findings from ci-maintainer (folded here because this head already carries its hive review):

Delta re-review (3ca85d6 → 407dd29, intent-alignment). The delta is the origin/v6 merge plus one PR-authored commit (0e227fec) that drops the duplicate yamlHint on the hive-wide fence-scope note in config-features.js:694 / index.html:67170. That change is fine and in scope. Nothing else in the PR's own files moved.

Still present (blocks): src/pkg/dashboard/api_governor_security.go:183-196 applies cfg.SetRepoSentinelSensitivePaths before two pre-existing refusals that follow it — invalid agentSandboxRuntime at :279 and sandbox timeouts must be >= 0 at :285. A request that carries both sentinel.repoSensitivePaths and a bad sandbox value gets a 400 after the per-repository Sentinel lists have already been mutated in the live cfg (not persisted, but visible until the next reload and inconsistent with the PR body's "A refused request changes nothing"). The comment at :183 claims these are "the only write here that can still be refused", which is not true of this handler.

Fix: validate the sandbox fields alongside the other pre-mutation checks (next to ReviewMaxParallel, before cfg := s.deps.Config), and make the later blocks pure assignments:

@@ src/pkg/dashboard/api_governor_security.go
 	if body.ReviewMaxParallel != nil && (*body.ReviewMaxParallel < 0 || *body.ReviewMaxParallel > 64) {
 		jsonError(w, "review max_parallel_reviews must be between 0 and 64", http.StatusBadRequest)
 		return
 	}
+	if rt := body.SandboxRuntime; rt != nil {
+		if v := strings.TrimSpace(*rt); v != "" && !config.ValidSandboxRuntimes[v] {
+			http.Error(w, "invalid agentSandboxRuntime", http.StatusBadRequest)
+			return
+		}
+	}
+	if body.SandboxTimeoutS != nil && *body.SandboxTimeoutS < 0 || body.SandboxJobTTLSeconds != nil && *body.SandboxJobTTLSeconds < 0 {
+		http.Error(w, "sandbox timeouts must be >= 0", http.StatusBadRequest)
+		return
+	}

 	cfg := s.deps.Config
@@
 	if rt := body.SandboxRuntime; rt != nil {
-		v := strings.TrimSpace(*rt)
-		if v != "" && !config.ValidSandboxRuntimes[v] {
-			http.Error(w, "invalid agentSandboxRuntime", http.StatusBadRequest)
-			return
-		}
-		cfg.AgentSandbox.Runtime = v
+		cfg.AgentSandbox.Runtime = strings.TrimSpace(*rt)
 	}
-	if body.SandboxTimeoutS != nil && *body.SandboxTimeoutS < 0 || body.SandboxJobTTLSeconds != nil && *body.SandboxJobTTLSeconds < 0 {
-		http.Error(w, "sandbox timeouts must be >= 0", http.StatusBadRequest)
-		return
-	}

A test that sends sentinel.repoSensitivePaths together with agentSandboxRuntime: "bogus" and asserts the repo policies are unchanged would pin this.

Out of PR scope: the delta's .github/workflows/dco-post-merge.yml and adminmcp/tools_cadence_writeback_ops*.go hunks come from v6 (#17510, #17555), not from this branch — not reviewed here.

Evidence bundle `#17556407dd29` sha256:b3d5798f695063027e0ac850abc5e679375dddcd30f9e862d5e946e4229b902a — download from the dashboard or `hivectl review evidence #17556`.

@hivecommons-hive
hivecommons-hive Bot merged commit 9850cfb into hivecommons:v6 Nov 10, 2026
71 of 72 checks passed
@hivecommons-hive

Copy link
Copy Markdown
Contributor

merged by Hive trusted-author auto-merge: author @Danathar holds role owner and GitHub permission maintain on repo; CI green at 407dd29.

hivecommons-hive Bot pushed a commit that referenced this pull request Nov 10, 2026
…ge (#17560)

The admin MCP could change these settings, but the dashboard could not show
or change them:

- Settings → Features → Auto-merge → Per-repository merge policy gets
  "Merge with no CI" (auto_merge.no_ci_ok) and, only while it is set, the
  deprecated auto_merge.allow_unprotected_base list, marked as having no
  effect so an owner can clear it. Both stage the full selection only when
  changed; an untouched save still omits them, so the server keeps them.
  A bare repository name from hive.yaml now selects that repository.
- Settings → Features → Let hive decide gets a per-repository
  on / off / hive-wide table (decisions.delegate.repos) and an Effect
  timeout (decisions.delegate.effect_timeout). The PUT replaces the repos
  map whole, so a table edit sends every saved override plus the edits.
  The timeout is checked like the server checks it before sending.
- Agent → Operating Mode lists NO_GITHUB (a legacy alias for ADVISORY)
  for an agent that has it, instead of showing "use level default".
- Fix the adminmcp comment that said decisions.delegate had no dashboard
  write endpoint.

No endpoint or server behaviour changes. static/index.html regenerated by
the manifest concatenation (cmp-identical).

Refs #17555 #17556


Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1

Signed-off-by: Danathar <Danathar@users.noreply.github.com>
Co-authored-by: Danathar <Danathar@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant