Skip to content

api drops the public surface library-api-public now holds - #176

Merged
jmbarzee merged 3 commits into
mainfrom
claude/api-drop-public
Nov 21, 2026
Merged

jmbarzee merged 3 commits into
mainfrom
claude/api-drop-public

Conversation

@jmbarzee

Copy link
Copy Markdown
Contributor

api carries only the authenticated contract, /metacensus/api/v1. The public surface lives in @metacensus/library-api-public.

Removed

  • proto/metacensus/public, its generated Go and TypeScript, ts/public.ts, the ./public export
  • PublicClient, PublicPrefix/publicPrefix, and PartnerRoutes from the regenerated client, manifest and server
  • make breaking-public and CI's origin/main baseline fetch, which existed only for the public surface
  • the tests' public-prefix branches, the cross-package field rule, and the entry-point ownership check, which only kept the two surfaces apart

Kept

  • routegen still emits one client, prefix and server set per model.Packages entry. There is now one entry. Collapsing that machinery would change the exported Route.Prefix field, so it is left out of this PR.

Prose

  • README, AGENTS.md, ts/README and the package description name only /metacensus/api/v1 and point to library-api-public.

No live importers

  • gh search code for @metacensus/api/public and metacensus/public/v1 finds hits only in api.
  • Every dependent was checked: service-api-standard, service-api-chain and service-ui import neither. service-public-api and service-ui-public import library-api-public 0.1.0.

Release

  • This needs a minor release with a note naming library-api-public.

Verification

  • make check && ! git grep -q 'metacensus/public' -- proto go ts exits 0.

Closes #174

🤖 Generated with Claude Code

jmbarzee and others added 3 commits November 21, 2026 15:44
metacensus.public.v1, its generated Go and TypeScript, the ./public
export, PublicClient and breaking-public leave api; the README, AGENTS.md
and the package description name /metacensus/api/v1 only and point to
metacensus/library-api-public for the public surface.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@jmbarzee jmbarzee left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pass

Reviewed at 45d3801. Reviewer and author share one identity, so this is a comment review headed with the verdict.

Summary

  • model.Packages, which lists every contract surface routegen emits, changed: drops the metacensus.public.v1 entry so api emits only /metacensus/api/v1
  • proto/metacensus/public and its generated Go/TS, which held the partner-intake surface, changed: deleted; ts/public.ts and the ./public export go with them
  • routes_gen.go, route-manifest, client.ts, which are regenerated from the model, changed: PartnerRoutes, PublicPrefix/publicPrefix, PublicClient gone
  • make check / CI, which gate the contract, changed: breaking-public and the origin/main baseline fetch removed
  • contract tests and check-entry-points.mjs, which kept the two surfaces apart, changed: cross-package field rule, entry-point ownership check and public-prefix branches removed; single-prefix assertions kept
  • README, AGENTS.md, ts/README, package description, which describe the package, changed: name only /metacensus/api/v1 and point to @metacensus/library-api-public
  • routegen's per-package machinery, which emits one client/prefix/server per entry, kept as-is (declared in the body)

Focus

  1. If wrong: a consumer still importing @metacensus/api/public or go/metacensus/public/v1 breaks on its next bump. Checked: service-ui-public and service-public-api import library-api-public 0.1.0 on main; service-ui, service-api-standard, service-api-chain reference neither; gh search code hits only api.
  2. Irreversible: the minor release (v0.13.0) publishes an npm version and Go module tag without ./public; nothing in this PR itself.
  3. Most likely wrong about: nothing found; the release note (criterion 4) happens after merge and is not something this diff can hold.
  4. Cells: check-cells --diff: 0 errors, no mapping in api.
  5. Verification: make check && ! git grep -q 'metacensus/public' -- proto go ts exits 0 on head; the grep fails if any public proto, generated code or import is left. Criteria 2–4 are not in the block by the issue's design.
  6. Scope: does what #174 asks and nothing else.

Checks

  • CI: Verify and service-api-chain api-check pass
  • Verification block exits 0 locally; make gen leaves no diff
  • Dependents checked on their main
  • elegance (inline read, not the agent): no residue describing the removed surface
  • open-source: no secrets; the only new external names are public npm @metacensus/library-api-public and its Go module path

Nits (apply or leave)

  • The generated manifest header still says "One manifest for every surface … Each surface has its own prefix:" over a one-row table, and clientgen says "one client per surface". Consistent with keeping the per-package machinery, which the body declares.
  • README line 3 names the Go module github.com/metacensus/library-api-public, which a public reader cannot fetch while that repo is private. The npm link is enough on its own.

Before landing

Cut a minor release with a note naming library-api-public (criterion 4).

@jmbarzee

Copy link
Copy Markdown
Contributor Author

Both nits are declined:

  • "per surface" wording. routegen still emits one set per model.Packages entry, so "every surface" and "per surface" describe what the generator does.
  • The Go module name in README. service-public-api depends on github.com/metacensus/library-api-public, so a Go reader needs that name. The npm link covers TypeScript readers.

No change since 45d3801.

@jmbarzee
jmbarzee added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit e138583 Nov 21, 2026
2 checks passed
@jmbarzee
jmbarzee deleted the claude/api-drop-public branch November 21, 2026 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

api drops the public surface library-api-public now holds

1 participant