Repository navigation
Closed
Labels
area:appcore, ports, adapters, HTTPprio:p0review:fable-2026-10-19filed from the Fable architecture review
Milestone
Description
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 (feat(compat): the M2 daily-use screens (acceptance list) with every other route stubbed and recorded #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 spike(auth): the two-day Rust auth slice (argon2id, sessions, CSRF, API keys, one OIDC login) #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 spike(auth): the two-day Rust auth slice (argon2id, sessions, CSRF, API keys, one OIDC login) #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(feat(core): makeScopethe argument of every repository andTxmethod #35) and the user-onlyPrincipal(feat(core): user-onlyPrincipal, database-authoritative sessions, deleteKvSessionStore#36), on the engine spike(db): run spike 0002 with aworker-pgcell and an instance-levelworker-doSQLite cell #37 decides. Plane-shaped request and response types stay inside the crate (chore(contracts): keep compat DTOs out ofthrust-contracts; add thecheck-deps.shrule #52), and/api/v1stays free for wire-compatible routes (chore(api): move the slice's routes out of the/api/v1prefix; reserve it for wire-compatible routes #47). - Hold the list rows (S17, S47) to the round-trip budget from chore(worker): set
placement.region = aws:us-east-1; add the 5-round-trip budget counter to the contract suite #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 test(e2e): Playwright journey suite on the stock React app as the UI oracle #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; chore(plans): bring the compat-inventory and spike-0004 scripts into this repository undertools/#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
Metadata
Metadata
Assignees
Labels
area:appcore, ports, adapters, HTTPprio:p0review:fable-2026-10-19filed from the Fable architecture review
Activity
Scopethe argument of every repository andTxmethod #35Principal, database-authoritative sessions, deleteKvSessionStore#36worker-pgcell and an instance-levelworker-doSQLite cell #37/api/v1prefix; reserve it for wire-compatible routes #47plane_500()helper for reproduced 500s; compat parity scoped to the acceptance list #51thrust-contracts; add thecheck-deps.shrule #52test(compat): thrust-compat-plane with a fixture recorder and parity …
6 remaining items
feat(compat): work items, the list, the create and the detail: S47, S…
feat(compat): work item change and history: X03, X02, and the sub wor…
docs(plans): bring the M0 and M1 status rows up to 2026-11-11 (#118)
feat(compat): the asset stage, S28, S29, S31 and S33 (#124)
Merge origin/main into feat/web-auth-client-json
test(adapters-selfhosted): reach the asset model's situations by cons…
feat(e2e): the first browser journey, the stock app against a Worker …
aRustyDev commentedon Nov 12, 2026
Closing #44: the walking skeleton runs, and what is not measured
The stock React app now signs a user up, onboards them, makes a workspace, a project and a work item, and lists it, against the Worker with the Cloudflare set, with no 404 in the browser's network log. Five acceptance criteria, in order.
1. Every row has a route and a
parity_test against the pinDone, and more. The acceptance list is now a file (
crates/thrust-compat-plane/tests/parity/acceptance.csv): 56 rows, S01 to S48 and X01 to X08, all served, each with a fixture recorded from the pinned Plane (69 fixtures, oneparity_test each).scripts/check-acceptance-list.shholds the list, the fixtures and the oracle recorder to the same rows in CI. Controls: a mutated fixture fails (parity_control_*intests/parity.rs), and so do a missing, extra or pending row.X04 to X08 are routes the 48 rows lack: the onboarding call (X04), a cover's own address (X05), sign-out (X06), and two stubs the first journey needs (X07 stickies, X08 cover pictures). PRs: #79 to #85, #97, #120, #124, #127, #129, #130, #132.
2. Contract tests on all four targets
The
mainpass (62 tests) runs onnative-memory,native-pg,worker-memoryandworker-cfin CI, and was green on the last PR. Among them, a slice read with no session is 401 (S02 answers a JSON object with noid:compat_users_me_without_a_session_is_401_json_with_no_id), and a caller without the role is 403 with the pin's two bodies (errorfrom its decorator,detailfrom a permission class): a stranger to the workspace, a member outside a project, and the rest. The guest rows are in the hermetictests/workspace_load.rs. S17 and S47 send 3 statements per list against the budget of 5, measured onnative-pgandworker-cf(G-24).3. Q-R2: only the auth client differs from the pin
The command as written,
git diff --stat ba85d4d3d3 -- apps/web packages, cannot run in this repository: the import is a vendored copy (web/SOURCE) and the pin's objects are not here. Its equivalent isscripts/check-web-diff.sh(CI jobweb): it compares tree hashes againstweb/PIN-MANIFESTand requires the set of files that differ to equalweb/ALLOWED-CHANGESexactly. Result: 3869 files, 2 differ:apps/web/components/account/auth-forms/password.tsxandapps/web/services/auth.service.ts. The base URL is empty at build time (same origin), so it needed no edit, and the collab provider and branding are untouched. (The issue'sapps/web/core/...paths have nocore/segment at the pin.)Narrower than proposed: only
password.tsxandsignOutchanged.unique-code.tsx,reset-password.tsx,hooks/oauth/core.tsxandpackages/services/.../auth.service.tsstay at the pin, because the server routes they call (magic code, password reset, social login) are not built, and a client change would only move the failure.4. The journey
#132:
e2e/journey.spec.tsdrives the built app in Chromium against the Worker, which serves it. It fails on any 404 or 5xx (the allowlist is empty) and cannot pass without proving something:/_infomust say CSRF enforcement is off, the app's files must be files and not the fallback page (a missing hashed asset is a 200text/html), a minimum of API responses, a 201 for the work item and the list after a reload with the title on it. Its control, a route answering 404 in the browser, must fail it by naming the 404.worker-cf e2eis a cell of the contract matrix, green in CI (35 of 35 checks). It is the first #45 journey.5. Actual pd, and the two tripwires
Actual pd per effort class was not recorded. There is no time log, pd is the owner's attention (
PLAN.md), and the model's unit costs are inputs, not measurements. So this comment gives a bound, not a figure.placement.region = aws:us-east-1; add the 5-round-trip budget counter to the contract suite #39, chore(infra): authenticated TLS to CNPG through a Cloudflare Origin CA server certificate andverify_ca(infra repo work, tracked here) #41, chore(worker): single-Worker topology; remove the Workflow binding,entry.mjs, the DO rate limiter and theSELFbinding #43, feat(api): /api/v1 projects, states, labels and work items with the oracle gate on those operations #58 and the rest), so it overstates the slice. It understates only by whatever was done before test(compat): thrust-compat-plane with a fixture recorder and parity harness, serving S01 and S02 #79 was opened; a further week would make it 26 pd.A measured figure can still be added to this issue by the owner; ADR-0034's re-check would then use it.
Deviations and decisions
Each is in
DEVIATIONS.md, with the pin's behaviour beside it.workspace_seedis not reproduced in M1; port it after).workspaces_existread live), D-026 (a project's lead must be a member), D-027 (three project fields hold less), D-028 (work items listed flat and unfiltered), D-029 (X03 and X02 in six ways), D-035 (the asset stage builds the cover only), D-036 (sign-out).Known gaps (G-30, G-29)
GET .../work-items/{id}/description-versions/, which the pin answers and Thrust does not: a 404 outside this journey.web/alone runs thewebjob (the Q-R2 gate and a build) and not the journey's cell: the classifier keepsweb/out ofrust.Follow-ups
workspace_seedport (D-024): feat(compat): port Plane's workspace_seed, so a new workspace is not empty #138.description-versions, and whatever else opening a work item calls: not a separate issue, because feat(compat): the M2 daily-use screens (acceptance list) with every other route stubbed and recorded #46's criteria already cover it; the details are in a comment on #46.feat(e2e): the journeys as a suite, with a target guard, a count guar…
docs(contrail): record the owner's confirmation of D-023, D-025 to D-…
docs(contrail): measure what the zxcvbn crate would cost the Worker (#…
docs(contrail): measure the first zxcvbn call's CPU on Cloudflare (#171)
chore(contrail): keep the zxcvbn measurement harness, tests, results …
test(core): reach the asset model's situations by construction, not b…