feat(registry): discovery corpus layer (Google Fonts, 3,283 faces) - #23
Merged
Conversation
…3 faces) Adds the discovery layer: a broad, public-safe inventory of open fonts to compare against, deliberately separate from the reviewed candidate corpus. "In the discovery snapshot" means only "this font exists and is comparable", never "recommended" - promotion into the license-text-hashed CorpusManifest, and then into a published verdict, stays a separate reviewed step. - FontSource / DiscoveryFace / DiscoverySnapshot types + a sources.json source registry (Google Fonts first, trust: discovery). - import-discovery.ts maps the existing Google all-files research corpus into a sanitized snapshot: drops the local cache path, keeps only public provenance (repoPath + raw re-fetch URL + inferred license + basis), flags variable fonts + axes explicitly, reports duplicate hashes. No binaries committed - faces are pointers (sha + URL). - acquisition: local_bootstrap records that this snapshot was mapped from a pre-downloaded corpus, not a pinned acquisition; direct git-clone at a pinned commit is the next step. - Validation tests: source-registry shape, per-face identity + explicit license basis, unique/reported hashes, explicit variable flags, and a public-safety gate (no binaries, no private paths). Bakeoff (oracle vs this corpus -> ranked candidates) is the next PR and does not auto-update records.json.
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.
First milestone of the open-font intelligence pipeline. It adds the discovery layer: a broad, public-safe inventory of open fonts to compare against, kept deliberately separate from the reviewed candidate corpus.
The tiers, so "available" never reads as "recommended":
What lands:
FontSource/DiscoveryFace/DiscoverySnapshottypes and adata/sources.jsonsource registry (Google Fonts first,trust: discovery).import-discovery.tsmaps the existing Google all-files research corpus into a sanitized snapshot: drops the absolute local cache path, keeps only public provenance (repoPath+ raw re-fetch URL + inferredlicense+licenseBasis), flags variable fonts + axes explicitly, and reports duplicate hashes rather than hiding them. No font binaries are committed - each face is a pointer (sha256 + URL).acquisition: "local_bootstrap"records honestly that this snapshot was mapped from a pre-downloaded corpus, not a fresh pinned acquisition. Direct git-clone-at-a-pinned-commit is the next acquisition mode./Users//Applications//System/paths).On the legal question: open licenses (OFL, Apache-2.0, UFL) generally permit redistribution with notices, but committing thousands of binaries makes every commit a redistribution event with per-source obligations and blurs discovery vs reviewed. So binaries stay out of git by default; the repo holds manifests (sha + license id + URLs), and any future downloadable artifact would be a separate release/object store with a generated notices bundle.
Bakeoff (a licensed oracle vs this corpus -> ranked candidates + negatives) is the next PR; it will commit result JSONs and will not auto-update
records.json.Note:
import-discovery.ts --check(committed == regenerated) needs the sibling research corpus, so it is verified locally, not enforced in CI. CI validates the committed snapshot through the discovery tests instead. Real CI-enforced reproducibility comes with the next milestone (git-clone acquisition at a pinned commit).Verified locally: bun test -> 91 pass / 0 fail (incl. 6 discovery checks, 40k+ assertions); tsc clean; biome clean; site build 23 pages;
import-discovery --checkreproduces the committed snapshot. The 2 MB manifest is biome-ignored (generated data).