Repository navigation
Closed
Labels
area:appcore, ports, adapters, HTTPprio:p0review:fable-2026-10-19filed from the Fable architecture review
Milestone
Description
Context
thrust_api::router() (crates/thrust-api/src/lib.rs:269-293) mounts the slice's routes under /api/v1/projects/{project_id}/work-items... and /api/v1/projects/{project_id}/activity (:278-291). The contract suite builds the same paths (crates/thrust-contract-tests/src/lib.rs:145-146, wi_path; tests/contract.rs:398), and so does the bench (src/bin/bench.rs:72). docs/src/flows/app.md:16-23 and :68 document them, and docs/src/testing/by-change.md:17 states "Every public route is under /api/v1".
Problem
- In Plane,
api/v1/is the public API (apps/api/plane/urls.py:21). Its work-item routes are/api/v1/workspaces/<slug>/projects/<uuid:project_id>/work-items/, with a trailing slash, anactivities/collection and attachments keyed by id (apps/api/plane/api/urls/work_item.py:100-145). - The slice's routes have no workspace slug, no trailing slash and attachments keyed by name. They are neither Plane-shaped nor documented as anything else, so the prefix misleads (FR-06).
- ADR-0031 makes
/api/v1wire-compatible, and ADR-0122's oracle checks it against Plane. A non-Plane route under that prefix falls outside what the oracle checks, yet any client reads it as part of the public API. - FR-06 also defers the core OpenAPI surface (ADR-0032) to M4. At P0 the router has two surfaces, compat-plane and
/api/v1, and the slice routes belong to neither.
Proposal
- Move the slice routes under one prefix constant in
thrust-apithat is neither Plane's nor/api/v1. Suggested:/api/_slice/....- Plane mounts only
api/,api/public/,api/instances/,api/v1/andauth/(apps/api/plane/urls.py:18-22), and noplane.approute starts with an underscore. - The prefix stays inside the
/apipatterns thatrun_worker_firstand the Access bypass already list (ADR-0011 round 26, ADR-0090 round 25).
- Plane mounts only
- Update
wi_path, the literal attests/contract.rs:398, and the bench. - Add a contract test that the old path, with the workspace slug that feat(core): user-only
Principal, database-authoritative sessions, deleteKvSessionStore#36 added, answers 404; it is the control and fails before the move. - Update the route table and sequence diagram in
docs/src/flows/app.md, anddocs/src/testing/by-change.md:17and:31. Track A notes the pending rename (handoff A5.5). - When the
/api/v1routes from feat(api): /api/v1 projects, states, labels and work items with the oracle gate on those operations #58 replace these endpoints (feat(compat): the 48-route minimum slice with the auth-client JSON change #44 supplies the compat routes, not the replacements), move the contract suite onto them, delete the_sliceroutes and retire the retired-prefix test.
Acceptance criteria
-
grep -rn '"/api/v1' crates/thrust-api/src crates/thrust-contract-testsprints only theRETIRED_SLICE_PREFIXconstant intests/contract.rs, the one place the suite names the old prefix, on purpose. -
scripts/contract-all.shis green on all 16 cells, withEXPECT_MAINraised from 20 to 21 for the new test. - A new contract test shows each of the eight slice routes, requested through
/api/v1/workspaces/{slug}/projects/{id}/...with a real token, slug and project, answering a routing 404 on every target. Control: it fails against the router before the move. (POST /api/v1/projects/{id}/work-items, without the slug, has answered 404 since feat(core): user-onlyPrincipal, database-authoritative sessions, deleteKvSessionStore#36, so a test on it would pass before the move and prove nothing.) -
docs/src/flows/app.mdanddocs/src/testing/by-change.mdshow the new prefix. ADR-0034 and ADR-0032 (round-29 notes) state the two P0 surfaces.
References
- Review: .agents/plans/contrail/reviews/2026-10-19-fable-architecture-review.md (FR-06)
crates/thrust-api/src/lib.rs:269-293;crates/thrust-contract-tests/src/lib.rs:145-146;tests/contract.rs:398;src/bin/bench.rs:72docs/src/flows/app.md:16-23,:68;docs/src/testing/by-change.md:17,:31- Plane oracle (
oracle/v1-pin-20261018):apps/api/plane/urls.py:18-22;apps/api/plane/api/urls/work_item.py:100-145 - ADR-0031, ADR-0032 (round-29 note), ADR-0034 (round-29 note), ADR-0122, ADR-0011, ADR-0090; SPEC R-F7; Q-0030.2
Finding: FR-06
Amended 2026-10-23 with the owner while planning the work (PR #75): the contract-test bullet and the last bullet of the proposal, and the first three acceptance criteria, for the reasons given in them.
Metadata
Metadata
Assignees
Labels
area:appcore, ports, adapters, HTTPprio:p0review:fable-2026-10-19filed from the Fable architecture review
Activity