Repository navigation
feat: feat: the index, phase 1: facet schema, 4-digit id ranges, backfill of every demo, index.json and .md twins - #570
Merged
Conversation
mvilacad
force-pushed
the
feat/569-feat-the-index-phase-1-facet
branch
from
October 25, 2026 10:01
acfaa1f to
25330a8
Compare
mvilacad
marked this pull request as ready for review
October 25, 2026 10:01
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.
Closes #569
What this is
Phase 1 of the gallery index: facet schema in every
Variant.meta.json, 4-digit id ranges, backfill of all 377 demos,site/public/api/v1/index.jsonand one.mdtwin per id at/gallery/<id>.md. No UI change.catalog.tsis untouched.Regression tests (fail before, pass after)
New
packages/ui/tests/demos-index.test.ts(schema rejections, id ranges, legacy exemptions, backfilled facets vs. source, publishing gate, index output). Fail-before evidence: with one sidecar set to the wrong kind and cost, 5 tests fail (catalog validation, range, legacy, tech/cost, committed output); withindustryforced topublishedat a 6.8% error rate, 4 gate tests fail. Pass-after:bun test tests/demos-index.test.ts tests/demos-catalog.test.ts tests/llms-budget.test.ts, 54 pass, 0 fail. The llms-full cap is unaffected (it does not read the catalog).Facet audit
Hand-read facets (industry, style, motion, interaction, layout, colorMode, density, aliases, related) were audited before publishing. Inferred facets (kind, subtype, components, tech, cost, added, reduced motion) come from the code and are always published.
What was and was not verified. A person read 203 of 377 entries against their source and sidecar summary: 130 in pass 1 (seed
569: 66 random, stratified by folder, plus all 64immersive/expressiveentries) and 73 in a holdout (seed1031: random, stratified by folder, none in pass 1, read after the fixes). 174 entries were never re-read. They hold the first pass's value as changed by two rules (below) and are unverified beyond those rules. The hand-read values were written by six agents that each finished in under two minutes.Gate. A field is published only when the one-sided 95% upper bound of its error rate is at most 5%. The bound is used, not the point estimate: 0 wrong of 73 means "at most ~4% wrong" (exact bound 4.0%, rule of three 4.1%), not "0% wrong". Fields above the limit stay in the sidecar as
review: pendingand are withheld fromindex.json, the facet counts and the.mdtwins.Fixes between pass 1 and the holdout: the sampled errors by hand, then two rules applied to all 377 entries: a non-default
stylestays only when the demo source shows it (minimaldropped; 35 entries changed), and anindustrystays only when the demo's own copy or data names that domain, otherwisegeneral(132 entries changed). Because the rules were written after seeing pass-1 errors, the holdout shows they generalise; it does not show the original values were good (industry was wrong on 28.8% of the random sample).Why
industryis hidden. Two reasons, neither a quality badge: it is unreliable (5 wrong of 73 on the holdout, upper bound ~14%) and it is uninformative. After the rule, 200 of 377 entries aregeneral-only and 177 carry a specific industry (saas107,fintech39,devtools29,media14,e-commerce12,agency5,ai4,travel3,education2,real-estate2). A filter that returns "general" for more than half the catalog andsaasfor most of the rest does not narrow anything, and the specific values are the ones the audit found wrong. It stays pending until it is corrected and re-audited on a new seed.Checks run
bun teston the three files above: 54 pass.bun run validate(the pre-push gate runs it), site e2e/a11y.indexblock), re-run backfill, hand-read those 3, rerun the checks,bun run check:nativeafter a build.