Anchor dependency preparation to checkout root

This commit is contained in:
2026-11-01 21:12:05 +00:00
parent b47202a2e9
commit 5aba4c6c87
4 changed files with 83 additions and 8 deletions

View File

@@ -41,7 +41,11 @@ For binary profiles, call `PrepareBuildDependencies` with a
`DependencyPreparationRequest` selecting the repository and module after
checkout preparation and before delivery. It runs `go mod download` in that
module with workspace discovery disabled and the available compatible local Go
toolchain.
toolchain. Inside a Git checkout, `RepositoryDir` can name a subdirectory;
`ModuleDir` is interpreted relative to the containing checkout root, and an
empty selection chooses that root. Previously, a supplied checkout subdirectory
acted as the selection base. Outside a checkout, the supplied directory remains
the base for `ModuleDir`.
The operation may use the network and updates the Go module cache while
preserving the caller's proxy, private-module, credential, and cache settings.
If checksums are missing, Go may update `go.sum`. For binary CI delivery, prepare

View File

@@ -110,8 +110,7 @@ and CLI publication tests. Use the offline environment specified in Stage 10.
**Status:** complete. `go test ./internal/git` passes offline, including real
checkout, worktree, alias, standalone, missing-Git, diagnostic, and failure
cases. The public Go-only preparation composition check is deferred to Stage 3,
where preparation adopts discovery.
cases. The public Go-only preparation composition check passed in Stage 3.
**Files:** `internal/git/source.go` or a focused companion file, Git tests, and
`internal/process/process.go` only if an existing invocation capability proves
@@ -172,7 +171,9 @@ checkout, discovery fails with the missing-Git cause before Go runs.
## Stage 3: Apply checkout-root selection to dependency preparation
**Status:** pending. **Depends on:** Stage 2.
**Status:** complete. Public preparation and CLI `TestCIDeliver` checks pass
offline, including checkout-relative, symlink, standalone, and missing-Git
selection. **Depends on:** Stage 2.
**Files:** `preparation.go`, `preparation_test.go`, and
`docs/consumers/delivery.md`'s preparation guidance.