Join an all-access project
Adds JoinProject in every SDK: the API's way to join an all-access project, as opening one in the web app and joining does.
Server: bc3 #13623, merged as c579a5a18c8, documented in doc/api/sections/people.md as "Join a project". bc3 #13881 later let an agent's own token join as a person does, where it had answered 403; the operation documents that current text.
Card: Admit people and agents to All-access projects through the API (bc3#13623)
What changed
JoinProject:POST /buckets/{projectId}/admissions.json, no body, empty201;404for a missing project or one whoseadmissionspolicy doesn't admit the person. On the Projects service:joinProject(TS, Swift, Kotlin),join_project(Ruby, Python, Rust),Projects().Joinin Go.- The already-on-the-project
302. When the policy admits the person and they already have access, bc3 answers302 Foundto the project and changes nothing. The SDKs' transports differ there, and the operation's doc says how: Go, TypeScript and Swift follow the redirect and return normally; Python and Ruby don't follow it but take the 3xx as success; Kotlin (Ktor follows redirects for GET and HEAD only) and Rust (never follows) raise an API error carrying302. Each SDK has a test pinning its own behavior (Swift's production transport is URLSession, whose following a POST 302 to a GET was checked by hand against a local server; its unit tests use a mock transport, which can't). - Not retried. It carries no idempotency flag: a replay after a join whose
201was lost answers that302, an error in Kotlin and Rust. A conformance case holds every SDK to one attempt on a 503, andscripts/check-idempotency-parityrecords why. GetProject's 403 withadmission_urlandadmission_methodis documented onJoinProject, not modeled as an error shape. Every SDK maps a 403 to its forbidden error by status and surfaces no error-body fields beyond the message, and the URL names this operation for a project id the caller already has. Modeling it would mean hand-written error parsing in seven SDKs for no new capability.- Gap registry:
project-join-admissionisabsorbed-in-sdk; its route-allowlist entry is gone, sobc3-route-paritynow checks the route as modeled. The provenance pin doesn't move. - MIGRATING.md: a new
# Unreleasedsection for the Go generated-interface growth and the 302 behavior.
Semver impact
Additive for every caller of the SDK services. Breaking only for Go code that implements generated.ClientInterface / ClientWithResponsesInterface itself (custom mocks must add JoinProject / JoinProjectWithResponse), as with #1053 and #1057. Release-note sections: Breaking Changes and Features (breaking, enhancement).
How it was tested
Locally on macOS, at this head:
make generateclean; every drift check (go,ts,rb,py,rs,kt,swift) passes, as do idempotency, operation-assignment, service-inventory, grouped-client, required-tags, behavior-model, url-routes, catalog, provenance,doc-constants-check,validate-api-gapsandbc3-route-parity.- Go:
go test ./...andgo vet ./...pass; four new tests (201, followed 302, 404, one attempt on 503). - TypeScript: typecheck, and 2136/2136 tests.
- Ruby: 1956 runs, 0 failures; rubocop clean on the touched test.
- Python:
make py-check, 3293 passed, 4 skipped. - Rust:
make rs-lint, andmake rs-test1121 passed; the route-count guarantees move 292 → 293. - Kotlin:
ProjectsServiceTeston the JVM, 30/30, three new. - Swift:
GeneratedServiceTests, 62/62, two new. - Conformance:
make conformancepasses; every runner reads 332 cases (two new) with 0 failures, its declared skips unchanged. - Not run locally: the
make checkwrapper as a whole, the full Swift and Kotlin suites (only the test classes above), and any live call against Basecamp. CI runs the full suites.
Summary by cubic
Adds JoinProject (POST /buckets/{projectId}/admissions.json) to every SDK, letting API clients join an all-access project the same way opening it in the web app and joining does.
Behavior
- Returns 201 with no body; 404 when the project is missing or its admissions policy doesn't admit the person.
- When the person already has access, a 302 is returned: Go, TypeScript, and Swift follow the redirect; Python and Ruby take the 3xx as success; Kotlin and Rust raise an API error carrying 302. Each SDK pins its behavior in a test.
- Not idempotent, so never retried: a replay after a lost 201 answers that 302, which is an error in Kotlin and Rust. A conformance case holds every SDK to one attempt on 503.
Migration
- Go's generated
ClientInterfaceandClientWithResponsesInterfacegainJoinProjectmethods; custom implementations must add them. All other callers are additive.