Repository navigation
Add a product registry and check every product name against it - #487
Open
eugenia-scandit wants to merge 6 commits into
Open
eugenia-scandit wants to merge 6 commits into
eugenia-scandit wants to merge 6 commits into
Conversation
Product identifiers were spelled two ways: `matrixscan` and `label-capture` in docs-schema.yml and page frontmatter, `matrixscan-batch` and `smart-label-capture` in products.json and skills.json, with URL_PRODUCT_MAPPING as the only bridge. A component that looked a page's `product` up in products.json found nothing for either schema value, and nothing failed. content/registry/products.yml is now the one list of products (17: 13 SDK products, 2 hosted, 2 cross-product topics). Keys are the products.json keys. Folder names that differ from a key (`matrixscan/`, `label-capture/`) are aliases, valid only as folder names and in URL_PRODUCT_MAPPING. `yarn verify:registry`, run in CI before the build, fails when any of these disagree with the registry: the docs-schema.yml product enum, products.json (entries and names), features.json, both parts of skills.json, the SkillsPage SKILL_DESCRIPTIONS keys, URL_PRODUCT_MAPPING, frontmatter `product` and `product="..."` component props under docs/, and the product folders under docs/sdks/<framework>/. It also validates content/registry/product-chooser.yml, the Product Chooser text, when that file exists. `yarn test:registry` has a failing case for every rule and an end-to-end drift case per source. The schema enum is now exactly the registry keys, so the three shipping label pages move from `product: label-capture` to `smart-label-capture`. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
The chooser reads its product from the /sdks/ route, so an approved entry for a hosted product passed the check and then never rendered. not_for may still point to a hosted product: that link works. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The product owner confirmed MatrixScan Sequence as the name, and that the product has two flows: capture, which registers the order of barcodes as they are scanned, and verification, which checks that each barcode is in its correct position. The old description covered only the second. The registry and products.json change together because verify-registry requires their names to match. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
An empty or comments-only product-chooser.yml, or a bare `products:`, now means "no entries yet" instead of failing verify:registry and the build. The file ships with a header comment that shows each field and how it is displayed, so whoever writes the first entry has the shape in front of them. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
js-yaml 5, the version in the lockfile, throws on an empty or comments-only file where 4 returned undefined, so the previous commit still failed there. readChooser uses loadAll, which returns no documents on both, and is exported so the docs plugin parses the file through the same function. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
js-yaml 5 rejects a BOM followed by a comment, and both registry files open with a comment, so a file saved with a BOM by some Windows editors would fail every build. The chooser file's header also says that rows for a product missing on the reader's framework are hidden. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch has not been deployed
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.
Summary
First piece of the docs foundation: one list of products that everything else is checked against.
Why: product identifiers were spelled two ways.
docs-schema.ymland page frontmatter usedmatrixscanandlabel-capture;products.jsonandskills.jsonusedmatrixscan-batchandsmart-label-capture. A component that looked a page'sproductup inproducts.jsonfound nothing for either schema value, and nothing failed.What:
content/registry/products.yml: 17 products (13 SDK, 2 hosted, 2 cross-product topics). Keys are theproducts.jsonkeys. Folder names that differ from a key (matrixscan/,label-capture/) are aliases, valid only as folder names and inURL_PRODUCT_MAPPING.yarn verify:registry(CI, before the build) fails when any of these disagree with the registry:docs-schema.ymlproduct enumproducts.json(entries and names),features.json, both parts ofskills.jsonSKILL_DESCRIPTIONSkeys andURL_PRODUCT_MAPPINGproductandproduct="..."props underdocs/docs/sdks/<framework>/content/registry/product-chooser.yml(the Product Chooser text) when that file exists. The text itself comes in a later PR, after product owners approve it.yarn test:registry: 67 tests, with a failing case for every rule and an end-to-end drift case per source. Removing any of the seven checks from the script fails a test.product: label-capturetosmart-label-capture(frontmatter only).AGENTS.md: a short "Products" section and the new command.Per-framework availability stays in
products.jsonuntil it is generated from SDK data.