Adopt basecamp-sdk v0.12.0 and cover the surface it opened up

Merged
JE
4mo ago
+3940-64

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

CommitWhat
4e232e9eSDK v0.12.0 bump + nil at the 11 changed Everything() call sites + vendorHash
746201f2bookmarks and drafts — the two personal feeds
1d549e5enotes and calendars
c2de7f67the Up Next verbs, and the id they need surfaced
bb89073aremaining v0.12.0 operations on todos and checkins
05ae2442the five BC5 sections tracked, plus two corrected counts
4577db37three 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/ci exit 0 at this head.
  • Targeting main, so the full remote suite runs on this PR — including the
    Nix build that gates vendorHash. That was not true of the stacked
    arrangement: test.yml is pull_request: branches: [main], so #611 and #612
    previously ran only label and the sensitive-change gate.
  • goldmark moved 1.8.4 → 1.8.5 on rebase, and notes renders 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. Live notes set --file →
    notes show round-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.