TROUBLESHOOTING GUIDE · SKU.md v1.0.0
SKU.md 1.0.0 validation errors and repair checklist
Diagnose and fix every stable issue code in the SKU.md 1.0.0 error registry across document, published, and graph validation scopes.
Updated
How validation scopes and layers isolate failures
SKU.md 1.0.0 splits conformance into three scopes: document, published, and graph. Each validation report tracks four layers (syntax, structure, publication, graph) and returns passed, failed, or incomplete.
Syntax errors run first on bounded input. When either unsafe_markdown or resource_too_large fires in the syntax layer, structural parsing does not run, so the structure layer reports not_checked until you fix the syntax or byte limit first.
| Scope | Checked layers | What a failure means | Where to run |
|---|---|---|---|
| document | syntax, structure | The raw Markdown file violates byte bounds, safe Markdown syntax, URL rules, metadata order, or Source grammar. | Local CLI, Conformance Kit, or sku_md_validate_document |
| published | syntax, structure, publication | The live HTTPS URL returned a non-200 status, HTML fallback, invalid MIME or charset, redirect issue, invalid UTF-8, or invalid Markdown. | Quick Start checker or sku_md_validate_published_document |
| graph | syntax, structure, publication (online), graph | Root catalog links, XML Sitemaps, Catalog backlinks, origin matching, or cited Source URLs disagree or fail HTTP 200. | Local graph CLI or sku_md_validate_published_graph |
All 8 stable SKU.md 1.0.0 validation error codes
The diagnostic registry at /errors/1.0.0.json defines eight stable issue codes for SKU.md v1.0.0. Validators emit these codes as deterministic diagnostics; passing checks never act as certification or a search ranking signal.
| Code | Scope & layer | Severity | Common trigger | Direct fix |
|---|---|---|---|---|
| unsupported_version | document / structure | error | Missing exact SKU.md: [1.0.0](https://sku.md/spec/1.0.0/) line, archived v0.10 YAML frontmatter, or any unsupported version line. | Use one exact 1.0.0 version link line and remove v0.x YAML frontmatter. |
| missing_required_content | document / structure | error | Missing, duplicated, or reordered H1, blockquote summary, metadata labels, ## Catalog or ## Facts first H2, unordered list grammar, Updated date, or Product data records. | Restore strict 1.0.0 preamble order, section order, single-list items, and plain-text record fields. |
| missing_source | document / structure | error | A normative item in ## Facts or optional Product sections has no exact [Source](https://...) inline link. | Append one or more untitled [Source](https://...) links after the item statement. |
| unsafe_markdown | document / syntax | error | Raw HTML or HTML comments anywhere, reference-style links or link definitions in normative blocks, or a physical line over 8,192 UTF-8 bytes. | Remove raw HTML, convert normative links to inline syntax, and keep every physical line within 8,192 UTF-8 bytes. |
| invalid_url | document / structure | error | Relative URL, http://, embedded credentials, cross-origin Website/Catalog/Product/## Catalog link, or ?/# on a catalog URL or backlink. | Use credential-free absolute https:// URLs with matching origins and no ? or # on catalog URLs. |
| resource_too_large | document / syntax (or published) | error | Markdown document exceeds 65,536 UTF-8 bytes (64 KiB), or a Sitemap exceeds 52,428,800 bytes. | Trim redundant prose or split product details into linked same-origin product documents. |
| published_contract_failed | published / publication | error or warning | Non-200 HTTP status, text/html soft-404 fallback, unsupported MIME or non-UTF-8 charset, invalid UTF-8 bytes, redirect cap, or temporary 429/5xx/timeout. | Serve exact UTF-8 bytes at /sku.md with HTTP 200, text/markdown; charset=utf-8, and no HTML fallback. |
| graph_mismatch | graph / graph | error or warning | Wrong Catalog: backlink, cross-origin product URL, duplicate direct/Sitemap/redirect aliases, invalid XML Sitemap, failed Source 200 check, or reader budget cap. | Align backlinks and origins, fix XML Sitemaps, verify Source HTTP 200 responses, and check budget coverage. |
Fixing document syntax, structure, and 64 KiB byte limits
Two byte bounds apply before and during CommonMark parsing: the entire Markdown file must be at most 65,536 UTF-8 bytes (64 KiB), and every physical line split by LF, CRLF, or CR must be at most 8,192 UTF-8 bytes. Because these limits measure UTF-8 bytes rather than characters, three-byte CJK characters or two-byte Cyrillic and Arabic letters reach the limit faster than ASCII text.
Structural checks are strict about link shape and order. In Catalog documents, SKU.md: precedes Website:, ## Catalog is the first H2, and optional sections follow Product knowledge, Policies, Contact, Extensions. In Product knowledge documents, SKU.md:, Catalog:, Product:, and Updated: (YYYY-MM-DD) precede ## Facts, followed optionally by Identifiers, Variants, Guidance, Limitations, Compatibility, Questions, and Product data.
Every Source link in a Product knowledge list item must parse as an untitled inline link whose single plain-text child is exactly Source. Padded labels like [ Source ], bold [**Source**], link titles like (https://... "title"), reference links [Source][1], or trailing text after the link do not pass. Inside ## Product data, records allow only plain-text Label: value items, unique IDs/SKUs/GTIN check digits, no dynamic keys (price, stock, shipping, tax, payment), and at most 256 variants/evidence/attributes or 32 live links.
- Remove all raw HTML tags, comments, <br>, and script or style blocks anywhere in the file (unsafe_markdown).
- Split any physical line longer than 8,192 UTF-8 bytes and keep total file bytes at or below 65,536 (resource_too_large).
- Replace [label][ref] reference links and [ref]: https://... definitions in the preamble and normative sections with inline [label](https://...) links.
- Verify the exact version line SKU.md: [1.0.0](https://sku.md/spec/1.0.0/) appears once and remove any archived v0.10 YAML frontmatter (unsupported_version).
- Check that Website, Catalog, Product, and ## Catalog links are credential-free https:// URLs on the exact document origin, and strip ? and # from catalog URLs (invalid_url).
- Place one or more exact [Source](https://...) links at the end of every normative product bullet with no trailing prose (missing_source).
Minimal passing SKU.md 1.0.0 Product knowledge document
# UltraLight 2P Tent> A lightweight two-person tent for three-season backpacking. SKU.md: [1.0.0](https://sku.md/spec/1.0.0/)Catalog: [Example Outdoor Gear](https://www.example-outdoor.com/sku.md)Product: [Official product page](https://www.example-outdoor.com/products/tent)Updated: 2026-08-11 ## Facts- Packaged weight is 1.35 kg. [Source](https://www.example-outdoor.com/products/tent)Every machine label (SKU.md:, Catalog:, Product:, Updated:) and section heading (## Facts) is case-sensitive English, ending with exact [Source](https://...) inline links.
Fixing published_contract_failed and HTTP/MIME errors
A file that passes local document validation can still fail published validation if your web server, CDN, or storefront platform alters HTTP status codes, headers, or byte encoding. Published checks use manual redirect inspection with an Accept: text/markdown, text/plain header (plus XML types for Product knowledge Sitemaps).
The most common cause of published_contract_failed is an SPA catch-all rewrite or theme router returning HTTP 200 OK with Content-Type: text/html; charset=utf-8 when /sku.md is requested. A soft-404 HTML response both fails MIME validation and prevents compatible discovery from reading the homepage <link rel="alternate" type="text/markdown" title="SKU.md"> tag, because fallback only runs after an exact HTTP 404 with zero redirects.
When an origin returns HTTP 429, 5xx, a DNS failure, or a 5-second timeout, the validator reports a warning and sets publication to not_checked (status: "incomplete") rather than declaring the file valid or permanently absent.
- Confirm /sku.md returns exact HTTP 200 with zero redirects (redirect_count: 0).
- Set Content-Type: text/markdown; charset=utf-8 (only text/markdown or text/plain is valid for Markdown files, and any declared charset must be utf-8).
- Check that response bytes decode cleanly as strict UTF-8 without binary corruption or oversized bodies.
- Exclude /sku.md and *.sku.md from SPA index.html fallback rewrites so missing files return exact HTTP 404 instead of soft-404 HTML.
Verify live status, redirects, and Content-Type without following redirects
curl -i --max-redirs 0 https://www.example-outdoor.com/sku.mdInspect the exact response code and content-type header returned on the first request hop.
Fixing graph_mismatch errors vs incomplete coverage
Graph validation checks consistency across the root catalog, any Product knowledge Sitemaps, every linked product document, and every cited Source URL. Common hard errors (severity: "error") include a Catalog: backlink that does not exactly match the final root catalog URL, cross-origin Product: or product document URLs, duplicate URLs or redirect aliases resolving to the same target, or a Source URL that returns anything other than exact HTTP 200.
Product knowledge Sitemaps must serve application/xml, text/xml, or application/sitemap+xml using the http://www.sitemaps.org/schemas/sitemap/0.9 namespace (<urlset> or one-layer <sitemapindex>), with 1 to 50,000 unique same-origin HTTPS <loc> URLs, at most 52,428,800 uncompressed UTF-8 bytes, and zero <!DOCTYPE> or <!ENTITY> declarations.
Do not confuse a budget warning with a format violation. The specification imposes no 31-product store limit, yet the public online reader caps traversal at 31 product documents (32 total documents including root), 63 fetched HTTP resources, 1 MiB total fetched bytes, 12 seconds, and 256 unique Source URLs. Exceeding those safety bounds triggers a warning (incomplete coverage, total: null if indexes remain unexpanded) rather than claiming the rest of the catalog passed.
- Set each product document's Catalog: link to the exact final root URL (for example https://www.example-outdoor.com/sku.md, matching www vs apex host and no ? or #).
- Ensure every product knowledge document URL and its Product: link share the exact origin of the root catalog.
- Deduplicate links so the same final document URL is not advertised both directly in /sku.md and inside a Product knowledge Sitemap, or via two redirecting aliases.
- Check that every Source URL cited in ## Facts, optional sections, and ### Evidence returns exact HTTP 200 within at most 3 public HTTPS redirects.
Pre-validation MCP and Quick Start input rejections
When you call /quick-start/#published-url-checker or the read-only /mcp tools, an outer input guard runs before document or HTTP validation. These pre-check codes stop malformed requests, oversized JSON-RPC payloads, or unsafe network targets early.
| Pre-check code | Trigger | How to resolve |
|---|---|---|
| INVALID_URL | URL cannot be parsed, includes a # fragment, or changes after canonical URL normalization. | Supply a clean, complete public https:// URL without fragments. |
| BLOCKED_TARGET | Target uses http://, embedded credentials, a non-443 port, an IP literal, localhost, .local/.internal, or resolves DNS to a private/loopback/CGNAT IP. | Test only public HTTPS hostnames resolving to public IP addresses on port 443. |
| DOCUMENT_TOO_LARGE | Submitted Markdown string exceeds 65,536 UTF-8 bytes before parsing. | Trim the document below 64 KiB UTF-8 before calling sku_md_validate_document. |
| DUPLICATE_RESOURCE_URL | The same URL appears twice across root, resources, or sitemaps in sku_md_validate_document_graph. | Supply each unique resource URL once in the graph payload. |
| INVALID_ROOT_URL | sku_md_validate_published_graph was called with a path other than /sku.md, or with ? or #. | Pass the exact origin root https://your-domain.com/sku.md without query or fragment. |
Validation troubleshooting FAQ
Why does local document validation pass while online checking returns published_contract_failed?
Local document scope inspects only the Markdown string and target URL. Published scope fetches the live HTTPS endpoint and fails if the server redirects unexpectedly, returns non-200 status (such as 404 or 403), serves text/html instead of text/markdown or text/plain, declares a non-UTF-8 charset, or streams invalid UTF-8 bytes.
Why does resource_too_large or unsafe_markdown trigger under 65,536 characters?
Both limits count UTF-8 encoded bytes, not JavaScript string characters. CJK, Thai, Japanese, Korean, Cyrillic, and Arabic characters take 2 to 3 bytes each in UTF-8, so 21,846 three-byte characters already exceed the 65,536-byte document limit, and long single-line minified text can cross the 8,192-byte physical line cap.
Why do [ Source ], [**Source**], or titled Source links fail with missing_source?
SKU.md 1.0.0 requires an exact CommonMark AST shape for every Source link: an untitled inline link whose single plain-text child is strictly Source. Whitespace inside brackets, bold or italic formatting, a link title attribute, reference-style links, or prose after the first Source link are rejected.
Does incomplete coverage after 31 product documents mean my store violates SKU.md 1.0.0?
No. SKU.md 1.0.0 allows up to 50,000 URLs per XML Sitemap and imposes no 31-product limit on merchants. The 31-product document cap (plus 63 fetches, 1 MiB, 12 seconds, and 256 Sources) is a safety budget for the public online graph reader, which reports incomplete coverage rather than assuming unchecked items passed.
What do passing all 8 validation checks establish about factual accuracy or search visibility?
Passing checks establishes technical syntax, HTTP delivery, and link-consistency conformance only. It does not certify factual product accuracy, guarantee adoption by AI agents, or promise search rankings, citations, or sales.
Why does the published checker reject http:// URLs, IP addresses, or ?query parameters?
Published validation enforces public-network safety (anti-SSRF) and strict catalog identity. All URLs must use public HTTPS on standard port 443 with no credentials or private IP resolution, and catalog URLs and Catalog: backlinks must not carry ? query or # fragment delimiters.
Next steps and verification tools
1.0.0 Conformance Kit
Validate Markdown offline in your browser and inspect all 28 official v1.0.0 test vectors.
Quick Start & URL Checker
Run live published validation against your public /sku.md endpoint.
Hosting & HTTP Headers
Copy-ready Cloudflare, Nginx, Vercel, and Netlify configs to fix published_contract_failed.
Product Knowledge Sitemaps
Publish compliant XML urlset and sitemapindex files and manage reader budgets.
Read-Only MCP Server
Connect agents or CI tools to https://sku.md/mcp for document, published, and graph checks.
SKU.md 1.0.0 Specification
Read the normative grammar, metadata order, and conformance layer rules.