Repository navigation
feat(#6): RoomPurposeSource seam — de-hardcode the projection's purpose (the gene, slice 1) - #1781
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.ChatProjectionroutes throughpurpose_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