Repository navigation
✨ prompt sources: owners can approve their own managed repos - #18499
Conversation
Adds an owner-only path to allow one of the hive's project.repos for agents' prompt_source and definition_source without editing the config volume: Settings -> Security -> Prompt sources plus GET /api/config/prompt-sources and PUT /api/config/prompt-sources/owner-repos. Approvals require acknowledge_trust, cover one repo only, are audited, persist to variables.security.owner_github_prompt_repos via Save, and lapse if the repo leaves project.repos. GitHubPromptAllowed keeps its signature and admits seed or owner-approved repos. 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
|
|
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. |
Mutation testing✅ Resolved: no surviving or uncovered mutants in changed files on the current head. Verdict: |
|
Scanner triage: the failing checks are PR-local, not a shared baseline incident. The branch is 3 commits behind 🐝 Hive Agent: — hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.325 |
…atch Signed-off-by: Andy Anderson <andy@clubanderson.com>
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 |
|
cc @joerunde: this is part of the hive changes for the spyre-inference deps agent and sandboxed reviewer setup. |
Fixes #18490
What
An owner can now allow one of the hive's own managed repos (
project.repos) as a source foragents.<n>.prompt_sourceanddefinition_sourcewithout editing the config volume.GET /api/config/prompt-sourcesandPUT /api/config/prompt-sources/owner-reposwith{"repo","allowed","acknowledge_trust"}. Both owner-only (403 for read, read-write, merger, unverified owner). Repos outsideproject.reposare refused with a 400 pointing at the seed edit; an approval withoutacknowledge_trust: trueis refused.variables.security.owner_github_prompt_repos(repo,approved_by,approved_at), written throughConfig.Saveto the PVC runtime config so it survives restart. The dashboard overlay'svariablesblock is still never merged, so the overlay cannot approve a repo (test included).allow_github_prompt, so seed allowlist entries are unaffected. An approval lapses if its repo leavesproject.repos.config_prompt_source_repoon every approve and revoke.Gate API
Config.GitHubPromptAllowed(slug)/GitHubDefinitionAllowed(slug)keep their signatures and now admit seed-allowed OR owner-approved managed repos, so existing resolvers (and #18491's repo discovery) need no change. New exported helpers:SeedGitHubPromptAllowed,OwnerPromptRepoAllowed,IsManagedRepo,ManagedRepoSlugs,NormalizeOwnerPromptRepo,AllowOwnerPromptRepoAndSave,RevokeOwnerPromptRepoAndSave.Tests
pkg/config/owner_prompt_repos_test.go: managed-repo matching, slug validation, gate semantics (owner path, lapse on removal, seed path unchanged), persistence across reload for approve and revoke, overlay cannot approve.pkg/dashboard/api_config_prompt_sources_test.go: owner approve/revoke, 403 for read/read-write/merger/unverified owner, non-managed refusal, ack required, bad bodies, audit entries, section rendering.Docs
src/docs/agent-configuration.md(new "Owner approval for the hive's own managed repos" section),src/docs/api-reference/configuration.md,src/hive.yaml.example, changelog fragment.static/index.htmlcarries the same edit asstatic-src/js/config-watchdog-security.js(byte-identical concatenation).🤖 Generated with Claude Code