Skip to content

feat(client): pass overwrite through packages.install for upgrade flows - #3007

Merged
os-zhuang merged 1 commit into
mainfrom
feat/client-install-overwrite
Jul 16, 2026
Merged

feat(client): pass overwrite through packages.install for upgrade flows#3007
os-zhuang merged 1 commit into
mainfrom
feat/client-install-overwrite

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Why

#2971 made POST /packages return 409 Conflict on a duplicate package id (with an overwrite: true escape hatch for intentional upgrade / re-install). The SDK's client.packages.install() had no way to set that flag, so any future upgrade/re-install flow built on the SDK would hit the 409 with no recourse. (409-blast-radius audit found no current caller — this is future-proofing the API surface, tracked in objectui#2555.)

What

  • packages.install(manifest, options) options bag gains overwrite?: boolean, passed through the POST body only when explicitly set — the default request body stays byte-identical, so the server keeps rejecting duplicate ids by default.
  • JSDoc documents the 409 semantics.

Tests

First SDK tests for packages.install (client.test.ts, existing createMockClient harness):

  1. default POST body carries manifest/enableOnInstall and omits overwrite;
  2. { overwrite: true } carries the flag.

client.test.ts: 91/91 pass; tsc --noEmit clean.

🤖 Generated with Claude Code

…lows

POST /packages now 409s when the manifest id is already installed (#2971,
duplicate-id guard). The SDK's packages.install() had no way to opt into the
intentional-overwrite escape hatch, so any upgrade / re-install flow built on
it would hit the 409 with no recourse.

Add `overwrite?: boolean` to the options bag and pass it through the POST body
only when explicitly set — the default request stays byte-identical so the
server keeps rejecting duplicate ids. First SDK tests for packages.install
(default omits the flag; overwrite:true carries it).

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

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jul 16, 2026 4:44am

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

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

12 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)

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 26fe609 into main Jul 16, 2026
16 checks passed
@os-zhuang
os-zhuang deleted the feat/client-install-overwrite branch July 16, 2026 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant