Skip to content

[REMOTE-3146] Discover nested build cache roots - #15844

Merged
bnavetta merged 12 commits into
masterfrom
factory/remote-3146-nested-spacectl-spec
Sep 10, 2026
Merged

[REMOTE-3146] Discover nested build cache roots#15844
bnavetta merged 12 commits into
masterfrom
factory/remote-3146-nested-spacectl-spec

Conversation

@warp-agent-staging

@warp-agent-staging warp-agent-staging Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Description

Discovers nested build and package roots using detector-aligned markers, then pipelines root and nested spacectl detections through one shared concurrency-8 pool. A Tokio blocking task owns the synchronous WalkDir traversal and feeds a bounded capacity-8 channel, which removes resumable iterator state while preserving deterministic selection and backpressure. A whole-discovery child span is created under the active cache-setup span and entered on the blocking thread, with per-repository child spans preserving the trace hierarchy.

Nested roots receive stable isolated cache paths; results return to canonical order before planning, all real mounts remain serial, and the global mount remains last. Traversal stays bounded to 10,000 directories and 32 child roots per repository, skips ignored and symlinked trees, and isolates per-root preparation or detection failures. Receiver drop stops the producer through failed blocking_send or Sender::is_closed() checks.

Linked Issue

  • REMOTE-3146
  • Originating Slack thread
  • The linked issue is labeled ready-to-spec or ready-to-implement — the work item is in Linear, where this GitHub-specific label does not apply.
  • Screenshots or video are not applicable to this non-rendered build-cache change.

Testing

  • ./script/format
  • cargo clippy -p build_cache --all-targets --all-features --tests -- -D warnings
  • cargo nextest run --no-fail-fast -p build_cache — 48 passed
  • cargo nextest run --no-fail-fast -p warp cache_setup — 3 passed
  • cargo run -p build_cache --example validate_spacectl -- empty — reached complete validation without the prior missing-reactor panic; exited 1 because the sandbox detected apt and destructive mounts degraded
  • cargo check -p warp --lib
  • git diff --check
  • Verified worker spacectl is 0.12.2 (df91f93)
  • Live nested fixture detected root Rust, backend Go, and frontend npm modes with distinct stable cache roots; destructive mounts were unavailable in the sandbox.
  • Workspace Clippy was attempted but is blocked by unrelated existing all-features errors in app/src/ai/execution_profiles and dead-code failures.
  • Wasm Clippy was attempted but the sandbox lacks wasm32-unknown-unknown, and installing it is permission-blocked. cargo tree -p warp --target wasm32-unknown-unknown -i build_cache confirms the native-only crate is absent from the wasm graph; CI remains the compilation proof.
  • Manually exercised nested discovery with the real worker spacectl binary.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

CHANGELOG-IMPROVEMENT: Discover and cache build tools in nested repository directories.

Define bounded marker scanning, concurrent detection, stable nested cache paths, serial mount safety, and objective validation criteria.\n\nCo-Authored-By: Warp Agent <agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label Sep 7, 2026
@warp-agent-staging

Copy link
Copy Markdown
Contributor Author

This PR was generated with Warp.

Comment @warp-staging-factory on this PR to send it follow-up work.

View run View conversation View origin

Comment thread specs/REMOTE-3146/TECH.md Outdated
Comment thread specs/REMOTE-3146/TECH.md Outdated
Comment thread specs/REMOTE-3146/TECH.md Outdated
@warp-agent-staging warp-agent-staging Bot changed the title [REMOTE-3146] Specify nested spacectl discovery [REMOTE-3146] Discover nested build cache roots Sep 8, 2026
@warp-agent-staging
warp-agent-staging Bot marked this pull request as ready for review September 8, 2026 14:22
Comment thread crates/build_cache/src/discovery.rs Outdated
Comment thread crates/build_cache/src/discovery.rs Outdated
Comment thread crates/build_cache/src/discovery.rs Outdated
Comment thread crates/build_cache/src/discovery.rs Outdated
Comment thread crates/build_cache/src/discovery.rs Outdated
Comment thread crates/build_cache/src/discovery.rs Outdated
Comment thread crates/build_cache/src/discovery_tests.rs
Comment thread crates/build_cache/src/discovery_tests.rs Outdated
Comment thread crates/build_cache/src/lib.rs
Comment thread crates/build_cache/src/spacectl.rs Outdated
Comment thread crates/build_cache/src/discovery.rs Outdated
Comment thread crates/build_cache/src/discovery.rs Outdated
Comment thread crates/build_cache/src/discovery.rs Outdated
Comment thread crates/build_cache/src/discovery.rs Outdated
Comment thread crates/build_cache/src/discovery.rs Outdated
Comment thread crates/build_cache/src/discovery.rs Outdated
Comment thread crates/build_cache/src/discovery_tests.rs Outdated
warp-agent-staging Bot and others added 4 commits September 9, 2026 18:16
Select one most-specific marker root, use only the walk resource bound,
and improve discovery diagnostics, tracing, and stable ID generation.
Keep the tests and technical specification aligned with the behavior.
Split the reviewer-prescribed helper documentation at its sentence
boundary to comply with the repository's 100-column comment rule.
Describe the helper's file and directory marker contract through its
most-specific match rule without implying that every entry is a file.
@bnavetta
bnavetta enabled auto-merge (squash) September 10, 2026 10:23
@bnavetta
bnavetta merged commit 3ec493c into master Sep 10, 2026
41 of 43 checks passed
@bnavetta
bnavetta deleted the factory/remote-3146-nested-spacectl-spec branch September 10, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant