Skip to content

feat(spec)!: remove the now-dead RefsCollectSeams.LatestTag seam - #184

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/kubevirt-remove-latesttag-seam
Sep 28, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/kubevirt-remove-latesttag-seam

Conversation

@aitrawog

Copy link
Copy Markdown
Contributor

Summary

Remove the now-dead RefsCollectSeams.LatestTag seam field (and its compile-only guard test).

Version-less remote refs no longer resolve to the latest tag: the sdk's CollectRemoteRefsOpts (opencharly/sdk#317) now resolves a version-less ref to the repo's DEFAULT BRANCH. A version-less ref means "the current tip of that repo"; the old latest-tag behavior served a stale build that also shadowed a project's explicit pin for the same word (opencharly/charly#715). With that resolution change, RefsCollectSeams.LatestTag has no reader anywhere, so it is deleted here (R5 — no dead seam survives the cutover).

The gitClient().LatestTag method and the GitLatestTag primitive are unchanged — only the unused loader seam field goes (explicit tag resolution still uses them).

How tested

$ grep -rn "\.LatestTag\b" spec/ refs/ | grep -vE "GitLatestTag|g\.LatestTag|func "
(no loader-seam readers remain)
$ go build ./...
$ go test ./spec/
ok  	github.com/opencharly/spec/spec	4.059s

The repo's own gate runs the full go build ./... && go test ./....

Rulebook compliance

  • R0 — /charly-internals:go context.
  • R5 — the dead seam field + its guard test are removed in the same change; no dual path.
  • R3 — one resolution mechanism (the sdk's resolveDefaultBranch); the removed field was its superseded predecessor.
  • R2 — the field is removed now that its only reader is gone; nothing is left transitional.
  • R6/R8/R9/R10, ADE/SDD — no runtime artifact; a wire-type field removal. N/A — no runtime path; the consumer (sdk#317) removes its writer in the paired change.

Change classification

  • Class: spec wire-type change (seam field removal). Gate: go build + go test ./spec/.
  • Attribution tier: fully tested and validated for the spec package.

Ordering (producer-first): this spec removal lands first; then opencharly/sdk#317 bumps its spec pin to this tag and removes its LatestTag: writer (the only writer org-wide), completing the cutover in one step.

Agent: kubevirt · session ses_f25de0d03ffeAneutX1OI1Oq2u
Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)

Version-less remote refs no longer resolve to the latest tag: the sdk's
CollectRemoteRefsOpts now resolves them to the repo's DEFAULT BRANCH
(opencharly/sdk#317 — a version-less ref means "the current tip of that repo",
and the latest-tag behavior served a stale build that SHADOWED a project's
explicit pin, opencharly/charly#715). With that, RefsCollectSeams.LatestTag has
no reader anywhere, so it is deleted here (R5 — no dead seam survives the
cutover) together with its compile-only guard test.

The gitClient().LatestTag method and GitLatestTag primitive are unchanged and
still used for explicit tag resolution; only the unused loader seam field goes.

*Agent: kubevirt · session ses_f25de0d03ffeAneutX1OI1Oq2u*
*Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)*
aitrawog added a commit to opencharly/sdk that referenced this pull request Sep 28, 2026
The version-less resolution no longer uses seams.LatestTag; opencharly/spec#184
removes the field itself. Drop the sole writer here so the cutover carries no
dead setter. (The spec pin bump to spec#184's tag lands once spec#184 merges,
producer-first.)
@aitrawog aitrawog added the rerun label Sep 28, 2026
@github-actions

Copy link
Copy Markdown

Review — PASS

I re-derived every claim in the body against the current diff.

Diff vs. body. The body claims a 2-file, 1-commit change removing the RefsCollectSeams.LatestTag seam and its guard test. The supplied diffs match exactly:

  • spec/loader_seam.go — the LatestTag func(repoURL string) (string, error) field and its doc comment are deleted; the preceding OverrideEnvValue field/comment and the struct's closing brace are intact, so no syntax damage and no orphaned comment.
  • spec/loader_seam_latesttag_test.go — deleted in full.
  • Commit list = 1 commit; comment thread = 0. Counts agree with the body.

Tests. The deleted test was explicitly a compile-only guard ("COMPILES ONLY IF the field exists"). Once the field is gone the test cannot compile, so deleting it is the correct move, not a coverage regression — there is no behavior to assert after removal. No new coverage is warranted for a pure type-surface deletion.

Dead-seam claim. The body's grep is scoped to spec/ and refs/ (this repo) and filters g.LatestTag (the unchanged gitClient method) and GitLatestTag (the unchanged primitive). Any in-repo reader (seams.LatestTag, cfg.LatestTag, …) would have matched and did not, and no in-repo file besides the two shown would need editing for the build to hold. So within this repo the field is genuinely dead and the removal is complete — no leftover legacy path or dual mechanism.

Caveat (non-blocking). The prose "no reader anywhere" is broader than the shown evidence, which only covers this repo. The org-wide claim rests on the paired consumer change (opencharly/sdk#317), and the body is transparent about that: it documents the producer-first ordering (spec lands first, then sdk#317 bumps its pin and removes the sole writer) and attributes the superseding mechanism to the sdk's resolveDefaultBranch. This is a coordinated, documented breaking cutover rather than an unbacked assertion, so it does not warrant a block. The ! in the commit subject correctly flags the breaking nature.

Security / scope. No secrets, injection, input handling, or dependency changes — a single public field removal plus its obsolete guard test. Coherent and self-contained.

Comments / sign-off. No comments exist, so there is no maintainer sign-off to weigh (and none is claimed). The change stands on its own evidence, which it does.

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) September 28, 2026 07:43
@github-actions
github-actions Bot merged commit 579b213 into main Sep 28, 2026
2 of 3 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Sep 28, 2026
github-actions Bot pushed a commit to opencharly/sdk that referenced this pull request Sep 28, 2026
…CH, not the latest tag (supersedes #317) (#318)

* fix(loaderkit)!: version-less remote refs resolve to the DEFAULT BRANCH, not the latest tag

A version-less remote candy ref (`@github.com/owner/repo`, no `:tag`) means "the
current tip of that repo", so it must TRACK the default branch. Resolving it to the
repo's newest tag silently served a STALE build whenever the repo had newer work on
its default branch than on its last tag — and, worse, the stale tag's provider
SHADOWED a project's own explicit pin for the same word: a bed that pinned a plugin
to a branch was served the repo's old TAGGED build instead, so the pinned fix never
ran (opencharly/charly#715 — cost many bed runs and a wrong RCA). The default branch
is a MUTABLE ref, so it re-resolves per access (refs.IsMutableRef) and a stale export
refreshes; a repo with no resolvable default branch errors loudly.

The resolution goes through a package-level `resolveDefaultBranch` seam (defaulting
to the cached gitClient().DefaultBranch), so it stays unit-testable offline. Tests
updated to the corrected contract.

Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)

* refactor(loaderkit): drop the now-dead LatestTag seam writer

The version-less resolution no longer uses seams.LatestTag; opencharly/spec#184
removes the field itself. Drop the sole writer here so the cutover carries no
dead setter. (The spec pin bump to spec#184's tag lands once spec#184 merges,
producer-first.)

* fix(loaderkit): repair the versionless-ref tests + bump spec to the #184 tag

Validator findings on sdk#317:
- The fallback test (TestVersionlessRefFallbackUsesCachedClient) only had its
  comment changed — its body still warmed/called LatestTag and asserted nothing.
  It now warms gitClient().DefaultBranch, runs CollectRemoteRefsOpts with the nil
  seam, and asserts the collected version is the DEFAULT BRANCH (non-empty, not a
  v-tag).
- TestVersionlessRefUsesCachedDefaultBranch asserted mere non-emptiness; it now
  pins the SAME value the warm call returned.
- Spec pin bumped to v0.2026271.743 (spec#184 merged: RefsCollectSeams.LatestTag
  removed; this PR drops its sole writer in the paired commit).

Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)

* test(loaderkit): make the versionless tests actually gate the behavior

Validator findings on sdk#317:
- TestVersionlessRefUsesCachedDefaultBranch never called CollectRemoteRefsOpts;
  renamed to TestCachedDefaultBranchServesWithoutGit (it covers the client cache).
- TestVersionlessRefFallbackUsesCachedClient: dropped the dead local-repo fixture,
  pinned the collected version to the warmed DefaultBranch value, marked LIVE-OR-SKIP.

Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)

* test(loaderkit): make the fallback test exercise the REAL changed path + sweep a stale comment

sdk#318 BLOCK findings:
- The fallback test did not run the changed path (it warmed a bare URL the resolver
  never uses, so the resolution fell to raw git). It now runs the REAL
  CollectRemoteRefsOpts to warm the cached default branch, installs a failing git
  shim, and re-runs — proving the changed resolution served the cache with no raw
  git, and pinning the resolved version to the warm value. Executed output:
  "Resolved @github.com/opencharly/plugin-deploy-vm -> main (default branch)".
- refs_versionless_test.go: swept the stale "stub tag resolver" comment (R5).

Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
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