Skip to content

fix: version-less remote refs resolve to the latest tag via the LatestTag seam - #169

Merged
github-actions[bot] merged 3 commits into
mainfrom
feat/versionless-ref-latest-tag
Aug 26, 2026
Merged

github-actions[bot] merged 3 commits into
mainfrom
feat/versionless-ref-latest-tag

Conversation

@atrawog

@atrawog atrawog commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

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 to main triggered 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. The defaultBranches identifier is renamed to latestTags (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):

$ go test ./loaderkit/ -run TestCollectRemoteRefsOpts_VersionlessRefResolvesLatestTag -count=1 -v
=== RUN   TestCollectRemoteRefsOpts_VersionlessRefResolvesLatestTag
    refs_versionless_test.go:38: version-less ref resolved to v2026.235.1653
--- PASS: TestCollectRemoteRefsOpts_VersionlessRefResolvesLatestTag (0.00s)
PASS

Full loaderkit suite (against the pinned spec, no replace):

$ go test ./loaderkit/ -count=1
ok  	github.com/opencharly/sdk/loaderkit	0.006s

Build against the pinned spec (no local replace):

$ go build ./...
(exit 0)

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

Rule How / N/A
R0 N/A — no skills surface touched
R1 — RCA every anomaly The 10m builder-connect hang was RCA'd to the version-less ref resolving to the mutable default branch (freshness-checked fetch on every connect)
R2 N/A — no deferral; the fix lands complete with its seam (spec#52, merged)
R3 — No duplication One canonical resolution path in CollectRemoteRefsOpts; no per-caller workarounds
R4 — No workarounds Mechanism-level fix (immutable latest-tag resolution + seam); no local replace ships
R5 — Delete legacy The default-branch fallback path is removed AND the defaultBranches identifier is renamed to latestTags in the same commit
R6 N/A — no git operations beyond the PR itself
R8 N/A — no docs surface
R9 N/A — no test-only change; the mechanism change ships with its test
R10 — Fresh disposable proof The hermetic test is the proof; no live network dependency at test time; tested against the shipping dependency state

Change classification

  • Change class: mechanism fix (ref resolution semantics) + seam
  • Verification gate: go test ./loaderkit/ green, hermetic, against the pinned spec
  • Attribution tier: fully tested and validated

Assisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (fully tested and validated)

…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.
@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: f959f9cf2553cc90d6c16f259fe89eaeea164f0b

Change class: code/config (mechanism fix in loaderkit + dependency/build-file edits)

Security screen (finding): T3 supply-chain — go.mod adds replace github.com/opencharly/spec => /home/atrawog/Sync/Atrapub/coder/pi/opencharly/spec, redirecting a core dependency to a personal absolute filesystem path. The validate / validate CI run cannot pass against this (the replacement directory does not exist anywhere but the author's machine).

Blocks

  1. B8/R4 — machine-specific "works on my machine" shim in the diff. go.mod:84 ships a replace to /home/atrawog/.... A local-path replace must never appear in a mergeable PR: it breaks the build for CI and every other checkout. Remove the replace from the diff and pin the real spec#52 pseudo-version (require + go.sum entries) inside this PR itself.

  2. A1/R5 — the gate tested a state that will not ship; the fix is promised as future work. The body states the replace is "dev-time … swapped for the spec#52 pseudo-version pin at merge." That is a promise, not evidence — A1 forbids "will do later" bodies, and R5 forbids landing a transitional state. The pasted go test output (hermetic test + full loaderkit suite) was produced against the local-replace checkout; the dependency state that would actually merge (pinned spec#52, no replace) has zero evidence and its go.sum entries for github.com/opencharly/spec were deleted in this PR (go.sum:161-162), so the committed tree is self-inconsistent and unbuildable as-is. Land the pin in this PR, re-run the suite against it, and paste the fresh output for the shipping state.

Placement verdict

placement: CORRECT — the tag-resolution seam lives in spec (spec#52) with executor wiring in loaderkit; no alias growth, no new core import of an sdk kit, defaultBranches→latestTags rename is in the single atomic commit, and the new hermetic test genuinely pins the new behavior (fails on the old default-branch path). No placement defect.

Verdict: BLOCK


deepseek.com/deepseek-v4-flash — pi-review-action.

View action run

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.
@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: a72f2a1413c2ead8289e127f7e32acc3af0cda92

Security screen: PASS — no secrets/egress/guardrail changes; the opencharly/spec pin (ce44afab8bbf) is a same-module pseudo-version bump with matching go.sum hashes; no local replace anywhere in the current diff.

Comments considered: the prior github-actions[bot] BLOCK (5422967807) raised (1) a local-path replace in go.mod and (2) deleted go.sum entries making the shipping state unbuildable — both stale-superseded: commit a72f2a1413c2 ("pin the spec#52 pseudo-version (drop the dev-time local replace)") removes the replace, pins v0.2026232.521-0.20260826090151-ce44afab8bbf, and restores go.sum hashes; the body's pasted output now covers the pinned, no-replace state.

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 — defaultBranches→latestTags rename and the default-branch fallback removal land in the same commit, no transitional name survives. R3/R4 clean (single resolution path, seam instead of workaround). New test would fail on the old path, so R10 coverage holds. Placement: CORRECT — seam shape in spec (spec#52), resolution mechanism in the loaderkit kit, real resolver wired in the executor; no alias growth, no kit import into core. CI validate / validate is still in-flight (no failure observed) — tool-limited note, non-blocking.

Verdict: PASS


deepseek.com/deepseek-v4-flash — pi-review-action.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) August 26, 2026 09:04
@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: a1c8c7c404d7 (branch: feat/versionless-ref-latest-tag)

Security screen: PASS — no secrets/egress/guardrail changes; the opencharly/spec bump (v0.2026232.521-0.20260826090151-ce44afab8bbf) is a same-module forward pseudo-version with matching go.sum hashes; no replace directive anywhere in the current diff (the prior BLOCK's local-path replace was removed by commit a72f2a14, and go.sum entries for the pinned spec are present — both prior findings stale/superseded).

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; *Assisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (fully tested and validated)* footer in exact form). A2/A3 gate and tier justified — the changed resolution path executed against the pinned, no-replace dependency state. R1 RCA (builder-connect hang ← version-less ref resolving to mutable branch) with root-cause fix; R5 satisfied (defaultBranches→latestTags rename + default-branch fallback removal in the same commit, no transitional identifier); R3/R4 clean (single canonical path, seam instead of workaround, no local replace ships). New hermetic test pins the new behavior and fails on the old path, so R10 coverage holds. SDD/RDD/ADE N/A (no schema/candy changes). Placement: CORRECT — seam shape in spec (spec#52, merged), resolution mechanism in the loaderkit kit, concrete resolver wired via the executor seam; no alias growth, no kit import into core, no Legacy identifiers.

Verdict: PASS


deepseek.com/deepseek-v4-flash — pi-review-action.

View action run

@github-actions
github-actions Bot merged commit 50df10b into main Aug 26, 2026
1 check passed
charly-auto-merge Bot added a commit that referenced this pull request Aug 26, 2026
@aitrawog
aitrawog deleted the feat/versionless-ref-latest-tag branch September 25, 2026 19:08
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