Skip to content

fix(dev): print seeded dev-admin credentials in the serve startup banner - #1510

Merged
xuyushun441-sys merged 1 commit into
mainfrom
fix/print-seeded-admin
Jun 2, 2026
Merged

xuyushun441-sys merged 1 commit into
mainfrom
fix/print-seeded-admin

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Collaborator

Problem

After #1503 moved dev-admin seeding in-process, the confirmation line went silent. The seed runs inside runtime.start(), which is within serve's boot-quiet window (stdout is suppressed to produce a clean banner, restored only afterward). So the ctx.logger.info('🔑 Dev admin seeded …') line was swallowed — a DX regression vs the old HTTP seed, which printed the credentials.

Fix

plugin-auth records the seed result on the auth service (AuthManager.devSeedResult). serve reads it after restoreOutput() and renders it inside the ready banner:

  ✓ Server is ready

  ➜  API:       http://localhost:3999/
  ➜  Console:   http://localhost:3999/_console/

  🔑  Dev admin: admin@objectos.ai / admin123
      seeded on empty DB · dev only — do not use in production
  • Single print point. Because os dev spawns serve with inherited stdout, printing from the serve child covers both serve --dev standalone and the os dev console — no IPC needed for this.
  • Never stale. The line shows only when an admin was actually seeded this boot (empty DB). On a populated DB the seed skips, devSeedResult stays undefined, and nothing prints.
  • Dev-only by construction (the seed itself is hard-gated to NODE_ENV=development).

Verification (showcase)

Case Result
Fresh DB → seeds banner shows 🔑 Dev admin: … ✓
Second run, same DB → skip banner has no Dev-admin line ✓

Tests: cli 144, plugin-auth 88 — all green. Typecheck/build clean.

🤖 Generated with Claude Code

The in-process dev seed confirmed via ctx.logger during runtime.start(),
inside serve's boot-quiet window, so the line was swallowed and never
reached the console (a regression vs the old HTTP seed, which printed the
credentials). plugin-auth now records the seed result on the `auth`
service; serve reads it after restoreOutput() and renders it in the ready
banner:

  🔑  Dev admin: admin@objectos.ai / admin123
      seeded on empty DB · dev only — do not use in production

Shown only when an admin was actually seeded this boot (empty DB), so
stale credentials are never displayed on a populated DB. Visible in both
`serve --dev` and `os dev` (the child's stdout is inherited by the parent
terminal). Verified: line appears on a fresh DB, absent on a second run.

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

vercel Bot commented Jun 2, 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 Jun 2, 2026 2:43am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface size/s labels Jun 2, 2026
@xuyushun441-sys
xuyushun441-sys merged commit b7a4f14 into main Jun 2, 2026
11 checks passed
@xuyushun441-sys
xuyushun441-sys deleted the fix/print-seeded-admin branch June 2, 2026 02:51

This branch was successfully deployed

1 active deployment
Preview — 8ed24354 Deployed Jun 2, 2026 by vercel[bot]
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 tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants