Skip to content

fix(all): avoid double-registration when serving the composed env#10

Merged
xuyushun441-sys merged 1 commit into
mainfrom
fix/all-double-registration
Jun 1, 2026
Merged

fix(all): avoid double-registration when serving the composed env#10
xuyushun441-sys merged 1 commit into
mainfrom
fix/all-double-registration

Conversation

@xuyushun441-sys
Copy link
Copy Markdown
Contributor

Found during browser testing

Driving objectstack dev all through the browser (login → all 9 apps → studio) surfaced a real bug.

The compile-input store was named .objectstack/installed-packages/ — which is the runtime's reserved live-install folder. MarketplaceInstallLocalPlugin auto-rehydrates that folder at boot, so when serving the composed --artifact, every app got registered twice:

[ObjectQL:registerApp] id=undefined flows=2 ...
[Registry] Overwriting package: undefined

This redundant double-registration destabilized the dev server.

Fix

Move the compile-input store to .objectstack/marketplace-packages/ so the composed artifact is the single source of truth at serve time. A genuine marketplace install in installed-packages/ is still folded into the compile if present.

Verified

  • Clean boot: env registered exactly once, no id=undefined / Overwriting package.
  • All 9 apps load and serve seed data from one runtime (compliance 6, content 14, contracts 6, expense 5, helpdesk 9, hr 7, procurement 4+5, pm 3, todo 16).
  • Dashboards aggregate correctly (helpdesk: SLA-breaching 6, angry 2, awaiting-triage 1).

Also documented (per-template, out of scope here)

  • Partial zh-CN coverage: dashboard/KPI/view labels stay English under Chinese locale.
  • "My Work" dashboards empty for a fresh admin (seed records owned by seed users).
  • Added pnpm clean; README gains a Verified section + the rationale.

🤖 Generated with Claude Code

Browser testing surfaced a real bug: the compile-input store was named
`.objectstack/installed-packages/` — the runtime's reserved live-install folder.
`MarketplaceInstallLocalPlugin` auto-rehydrates that folder at boot, so every
app got registered twice when serving `--artifact` (once by the composed env,
once by rehydrate), logged as `id=undefined` / `Overwriting package: undefined`,
which destabilized the dev server.

Move the compile-input store to `.objectstack/marketplace-packages/` so the
composed artifact is the single source of truth at serve time. Genuine
marketplace installs in `installed-packages/` are still folded in if present.

Verified: clean boot registers the env exactly once, no id=undefined; all 9
apps load and serve seed data from one runtime; helpdesk/todo dashboards render.

- compile script: store → marketplace-packages; also ingest live installed-packages
- add `pnpm clean`
- README: document the rationale + business-user testing findings (partial zh-CN
  coverage, empty personal dashboards) and a Verified section

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@xuyushun441-sys xuyushun441-sys merged commit 5d733a8 into main Jun 1, 2026
0 of 2 checks passed
@xuyushun441-sys xuyushun441-sys deleted the fix/all-double-registration branch June 1, 2026 19:30
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.

2 participants