feat(templates): model start_date on project construction
What
POST /templates/:id/project_constructions.json has accepted project[start_date] since 2022 (bc3 project_operations.rb#project_from_template_params), but ProjectConstructionAttributes modeled only name and description, so no SDK could anchor a constructed project's template dates to a chosen week. Surfaced by basecamp-cli#659; tracked on this card. The bc3 doc side is basecamp/bc3#13259.
spec/basecamp.smithy:ProjectConstructionAttributes.start_date: ISO8601Date, optional, with the anchoring rule in its doc comment — template dates are relative to the template's first week, weeks start on Sunday, so the project's dates land on the Sunday on or beforestart_date; omitted, they anchor to the week the construction is processed (Template::RelativeDates#rebase,Template::ProjectBuilder#new_project_start_date).- All six SDKs regenerated (
make generate). Five of them take the request body as a generated struct or plain map, so they pick the field up with no hand-written change. The Go wrapper'sCreateProject(ctx, templateID, name, description)is positional, so it gains a variadic...*CreateProjectOptions{StartDate}in theCreateLine/CreateLineOptionsidiom; the existing call shape compiles unchanged, and an emptyStartDateis omitted from the wire rather than sent blank. - Not a repin: the field predates the current provenance pin, so
spec/api-provenance.jsonis untouched.
Tests
conformance/tests/project_constructions.json(2 cases), dispatched in all six runners —CreateProjectFromTemplatehad no dispatch arm anywhere until now. Case 1 pins the literal wire body{"project":{"name","description","start_date":"2026-09-01"}}via nestedrequestBodyassertions plusrequestBodyAbsenton the top-level keys; case 2 pins that an unsetstart_dateis absent, notnull/"". SPEC §19 Test Categories and Appendix D carry the new fixture's rows.- Per-SDK unit tests from each SDK's own request capture: Go (
TestTemplatesService_CreateProjectStartDate, both the carried and the omitted shape), TypeScript, Ruby, Python, Kotlin, Swift.
Gate
make check-targets -k locally on macOS: every target green including all six conformance runners (228 cases, my two executed in each) and check-fixture-execution, except lint-actions, which reports the 7 pre-existing zizmor self-repository lows that are unrelated to this change. doc-constants-check re-run after the SPEC rows.
breaking label
CI's apidiff reports one incompatible change: (*TemplatesService).CreateProject changed from func(context.Context, int64, string, string) to func(context.Context, int64, string, string, ...*CreateProjectOptions). Every existing call compiles unchanged; only a func value or an interface naming the old signature has to add the parameter. The label acknowledges the verdict, and MIGRATING.md carries the note under Unreleased. The other five SDKs take the attributes as a struct or map and are additive (ProjectConstructionAttributes.StartDate and CreateProjectOptions are apidiff's two compatible additions).
I'm babysitting the review loop on this PR through to convergence.
Release note: Features (enhancement).
Summary by cubic
Adds optional start_date to project construction so SDKs can anchor a template-built project's dates to a chosen week. The endpoint has accepted project[start_date] since 2022, but ProjectConstructionAttributes only modeled name and description.
- Regenerates all six SDKs; the Go wrapper takes the field via a new variadic
CreateProjectOptions(more than one options argument is rejected), so existingCreateProjectcalls compile unchanged. - Adds two conformance cases pinning the wire body:
start_dateunder theprojectenvelope when given, omitted when not. - Template dates anchor to the Sunday on or before
start_date; omitted, they anchor to the week the construction is processed. MIGRATING.mddocuments the Go signature change; code holdingCreateProjectas a func value or in an interface must add the variadic parameter.