nextlevelbuilder/ui-ux-pro-max-skill · warning · ValueError

catalog-summary.json is missing

Error message

catalog-summary.json is missing

What it means

In --check mode without --verified-at, the script tries to read the verification date from the existing catalog-summary.json (the OUTPUT file); if that file doesn't exist, it throws. It means the verification step was run before the summary was ever generated in this checkout — the artifact the check exists to validate is absent.

Source

Thrown at scripts/generate-catalog-summary.py:123

        ),
    }
    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:
            if not OUTPUT.exists() or OUTPUT.read_text(encoding="utf-8") != content:
                raise ValueError("catalog-summary.json is stale; regenerate it")
            check_readme_counts(summary)
        else:
            OUTPUT.write_text(content, encoding="utf-8")
    except (KeyError, OSError, ValueError, json.JSONDecodeError) as exc:
        print(f"generate-catalog-summary: {exc}", file=sys.stderr)
        return 2
    print("Catalog summary is current." if args.check else "Generated catalog summary.")
    return 0

View on GitHub (pinned to a38d04c3d5)

Solutions

  1. Generate the summary first: `python3 scripts/generate-catalog-summary.py --verified-at $(date +%F)`, then run --check.
  2. If the file should be committed, commit it so fresh checkouts can run --check directly.
  3. Check .gitignore doesn't exclude the OUTPUT path used by the script.
  4. Order CI steps: generate (or restore) before check.

Example fix

# before
python3 scripts/generate-catalog-summary.py --check
# after
python3 scripts/generate-catalog-summary.py --verified-at $(date +%F)
python3 scripts/generate-catalog-summary.py --check
Defensive patterns

Strategy: validation

Validate before calling

from pathlib import Path
OUTPUT = Path('data/catalog-summary.json')  # match the script's OUTPUT constant
if args.check and not args.verified_at and not OUTPUT.exists():
    raise SystemExit('catalog-summary.json missing - run generation with --verified-at first')

Prevention

When it happens

Trigger: Running `python3 scripts/generate-catalog-summary.py --check` in a tree where the catalog-summary.json OUTPUT path was never generated, was deleted, or is excluded by .gitignore; a fresh clone whose CI invokes check before generate.

Common situations: The summary file isn't committed and CI assumes it exists; .gitignore accidentally covering the output path; a clean-build pipeline skipping the generation step.

Related errors


AI-assisted analysis of nextlevelbuilder/ui-ux-pro-max-skill@a38d04c3d5 (2026-08-14). Data as JSON: /api/errors/e4da7c43ae5caeb9. Report an issue: GitHub.