nextlevelbuilder/ui-ux-pro-max-skill · warning · ValueError
{name} catalog counts are stale: {', '.join(missing)}
Error message
{name} catalog counts are stale: {', '.join(missing)} What it means
After (re)building the summary, the script verifies that README.md and localized variants (e.g. README.zh.md) still contain the expected count tokens (approved Google Fonts count, curated icon count, Phosphor upstream manifest size, exclusion count). If the freshly computed counts differ from the numbers currently written in the READMEs, it throws listing the stale tokens. It keeps the numbers published in docs honest against the data.
Source
Thrown at scripts/generate-catalog-summary.py:111
expected = {
"README.md": (
f"**{counts['googleFonts']:,} approved Google Fonts**",
f"**{exclusions} review exclusions**",
f"**{counts['curatedIcons']} curated rows**",
f"**{counts['upstreamPhosphorIcons']:,}-icon upstream Phosphor manifest**",
),
"README.zh.md": (
f"**{counts['googleFonts']:,} 个已批准的 Google Fonts**",
f"**{exclusions} 个待审核的排除项**",
f"**{counts['curatedIcons']} 条精选记录**",
f"**{counts['upstreamPhosphorIcons']:,}-icon Phosphor upstream manifest**",
),
}
for name, tokens in expected.items():
text = (ROOT / name).read_text(encoding="utf-8")
missing = [token for token in tokens if token not in text]
if missing:
raise ValueError(f"{name} catalog counts are stale: {', '.join(missing)}")
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--verified-at")
parser.add_argument("--check", action="store_true")
args = parser.parse_args()
try:
verified_at = args.verified_at
if args.check and not verified_at:
if not OUTPUT.exists():
raise ValueError("catalog-summary.json is missing")
verified_at = json.loads(OUTPUT.read_text(encoding="utf-8")).get("verifiedAt")
if not verified_at:
raise ValueError("--verified-at is required when generating the summary")
summary = build(verified_at)
content = json.dumps(summary, ensure_ascii=False, indent=2) + "\n"
if args.check:View on GitHub (pinned to a38d04c3d5)
Solutions
- Copy the exact expected token strings (shown in the error) into the matching README sentence.
- Update every file the error names, including localized READMEs.
- Match formatting exactly — the token includes the comma-grouped number, e.g. '1,234'.
- Commit README updates together with the data changes so --check passes in CI.
Example fix
# before (README.md) **1,200 approved Google Fonts** # after **1,234 approved Google Fonts**
Defensive patterns
Strategy: validation
Validate before calling
# detect stale README numbers before the check fails
for name, tokens in expected.items():
text = (ROOT / name).read_text(encoding='utf-8')
missing = [t for t in tokens if t not in text]
if missing:
print(f'{name}: update these tokens -> {missing}') Prevention
- Add 'README counts updated?' to the PR checklist for any data-file change.
- Let the generator print the exact expected sentences so they can be pasted verbatim.
- Update localized READMEs (zh) in the same commit as the English one.
When it happens
Trigger: Adding/removing Google Fonts, icons, or styles in the data files so counts change, then regenerating the summary without updating the README count sentences; localized READMEs (zh) left with old numbers; formatting drift such as comma grouping (1,234 vs 1234).
Common situations: Data PRs that bump catalog sizes but skip README edits; CI --check run after data changes; the localized README forgotten during a sync.
Related errors
- Invalid threshold manifest:\n- {manifest_errors}
- Relevance gate failed:\n- {failures}
- verified-at has suspicious date {value!r}
- catalog-summary.json is missing
- Invalid JSON file {path}: {error}
AI-assisted analysis of nextlevelbuilder/ui-ux-pro-max-skill@a38d04c3d5 (2026-08-14).
Data as JSON: /api/errors/86037c9b61f1ea12.
Report an issue: GitHub.