feat(projects): add recent-projects operations
bc3#13043 (merged to master) exposes the per-user recent-visit log in the API. This PR absorbs both halves into the spec and all six SDKs:
ListRecentProjects—GET /my/recent_projects.json: the projects the current user has most recently visited, most recent visit first. Reads the raw visit log — capped at the 50 most recent visits, keeping only active projects the person can still access — so the response is a single page and the operation carries no pagination traits. Each entry is the standard project projection plusbookmarked(the wire omitsstarredhere, unlikeGET /projects.json; harmless sinceProject.starredis optional).RecordProjectVisit—POST /projects/{projectId}/recent_visit.json,204 No Content, newly documented by the same bc3 PR: records a visit so CLI/SDK project opens feed the same list the web does. Re-recording a visit refreshes the same entry, so the POST is naturally idempotent (@basecampIdempotent(natural: true), joining the other eight idempotent POSTs). Visits to archived/trashed projects are accepted but not recorded; an inaccessible project answers 404.
What's in the change
- Spec: two operations + shapes in
spec/basecamp.smithy, taggedProjects; output reuses the existingProjectshape. - Generated:
make generateacross all six SDKs (OpenAPI, behavior model, url-routes, per-language services/metadata/types). - Go wrapper:
Projects().ListRecent(ctx)andProjects().RecordVisit(ctx, id)over the generated client only;grouped-client-inventory.ymlrows. - Conformance: path cases for both operations, an idempotency retry case for the POST, dispatch entries in all six runners, and the Ruby GET-only-retry waiver (runner skip lists +
spec/zero-skip-roster.yml, SPEC roster re-rendered). A live read-only case forListRecentProjectsjoinslive-my-surface.json, with the decoder registered in all five replay/dispatch tables; the deliberately pinned counts incheck-replay-decoder-parity(31 → 32 live ops) andcheck-idempotency-parity(85 → 86 idempotent, 210 → 212 union) advance with it. - Fixture:
spec/fixtures/projects/recent.json— the bookmarked-only projection, most recent visit first, with one unpinned entry so the flag is exercised both ways; consumed by the Go fixture tests. - Tests: happy path + error case for both operations in TypeScript, Ruby, Python, Kotlin, Swift, and Go.
- Repin: provenance advances to the bc3 revision that shipped #13043, with the
824013d672d..88549ca619erange triaged inspec/api-gaps/README.md(49 commits; #13042/#13037 were already absorbed by #835/#834, and #13040's delegated-eventsperformed_byfield is registered as a newaddressed-in-bc3-pr-13040gap entry rather than absorbed here).spec/bc3-routes.jsonregenerated at the new pin: 377 → 379 routes, exactly the two new recent-projects routes. New gap entryrecent-projects.mdrecords the absorption.
Verification
make check-targets run locally: green end to end with two disclosed local-toolchain gaps, both in files/lanes this PR barely touches and where remote CI is authoritative — lint-actions (the local zizmor flags pre-existing workflow style in untouched workflow files) and the Swift test lanes (swift test cannot resolve XCTest under this machine's CommandLineTools; swift build succeeds, and the Swift SDK + generator drift checks pass). Conformance suites pass across the mock runners, including the two new path cases and the new idempotency case; the Python/Ruby replay-runner unit suites and check-replay-decoder-parity were re-run green after the decoder registrations.
Tracking card: Add recent-projects API to basecamp-sdk
Summary by cubic
Adds the recent-projects API to the spec and all six SDKs so SDK-driven project opens can read and feed the same per-user recent-visit list the web uses.
New Features
ListRecentProjects—GET /my/recent_projects.json, unpaginated; entries are the standardProjectprojection plusbookmarked(starredis omitted on the wire, which is harmless since it's optional).RecordProjectVisit—POST /projects/{projectId}/recent_visit.json, returns204; re-recording refreshes the same entry, so the POST is naturally idempotent and joins the retry-eligible POSTs.- Visits to archived or trashed projects are accepted but not recorded; an inaccessible project answers
404.
Across the SDKs
- Regenerates all six SDKs and the OpenAPI/behavior-model metadata, reflowing the new operations' Smithy docs so generated method summaries render fully; Go adds
Projects().ListRecent(ctx)andProjects().RecordVisit(ctx, projectID)wrappers, and TypeScript, Kotlin, and Swift override resource types so both operations reportprojecttelemetry. The Go test assertsbookmarkedsurvives the wrapper conversion andstarredstays false when the wire omits it. - Conformance adds path cases for both, an idempotency-retry case for the POST (waived in Ruby under its GET-only retry rule), a live read-only
ListRecentProjectscase with decoders in all five replay tables, 403 error-path tests for the list in Python, TypeScript, and Ruby, and the TypeScript, Kotlin, and Swift runners now carry the decoded list result like the Go runner does. - Provenance repins to the bc3 revision shipping #13043;
bc3-routes.jsongoes 377 → 379 routes and the triage absorbsrecent-projectsand registers adelegated-events-performed-bygap. make check-targetsis green locally except two disclosed toolchain gaps in untouched lanes (lint-actionsworkflow-style flags and SwiftXCTestresolution).