Skip to content

feat(client)!: delete projects.listTemplates() — nothing has ever mounted its route (#3702) - #3730

Merged
os-zhuang merged 1 commit into
mainfrom
fix/3702-drop-listtemplates
Jul 28, 2026
Merged

feat(client)!: delete projects.listTemplates() — nothing has ever mounted its route (#3702)#3730
os-zhuang merged 1 commit into
mainfrom
fix/3702-drop-listtemplates

Conversation

@os-zhuang

@os-zhuang os-zhuang commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Closes #3702.

What was wrong

client.projects.listTemplates() built GET /api/v1/cloud/templates. Nothing mounts that path, in either repo:

So every invocation was a 404, behind a type signature promising a resolved value.

No caller anywhere. gh search code --owner objectstack-ai returns only the definition, the two guards, and history — nothing in objectui, cloud, templates, objectos, website, builder, crm, hotcrm, mobile, objectbase.

Why option 1 (trim), not option 2 (mount)

Templates are real as datasys_package_templates, the is_starter = true view over sys_package, rendered as a console page — but have never been an HTTP route, and cloud states the position explicitly (sys-package.object.ts: there "is no separate 'template' concept"; apps/cloud/objectstack.config.ts: "No built-in environment templates: every environment is provisioned empty"). The client's declared shape ({ id, label, description, category? }) does not match sys_package's columns, so mounting a route means first deciding what a template is on the wire — a product call, not an implementation detail, and the wrong order for a method nobody calls. It returns when a route exists to back it, with an sdk ledger row proving so.

The class

Sixth instance of the method exists ≠ the method can be called, after analytics.explain/analytics.meta (#3584), meta.getView (#3611), i18n.getTranslations/getFieldLabels (#3636) — and the first one only a cross-repo guard could see: the framework capstone (#3642) exempts the /api/v1/cloud/ prefix wholesale because this repo does not serve those routes, so the finding came from cloud's control-plane ledger (#3655), the one place the mounted set and the SDK are both in scope.

Changes

Companion change required in cloud — after this merges

projects-namespace-coverage.test.ts there drives the real SDK and will go red on the next .objectstack-sha bump: it asserts methods.length >= 23 (becomes 22) and drives projects.listTemplates from its DRIVE table. The cloud PR bumps the pin and prunes the row in one commit (it cannot be green against the old pin, by design — that lockstep is the guard working):

  • drop the UNMOUNTED_CLIENT_METHODS entry → the list becomes [], and the exact-pin assertion holds it there
  • drop 'projects.listTemplates': [] from DRIVE, 2322

Verification

  • pnpm vitest run src/ in packages/client13 files / 175 tests pass, including the capstone client-url-conformance.test.ts (its controlPlane.length > 0 bound still holds; the remaining projects.* methods reach the control plane).
  • pnpm build — 71/71 tasks green with dts on (OS_SKIP_DTS unset); packages/client/dist/index.d.ts regenerated with zero listTemplates hits, which is the type-check for a method-removal.

Out of scope, filed separately

The same dead concept has a second, still-advertised half: os env create --template and projects.create({ template_id }). Filed as #3731.

🤖 Generated with Claude Code

…ounted its route (#3702)

`client.projects.listTemplates()` built `GET /api/v1/cloud/templates`. That
path is mounted by nothing: none of the 17 registrars in cloud's
`cloud-artifact-api-plugin.ts` (91 registrations, enumerated by driving them
against a capturing mock `IHttpServer`), and nothing here — the string occurs
exactly once in each repo, at the call itself. Every invocation was a 404
behind a type signature promising a resolved value.

Templates are real as DATA — `sys_package_templates`, the `is_starter = true`
view over `sys_package`, rendered as a console page — but there has never been
an HTTP route that lists them, and an org-wide code search finds no caller in
any repo. Mounting a route to satisfy a method nobody calls is the wrong
order: the client's declared shape (`{ id, label, description, category? }`)
does not match `sys_package`'s columns, so picking that mapping is a product
decision. The method returns when a route exists to back it, with an `sdk`
ledger row proving so — cloud's ledger already pins the absence
("DELIBERATELY ABSENT") and `UNMOUNTED_CLIENT_METHODS` shrinks to empty on the
companion bump there.

Sixth instance of the `the method exists != the method can be called` class,
after analytics.explain/meta (#3584), meta.getView (#3611) and
i18n.getTranslations/getFieldLabels (#3636) — and the first only a cross-repo
guard could see: the framework capstone (#3642) exempts the `/api/v1/cloud/`
prefix wholesale because this repo does not serve those routes, so the finding
came from cloud's control-plane ledger (#3655).

Audit doc and the capstone's prose updated to record the finding as resolved.

Closes #3702

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

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
objectstack Ignored Ignored Jul 28, 2026 12:52am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation tests tooling size/s labels Jul 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/client.

13 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/ai/skills-reference.mdx (via packages/client)
  • content/docs/api/client-sdk.mdx (via @objectstack/client)
  • content/docs/api/data-flow.mdx (via @objectstack/client)
  • content/docs/api/environment-routing.mdx (via @objectstack/client)
  • content/docs/api/error-catalog.mdx (via @objectstack/client)
  • content/docs/getting-started/your-first-project.mdx (via @objectstack/client)
  • content/docs/kernel/runtime-services/data-service.mdx (via packages/client)
  • content/docs/kernel/runtime-services/index.mdx (via packages/client)
  • content/docs/permissions/authentication.mdx (via @objectstack/client)
  • content/docs/plugins/packages.mdx (via @objectstack/client)
  • content/docs/protocol/kernel/realtime-protocol.mdx (via @objectstack/client)
  • content/docs/releases/implementation-status.mdx (via @objectstack/client)
  • content/docs/releases/v16.mdx (via @objectstack/client)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

@os-zhuang
os-zhuang merged commit 5e55739 into main Jul 28, 2026
16 checks passed
@os-zhuang
os-zhuang deleted the fix/3702-drop-listtemplates branch July 28, 2026 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

client.projects.listTemplates() targets /api/v1/cloud/templates, which nothing mounts

1 participant