Introduce a model source descriptor for the installer - #85
Open
webdevtodayjason wants to merge 1 commit into
Open
Introduce a model source descriptor for the installer#85webdevtodayjason wants to merge 1 commit into
webdevtodayjason wants to merge 1 commit into
Conversation
The installer's supported source was a set of standalone static constants, so every pinned value (repo, revision, index digest, size estimates) was addressable only as a global. Adding a second model meant either mutating those globals or threading a parallel set through the call sites. Collect the pinned values into a `ModelSourceDescriptor` value type keyed by a `ModelFamily`, and register the existing Gemma pin as the sole entry in `SupportedModelSource.all`. Behaviour is unchanged: the legacy statics become thin shims over `SupportedModelSource.default`, so existing callers and the CLI keep resolving exactly the same values. `SourceFingerprint.knownFingerprints` now derives from the registry rather than restating the Gemma digest, which keeps the verification table from drifting away from the pin it is meant to enforce. Tests cover shim/descriptor parity, the pinned Gemma identity, registry key and repo uniqueness, and fingerprint coverage for every registered source.
rexmhall09
added a commit
to rexmhall09/TUFF
that referenced
this pull request
Aug 16, 2026
User-facing rename of the fork. The five executable products become TUFF, TUFFCLI, TUFFServer, TUFFRepack, and TUFFDecodeService; the app window, About panel, and every CLI usage banner say TUFF; README and docs are rewritten around the name, with the new logo as the header image and app icon. Internal Swift target and module names stay TurboFieldfare*. Renaming them would touch every file for no user-visible gain and would make merges from upstream impractical, which is the point of tracking a fork. Not renamed, deliberately: - docs/benchmark-prompts/**: frozen benchmark fixtures whose text must not change, or measured results stop being comparable. - The afterword: it is the upstream author's, about his project, and is now labelled as such with a link back to turbo-fieldfare. Adds a Fork notice and Merge notes section covering what the Qwen merge required and why upstream PR drumih#85 was skipped. 774 tests pass; release build produces all five renamed executables and the app launches clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Collects the installer's pinned model values into a
ModelSourceDescriptorvalue type keyed by a
ModelFamily, and registers the existing Gemma 4 pin asthe sole entry in
SupportedModelSource.all.Why
The supported source was a set of standalone static constants, so every pinned
value (repo, revision, index digest, size estimates) was addressable only as a
global. That works well for one model, but it means a second model has to
either mutate those globals or thread a parallel set of constants through the
call sites.
Separately,
SourceFingerprint.knownFingerprintsrestated the Gemma indexdigest as its own literal. Two copies of a value whose whole purpose is to
detect drift is a hazard, so the table now derives from the registry.
Behaviour
Unchanged. The legacy statics (
SupportedModelSource.repoID,.revision,.sourceIndexSHA256,.installOptions(...), etc.) remain and are thin shimsover
SupportedModelSource.default, so existing callers and the CLI resolveexactly the same values. This PR adds no user-visible flag or model choice.
Tests
New
ModelSourceDescriptorTestscovers:installOptionsfield-by-fieldre-pin fails in CI rather than at install time
knownFingerprintsis built withuniqueKeysWithValues, which traps on a duplicate repo ID, and this keepsthat failure in the suite
Full suite: 575 tests in 113 suites passing,
swift build -c releaseclean.Branch is one commit on top of
7a99f2a.Context
This is the first of a few narrow PRs factored out of experimental multi-model
work discussed in #44. It is deliberately scoped to the descriptor seam and
stays Gemma-only: the repack planner is still single-family, so registering a
second descriptor here would expose a model choice the planner cannot yet
honour. Happy to adjust naming or drop the legacy shims if you would rather
migrate the call sites outright.