Expand feed to 111 sources and stop the finder adding non-recipe repos - #14
Conversation
The finder trusted GitHub code search directly: any repo containing a .cook file was added. That let in Cooklang tooling, parser test-fixture repos, and repos carrying a single sample file. The worst case was not keyword noise. ".cook" is also the extension of Peter Miller's `cook` build tool, whose build scripts live in the etc/ directory of srecord, aegis, libexplain, the UCSD p-system tools and their many forks. Twelve such repos passed a naive check. A candidate now has to be a fork-free, non-cooklang-org repo with no tooling keywords, at least --min-recipes recipes outside test/fixture directories, and sampled files carrying real Cooklang syntax (@flour{200%g}, #pan{}, ~{5%min}) rather than build-script constructs. Also fixed along the way: - Code search returns only a stub repository object, so every entry the script wrote claimed 0 stars and had no description. Repo metadata is now fetched per candidate. - save_config() regenerated feeds.yaml, dropping comments and the disabled_at/disabled_by fields that the config validator requires on every disabled feed. Entries are appended instead. - The search ran one query, capped by the API at 1000 results out of ~23,000 .cook files on GitHub. It is now partitioned by file size. - A failed download read as "not a recipe", rejecting good repos at random. Fetches retry, and a failure is reported as a failure. - Titles came from GitHub descriptions, which are usually absent or carry typos and URLs. They are now built from the owner's display name and the repo name; the description moves to notes. tests/feeds_config_test.rs loads the shipped config/feeds.yaml through the real validator, so a malformed entry fails CI instead of startup. Claude-Session: https://claude.ai/code/session_01XGqv3F4GVDc7kpqE2LVFmn
Adds 50 GitHub recipe collections found by the updated finder, taking the feed from 76 to 111 enabled sources - 7021 recipes in total. The largest additions are ianseddon/cookbook (816 recipes), johnhkchen/tabular-recipes (685) and arnars/recipes (324). Retires 16 feeds, disabled per config/README.md rather than deleted so the entries stay as a record and the finder will not re-add them: - 4 whose repositories now 404 - 12 holding only one or two recipes Fixes andreaskrath/recipes, which was enabled but pointed at a branch named "main" in a repository that only has "master". Every crawl of it has failed since it was added in December. All 126 GitHub feeds were checked for this; it was the only live case. Backfills the metadata the old finder could not collect. Every entry it added claimed "⭐ 0" because code search returns a stub repository object, hiding some of the largest collections in the feed - nicholaswilde/recipes is 1230 recipes and 49 stars, Diegothx/CookBook is 953 recipes. 65 notes now carry counts measured on the branch each feed actually crawls; the 7 left alone are unreachable repos. Retitles every feed onto one convention, "<Owner>'s <Collection>", built from the owner's display name. The old titles were raw GitHub descriptions or invented strings: "reipes in table form", "javoulla", "jackhumbert/recipes recipes", "my website ". Generated titles were corrected by hand where the generator does worse than what was there - one display name is written in Unicode homoglyphs, an org name carries a legal suffix, and two zarguell repos would have collided. Languages were confirmed by reading the recipes, not guessed from descriptions: this is how it2023115/javlakes turned out to be Greek cocktails rather than food, and it is now tagged accordingly. Claude-Session: https://claude.ai/code/session_01XGqv3F4GVDc7kpqE2LVFmn
ReviewSolid piece of work — the root-cause analysis of the Code quality / best practices
Potential bugs / correctness
Performance
Security
Test coverage
Overall: well-scoped, well-explained, and the config/test changes look correct. The two performance/dead-code notes above are minor and not blocking. |
ReviewSolid piece of work — the root-cause analysis of the A few things worth a look: Correctness
Similarly, Minor / nits
Test coverageThe Rust-side config validation test is a good addition. The actual core logic of this PR, though, is the Python heuristic filter ( Nice touches
|
Adds 50 GitHub recipe collections, retires 16 dead or near-empty ones, and fixes the finder script that had been adding repositories that contain no recipes.
The bug
scripts/find-cooklang-repos.pytrusted GitHub code search directly: any repository containing a.cookfile was added. That let in Cooklang tooling, parser test-fixture repos, and repos carrying a single sample file.The worst case was not keyword noise.
.cookis also the extension of Peter Miller'scookbuild tool, whose build scripts live in theetc/directory ofsrecord,aegis,libexplain, the UCSD p-system tools and their many forks:Twelve such repositories passed a naive "does it contain
@" check. This is the same family asmdhender/cook, which had already been disabled by hand.The filter
A candidate must now be a fork-free, non-
cooklang-org repository with no tooling keywords, at least--min-recipesrecipes outside test/fixture directories, and sampled files carrying real Cooklang syntax —@flour{200%g},#pan{},~{5%min}— rather than build-script constructs. Verified against nine known cases, accepting real cookbooks and rejecting every build-tool and tooling repo.Of 180 candidates, 50 survived.
Other fixes in the script
⭐ 0and had no description. Repo metadata is now fetched per candidate.save_config()regeneratedfeeds.yaml, dropping comments and thedisabled_at/disabled_byfields the config validator requires on every disabled feed — it would have broken startup. Entries are appended instead..cookfiles on GitHub. It is now partitioned by file size.notes.Feed changes
Added 50 collections, taking the feed from 76 to 111 enabled sources — 7021 recipes. Largest:
ianseddon/cookbook(816),johnhkchen/tabular-recipes(685),arnars/recipes(324).Retired 16 feeds — disabled per
config/README.mdrather than deleted, so the entries stay as a record and the finder will not re-add them: 4 whose repositories now 404, and 12 holding only one or two recipes.Fixed
andreaskrath/recipes, which was enabled but pointed at a branch namedmainin a repository that only hasmaster. Every crawl of it has failed since it was added in December. All 126 GitHub feeds were checked; it was the only live case.Backfilled the metadata the old script could not collect. The fabricated
⭐ 0was hiding some of the largest collections in the feed —nicholaswilde/recipesis 1230 recipes and 49 stars,Diegothx/CookBookis 953 recipes. 65 notes now carry counts measured on the branch each feed actually crawls.Retitled every feed onto one convention,
<Owner>'s <Collection>. The old titles were raw descriptions or invented strings —reipes in table form,javoulla,jackhumbert/recipes recipes,my website. Generated titles were corrected by hand where the generator does worse: one display name is written in Unicode homoglyphs, an org name carries a legal suffix, and twozarguellrepos would have collided.Languages were confirmed by reading the recipes rather than guessed from descriptions — which is how
it2023115/javlakesturned out to be Greek cocktails rather than food. It is now taggedcocktails.Tests
tests/feeds_config_test.rsis new: it loads the shippedconfig/feeds.yamlthrough the realFeedConfig::from_filevalidator, so a malformed entry fails CI instead of at startup. Confirmed it catches the failure mode — removing onedisabled_atmakes it fail withFeed #12 (algorist-ahmad/recipes): Disabled feed must have disabled_at field.Full suite passes (97 lib tests + integration tests).
https://claude.ai/code/session_01XGqv3F4GVDc7kpqE2LVFmn