The "no temporary merge files should remain on disk" step in
features/sandbox_merge_strategies.feature:36 scanned global
tempfile.gettempdir() for any ca_merge_* entry and asserted zero. Under
behave-parallel --processes 8 a sibling scenario's in-flight tmpdir in
the same shared /tmp could be observed mid-merge and trip the
assertion, even though GitMergeStrategy.merge cleans up its own tmpdir
in a finally block
(src/cleveragents/infrastructure/sandbox/merge.py:151-155).
Patch tempfile.mkdtemp inside cleveragents.infrastructure.sandbox.merge
for the @when step to track the tmpdirs this scenario's merge actually
creates, then assert those specific paths are gone in the @then step.
Production merge code is unchanged; the contract under test
(cleanup-on-success) is preserved; sibling scenarios sharing /tmp no
longer race the assertion.
ISSUES CLOSED: #7527
- Remove unused typing.Any import from dirs_cache.py (ruff lint)
- Collapse multiline expressions without trailing commas (ruff format)
- Rename ambiguous behave step "the result should be {True,False}" to
"the dir membership result should be {True,False}" — resolves conflict
with existing step @then('the result should be {expected}') in
cli_steps.py that caused all 31 feature workers to crash on load
- Add self._sandbox_dirs_cache = None invalidation to
CleanupService._purge_sandboxes() — the actual fix for issue #7527;
without this, subsequent scan() calls return stale deleted paths
- Fix CONTRIBUTORS.md PR reference from #10989 to #11091
ISSUES CLOSED: #7527
Adds SandboxDirsCache to track filesystem paths of sandbox-created directories indexed by plan_id. Cache is purged in cleanup_all(), cleanup_abandoned(), clear_sandbox_dirs_cache(), and the at-exit handler matching the existing clear_boundary_cache() invalidation.
All agents now track which variables were explicitly present in their prompt
versus fetched from environment variables or git remote. When constructing
subagent prompts, only explicitly-present variables are included. Fetched
variables are omitted, allowing each subagent to fetch them independently.
This prevents credentials and other fetched values from being garbled as they
propagate through multiple LLM prompt layers.
Affected agents:
- auto-agents (primary orchestrator)
- implementation-supervisor, pr-merge-supervisor, pr-review-supervisor
- supervisor (generic)
- implementation-worker, pr-merge-worker, pr-review-worker
- task-implementor, tier-dispatcher
- work-group-util, git-clone-util, git-push-util, git-checkout-util