Skip to content

fix: share build cache across agent worktrees#763

Merged
AlexMikhalev merged 2 commits intomainfrom
fix/worktree-shared-target
Apr 6, 2026
Merged

fix: share build cache across agent worktrees#763
AlexMikhalev merged 2 commits intomainfrom
fix/worktree-shared-target

Conversation

@AlexMikhalev
Copy link
Copy Markdown
Contributor

Summary

  • Set CARGO_TARGET_DIR to main repo's target/ for all spawned agents
  • Detect sccache and set RUSTC_WRAPPER for cross-worktree compilation caching

Problem

Each agent worktree gets an empty target/ directory, triggering a full cargo build from scratch (30+ minutes). This blocked implementation-swarm from completing work.

Test plan

  • cargo test -p terraphim_orchestrator -- 379 tests pass
  • Deploy to bigbox, verify worktree agents use shared target dir
  • Install sccache on bigbox for additional caching

Generated with Terraphim AI

Terraphim CI and others added 2 commits April 6, 2026 22:20
Set CARGO_TARGET_DIR to main repo's target/ for all spawned agents
so worktree builds reuse the existing compilation cache instead of
building from scratch. Also detect sccache and set RUSTC_WRAPPER
for cross-worktree content-addressed caching.

Without this, each worktree agent triggered a full cargo build
from zero (30+ minutes) because git worktrees get empty target/.

Co-Authored-By: Terraphim AI <noreply@terraphim.ai>
Circuit breakers now keyed by provider:model (e.g., anthropic:claude-opus-4-6)
instead of just provider name. If opus is down but sonnet works, only opus
is marked unhealthy -- anthropic provider stays healthy.

Added: model_health(), is_model_healthy(), record_model_success(),
record_model_failure() for per-model operations.

provider_health() and is_healthy() still work at aggregate level:
provider is healthy if ANY of its models is healthy.

unhealthy_providers() reports a provider only if ALL its models are down.

Fixes HIGH finding from compound-review #413.

Co-Authored-By: Terraphim AI <noreply@terraphim.ai>
@AlexMikhalev AlexMikhalev merged commit a4a528e into main Apr 6, 2026
14 checks passed
@AlexMikhalev AlexMikhalev deleted the fix/worktree-shared-target branch April 6, 2026 22:13
AlexMikhalev added a commit that referenced this pull request Apr 22, 2026
…able agents in context

- Fix AgentRunRecord construction: extract chain fields from active_agents
  via .get() instead of referencing non-existent local variable
- Add mention_parent_agent field to ManagedAgent, set at all 3 dispatch sites
- Pass available_agents in MentionContextArgs so spawned agents know who
  they can chain to
- Add 2 tests for available_agents in mention context output

Refs #763 Refs #764 Refs #144
AlexMikhalev added a commit that referenced this pull request Apr 22, 2026
…#832)

Adds inter-agent orchestration via mention chain tracking. Fixes #144. Closes #760, #761, #762, #763, #764, #765.
AlexMikhalev added a commit that referenced this pull request Apr 22, 2026
…#832)

Adds inter-agent orchestration via mention chain tracking. Fixes #144. Closes #760, #761, #762, #763, #764, #765.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant