Files
cleveragents-core/robot/sandbox_boundary_algebra.robot
T
freemo 5935940276
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
feat(sandbox): implement sandbox boundary algebra and domain computation
Implement sandbox_boundary(r) function that walks up containment edges
in the resource DAG to the nearest sandboxable ancestor, enabling
resources sharing a boundary to share one sandbox instance.

Changes:
- Add boundary.py: is_sandbox_boundary(), sandbox_boundary(),
  compute_sandbox_domains(), BoundaryCache (thread-safe, per-execution)
- Update SandboxManager: resolve_sandbox_key() and
  get_or_create_sandbox_for_resource() key by (plan_id, boundary_id)
  instead of (plan_id, resource_id); boundary cache lifecycle methods
- Define "sandboxable" via ResourceCapabilities.sandboxable + non-none
  sandbox_strategy as per specification section 24659-24674
- Export new symbols from sandbox __init__.py
- Add vulture whitelist entries for new public API

Tests:
- 26 Behave BDD scenarios (features/sandbox_boundary_algebra.feature)
- 5 Robot Framework integration tests (robot/sandbox_boundary_algebra.robot)
- ASV benchmarks for boundary walk, domain grouping, and cache performance

ISSUES CLOSED: #548
2026-03-04 15:59:15 +00:00

48 lines
2.5 KiB
Plaintext

*** Settings ***
Documentation Integration tests for sandbox boundary algebra: sandbox_boundary(),
... compute_sandbox_domains(), BoundaryCache, and SandboxManager
... boundary-aware keying.
... Covers M6 sandbox boundary algebra (#548).
Resource ${CURDIR}/common.resource
Suite Setup Setup Test Environment
Suite Teardown Cleanup Test Environment
*** Variables ***
${HELPER_SCRIPT} robot/helper_sandbox_boundary.py
*** Test Cases ***
Sandbox Boundary Walk To Nearest Sandboxable Ancestor
[Documentation] Verify sandbox_boundary() walks containment edges to nearest sandboxable resource
[Tags] sandbox boundary walk
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} boundary-walk cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} boundary-walk-ok
Domain Grouping Partitions Resources By Boundary
[Documentation] Verify compute_sandbox_domains() groups resources by sandbox boundary
[Tags] sandbox boundary domains
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} domain-grouping cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} domain-grouping-ok
Boundary Cache Stores And Retrieves Results
[Documentation] Verify BoundaryCache caches boundary lookups for plan execution
[Tags] sandbox boundary cache
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} boundary-cache cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} boundary-cache-ok
Manager Keys Sandboxes By Boundary ID
[Documentation] Verify SandboxManager resolves keys via boundary algebra so child resources share sandbox
[Tags] sandbox boundary manager
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} manager-boundary-keying cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} manager-boundary-keying-ok
Multi Resource Plan With Separate Sandbox Domains
[Documentation] Verify multi-resource plan with different boundaries creates separate sandboxes
[Tags] sandbox boundary multi
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} multi-resource-plan cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} multi-resource-plan-ok