Skip to content

[codex] Generalize sparse agent worktree inference#396

Merged
jamesrochabrun merged 1 commit into
mainfrom
jroch-sparse
Jun 22, 2026
Merged

[codex] Generalize sparse agent worktree inference#396
jamesrochabrun merged 1 commit into
mainfrom
jroch-sparse

Conversation

@jamesrochabrun

Copy link
Copy Markdown
Owner

Summary

Generalizes AgentHub's sparse checkout inference for launched agent worktrees so monorepo subdirectory starts no longer depend on hard-coded paths like ios, android, ribbons, or tools/ios/SproutApp.

The new flow infers a sparse owner path from project markers near startPath, keeps repo-root launches as full checkouts, preserves explicit sparseProfile and fullCheckout, and includes tracked support paths such as .agents, .claude, and git hook support when present. Gradle support is included only when a Gradle marker is detected.

Why

The previous implementation solved sparse checkout for one set of known monorepo layouts, but it did not cover generic layouts like apps/ios and apps/android. That meant AgentHub could still materialize an entire monorepo when the desired agent launch path was only one app subtree.

Validation

  • swift test --filter WorktreeManagementServiceTests passed.
  • ./scripts/test.sh passed the fast package gates through AgentHubCLI, AgentHubGitHub, SimulatorPreview, and Storybook.
  • Full ./scripts/test.sh is not green due to unrelated AgentHubCore issues observed before PR creation:
    • DiffAvailabilityServiceTests: Invalidate succeeds after the adaptive window elapses expectation failure.
    • WebPreviewResolverLaunchOptionsTests: Has no static fallback when no HTML files exist timed out.
    • CodeEdit dependency SwiftLint plugin phases reported 0 violations but failed with The folder “Output” doesn’t exist.

@jamesrochabrun jamesrochabrun marked this pull request as ready for review June 22, 2026 06:29
@jamesrochabrun jamesrochabrun merged commit 224c67a into main Jun 22, 2026
1 check passed
@jamesrochabrun jamesrochabrun deleted the jroch-sparse branch June 22, 2026 06:29
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