Adopt basecamp-sdk v0.12.0 and cover the surface it opened up
Supersedes #610, which is closed. This is now one complete SDK landing unit:
the bump and the coverage that documents it, targeting main.
#610 split the bump into its own PR. Review correctly rejected that as an
invalid landing unit — at 4e232e9e, go.mod pinned v0.12.0 while
API-COVERAGE.md still said v0.11.0 and none of the 20 new methods were
covered, contrary to AGENTS.md's completeness bar. Merging the two avoids that
without rewriting any commits.
Contents
| Commit | What |
|---|---|
4e232e9e | SDK v0.12.0 bump + nil at the 11 changed Everything() call sites + vendorHash |
746201f2 | bookmarks and drafts — the two personal feeds |
1d549e5e | notes and calendars |
c2de7f67 | the Up Next verbs, and the id they need surfaced |
bb89073a | remaining v0.12.0 operations on todos and checkins |
05ae2442 | the five BC5 sections tracked, plus two corrected counts |
4577db37 | three defects review found (below) |
Every new SDK service method gets the full treatment: command file, catalog
entry, registration in root.go and commands_test.go, API-COVERAGE.md row.
Defects review found, now fixed (4577db37)
notes set could silently discard piped content. notesContent checked
stdin only after an argument and --file had been ruled out, so
generate | basecamp notes set --file fallback.md overwrote the note from the
file and threw the generated body away — in the one command that replaces
everything, and against the function's own doc comment. All three sources are
now detected before any is chosen; naming two is a usage error. An empty pipe
stays a non-source so a redirected-but-empty stdin does not break a valid
--file call.
checkins reminders silently ignored explicit scope. --project, --in
and --questionnaire are persistent flags on the checkins parent, so cobra
accepted them on a subcommand whose handler always calls the account-wide
endpoint. The caller believed the request was scoped and got every project's
reminders back with nothing saying otherwise. All three are now rejected before
the request.
The 400 exit-code claim in API-COVERAGE.md was wrong. It said a 400's exit
code moves from 7 to 9. It does not: internal/output defines no validation
mapping and clioutput defaults an unrecognised code to ExitAPI, so a 400
still exits 7 — only its JSON code changed api_error → validation.
Exit 9 is not reachable from the CLI. This correction had been established
before and never reached the repository.
Both behavioural fixes have no-request tests (pipe+argument, pipe+file, and each
of the three scope flags), and both were mutation-checked — reverting either
guard fails exactly its own test and nothing else.
Verification
bin/ciexit 0 at this head.- Targeting
main, so the full remote suite runs on this PR — including the
Nix build that gatesvendorHash. That was not true of the stacked
arrangement:test.ymlispull_request: branches: [main], so #611 and #612
previously ran onlylabeland the sensitive-change gate. - goldmark moved 1.8.4 → 1.8.5 on rebase, and
notesrenders through
richtext.MarkdownToHTML. Rendering one corpus (headings, nested lists,
tables, fenced code, footnotes, emoji, raw HTML, hard breaks, entities) under
both versions gives byte-identical output. Livenotes set --file→
notes showround-trip against production also clean; test note restored
byte-for-byte.
Backups: backup/sdk-0.12.0-pre-rebase, backup/bc5-command-surface-pre-rebase.