Skip to content

feat(#6): RoomPurposeSource seam — de-hardcode the projection's purpose (the gene, slice 1) - #1781

Merged
joelteply merged 1 commit into
canaryfrom
feat/room-purpose-source
Jul 4, 2026
Merged

joelteply merged 1 commit into
canaryfrom
feat/room-purpose-source

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

First slice of the gene (#6). The positron chat projection hardcoded purpose: "chat" for every room. This introduces the ONE seam that resolves room → purpose (the Content dispatch key):

  • ipc/room_purpose.rs (NEW) — trait RoomPurposeSource { purpose_for(room_id) -> String } + DefaultRoomPurpose (every room → "chat", honest not fabricated) + default_source(). Purpose is an open String (recipe-defined, never an enum) — the doctrine answer to the open-value-vs-enum question IntelMac/BigMama raised on airc.
  • ChatProjection routes through purpose_for(room_id) instead of the hardcode. No signature change → zero call-site churn; the real recipe-backed resolver injects later as a one-line change.

Behavior identical today; when the resolver injects, foundry/scada/academy rooms dispatch their own Content with no projection edit. Engine-first: de-hardcode once, dispatch follows the data. 57 ipc tests green + new seam test. Per ALPHA-COMPLETION-BLUEPRINT Workstream C brick 1.

🤖 Generated with Claude Code

…se (the gene, slice 1)

The positron chat projection hardcoded purpose: "chat" for every room. Introduce the ONE
seam that resolves a room -> its activity purpose (the Content dispatch key), resolved in one
place so the projection never hardcodes it:
- ipc/room_purpose.rs (NEW) — trait RoomPurposeSource { purpose_for(room_id) -> String } +
  DefaultRoomPurpose (every room -> "chat", honest not fabricated: the one recipe live e2e today)
  + SharedRoomPurpose + default_source(). Purpose is an OPEN String (recipe-defined, never an
  enum, [[room-purpose-is-per-recipe-not-an-enum]]) — the doctrine answer to the open-value-vs-enum Q.
- ChatProjection holds an Arc<dyn RoomPurposeSource>, calls purpose_for(room_id) in store()
  instead of the hardcode. No new signature -> zero call-site churn; injecting the real
  recipe-backed resolver later is a one-line change, no projection edit.

Behavior identical today (default resolves "chat"); when the recipe resolver injects, a foundry/
scada/academy room reports its own purpose and Content dispatches on it with no projection change.
Engine-first: de-hardcode once, dispatch follows the data. 57 ipc tests green + seam test.
Per ALPHA-COMPLETION-BLUEPRINT Workstream C brick 1.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 4ababf0 into canary Jul 4, 2026
4 checks passed
@joelteply
joelteply deleted the feat/room-purpose-source branch July 4, 2026 17:30
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