Repository navigation
π Sandbox toggle writes a complete block; reap orphaned sandbox Jobs - #18566
Conversation
The per-agent Run in sandbox toggle now resolves the agent's effective sandbox block (own fields, then agent_sandbox defaults) and refuses with 400 when no image or usable runtime resolves. copy_from copies another agent's complete block minus publish.verify. The General tab shows a source picker with an inline error when there is none. Toggling off keeps the block with enabled: false. Switching an agent into sandbox mode now stops its tmux session, and the running-state kick refusal names the real state. Every sandbox Job gets activeDeadlineSeconds (kick timeout plus a named margin), and hive sweeps orphaned hive-kubejob sandbox Jobs at boot, logging and auditing each. Fixes #18525 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. Evidence bundle `#185669f08e3d` sha256:89e42977324eed2efb17a7a7c2b4621baa9696ecd195bea8f8da0a628fa4d1aa β download from the dashboard or `hivectl review evidence #18566`. |
Mutation testingβ 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 4 surviving mutant(s) in changed files: the code ran under tests, but changing it did not fail any test.
9 mutant(s) in changed files are not reached by any test (NOT COVERED). A maintainer may apply the
Verdict: |
β¦under its size ratchet 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 |
|
New changes are detected. LGTM label has been removed. |
|
merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 9f08e3d. |
Fixes #18525
What changed
Run in sandbox toggle (
PUT /api/config/agent/{name}/general)agent_sandboxdefaults. It writes the block with the image and runtime pinned.job.workspace_claimresolves, it refuses with 400. The message names what is missing and lists the agents a block can be copied from.copy_from(the dashboard sendssandboxCopyFrom) copies another agent's complete block, minus itspublishblock. The receiving agent keeps its ownpublish.verify.enabled: false.GET /api/config/agent/{name}now carriesgeneral.sandboxDefaultsProblemandgeneral.sandboxCopySources.Entering sandbox mode stops the tmux session
UpdateConfig,ReconcileAgents, or the global gate inSetSandboxConfig), the manager does the following:idlesandbox_mode_enteredaudit linerunningnow names the real state:a sandbox kick is already runningoragent has a live interactive session; sandbox kicks are blocked until it stops.Job deadline and boot sweep
activeDeadlineSeconds: the kick timeout pluskubejob.DeadlineMargin(15 minutes). When the run's context deadline gives a later value, the Job uses that one.app.kubernetes.io/managed-by=hive-kubejobJobs in its namespace. It deletes unfinished agent-sandbox Jobs (hive-<agent>-sandboxand-verify) in two cases:sandbox_job_reaped.crux-run-*)Tests
activeDeadlineSecondsin the Job spec, both configured and defaultDocs:
src/docs/sandbox-isolation.md,src/docs/dashboard-sections/workflow-and-agents.md. Changelog:changelog.d/fixed-18525-sandbox-toggle-and-job-reap.md.cc @joerunde
π€ Generated with Claude Code