feat(compat): the 48-route minimum slice with the auth-client JSON change
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
- 20/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ệ
- react, rust, typescript
- Lĩnh vực
- api, authentication, backend-api-design, testing
Hướng nghiên cứu
Start with research/0003-compat-plane-inventory.md §8.1 and §9, then read ADR-0034 and the route inventory in scripts/compat-inventory/p0_slice.py. The work depends on issues #35, #36, #37, #38 and #47, and spans the new compat crate, imported React files, and parity tests. Done means routes S01–S48 and X01–X03 pass fixture comparisons, contract tests and the specified browser journey, with actual effort and ADR tripwires recorded.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Context
Today thrust_api::router() (crates/thrust-api/src/lib.rs:269-293) serves the spike slice only: work items, activity and attachments, with no /auth routes. The tree has neither a compat crate nor a React app. docs/src/architecture/app.md:119-120 says thrust-compat-plane does not exist and there is no web/ directory, although Q-0005.2 (answered in round 15) moves the frontend into this repository. research/0003 §8.1 lists what the stock React UI needs for "sign up, onboard, create workspace, create project, create work item, see it in the list". That is 48 route rows (S01 to S48) on 42 distinct paths, plus X01 to X03 to open the item.
Problem
- At the pin, the slice is estimated at 39.3 pd (26.7 to 66.7) and every P0 row React uses at 207.6 pd (
research/0003§15.6, lines 817 and 819). FR-01 says to build the slice first and bound everything after it by the M2 acceptance list (#46). ADR-0034's round-27 tripwires reopen it if the slice costs more than 66 pd or the re-estimated P0 exceeds 364 pd (adrs/api/0034-internal-api-compat-layer-and-core-openapi.md:68; Q-0009.1,QUESTIONS.md:280). - The auth-client JSON change is the largest lever inside the Q-R2 allowed areas (
research/0003§9 row 1, line 528; ADR-0034:60). Today sign-in is a browser form POST to/auth/sign-in/with a CSRF token fetched as JSON (apps/web/core/components/account/auth-forms/password.tsx:122-125,:150-151at the oracle pin), and the server answers302 ?error_code=. Emulating that costs about 16 pd and 41 of the 545 rows. Q-0009.1 says to make the change before reopening ADR-0034. - Two React behaviours fix shapes. Any 401 sends the app to
/?next_path=(apps/web/core/services/api.service.ts:29-31), so a 401 must mean only "no or expired session"; a role failure must be a 403. An unauthenticatedGET /api/users/me/must return a JSON object with noid(research/0003§9 rows 2 and 3). - In Plane, seven slice handlers dispatch background tasks, so the outbox sits on the slice's write path (§8.1, line 500). The project page fires 13 reads and the workspace wrapper 9 (§1 item 5).
Proposal
- Bring
apps/web, and the@plane/*packages it needs, into this repository at the oracle pinba85d4d3d3(Q-0005.2). Change only the Q-R2 areas. - Auth client: change
auth-forms/{password,unique-code,reset-password}.tsx,hooks/oauth/core.tsx,services/auth.service.tsandpackages/services/.../auth.service.ts. Replace the form-POST-and-302 flow with JSON POSTs to/auth/*handlers built on the #38 auth slice. Responses carry the sameerror_codevalues in a JSON body, soauthErrorHandleris unchanged, and set the session cookie. CSRF is the double-submit from #38. - Create the compat crate (ADR-0034;
thrust-compat-planein ARCHITECTURE §2a). It mounts S01 to S48 and X01 to X03 under/api/and/auth/on the shared router, overthrust-coreuse-cases that take a&Scope(#35) and the user-onlyPrincipal(#36), on the engine #37 decides. Plane-shaped request and response types stay inside the crate (#52), and/api/v1stays free for wire-compatible routes (#47). - Hold the list rows (S17, S47) to the round-trip budget from #39.
- Record actual pd per effort class (
research/0003§8) and re-check both ADR-0034 tripwires at the end.
Acceptance criteria
- Every row S01 to S48 and X01 to X03 has a route. A
parity_test per row compares status and normalised body with a fixture recorded from the pinned oracle (intests/parity/fixtures/). Control: a mutated fixture fails. - Contract tests on all four targets: a slice read with no session gets 401; a member lacking the role gets 403; an unauthenticated
GET /api/users/me/gets a JSON object with noid. -
git diff --stat ba85d4d3d3 -- apps/web packages, run against the imported tree, lists only auth-client and base-URL or service-layer files (Q-R2). - Against
wrangler devwith the Cloudflare set, the stock React app completes sign up, onboarding, workspace, project, work item and list, and the browser network log shows no 404. That journey becomes the first #45 journey. - The closing comment records actual pd against 39.3 pd and says whether either ADR-0034 tripwire fired.
References
- Review: .agents/plans/contrail/reviews/2026-10-19-fable-architecture-review.md (FR-01; §3 M1 row)
research/0003-compat-plane-inventory.md§1, §8, §8.1 (lines 439-507), §8.2, §9 (lines 522-539), §15.6 (lines 794-833)- ADR-0034 (
:60,:68; round-29 note), ADR-0001 (:43, walking skeleton), ADR-0013 (round-29 note), ADR-0050, ADR-0052 - Q-0009.1, Q-R2, Q-0005.1, Q-0005.2, Q-0010.1; FEATURES F-X13, F-A03, F-B01 to F-B03; DEVIATIONS D-013
spikes/0009-compat-plane-inventory.md; slice definitionscripts/compat-inventory/p0_slice.py(off-repo,spikes/README.md:54; #55)- Plane oracle (
oracle/v1-pin-20261018):apps/web/core/components/account/auth-forms/password.tsx:122-125,150-151,apps/web/core/services/api.service.ts:29-31 crates/thrust-api/src/lib.rs:269-293;docs/src/architecture/app.md:115-124- Beads: plane-byd.3
Blocked by: #35, #36, #37, #38, #47
Finding: FR-01
- 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