Repository navigation
✨ Dashboard/API: set review.perspectives_source and agent sandbox image/block without editing config files - #18800
Conversation
…ge/block without editing config files Fixes #18797 Signed-off-by: Andy Anderson <andy@clubanderson.com>
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
Signed-off-by: Andy Anderson <andy@clubanderson.com>
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. @clubanderson this PR is held at Failing checks:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. |
Signed-off-by: Andy Anderson <andy@clubanderson.com>
|
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Correctness review at 4c6d4e6: no in-scope blocker. Set/clear of perspectives_source, the approval gate, hook re-resolve and sandbox field validation match #18797. Two low advisory edge cases are inline (mutate-before-validate order; link plus inline edit in one request). I did not run the tests.
— hive: agent=adjudicator backend=claude model=claude-sonnet-5-5 claude=2.1.326
| cfg.Review.PerspectivePrompts = cleaned | ||
| } | ||
| } | ||
| if sourceChange { |
There was a problem hiding this comment.
Advisory: this mutates the live config before later validations (e.g. revise_verdicts_before 400 below) can reject the request, leaving the link changed in memory but unsaved/unresolved. Move this block after the last validation return.
| if src := s.deps.Config.Review.PerspectivesSource; src.IsSet() && (body.Perspectives != nil || body.PerspectivePrompts != nil) { | ||
| // editable (hivecommons/hive#17989). Unlinking in the same request lifts | ||
| // the refusal. | ||
| if src := s.deps.Config.Review.PerspectivesSource; linkedAfter && src.IsSet() && (body.Perspectives != nil || body.PerspectivePrompts != nil) { |
There was a problem hiding this comment.
Advisory: the guard also requires the current source to be set, so linking plus inline perspectives in one request passes and the inline values are then overwritten by the resolver. Consider refusing whenever linkedAfter and inline edits are present.
Fixes #18797
What
PUT /api/config/reviewacceptsperspectives_source(set; null or an incomplete object clears), validated likedefinition_sourceand gated byGitHubPromptAllowed. An unapproved repo gets a 400 pointing to Settings, Security, Prompt sources. A save re-resolves through the existingReviewConfigAppliedhook, so no restart. The 409 now names Unlink; sending null with the inline edit unlinks and edits in one request.sandboxImage,sandboxRuntime,sandboxJob), a standalone "Copy sandbox settings from..." (sandboxCopyFrom, Secret names only, deep copy), saving an enabled sandbox with no image is refused namingsandbox.image, and the "no sandbox image" warning links to the agent and Settings, Security controls.agent_sandbox.job.env_from_secrets(names validated), default image section opens when the gate is on with no image.Config.Save, which writes the same marshalled config to bothhive.yaml.runtimeandhive.yaml.dashboard; no new writer. A test pins both files for the new fields.Not run locally (CI is the gate).
🤖 Generated with Claude Code