Skip to content

fix(activity): validate recipe strings + fix live benchmark-room purpose mismatch (#431) - #2302

Merged
joelteply merged 1 commit into
canaryfrom
fix/431-recipe-strings-validated-at-activity-spawn
Aug 14, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/431-recipe-strings-validated-at-activity-spawn

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

What

SPAWN GATE slice 3 (task #431). Two halves:

  1. Recipe validation at the one birth path. spawn_activity_room now refuses a recipe string that names no known recipe purpose, with the actionable set in the error. New shipped_purposes()/shipped_purpose(id) on RecipeExperienceSource, derived from the same embedded() iterator the registry itself is built from — the validation set and the resolution set cannot drift (both must grow the disk overlay when Dispatch: feature/bug/review overrides simple command gate #432 wires it; noted in-doc).

  2. The live bug fixed: benchmark/dispatch bound "benchmark" while the shipped recipe declares "benchmark/hard-rs" — every benchmark run room resolved to no manifest and rendered as plain chat. The call site now resolves the purpose from shipped::BENCHMARK_HARD_RS, keeping the string authored in exactly one place (the recipe JSON).

Why

The classroom must look like a classroom: a benchmark room whose scoreboard never renders is the parallel-system failure in UI form. The registry's own ids() doc named this exact validation as its purpose — it was designed and never wired (spawn survey, 2026-08-14).

Validation

modules::activity + experience::source suites: 15 passed, 0 failed, including the regression pinning the exact old literal ("benchmark" refuses, every shipped purpose passes, constant→purpose mapping pinned).

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

… live benchmark-room purpose mismatch (#431)

A recipe string is a reference into the recipe REGISTRY, not free text.
Before this gate an unknown one "worked" — room made, binding published —
then resolved to no manifest, so every client projected the room as plain
chat. The live instance: benchmark/dispatch bound "benchmark" while the
shipped recipe declares "benchmark/hard-rs", so EVERY benchmark run room
rendered as chat for the whole campaign (the scoreboard region was the
point of the recipe). The registry's own ids()/purposes() doc named this
exact validation as its purpose; it was never wired.

- experience::source: shipped_purposes() + shipped_purpose(id), both
  derived from the SAME embedded() iterator the registry is built from —
  validation set == resolution set by construction. Doc notes both must
  grow the disk overlay when #432 wires it.
- activity::validate_recipe: pure gate called by spawn_activity_room;
  refusal names the actionable set.
- benchmark/dispatch: binds the purpose resolved from
  shipped::BENCHMARK_HARD_RS — the string stays authored in exactly one
  place, the recipe JSON.

Tests (existing mods): validate_recipe passes every shipped purpose and
refuses the old "benchmark" literal with the set named; the shipped
constant resolves to "benchmark/hard-rs". modules::activity +
experience::source: 15 passed, 0 failed.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 68cca39 into canary Aug 14, 2026
5 checks passed
@joelteply
joelteply deleted the fix/431-recipe-strings-validated-at-activity-spawn branch August 14, 2026 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant