Registry generators crash on a persona with no slug

Open Beginner friendly
#539 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
tooling

Research direction

Start in systems/superintelligence/*/scripts/build_registry.py and find where fm["slug"] is read next to the guarded frontmatter parsing; the same pattern repeats in each generator. Add the isinstance(fm, dict) and fm.get("slug") guard before use and route the failure into the same warning-and-skip path already used for unparseable files. To check, run the generator with a temporary persona lacking a slug and confirm a WARN line appears while the registry still builds from the remaining personas.

Written by the indexing model from the issue text.

Description

bug P2

The systems/superintelligence/*/scripts/build_registry.py generators read fm["slug"] with no guard, outside the try that covers frontmatter parsing. So one persona file with no slug, or with empty frontmatter (fm is None), stops the whole registry build with a KeyError or TypeError. It should be skipped with a warning, like an unparseable file.

Fix: check isinstance(fm, dict) and fm.get("slug") before use, and warn and skip otherwise, in each generator.

Check: a temp persona with no slug gives a WARN line, and the registry still builds from the other files.

Dominant language
HTML
Stars
347
Forks
12
Avg merge
2d 16h
Merged PRs (30d)
95

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from coco-research/coco

All issues in coco-research/coco

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.