f0923e08ba
CI / helm (pull_request) Successful in 34s
CI / push-validation (pull_request) Successful in 27s
CI / build (pull_request) Successful in 1m17s
CI / lint (pull_request) Successful in 1m36s
CI / quality (pull_request) Successful in 1m37s
CI / typecheck (pull_request) Successful in 1m51s
CI / security (pull_request) Successful in 2m5s
CI / integration_tests (pull_request) Successful in 4m4s
CI / e2e_tests (pull_request) Successful in 4m21s
CI / unit_tests (pull_request) Successful in 8m0s
CI / docker (pull_request) Successful in 1m41s
CI / coverage (pull_request) Successful in 12m36s
CI / status-check (pull_request) Successful in 3s
CI / lint (push) Successful in 50s
CI / helm (push) Successful in 32s
CI / push-validation (push) Successful in 30s
CI / build (push) Successful in 45s
CI / quality (push) Successful in 1m16s
CI / typecheck (push) Successful in 1m19s
CI / security (push) Successful in 1m33s
CI / e2e_tests (push) Successful in 4m8s
CI / integration_tests (push) Successful in 4m56s
CI / unit_tests (push) Successful in 5m58s
CI / docker (push) Successful in 2m17s
CI / benchmark-publish (pull_request) Has been skipped
CI / coverage (push) Successful in 12m21s
CI / status-check (push) Successful in 4s
CI / benchmark-regression (push) Has been skipped
CI / benchmark-regression (pull_request) Failing after 1h12m31s
CI / benchmark-publish (push) Successful in 1h17m21s
Per spec §19310-19312, each resource gets its own sandbox and Apply commits each sandbox separately. When a plan is linked to multiple projects with git-checkout resources: - _create_sandbox_for_plan creates a worktree for EACH resource (not just the first), returning a list of _SandboxInfo objects - LLM output is written to the first resource's worktree (primary) - _route_sandbox_files_to_worktrees moves files that belong to other resources into their worktrees by matching against each resource's git ls-files output - Each worktree is committed independently - _apply_sandbox_changes merges each resource's worktree separately, showing per-resource Apply Summary and Sandbox Cleanup panels - Partial apply: if one resource's merge fails, others still proceed Single-resource plans are fully backward compatible — same behavior as before. ISSUES CLOSED: #7270
64 lines
3.4 KiB
Gherkin
64 lines
3.4 KiB
Gherkin
@multi-project-sandbox
|
|
Feature: Per-resource sandboxes for multi-project plans (#7270)
|
|
Per spec §19310-19312, each resource gets its own sandbox and
|
|
Apply commits each sandbox separately.
|
|
|
|
Scenario: Single-resource plan creates one sandbox for mps
|
|
Given a temp git project "alpha" for mps
|
|
And a mocked plan service linking project "alpha" for mps
|
|
When I call _create_sandbox_for_plan for mps
|
|
Then sandbox_infos should have 1 entry for mps
|
|
And sandbox_root should be a directory for mps
|
|
|
|
Scenario: Multi-resource plan creates sandboxes for each resource for mps
|
|
Given a temp git project "alpha" for mps
|
|
And a temp git project "beta" for mps
|
|
And a mocked plan service linking projects "alpha" and "beta" for mps
|
|
When I call _create_sandbox_for_plan for mps
|
|
Then sandbox_infos should have 2 entries for mps
|
|
And each sandbox_info should have a different sandbox_path for mps
|
|
|
|
Scenario: Route files moves file to correct worktree for mps
|
|
Given a temp git project named "alpha" containing "src/app.py" for mps
|
|
And a temp git project named "beta" containing "src/api.py" for mps
|
|
And a mocked plan service linking projects "alpha" and "beta" for mps
|
|
And sandbox_infos for both projects for mps
|
|
And a file "src/api.py" exists in the primary sandbox for mps
|
|
When I call _route_sandbox_files_to_worktrees for mps
|
|
Then "src/api.py" should exist in the beta sandbox for mps
|
|
And "src/api.py" should not exist in the alpha sandbox for mps
|
|
|
|
Scenario: Route files preserves primary file when both projects share path for mps
|
|
Given a temp git project named "alpha" containing "README.md" for mps
|
|
And a temp git project named "beta" containing "README.md" for mps
|
|
And a mocked plan service linking projects "alpha" and "beta" for mps
|
|
And sandbox_infos for both projects for mps
|
|
And the file "README.md" in the primary sandbox is overwritten with "ROUTED_CONTENT" for mps
|
|
When I call _route_sandbox_files_to_worktrees for mps
|
|
Then "README.md" in the alpha sandbox should contain "ROUTED_CONTENT" for mps
|
|
And "README.md" in the beta sandbox should not contain "ROUTED_CONTENT" for mps
|
|
|
|
Scenario: Route files is a no-op for single resource for mps
|
|
Given a temp git project named "alpha" containing "src/app.py" for mps
|
|
And sandbox_infos with only one entry for mps
|
|
And a file "src/app.py" exists in the primary sandbox for mps
|
|
When I call _route_sandbox_files_to_worktrees for mps
|
|
Then "src/app.py" should still exist in the alpha sandbox for mps
|
|
|
|
Scenario: Apply merges multiple worktrees separately for mps
|
|
Given a temp git project "alpha" with a worktree branch for mps
|
|
And a temp git project "beta" with a worktree branch for mps
|
|
And a mocked plan service linking projects "alpha" and "beta" for mps
|
|
When I call _apply_sandbox_changes for mps
|
|
Then both projects should have the merged changes for mps
|
|
And the console output should contain "Apply Summary" for mps
|
|
|
|
Scenario: Partial apply continues when one merge fails for mps
|
|
Given a temp git project "alpha" with a worktree branch for mps
|
|
And a temp git project "beta" with a conflicting worktree branch for mps
|
|
And a mocked plan service linking projects "alpha" and "beta" for mps
|
|
When I call _apply_sandbox_changes for mps
|
|
Then alpha should have the merged changes for mps
|
|
And beta should have the original content for mps
|
|
And _apply_sandbox_changes should return False for mps
|