feat(collab): one `yrs` room hosted on a Durable Object and on axum (spike 0005 first)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- rust, wasm
- Lĩnh vực
- backend, databases, distributed-systems
Hướng nghiên cứu
Start with spike 0005 at spikes/0005-collab-yrs-durable-objects.md and record whether each exit criterion passes, including the same room running on axum. The issue also points to crates/thrust-worker/src/durable.rs and crates/thrust-editor-doc/Cargo.toml; read ADR-0060 and ADR-0061 for the room and persistence requirements. Done means the report and acceptance checks cover both hosts, convergence, persistence, authorization, and the stated load target.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Context
P0 has no collaborative editing: descriptions and pages are plain saves (ADR-0060, round 6). The only room-shaped code is the spike's RoomDo (crates/thrust-worker/src/durable.rs:79-153): WebSocket hibernation plus SQLite storage, a text echo that ignores binary frames (:119-121), reachable only through /_test/room/... with test routes and the admin token (:159-176). yrs is already in the workspace for the editor conversions (crates/thrust-editor-doc/Cargo.toml:15). ADR-0060 (accepted) chose a Collab port with a Durable Object adapter and a Hocuspocus + Redis adapter (lines 31, 38); round 21 left the self-hosted adapter open between Hocuspocus + Redis (TypeScript) and a Rust axum + yrs service (line 115; Q-0061.2, QUESTIONS.md:103). Spike 0005 has not run (spikes/README.md:46).
Problem
- FR-15: Hocuspocus + Redis as the self-hosted adapter is a shipped TypeScript service with no exit plan, which ADR-0006's round-22 policy does not allow (bounded shims behind a port with an exit plan, ADR-0006 line 75).
- FR-05: it also brings Redis back into a twin that is otherwise one binary, and two different room implementations must be kept behaviour-identical (ADR-0060 line 66).
- The kept editor connects with
HocuspocusProvider, so whatever hosts the room speaks Hocuspocus framing or the editor's collab provider changes, which Q-R2 allows (ADR-0060 line 60;QUESTIONS.md:260). Yjs sync uses binary frames, whichRoomDodrops today. - A Durable Object class must be exported from the same Wasm module as
fetch(ADR-0060 round 26, line 123), so the room needs a Worker root of its own.
Proposal
- Spike 0005 first, with the round-29 exit criterion "the same room runs on axum" added to the existing ones: 50 editors with p95 update fan-out < 250 ms, no data loss on forced eviction, a P0-saved page opens unchanged, cost within the envelope (
spikes/0005-collab-yrs-durable-objects.md:23-26). Its step 5 (Hocuspocus or a Rust service, line 19) is answered by ADR-0060 (round-29 note). - One room crate (for example
crates/thrust-collab): sync and awareness overyrs, Hocuspocus framing (or the provider swapped under Q-R2), the short-lived signed token on upgrade (ADR-0060 round 19), persistence throughCollabPersistenceover the core ports (ADR-0061). It is runtime-free and listed inCLEAN_CRATES(scripts/check-deps.sh:14). - Two hosts of the same crate: a hibernating Durable Object in a
collabWorker root, added when the room lands (ADR-0090 round-29 note, FR-11), and an axum WebSocket route inthrust-server. No Node service and no Redis. - Pages open collaboratively from the P0 stored triple (#48); the binary for a work-item description is derived from its HTML on first open by
thrust-editor-doc(research/0008§8).
Acceptance criteria
- The spike 0005 report exists; each exit criterion, including "the same room runs on axum", is met, or the editor cap is recorded.
- The ADR-0060 Confirmation tests (lines 73-75) run on the
worker-cfand native targets: two clients converge, awareness propagates, an unauthorized socket is refused, persistence receives the update. Control: a room that drops binary frames, asRoomDodoes, fails the convergence test. -
scripts/check-deps.shpasses with the room crate inCLEAN_CRATESand fails when aworkerortokiodependency is added to it (control). - The stock
@plane/editoropens a P0-saved page in a room on both hosts with no data migration. - A 50-editor load test on the Durable Object host has p95 fan-out < 250 ms (M5 exit criterion).
- ADR-0060 and the ARCHITECTURE §1c
Collabrow (ARCHITECTURE.md:92) read "oneyrsroom, two hosts"; Q-0061.2 is answered.
References
- Review: .agents/plans/contrail/reviews/2026-10-19-fable-architecture-review.md (FR-05, FR-15)
crates/thrust-worker/src/durable.rs:79-176;crates/thrust-editor-doc/Cargo.toml:15;scripts/check-deps.sh:14- ADR-0060 (lines 31, 38, 60, 66, 73-75, 115, 123; round-29 note), ADR-0061, ADR-0006 (line 75), ADR-0090 (round-29 note)
spikes/0005-collab-yrs-durable-objects.md:19,23-26;research/0008-editor-conversions.md§8- Q-0061.2, Q-R2, Q-G4.1, Q-0060.1;
.agents/plans/contrail/ARCHITECTURE.md:92,157
Blocked by: #46
Finding: FR-05, FR-15
- Ngôn ngữ chính
- Rust
- Star
- 0
- Fork
- 0
- Merge trung bình
- 1 giờ 35 phút
- Pull request đã merge (30 ngày)
- 67
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của aRustyDev/thrust
-
area:process prio:p1 type:security
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:process bug prio:p1
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:process prio:p1
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:process prio:p1
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:process prio:p1
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 56/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của aRustyDev/thrust
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Clean master build fails in zune-jpeg error conversion and zero-IV array construction (patch)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
CakeRepository/agentshangout#995 ·
-
area:frontend kind:bug priority:p3 ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày