Repository navigation
Description
Problem
Recipes in this cookbook silently break in a specific, repeating way: the SSE event contract drifts between the TinyFish agent stream, the recipe's own /api route, and the client hook that renders progress. Nothing in CI catches it, so it is only found when a human opens the app and notices the live browser preview never appears.
@zk1tty called this out in #86 (March, still open):
I only tried this folder, but I assume same issues can happen at other folders too. Highly recommended to review and adjust to new event types on /run-sse endpoints.
That review never happened repo-wide. I did it, and the prediction was correct — three recipes are currently shipping dead code paths, including one Featured recipe with a live demo:
| Recipe | Defect | User-visible effect |
|---|---|---|
tinyskills |
use-generation.ts:202 handles source_streaming; api/scrape-sources/route.ts never emits it (emits source_start, source_step, source_error, source_complete, scrape_complete, error, scrape_start) |
Live browser preview never renders |
stay-scout-hub |
lib/api/area-search.ts:84 handles event.type === 'STATUS'; api/research-area/route.ts emits only CONNECTED, SCREENSHOT, COMPLETE, ERROR |
Progress text never updates during research |
competitor-analysis |
api/scrape-pricing/route.ts:369 reads event.streamingUrl off the raw SDK event; the SDK emits streaming_url |
Guard never fires → competitor_streaming never sent → preview dead end-to-end |
All three are the same shape as #86: a consumer waiting on an event type or field name that no producer ever emits. tinyskills and stay-scout-hub are provable statically — the consumed event-type set is not a subset of the emitted set. competitor-analysis is a snake_case/camelCase slip at the SDK boundary, where every other recipe correctly reads event.streaming_url.
This is not a one-off. Each recipe hand-rolls the same three-hop relay (SDK event → internal SSE → client state) and picks its own key convention along the way — streamingUrl, streaming_url, and data.streamingUrl are all in use today. There is no shared contract and no check, so every new recipe is a fresh chance to get it wrong.
Why a checker rather than another round of fixes
The fixes themselves are small. The reason this recurs is that the cookbook has no conformance check at all — CI today is TruffleHog + osv-scan, both security-only. CONTRIBUTING.md specifies seven required README.md sections for every project, and nothing verifies them either.
That gap also shows up in review throughput: 43 PRs are currently open, the oldest from January, and most are large recipe submissions where correctness has to be established by hand. A mechanical pre-check moves the cheap, objective part of that review off the maintainers.
Proposed approach
A single .github/scripts/check_recipes.py, run from a pull_request workflow and a make check-recipes target, that validates only the recipes touched by the PR.
Directly modelled on openai/openai-cookbook's .github/scripts/check_notebooks.py + .github/workflows/validate-notebooks.yaml — git diff --name-only against the base ref, per-file validation, error count, sys.exit(1), SHA-pinned actions. Same shape, same footprint. Credit to that repo in the PR description; I'm borrowing their structure rather than inventing one.
Checks, ordered by confidence:
- SSE event-type reachability (hard error) — within a recipe, every event type string a client compares against must be emitted somewhere in that recipe. This is the set-difference check that catches
tinyskillsandstay-scout-hub. - SDK boundary field names (hard error) — on a value derived from
client.agent.stream(), flag camelCase reads of documented snake_case fields (streamingUrl→streaming_url,resultJson→result). Catchescompetitor-analysis. - README structure (hard error) — the seven sections
CONTRIBUTING.mdalready requires. .env.examplecoverage (warning only) — env vars referenced in code but undocumented.
Deliberately kept to stdlib + regex/AST heuristics scoped to the TinyFish boundary. I'd rather ship four checks with near-zero false positives than a broad linter people learn to ignore — a noisy gate is worse than no gate.
What I'd like a maintainer's read on
- Should the workflow gate merges, or start advisory (
continue-on-error) until the backlog is clean? My instinct is advisory for one or two releases, because turning it on as a hard gate today would fail some of the 43 open PRs and that isn't a fair thing to spring on contributors. Happy to go straight to blocking if you'd prefer. - Scope of check 3 — enforce README sections on new recipes only, or all touched recipes? Existing recipes predate the current template and some would fail.
- Placement —
.github/scripts/(matching openai-cookbook) orscripts/?scripts/currently holds user-facing Raycast content, so I've assumed.github/scripts/.
Note: Makefile, .semgrepignore, and golden-images.yaml are Terraform-managed from github-control, so I'd add the make target only if you confirm that file is locally editable — otherwise the workflow alone is fine.
Offer
I have the checker working locally against all 40+ recipes and the three defects above reproduced. Happy to send it as one reviewable PR (script + workflow + a short CONTRIBUTING.md note), with the three recipe fixes as separate small PRs so each can be reviewed and reverted independently.
If you'd rather not take on new CI, say so and I'll just send the three bug fixes — those stand on their own and close out #86.
Activity
Hotragn commentedon Aug 4, 2026
@simantak-dabhade — @zk1tty pointed me your way. Consolidating everything here so it's one triage pass rather than five tabs.
Root cause — #86, open since March
The three recipes it flags — one PR each, so each is independently reviewable and revertible
tinyskills— removes a dead live-preview path. The recipe runs on Fetch, which has no browser session, so there is no streaming URL to surface; restoring the feature would mean going back to the metered Agent endpoint, which is your call, not a bug fix.stay-scout-hub— the route was droppingPROGRESS, so progress text never updated. Regression from the SDK migration in Migration stay-scout-hub to Tinyfish SDK #223.competitor-analysis— readevent.streamingUrloff the raw SDK event, so the live preview was dead end-to-end.Separate problem found on the way
npm run lintdoes not run at all in 6 recipes. Three different root causes, each measured by installing the recipe and running its script, not inferred frompackage.json.stay-scout-hubfixed as a reference. I'm deliberately holding the other five until you've seen the shape.Two things worth knowing before you look
action_required— standard first-time-contributor gating. TruffleHog and OSV-Scanner can't report until someone with write access approves the runs, so the absence of green checks isn't a failure signal, just no signal.continue-on-error: trueon purpose. Making it a hard gate today would fail some of the currently open PRs, which didn't seem a fair thing to spring on people mid-flight. Deleting that one line makes it blocking whenever you want.One correction to my own framing above: this isn't a new ask. @JiwaniZakir already called for exactly this audit on #86 back in March, naming the same three renames (
streamingUrl→streaming_url,STATUS→PROGRESS,resultJson→result) and noting other samples likely shared the stale handler. #243 is the second request for it, not the first.If any of this isn't the direction you want — particularly adding a new CI workflow — say so and I'll close it rather than leave it sitting. I'd genuinely rather have a no than a stale PR.