Skip to content

fix(packages): register PATCH /packages/:id so edit-manifest reaches the handler#2995

Merged
os-zhuang merged 1 commit into
mainfrom
fix/packages-patch-route
Jul 16, 2026
Merged

fix(packages): register PATCH /packages/:id so edit-manifest reaches the handler#2995
os-zhuang merged 1 commit into
mainfrom
fix/packages-patch-route

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Problem

handlePackages has handled PATCH /packages/:id (edit a package's name / description / version) since the edit-manifest feature landed, but the route was never mounted in dispatcher-plugin. Only GET/DELETE /packages/:id and PATCH /packages/:id/enable|disable were registered.

Result: PATCH /packages/:id returns 405 Method Not Allowed (Allowed: DELETE, GET, HEAD) over HTTP, so the Studio "edit package" form silently fails end-to-end. Found while dogfooding the Studio builder header-refresh (objectui).

Fix

Register server.patch('/packages/:id') mirroring the existing GET/DELETE /:id handlers, forwarding req.body/req.query to handlePackages(..., 'PATCH', ...). /:id is a single path segment so it does not shadow the /:id/enable|disable routes.

Test

Adds a route-registration regression test in dispatcher-plugin.routes.test.ts (same harness/class as the /ready seam bug #2217): asserts PATCH /api/v1/packages/:id is mounted. dispatcher-plugin.routes.test.ts passes (6 tests).

🤖 Generated with Claude Code

…the handler

handlePackages has handled `PATCH /packages/:id` (edit a package's name /
description / version) all along, but the route was never mounted in
dispatcher-plugin — only GET/DELETE `/:id` and PATCH `/:id/enable|disable`
were. So `PATCH /packages/:id` 405'd over HTTP and the Studio "edit package"
form silently failed (surfaced dogfooding the builder header refresh).

Register the missing route, mirroring the GET/DELETE `/:id` handlers. `/:id`
is a single path segment, so it does not shadow the `/:id/enable|disable`
routes. Adds a route-registration regression test (same class as the /ready
seam bug, #2217).

Co-Authored-By: Claude Opus 4.8 <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 1:51am

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

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

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

  • content/docs/api/index.mdx (via @objectstack/runtime)
  • content/docs/api/wire-format.mdx (via @objectstack/runtime)
  • content/docs/automation/hook-bodies.mdx (via @objectstack/runtime)
  • content/docs/concepts/north-star.mdx (via packages/runtime)
  • content/docs/data-modeling/drivers.mdx (via @objectstack/runtime)
  • content/docs/deployment/index.mdx (via @objectstack/runtime)
  • content/docs/deployment/production-readiness.mdx (via @objectstack/runtime)
  • content/docs/deployment/single-project-mode.mdx (via @objectstack/runtime)
  • content/docs/deployment/vercel.mdx (via @objectstack/runtime)
  • content/docs/getting-started/your-first-project.mdx (via @objectstack/runtime)
  • content/docs/permissions/authentication.mdx (via @objectstack/runtime)
  • content/docs/plugins/packages.mdx (via @objectstack/runtime)
  • content/docs/protocol/kernel/http-protocol.mdx (via @objectstack/runtime)
  • content/docs/protocol/kernel/index.mdx (via @objectstack/runtime)
  • content/docs/protocol/kernel/lifecycle.mdx (via @objectstack/runtime)
  • content/docs/releases/implementation-status.mdx (via @objectstack/runtime)

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 9c8cf9c into main Jul 16, 2026
16 checks passed
@os-zhuang os-zhuang deleted the fix/packages-patch-route branch July 16, 2026 01:56
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