Repository navigation
fix(id): show world chat only to participants who may chat or read history - #256
Merged
Merged
Conversation
…story Add the history scope and route the snapshot, catch-up pages and the live stream through one projection that withholds chat from join-only viewers and zeroes the install seed.
dezren39
added a commit
that referenced
this pull request
Oct 18, 2026
Resolutions: - web/mod.rs: take main's unwrap_or(Duration::ZERO) in the save limiter. - world.rs: keep ModuleProvenance and SourceBuildProvenance; drop the local Isolation, which main moved to groups::worlds and re-exports. - world_session.rs: keep main's per-viewer event projection and pass the viewport through to send_view. - world.rs project_event_for: zero only the install seed, keeping provenance and any later event field; main's tests gain provenance: None. Integration with the chat-visibility change (#256): - chat.history now needs the right to read chat (CHAT or HISTORY), the same rule the event stream applies. - new observer role: join + history.
This was referenced Oct 20, 2026
id phase-9/10: verification debt — delivered faster than verified, no dedicated issues carry it
#796
Open
This was referenced Oct 27, 2026
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.
Summary
Implements the owner's decision: join-only participants do not see chat, and an explicit new
historyscope opts in to reading it. The install seed stays secret (#250), now through the same single projection. Based onmain.WorldScopes::HISTORY(wire namehistory): read chat lines without being able to send.chatimplies it.GUESTis unchanged.project_event_forreplacesredact_install_seed. It is the one place that decides what a viewer sees: it hides chat (including host chat) from viewers with neitherchatnorhistory, and zeroes the install seed for everyone. It is used byevents_after, the snapshot, and the live stream that sessions forward.chatimplieshistory, the scope intersections (attenuation, effective scopes, account and directory ceilings, friend delegation) useimplied()so ahistorychild of achatparent keeps its bit. A guest can hand out a read-only link.Findings
main: a join-only snapshot contained chat (reproduced againste1f99237).WorldHandle::subscribe()broadcast does carry the real seed and chat, and a test now pins that so nobody forwards it unprojected.web/src/world.ts) both advance their cursor withmax(cursor, event.sequence); neither assumes contiguous sequences.needs_snapshotandoldest_retained_sequencecome from the retained buffer before projection, so they do not depend on the viewer.Behaviour change
Existing join-only capabilities (for example from
attenuate) stop seeing chat. The journal format does not change. Downgrading is not safe for chat privacy: an older binary ignores the unknown scope bit and treats ahistory-only capability as join-only, and it answers the wire namehistorywith "unknown scope". The record covers this.Not done
chat.historyand the roles (spectator,observer) live in the open platform stack (feat(id): migrate world apps to structured RocJson and Screen #234), not onmain. When that stack rebases onto this,chat.historymust acceptchatorhistory, and a newobserverrole should be join + history. Recorded in the design record.Validation
cargo test --lib: 1275 passed, 4 ignored (the subagent's run). I re-ran the 12chat_visibilitytests and the 31world_sessiontests: all pass.cargo fmt --check: clean. Clippy via the rustup 1.97.0 cargo has no errors; plaincargo clippyfails with E0514 as before.tests/integration targets and the web build.Design record:
doc/2026-10-18T04-00-00Z_fix_world_chat_visibility/.Summary by CodeRabbit
New Features
Documentation