Repository navigation
✨ Sandboxed agents open issues and keep topic claims through the request spool - #18586
Conversation
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
Mutation testing⏱️ The 900s mutation budget ran out, so 1 package(s) were not fully mutated and the results below do not cover them:
❌ gremlins did not produce a report for 2 package(s), so no verdict can be derived from this run (see the job log):
gremlins found 1 surviving mutant(s) in changed files: the code ran under tests, but changing it did not fail any test.
Verdict: |
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. ℹ️ Sentinel: informational, author is trusted (owner), merge is not blocked. Head
No 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. hive/awaiting-ci: rebased onto v5 (dropped the docs-citation refresh commit, which conflicted and is now stale; CI's citation guard will report any remaining drift). CI pending — sweep will merge when green. 🐝 Hive Agent: — hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.325 |
5ae49d9 to
5ac25bb
Compare
Generalize the sandbox review spool into a typed request spool. Envelopes now name a kind (review, issue, topic); every kind but review binds its name into the MAC, so a request signed as one kind is refused as another, and the seen-MAC replay guard covers all kinds. Kindless envelopes are reviews MACed as before, so hive-review is unchanged. - issue requests run through the issue relay's own handler with every gate, attributed to the manifest's agent and authorized by the issue authorizer installed for the spool. - topic requests are applied to the manifest agent's bead store. A claim without a PR is pending on the kick's branch (now recorded in the manifest) and the governor binds it to the PR opened from that branch. - hive-open-issue writes signed requests to the spool when HIVE_SANDBOX_REQUEST_DIR and HIVE_SANDBOX_SPOOL_KEY are set; the new hive-topic relay mirrors bd topic and falls back to bd in-pod. - Both ship on the sandbox PATH (Podman bind mount, Job init container). Fixes #18572 Fixes #18573 Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
5ac25bb to
a0e3a9b
Compare
…fusal test 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 |
Review follow-ups (below
|
Checks in the hive `deps` agent's prompt, definition and dependency targets under `.hive/`, where hive's repo agent discovery looks for them. The flow is unchanged: bump one dependency group, compile it, open an issue if that fails, open one PR on success, fix our side when CI is red, file dependency bugs upstream, recommend a refresh only when a newer release may fix the bug, never run the test suite and never wait for CI. Hive features this now uses, all merged in hive v5: - `hive-topic claim` from the sandbox, so each group keeps its one-PR claim (hivecommons/hive#18586). - `hive-open-issue` from the sandbox for dependency bugs (on torch-spyre) and compile failures (here). This replaces the `known_bad` ledger PR. `known_bad` stays in `targets.yaml` as a cap maintainers can set by hand (hivecommons/hive#18586). - Fix kicks on the agent's own red bump PR commit on top of it, and sandbox PRs are credited to `deps`, so red CI kicks `deps` and not `scanner` (hivecommons/hive#18587). PRs opened before that fix still get the fix as a patch in the report. - `${NEW_RELEASES}` from the release-feed watcher (hivecommons/hive#18507). - `.hive/agents/` discovery (hivecommons/hive#18505). Files: - `.hive/agents/deps.md`: the kick template (`prompt_source`). - `.hive/agents/deps.yaml`: optional presentation-only definition. - `.hive/deps/targets.yaml`: dependency groups. Only `deps-torch-spyre` is enabled. - `.gitignore`: keeps hive's per-run scratch under `.hive/` ignored and tracks only `.hive/agents/` and `.hive/deps/`. This overlaps torch-spyre#1626, which puts the prompt at `.github/hive/prompts/deps.md` and ignores all of `.hive/`. Its prompt content is merged into `.hive/agents/deps.md` here. If this lands first, torch-spyre#1626 can drop its prompt and `.gitignore` hunks. ## Setup after merge (hive owner) 1. **Approve the prompt source.** Settings, Security, Prompt sources. On the `torch-spyre/spyre-inference` row, click **Approve…** and confirm. Leave `allow_github_prompt` and `github_prompt_allowlist` alone. 2. **Point the agent at the prompt.** Agents, `deps`, General tab, **Prompt from GitHub repo**: Owner `torch-spyre`, Repo `spyre-inference`, File path `.hive/agents/deps.md`, Ref `main`. Save. Keep the current kick template as the cold-start fallback, and replace its text with this file so the fallback runs the same flow. 3. **Variables tab** (static, template scope): - `DEPS_LOCAL_CHECK`: `uv sync --frozen --inexact && uv run --no-sync python -c 'import torch_spyre, spyre_inference; print(torch_spyre.__version__)'` - `DEPS_MAX_REFRESHES`: `2` - `DEPS_UPSTREAM_REPO`: `torch-spyre/torch-spyre` 4. **Cadences tab.** idle, quiet and busy `24h`, surge `pause`. 5. **Optional, release-feed kicks** (YAML only, no Settings control yet): `governor.release_feeds.agents.deps.sources: [{kind: github_tag, repo: torch-spyre/torch-spyre}]`, with `cooldown_s: 21600`. Keep the daily cadence for CI follow-up. 6. **Import tab.** `deps.yaml` will show under "Declared in your repos". Leave it pending or reject it, because approving it would create a second `deps` agent. 7. Unpause `deps`. cc @joerunde 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Andy Anderson <andy@clubanderson.com>
What
The sandbox review spool becomes a typed sandbox request spool. Besides PR reviews it now carries
issueandtopicrequests, so an agent whose kicks run in a Podman or Kubernetes Job sandbox can open, comment on, claim, close and label issues, and keep its one-PR-per-topic claims.{"kind": "issue"|"topic", "request": "...", "mac": "..."}. Every kind except review MACs"<kind>\n" + requestunder the per-kick key, so a request signed as one kind is rejected as any other. The seen-MAC replay guard is shared across kinds, and an unknown kind is set aside as.rejected. A kindless envelope is still a review MACed over the request alone, sohive-reviewis unchanged and an older copy still works.handleOneIssueRequestFrom, the pod-local issue handler, with every gate: repo gate, ACMMCanCreateIssues, lane write allowlist, repo pause, repo scope, title dedupe and consolidation, canary scan and audit. They are attributed to the manifest's agent with uid 0. The spool uses the issue authorizer installed throughSetSandboxSpoolRelaysbefore the watchers start, and it never reads the issue watcher's field, which another goroutine writes.cmd/hive. The manifest now also records the kick's repo and branch.hive-topic claim <key>without--prrecords a pending claim on that branch, andsyncTopicClaimsbinds it to the PR opened from that branch on the next eval cycle. A review-only kick records no branch, so a claim from it needs--pr.hive-open-issuewrites signed requests to the spool whenHIVE_SANDBOX_REQUEST_DIRandHIVE_SANDBOX_SPOOL_KEYare set (theHIVE_REVIEW_*names also work). The newhive-topicmirrorsbd topic: in the pod it runsbd topic, and in a sandbox it writes to the spool, waits for the reply and uses the same exit codes asbd topic. Both are added tosandbox.RelayNames, so they reach the sandbox PATH through the Podman bind mount and the Job init container.hive-topicis also added to the Dockerfile.Tests
pkg/github/sandbox_spool_relays_test.go: each kind end to end with fakes (issue create, dedupe and comment; topic claim, get, list, release, explicit PR and refusal). Also attribution from the manifest agent, gate refusals (mode gate, fail-closed authorizer, placeholder repo, repo scope, missing topic handler, malformed topic requests), and MAC rejection (review MAC on an issue envelope, another run's key, unknown kind) plus replay.crux: MAC kind binding and kind normalization.crux/agent: the manifest records the repo and branch, the generic env names carry the spool, and review-only kicks have no branch.crux/sandbox,crux/kubejob: the relays are staged and on PATH in the Podman args and the Job init container command.pkg/beads,cmd/hive,pkg/scheduler: pending claims are created, moved and bound, the sync binds them by branch, the topic handler is covered, and the kick shows a pending claim.bin/test_hive_open_issue.shcovers spool signing. The newbin/test_hive_topic.shis wired into v2-ci.Docs:
src/docs/sandbox-isolation.md,src/docs/beads-cli.md. Changelog:changelog.d/added-18572-sandbox-issue-topic-spool.md.Fixes #18572
Fixes #18573
cc @joerunde
🤖 Generated with Claude Code