Repository navigation
fix: version-less remote refs resolve to the latest tag via the LatestTag seam - #169
Conversation
…tTag seam A version-less remote candy ref (e.g. a builder plugin connected by word ref, where the caller knows the repo but not the tag) previously fell back to the MUTABLE default branch — a freshness-checked ref that hangs in a network-bound CI/container and can advance under the resolver. The newest tag is immutable and deterministic; a repo with no tags errors loudly rather than silently pinning a branch. The tag resolver is now a SEAM (spec.RefsCollectSeams.LatestTag, spec#52) so the mechanism is unit-testable offline: TestCollectRemoteRefsOpts_VersionlessRefResolvesLatestTag stubs the resolver and asserts the version-less ref lands on the stub tag (fails on the old default-branch path). The defaultBranches identifier is renamed to latestTags (R5 — no transitional name survives the cutover). Dev-time: local spec replace; swapped for the spec#52 pseudo-version pin at merge.
Review — BLOCKHead SHA: Change class: code/config (mechanism fix in Security screen (finding): T3 supply-chain — Blocks
Placement verdict
Verdict: BLOCK deepseek.com/deepseek-v4-flash — pi-review-action. |
The LatestTag seam landed in spec#52 (v0.2026232.521-0.20260826090151-ce44afab8bbf); the dev-time local replace is removed so the committed tree builds from the proxy.
Review — PASSHead SHA: Security screen: PASS — no secrets/egress/guardrail changes; the Comments considered: the prior Checklist: All applicable rules PASS or NA. A1 body complete with pasted hermetic-test / suite / build output consistent with the diff; A3 tier justified (changed resolution path executed against the pinned dependency state). R5 satisfied — Verdict: PASS deepseek.com/deepseek-v4-flash — pi-review-action. |
Review — PASSHead SHA: Security screen: PASS — no secrets/egress/guardrail changes; the Checklist: All applicable rules PASS or NA. A1 body complete (summary accounts for all 5 changed files incl. the spec pin; pasted hermetic-test/suite/build output; Verdict: PASS deepseek.com/deepseek-v4-flash — pi-review-action. |
Summary
A version-less remote candy ref (e.g. a builder plugin connected by word ref, where the caller knows the repo but not the tag) previously fell back to the mutable default branch — a freshness-checked ref that hangs in a network-bound CI/container and can advance under the resolver. The newest tag is immutable and deterministic; a repo with no tags errors loudly rather than silently pinning a branch.
This is the Phase-4 candy de-submodule cutover's builder-connect hang RCA:
connectPluginByWordRef's lazy-connect pass-1 vendors builder plugins by word ref, and a version-less ref resolving tomaintriggered the freshness-checked download path on every connect.The tag resolver is now a SEAM (
spec.RefsCollectSeams.LatestTag, spec#52 — MERGED) so the mechanism is unit-testable offline. ThedefaultBranchesidentifier is renamed tolatestTags(R5 — no transitional name survives the cutover). The spec pin is the real spec#52 pseudo-version (v0.2026232.521-0.20260826090151-ce44afab8bbf) — no local replace in the diff; the committed tree builds from the proxy.How tested
Hermetic test (no network — the tag resolver is stubbed):
Full loaderkit suite (against the pinned spec, no replace):
Build against the pinned spec (no local replace):
The test fails on the old default-branch path (asserts
d.Version != "main"and equals the stub tag) and passes on the latest-tag path. The stub asserts the resolver is called with the layer-ripgrep repo URL, so the seam is genuinely exercised.Rulebook compliance
CollectRemoteRefsOpts; no per-caller workaroundsdefaultBranchesidentifier is renamed tolatestTagsin the same commitChange classification
go test ./loaderkit/green, hermetic, against the pinned specAssisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (fully tested and validated)