Skip to content

feat(registry): discovery corpus layer (Google Fonts, 3,283 faces) - #23

Merged
caio-pizzol merged 2 commits into
mainfrom
caio-pizzol/discovery-corpus
Jun 5, 2026
Merged

feat(registry): discovery corpus layer (Google Fonts, 3,283 faces)#23
caio-pizzol merged 2 commits into
mainfrom
caio-pizzol/discovery-corpus

Conversation

@caio-pizzol

@caio-pizzol caio-pizzol commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

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":

  • DiscoverySnapshot (this PR) - "this open font exists and is comparable." Lighter, source-derived provenance (license inferred from the repo layout, hash + re-fetch URL). 3,283 Google Fonts faces.
  • CorpusManifest (existing, unchanged) - "reviewed enough to publish": license-text-hashed, exact provenance.
  • EvidenceRecord (existing) - "we are willing to publish a verdict." Curated, never auto-promoted.

What lands:

  • FontSource / DiscoveryFace / DiscoverySnapshot types and a data/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 absolute local cache path, keeps only public provenance (repoPath + raw re-fetch URL + inferred license + 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.
  • 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 /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 --check reproduces the committed snapshot. The 2 MB manifest is biome-ignored (generated data).

…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.
@caio-pizzol
caio-pizzol merged commit 2bef141 into main Jun 5, 2026
1 check passed
@caio-pizzol
caio-pizzol deleted the caio-pizzol/discovery-corpus branch June 5, 2026 11:06
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