Repin bc3 to 2c0dafba13 and absorb the Folders API it brings into range
Repins bc3 provenance d0edc1283b → 2c0dafba13 and absorbs the Folders API
that repin brings into range, as one change. 238 → 243 operations.
Why these are coupled
doc/api/sections/folders.md does not exist at the old pin, so the five
/stacks routes are absent from spec/bc3-routes.json today. Repinning alone
makes them appear in the route table with no operation modelling them, and the
#586 parity gate (direction 2) then demands a disposition for five routes we
have every reason to model. Absorbing alone would model a contract the pin says
isn't there. Doing both is the only coherent order.
The repin — 11 commits, one API-surface change
| Commit | What | Action |
|---|---|---|
dc6cd10714 #12384 | Folders API | absorbed (below) |
344581a379 #12494 | Drafts keep subscribers when an update doesn't address them | repin only |
2c0dafba13 #12501 | Screen a drafted entry's participants before subscribing | repin only |
19956c5579 #12488 | Web deprioritize goes exact-target | repin only — see below |
845df62b6b #12487 | action_push_native structured errors | not API surface |
112c1664bf 63a34abe30 5f889d8365 faf5fe9dfc | pre-commit hook harness | dev tooling |
1fad1ef608 c664cdc9de | Turbo-morph controller split | web only |
#12494 / #12501 are behaviour fixes to endpoints the SDK already models.
They add prose to five doc/api sections but no route and no payload field —
proven, not assumed: regenerating spec/bc3-routes.json at the new pin yields
exactly five new entries, all /stacks.
#12488 verified independently, and the brief's read of it holds. It deletes
a request.format.json? branch, which looks like an API change. It isn't. The
removed branch returned nil for JSON when the recording's own assignment
wasn't prioritized; the replacement returns that same assignment unconditionally
and &.unprioritize is a no-op when there's no priority to remove. Both
spellings target exactly the id in the URL and both answer 204. What changed
is that the web path stopped cascading to a sibling step — it adopted the
contract the JSON API has had since bc3#12483 (absorbed in SDK #528).
The absorption — FoldersService
ListFolders GET /{accountId}/stacks.json 200 bare array of Folder
GetFolder GET /{accountId}/stacks/{folderId} 200 FolderWithProjects
CreateFolder POST /{accountId}/stacks.json 201 FolderWithProjects
UpdateFolder PUT /{accountId}/stacks/{folderId} 200 FolderWithProjects
DeleteFolder DELETE /{accountId}/stacks/{folderId} 204 no body
The wire type stays Stack. The product was renamed, the payload was not.
The operations, structures and generated methods use Folder; the URI segment
and the type discriminator keep stack/Stack. Anything matching on type
must match "Stack".
Two output structures, not one. Folder is what the list returns;
only FolderWithProjects carries the expanded projects. A single shape with
an optional member would make every generated list-item type declare a field the
list response never populates.
Three required-and-nullable fields. gauges_url, color and image_url
are emitted unconditionally by app/views/api/stacks/_stack.json.jbuilder and
are commonly null, so @required models the presence and smithy-build.json
jsonAdd layers type: ["string","null"] on top — SPEC §"A third wire state",
the same treatment Wormhole.color/destination_url already get. Go types them
*string because the value is nullable, not because the key is optional.
project_ids doesn't round-trip. Create takes it; the response reports the
same ids as bucket_ids and expands them as projects. Three names, one
relationship. An unreachable id fails the whole request with 404 and writes
nothing, so CreateFolder lists NotFoundError. UpdateFolder lists
ValidationError because a blank name is a real 422 — create defaults it to
New folder instead. UpdateFolder/DeleteFolder are naturally idempotent;
CreateFolder is not.
Generator overrides: one. The Folders tag resolves to FoldersService
through every generator's default fallback (zero service-group overrides), and
ListFolders infers the folder resource type cleanly. The one addition is
GetFolder → getFolder in TS/Kotlin/Swift: the bare rule collapses it to
folder(id), a noun with no verb, while Ruby and Python already emit
get_folder. Same shape as the GetBookmark override — all six SDKs now agree.
Go note. FolderWithProjects repeats the base fields rather than embedding
Folder. Embedding promotes them correctly at runtime but hides them from
check-wrapper-drift, which walks declared fields and reported all twelve as
missing. Repeating them keeps the guard able to verify every field.
Registry and coordination
spec/api-gaps/folders-api.md→absorbed-in-sdk, sevensmithy_refs.spec/api-gaps/stack-doc-and-smithy.mdkeepsconfirmed-not-api-resource
on purpose. It records a decision that was correct when made; the supersession
note infolders-api.mdexists to preserve that history, not to be erased by
it. Registration issue #559 is already closed.spec/bc3-route-allowlist.ymlneeds no change — no/stacksentry existed
(the routes weren't in the table), and no entry became redundant.COORDINATION.mdnamed pin338b7a11, three repins stale. Now names
2c0dafba13and says the provenance file is the only authority.
Verification, with real exit codes
| Gate | Result |
|---|---|
make check | REAL_EXIT=0 |
BC3_REPO_PATH=… make bc3-routes-check | REAL_EXIT=0 |
make bc3-route-parity | REAL_EXIT=0 — five /stacks routes matched both directions |
| Swift (macOS-gated, actually ran) | swift build + swift test: 306 tests, 0 failures; swift run ConformanceRunner executed |
| Ruby | 1092 runs, 2572 assertions, 0 failures (make rb-check) |
| Python | 867 passed, mypy clean, ruff clean |
| Conformance | 147 passed, 0 failed, 1 skipped (pre-existing Go-runner origin case) |
The five new paths.json cases PASS in all six runners — Go, Kotlin,
TypeScript, Ruby, Python and Swift each got a dispatch branch, so none silently
skips. Confirmed per-runner in the log, and for TypeScript (whose summary is
compact) by a --reporter=verbose run naming all five.
Counts bumped deliberately, each derived from behavior-model.json rather than
incremented by hand: check-idempotency-parity 77/199 → 79/203;
SPEC/SECURITY/AGENTS 238 → 243 operations, 122 → 124 GETs, 47 → 48
PUTs, 23 → 24 DELETEs, 39 → 40 single-attempt POSTs, 188 → 192
retry-eligible ops at max 3.
New hand-written tests: typescript/tests/services/folders.test.ts (11),
python/tests/services/test_folders_service.py (11),
ruby/test/basecamp/services/folders_service_test.rb (14). Each covers the
list-has-no-projects / get-has-projects split and the always-present-null
decode, plus a 4xx per operation.
The API version tracks the pin date, so every SDK's API_VERSION moves to
2026-08-02.
Summary by cubic
Repins BC3 to 2c0dafba13 and adds the Folders API (/stacks) across all SDKs, introducing 5 operations and moving the API version to 2026-08-02. Operation count increases 238 → 243 with updated retry/idempotency metadata.
-
New Features
- Added
FoldersServicewith List/Get/Create/Update/Delete at/stacks.jsonand/stacks/{folderId}.json. - Two shapes:
Folder(list; noprojects) andFolderWithProjects(get/create/update; includesprojects). Wiretypestays"Stack". project_idsis input-only on create; responses returnbucket_idsand expandedprojects.gauges_url,color,image_urlare required-and-nullable.- Idempotency:
UpdateFolder/DeleteFolderidempotent;CreateFoldernon-idempotent with standard retry. Naming overrideGetFolder→getFolderin TS/Kotlin/Swift. - Services, models, and tests added in Go/Kotlin/Python/Ruby/Swift/TypeScript.
- Added
-
Bug Fixes
- Folder writes now return
FieldValidationError(field-keyed 422) instead ofValidationErrorfor create/update. Verified with new Go tests that assert JSON422 decoding. - SPEC §2 prose corrected: per-op retry.max distribution counts the five Folder ops (
max:3bucket 195 → 200; totals now match 243 ops). - Swift conformance: parse
project_idsvia the throwingintArrayhelper to avoid silent truncation.
- Folder writes now return
Post-review correction to this description
Two statements above were written before review and are superseded by what shipped:
- Both Folders writes declare
FieldValidationError, not justUpdateFolder. bc3'sstacks_controller.rbrenders{ errors: <ActiveModel::Errors> }on create (:27) as well as update (:51), via theRecordInvalidrescue — andActiveModel::Errorsserializes field-keyed, so the wire is{"errors":{"name":["can't be blank"]}}for both. The review only namedUpdateFolder;CreateFolderhad the identical defect. The TS/Python/Ruby tests already modelled the field-keyed body correctly — the spec was the wrong half. Verified by a Go test that pins the typedJSON422field and is red-proofed by failing to compile against the previous generated client (*ValidationErrorResponseContent has no field or method Errors). Wrapper-level assertions here are vacuous, becausecheckResponseparses the raw body and never reads the typed field. - "One API-surface change" should read "one newly modeled API surface." The same section already acknowledges two API behavior fixes in the repin range (bc3 #12494 / #12501), so the original phrasing undercounts what the repin carries.