Skip to content

feat(registry): discovery->reviewed promotion path (Viga) - #27

Merged
caio-pizzol merged 1 commit into
mainfrom
caio-pizzol/promote-viga
Jun 5, 2026
Merged

feat(registry): discovery->reviewed promotion path (Viga)#27
caio-pizzol merged 1 commit into
mainfrom
caio-pizzol/promote-viga

Conversation

@caio-pizzol

Copy link
Copy Markdown
Contributor

Builds the discovery -> reviewed promotion path - the step that turns "we know this open font exists" into "this font has exact, reviewed provenance," the tier a published verdict is allowed to rest on. First promotion: Viga (Tahoma's existing top_candidate), the clean systems test (static, OFL, single regular face).

scripts/promote-candidates.ts promotes an allow-listed family (Viga only) from the discovery snapshot:

  • reads the font bytes from the local cache and verifies them against the discovery fileSha256 (the driver throws on mismatch),
  • fetches + hashes the exact upstream license text (ofl/viga/OFL.txt -> licenseTextSha256), which the discovery tier never carries,
  • parses facts and reuses import-corpus.ts buildManifest for the assembly (now exported; main() guarded by import.meta.main).

The result is a reviewed CorpusManifest (promoted-google-fonts-2026-06-05.json) wired into loadCorpus(), so it passes every existing corpus invariant (license-text hash, unique sha/faceId, parsed metadata, licenseUrl != sourceUrl, no proprietary). A new test asserts Viga's committed sha equals the discovery snapshot's.

No binaries committed (manifest = sha + license-text hash + public URLs). records.json is untouched: naming Viga as Tahoma's public candidate is a separate editorial decision, intentionally not in this mechanical PR.

Reusable: adding a family to the allow-list promotes it. Variable fonts (e.g. Ruda) get a deliberate instancing pass later, as with Gelasio.

Verified locally: bun test -> 119 pass / 0 fail (incl. the reviewed-Viga check); tsc clean; biome clean; site build 23 pages. The license fetch is local/network, so it is verified locally, not CI-enforced.

Adds the one path that turns a discovery font into a REVIEWED corpus entry: a
license-text-hashed CorpusManifest the registry's verdicts are allowed to rest
on. scripts/promote-candidates.ts promotes an allow-listed family (Viga only)
from the discovery snapshot - it reads the font bytes from the local cache and
verifies them against the discovery fileSha256, fetches + hashes the EXACT
upstream OFL.txt, parses facts, and reuses import-corpus buildManifest to emit
the reviewed manifest. No binaries committed; records.json untouched.

Viga (Tahoma's existing top_candidate) is the clean first promotion: static,
OFL, single regular face. It passes every reviewed-corpus invariant
(license-text hash, unique sha/faceId, parsed metadata) plus a new test that
its committed sha matches the discovery snapshot.

Naming Viga as Tahoma's public candidate is a SEPARATE editorial decision; this
PR only establishes provenance.
@caio-pizzol
caio-pizzol merged commit 9eba74f into main Jun 5, 2026
1 check passed
@caio-pizzol
caio-pizzol deleted the caio-pizzol/promote-viga branch June 5, 2026 13:19
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