Skip to content

feat(skills): support version: latest - #101

Merged
albertodebortoli merged 7 commits into
mainfrom
support-for-latest
Jul 22, 2026
Merged

feat(skills): support version: latest#101
albertodebortoli merged 7 commits into
mainfrom
support-for-latest

Conversation

@albertodebortoli

@albertodebortoli albertodebortoli commented Jul 22, 2026

Copy link
Copy Markdown
Member

Description

  • Adds support for version: latest on skills (Lucafile skills:/repos: entries and luca install --ref latest). It resolves to the repository's current default-branch HEAD commit via git ls-remote inside SkillsInfoFactory, before the value ever becomes a SkillSet.version — so the cache path, symlinking, and git checkout logic downstream are completely unchanged, since they already treat version as an opaque resolved string.
  • Scope is skills only. Spec-defined tools (tools:) have a literal, fully-formed url: with no version templating anywhere in the codebase, so latest has nothing to attach to for them; that's a separate, larger design question (URL templating or an org/repo-based schema) deferred for now.
  • Important trade-off: using latest prevents leveraging the cache the way a pinned tag/SHA does. Every install with version: latest requires a network round-trip (git ls-remote) to determine the current HEAD commit before Luca can even check whether that commit is already cached — unlike a pinned version, which never needs to contact the remote once its folder exists on disk. The download itself is still skipped if the resolved SHA happens to match a previously cached one, but the "no network needed at all" fast path is gone. It's also not reproducible across time: two installs can resolve to different commits, and therefore install different content, if the upstream repository gains commits in between.
  • Added SkillLatestVersionResolver (runs git ls-remote --quiet <url> HEAD, parses the SHA) and a small SubprocessOutputRunning/SubprocessOutputRunner primitive for output-capturing subprocess execution (distinct from the existing exit-code-only SubprocessRunning, which is left untouched). Extracted GitRepositoryURLNormalizer out of GitRepositorySkillFetcher so both it and the new resolver share one URL-normalization implementation.

Type of Change

  • Feature
  • Bug fix
  • Maintenance / Refactor
  • Documentation
  • CI / Tooling
  • Other (specify)

How Has This Been Tested?

  • Added / updated unit tests
  • Manually tested locally
  • Tested on macOS (arch: arm64)
  • Other

Checklist

  • Swift code builds locally (swift build)
  • Tests pass locally (swift test)
  • Code style / formatting respected
  • Documentation updated (README / comments)
  • Version / tag alignment considered (if release related)
  • PR title follows conventional style (optional)

CI Considerations

  • Affects build time notably
  • Requires new secrets / env vars
  • Alters release process

Breaking Changes?

  • No
  • Yes (describe impact and migration path)

@albertodebortoli albertodebortoli added the feature New feature or enhancement label Jul 22, 2026
@albertodebortoli albertodebortoli added this to the 0.22.0 milestone Jul 22, 2026
@albertodebortoli albertodebortoli changed the title Support version: latest for skills featu(skills): support version: latest Jul 22, 2026
@albertodebortoli
albertodebortoli force-pushed the yaml-format-error-reporting branch from 7649464 to 2b4b53a Compare July 22, 2026 12:19
Base automatically changed from yaml-format-error-reporting to main July 22, 2026 12:33
Read stdout via a blocking readDataToEndOfFile() on a background queue
instead of accumulating chunks from a readability handler behind a lock.
readDataToEndOfFile() already drains the pipe continuously as the child
writes, so it can't deadlock on a full buffer — no shared mutable state
means no lock is needed at all. Mirrors the pattern Unarchiver already
uses elsewhere in this codebase.
@albertodebortoli
albertodebortoli merged commit da02fe8 into main Jul 22, 2026
2 checks passed
@albertodebortoli
albertodebortoli deleted the support-for-latest branch July 22, 2026 12:39
@albertodebortoli albertodebortoli changed the title featu(skills): support version: latest feat(skills): support version: latest Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant