Skip to content

feat: add no-fetch worktree acquisition - #94

Merged
kunchenguid merged 1 commit into
kunchenguid:mainfrom
albertywu:feat/no-fetch
Aug 19, 2026
Merged

kunchenguid merged 1 commit into
kunchenguid:mainfrom
albertywu:feat/no-fetch

Conversation

@albertywu

Copy link
Copy Markdown
Contributor

Summary

  • add treehouse get --no-fetch for callers that already refreshed local refs
  • preserve the existing fetch-before-acquire behavior by default
  • support both interactive and durable lease acquisition
  • document the supervisor-managed fetch workflow

Motivation

Automation may acquire several worktrees from one backing repository after performing a single coordinated fetch. Fetching again for every acquisition adds redundant network work and allows concurrent acquisitions to contend on shared refs. --no-fetch lets the caller own freshness while Treehouse continues to own pool allocation, reset, and leases.

Testing

  • make lint
  • make test
  • end-to-end test verifies the default path fails against an unreachable origin while get --lease --no-fetch --json succeeds from local refs
  • local prototype acquired two distinct leases with origin intentionally unreachable, checked out two exact detached SHAs, returned both with lease fencing, reused a returned path, reset it to main, and retained an ignored warm-cache sentinel

@greptile-apps

greptile-apps Bot commented Aug 19, 2026

Copy link
Copy Markdown

Confidence Score: 5/5

The PR appears safe to merge with no concrete blocking or independently actionable non-blocking defects identified.

Existing callers retain fetch-before-acquire behavior, while explicit no-fetch requests are propagated consistently through both acquisition modes and leave freshness responsibility with the caller.

Reviews (1): Last reviewed commit: "feat: add no-fetch worktree acquisition" | Re-trigger Greptile

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: CI is green and Greptile already scored this 5/5 with no findings. In scope (optional --no-fetch, default fetch stays). Merging.

@kunchenguid
kunchenguid merged commit 164d903 into kunchenguid:main Aug 19, 2026
5 checks passed
@kunchenguid

Copy link
Copy Markdown
Owner

No description provided.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: this is merged. Thank you @albertywu — really appreciate you taking the time on this.

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.

2 participants