feat(sandbox): implement sandbox boundary algebra and domain computation #557

Merged
freemo merged 1 commit from feature/m6-sandbox-boundary-algebra into master 2026-03-04 16:38:24 +00:00
Owner

Summary

Implements the sandbox boundary algebra and domain computation as specified in docs/specification.md § Resource DAG > Sandbox Boundaries.

Changes

  • sandbox_boundary(resource) function — walks up containment edges in the resource DAG to the nearest sandboxable ancestor resource
  • Domain grouping — resources sharing the same sandbox_boundary are grouped into sandbox domains, sharing one sandbox instance
  • SandboxManager re-keying — updated from (plan_id, resource_id) to (plan_id, sandbox_boundary_id) for proper domain-based sandbox reuse
  • "Sandboxable" resource type attribute — resource types can declare themselves as sandboxable boundaries
  • Boundary computation caching — cached per plan execution since the resource DAG doesn't change mid-execution

Testing

  • Behave BDD scenarios for boundary computation (direct parent, nested, multiple domains, no-ancestor error, caching)
  • Robot Framework integration tests for multi-resource plans with boundary algebra
  • ASV benchmarks for boundary computation performance

Quality Gates

  • nox -s lint — passes
  • nox -s typecheck — 0 errors (Pyright strict)
  • nox -s unit_tests — all scenarios pass
  • nox -s integration_tests — all tests pass
  • nox -s coverage_report — >= 97%

Closes #548

## Summary Implements the sandbox boundary algebra and domain computation as specified in docs/specification.md § Resource DAG > Sandbox Boundaries. ### Changes - **`sandbox_boundary(resource)`** function — walks up containment edges in the resource DAG to the nearest sandboxable ancestor resource - **Domain grouping** — resources sharing the same `sandbox_boundary` are grouped into sandbox domains, sharing one sandbox instance - **SandboxManager re-keying** — updated from `(plan_id, resource_id)` to `(plan_id, sandbox_boundary_id)` for proper domain-based sandbox reuse - **"Sandboxable" resource type attribute** — resource types can declare themselves as sandboxable boundaries - **Boundary computation caching** — cached per plan execution since the resource DAG doesn't change mid-execution ### Testing - Behave BDD scenarios for boundary computation (direct parent, nested, multiple domains, no-ancestor error, caching) - Robot Framework integration tests for multi-resource plans with boundary algebra - ASV benchmarks for boundary computation performance ### Quality Gates - `nox -s lint` — passes - `nox -s typecheck` — 0 errors (Pyright strict) - `nox -s unit_tests` — all scenarios pass - `nox -s integration_tests` — all tests pass - `nox -s coverage_report` — >= 97% Closes #548
freemo added this to the v3.5.0 milestone 2026-03-04 04:45:28 +00:00
freemo scheduled this pull request to auto merge when all checks succeed 2026-03-04 15:37:21 +00:00
freemo force-pushed feature/m6-sandbox-boundary-algebra from 24e6c86420
All checks were successful
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 16s
CI / quality (pull_request) Successful in 18s
CI / build (pull_request) Successful in 21s
CI / typecheck (pull_request) Successful in 38s
CI / security (pull_request) Successful in 49s
CI / unit_tests (pull_request) Successful in 1m55s
CI / docker (pull_request) Successful in 39s
CI / integration_tests (pull_request) Successful in 3m4s
CI / coverage (pull_request) Successful in 4m39s
CI / benchmark-regression (pull_request) Successful in 26m51s
to 5935940276
All checks were successful
CI / lint (pull_request) Successful in 16s
CI / typecheck (pull_request) Successful in 31s
CI / security (pull_request) Successful in 29s
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 1m21s
CI / quality (pull_request) Successful in 2m33s
CI / unit_tests (pull_request) Successful in 3m10s
CI / integration_tests (pull_request) Successful in 5m17s
CI / coverage (pull_request) Successful in 4m25s
CI / docker (pull_request) Successful in 40s
CI / lint (push) Successful in 12s
CI / typecheck (push) Successful in 31s
CI / quality (push) Successful in 15s
CI / security (push) Successful in 32s
CI / build (push) Successful in 21s
CI / integration_tests (push) Successful in 3m6s
CI / unit_tests (push) Successful in 3m30s
CI / benchmark-regression (push) Has been skipped
CI / docker (push) Successful in 1m43s
CI / coverage (push) Successful in 5m21s
CI / benchmark-regression (pull_request) Successful in 31m11s
CI / benchmark-publish (push) Successful in 17m24s
2026-03-04 15:59:17 +00:00
Compare
freemo merged commit 5935940276 into master 2026-03-04 16:38:24 +00:00
freemo deleted branch feature/m6-sandbox-boundary-algebra 2026-03-04 16:38:24 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core!557
No description provided.