Skip to content

DB-created base packages vanish from GET /packages after server restart #2532

Description

@os-zhuang

Found while browser-demoing the login→build journey.

Repro

  1. POST /api/v1/packages {id:'com.example.support', name:'客服中心'} → 201; GET /packages lists it (writable base). Author objects into it, publish — all works.
  2. Restart the server on the same database.
  3. GET /api/v1/packages no longer lists com.example.support. The package's metadata rows survive (published objects still load and their data tables still serve), but the package registration itself is gone — so the Studio builder landing/switcher can't show it, and POST /packages/:id/publish-drafts presumably has nothing to bind to.

Expected: DB-created (runtime/base) package registrations rehydrate on boot, like their metadata does.

Workaround: re-POST /packages with the same id after restart re-attaches (existing metadata keeps its packageId).

Likely area: package registry rehydration on boot only covers code/registry packages (and marketplace installs?), not bare runtime-created bases. Related: ADR-0070 package-first authoring; the pillar Studio builder (objectui#2175) surfaces writable bases from GET /packages.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions