Repository navigation
feat(positron): runtime wall projector (task #89 Unit 2) - #1735
Merged
Merged
Conversation
Project the room's pinned board (airc WallPostPublished supersede chain) into a renderer-shaped `kind="wall"` WallViewState on the thin-client substrate — the sibling of the chat projection, so a wall widget is defined once for web / terminal / mobile / AI-observer surfaces. The projector RE-READS airc's authoritative `Airc::wall_posts()` via the existing WallReader seam on each change, rather than re-implementing the supersede fold (one supersede impl, in airc). Two bus streams drive it: - `wall:changed` — a WallPostPublished transcript event landed for the room; inbound_attach classifies it into a thin room-id-only re-read cue (never the post content — the board can't be rebuilt from one delta). - `presence:updated` — the roster changed; the wall carries only a published_by peer id, so the projector resolves each author's name / kind / badges / provenance from the roster exactly as the chat projection resolves a sender, and re-projects so a post pinned before its author's card arrived upgrades in place. Attribution woven in from day one ([[positron-identity-security-first-class]]). Compression: extracted `resolve_identity` + `roster_slots_from` as pub(crate) helpers in positron_source, reused by both projections — one identity-resolution decision, one place. A read failure keeps the last-good board (reader owns reconnection), never blinks it empty; a failed node-reader attach disables the projection loudly, never fabricates a board ([[fallbacks-are-illegal-fail-loud]]). Spawn-wired in ipc/mod.rs under the same (socket, room) precondition as the presence emitter, with a dedicated node "continuum-wall" lurker as its WallReader so the board renders with zero resident personas. Tests: 5 wall-projector (project, author-upgrade, empty-board, foreign/malformed skip, monotonic revision) + 1 inbound-attach classification; chat projection (10) and inbound (now 6) still green. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…-up) The spawned review of PR #1735 flagged three loop branches as trust-me (the consume loop is an infinite `recv().await`, so its Lagged / Closed / foreign-room guards had no coverage) and one distinct resilience contract that no test pinned (a read failure keeps the last-good board, never blinks it empty — different from the RagSource path's read-fresh). Factor the loop's per-event decision into a pure `fold_recv` helper (returns LoopStep::Continue | Stop) so those branches are unit-testable without racing a live broadcast channel, and add three tests: - read_error_keeps_the_last_good_board — a wall_posts() failure keeps the last board (extends the test StubReader with the same set_fail toggle wall_source::tests already uses; one fixture pattern, not a parallel mock). - lagged_re_reads_to_re_establish_coherence — the projector's one improvement over chat: Lagged RE-READS rather than continuing stale. - closed_channel_stops_the_loop_and_foreign_room_is_not_re_read — Closed stops the loop; a foreign room's wall:changed does not thrash our board. Re-export BusEvent from runtime so the helper's signature is nameable in the test. No behavior change to run_wall_loop (same branches, now via the extracted helper). 8/8 wall tests pass. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Contributor
Author
|
Spawned review came back clean and mergeable (no blockers). Both should-fixes were test-coverage gaps for behavior this PR uniquely introduces — addressed in
8/8 wall tests pass; full lib The one design-level note (a static roster's sole |
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
The runtime wall projector — the sibling of the chat projection (task #89 Unit 2, following the merged Unit 1 wall contract #1734). It projects the room's pinned board (airc
WallPostPublishedsupersede chain) into a renderer-shapedkind="wall"WallViewStateon the thin-client substrate, so a wall widget is defined once for web / terminal / mobile / AI-observer surfaces.How
ipc/positron_wall_source.rs(new) —WallProjectionfolds two bus streams for one room:wall:changed→ RE-READ airc's authoritativeAirc::wall_posts()through the existingWallReaderseam. It never re-implements the supersede fold (one supersede impl, in airc — the continuum side is a cache of airc's truth). The signal carries onlyroom_id; the board comes from the authoritative re-read, never from one delta.presence:updated→ the wall carries only apublished_bypeer id, so the projector resolves each author's name / kind / badges / provenance from the roster exactly as the chat projection resolves a sender, and re-projects so a post pinned before its author's card arrived upgrades in place. Attribution woven in from day one.airc/inbound_attach.rs— addedwall_changed_from_event: aTranscriptKind::WallPostPublishedevent classifies into a thinwall:changedre-read cue (room-id only, no content).ipc/positron_source.rs— compression: extractedresolve_identity+roster_slots_fromaspub(crate)helpers, reused by both projections (one identity-resolution decision, one place). Chat behavior unchanged.ipc/mod.rs— spawn-wired under the same(socket, room)precondition as the presence emitter, with a dedicated nodecontinuum-wallheartbeat-less lurker as itsWallReaderso the board renders with zero resident personas.Doctrine
Tests
wall:changedcue, no content).cargo check --features metal,accelerate -p continuum-coreclean; targeted tests pass.🤖 Generated with Claude Code