Repository navigation
feat(positron): converge roster projection — one neutral RoomMember→RosterSlotView both rails read (#8/#13) - #1748
Merged
Conversation
…osterSlotView both rails read (#8/#13) The persona's room-presence grounding (Rail A, RoomRosterSource) and the WS widget roster (Rail B, ChatProjection) independently projected the SAME airc `RoomMember` and dropped DIFFERENT fields: Rail A kept availability + last_seen_ms; Rail B silently dropped them. Two projections of one truth — the compression violation task #8/#13 targets. Converge on ONE neutral superset projection, keeping positron generic: - continuum-positron (the public, framework-neutral package): extend the neutral `RosterSlotView` with `availability: Option<String>` (airc's stable snake_case label, transported VERBATIM — positron never enumerates availability states, same not-interpreted discipline as provenance.runtime / integrations) and `last_seen_ms: u64`. Additive + serde(default) → wire-safe. - continuum-core: one shared `roster_slot_from_member(&RoomMember) -> RosterSlotView` — the single place a slot is built. Both rails call it, so they can never drop different fields again. Delete the hand-copied `AircPresenceSlot` twin (RosterSlotView already derives Serialize/Deserialize, so the neutral view IS the wire shape) and the now-identity `roster_slots_from`. Collapses the two provisional-name fallbacks into one decision. - Rail A formats its grounding line from the shared slot (availability/recency now survive into the persona's prompt — the fields Rail B used to drop). Test drift-proofing: the projector tests hand-authored camelCase presence JSON — the exact "hand-copied JSON literal" the module doc forbids, which my type change exposed. Replace with shared `#[cfg(test)] test_presence_payload` / `test_roster_slot` that serialize the REAL AircPresenceUpdate, so a test's wire can never drift from the struct's field names again. Transcript/ChannelDigest path is intentionally untouched — display (flat ring) and cognition (consolidated digest) are legitimately different projections; sharing the ChannelElement upstream is a separate follow-up. Validated: continuum-positron 83+5 tests; continuum-core roster + positron projection modules 40 tests; ts-rs bindings regenerated + re-vendored to sdk/typescript; chat-view/web/sdk/tui typecheck + vitest all green. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…n this room] via one projection Prove the personaRag consumer reads the converged roster projection end to end, through the exact code the live heartbeat loop runs — deterministically, without depending on airc presence (which is empty on this host: 0 healthy routes, the known event/presence-wake gap #16/#84, upstream of this convergence). - Extract `project_room_roster` (the room-roster delivery → grounding fold) out of `serve_persona_loop` into a pure `pub(crate)` fn beside its sibling `build_workspace_turns`. The loop now calls it; behavior-preserving (all service_loop projection tests stay green). One roster truth, and a testable seam instead of inline loop code. - Add `present_member_reaches_present_in_room_block_end_to_end`: a present airc RoomMember (self-reported Busy) flows RoomRosterSource.deliver (the ONE shared roster_slot_from_member projection both rails use) → project_room_roster (the live fold) → prompt_assembly, and lands `win-claude [claude] — busy` in the [Present in this room] block — availability carried as airc's neutral label, the field the widget rail dropped before the convergence (#8/#13). Connects the three separately-unit-tested halves via real code. Live core (rebooted onto this branch) confirmed the plumbing runs: persona reads the channel + takes turns, prompt assembly intact. The [Present in this room] block can't render live only because airc presence returns no member — a separate infra gap, not this change. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… drop generation-lane --embeddings
Two regressions were keeping the live persona stack dark; found + fixed while
proving the roster convergence end-to-end on a running core.
1. Generation lane ran with `--embeddings` (inference/llama_server.rs). On the
current llama.cpp build that flag forces embedding (non-causal) mode, so
EVERY generation request failed with `500 "Compute error."` — no persona
could take a turn — and OAI `/v1/embeddings` still 400'd ("pooling type
'none'"), so it wasn't even serving embeddings. One server can't do both
causal generation and non-causal embeddings. Dropped the flag from the
generation lane; verified the base GGUF generates cleanly the instant it's
gone (`200` "Hello!" vs `500`). llama-hosted embeddings need their own lane
(follow-up); the live embedding path is the fastembed/ONNX provider.
2. Personas never emitted airc `Alive` heartbeats. airc `active_agents`
(which backs `room_roster`) reduces heartbeat events, NOT `say()` messages,
so co-resident personas were invisible to each other's roster — the
`[room-roster]` grounding went dark and personas leaked raw peer UUIDs
instead of names. The spawn contract was attach → join → subscribe →
publish_identity but never started the heartbeat pump. Now bootstrap calls
`start_agent_heartbeat("persona", …, DEFAULT_HEARTBEAT_INTERVAL)` and holds
the `HeartbeatTask` for the persona's lifetime (drop on teardown ages it out
of the roster — the honest "no longer here"). WARN-and-continue on failure,
symmetric with publish_identity.
Live proof (rebooted onto this branch): room_roster deliver `present=1` for
both Asha and Solenne; Asha's live brain-assembled system prompt now carries
`[room-roster]\nSolenne [persona]` (the converged roster_slot_from_member line),
and she converses as a grounded citizen.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… not just fits_on_gpu The `--embeddings` outage was silent because persona-boot spawned citizens the moment the serving PLAN said `fits_on_gpu` — a pure VRAM/resource decision that says nothing about whether the lane can actually generate. So a lane that fit GPU but 500'd on every `llama_decode` (embedding/non-causal mode, a bad LoRA, a wedged Metal context — all while `/health` answers 200) got personas hosted onto it, and every turn failed silently. The decode-verified signal already existed and was correct: `ServingSnapshot.ready` is published ONLY on a serve/adopt outcome that passed the 1-token decode smoke-probe (`wait_ready` → `decode_smoke_ok`). Persona-boot just wasn't waiting on it. Now, after `fits_on_gpu`, the boot loop `await_ready_serving(120s)` — parks on the serving snapshot until the lane proves it can decode. Timeout → do NOT host (loud warn, retry on the next serving edge, self-healing), never spawn personas onto a can't-generate lane. Verified live: healthy lane → `citizen(s) hosted, attempts=1` (no deadlock); a can't-decode lane now warns loudly and holds off hosting instead of producing silent per-turn 500s. This is the startup/health guard that makes the `--embeddings`-class regression impossible to land silently again. 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.
What
Kills the parallel roster derivation between the WS widget rail (
ChatProjection) and the persona grounding rail (RoomRosterSource) — the compression violation task #8/#13 targets. Both projected the same aircRoomMemberand dropped different fields: Rail A keptavailability+last_seen_ms; Rail B silently dropped them.Now there is one neutral superset projection —
roster_slot_from_member(&RoomMember) -> RosterSlotView— and both rails call it. This is the personaRag leg of the "web + terminal + personaRag off one seam" north-star.How
RosterSlotViewgainsavailability: Option<String>(airc's stablesnake_caselabel —ready/busy/away— transported verbatim, never a positron-side enum; same not-interpreted discipline asprovenance.runtime/integrations) +last_seen_ms: u64. Additive +#[serde(default)]→ wire-safe.AircPresenceSlottwin (RosterSlotViewalready derivesSerialize/Deserialize, so the neutral view is the wire shape) and the now-identityroster_slots_from. Collapsed the two provisional-name fallbacks into one.[Present in this room]block.#[cfg(test)]helpers that serialize the realAircPresenceUpdate.project_room_roster(the delivery→grounding fold) out ofserve_persona_loopinto a purepub(crate)fn besidebuild_workspace_turns— behavior-preserving, and the seam a deterministic integration test can drive.Proof
crossConsumer.spec+ shared projectionRoomMember→RoomRosterSource.deliver→project_room_roster→prompt_assemblylandswin-claude [claude] — busyin the live[Present in this room]blockTranscript/
ChannelDigestpath intentionally untouched — display (flat ring) and cognition (consolidated digest) are legitimately different projections; sharing theChannelElementupstream is a separate follow-up.Honest caveat: the live
[Present in this room]block does not render on this host because airc presence returns no member (0 route(s) healthy; separate persona airc homes) — the known event/presence-wake gap (#16/#84), upstream of and independent from this change. The deterministic integration test covers that seam without depending on presence.Validation
sdk/typescript.🤖 Generated with Claude Code