Skip to content

refactor(dashboard): require a database and drop the solo dev mode - #68

Merged
RedStar071 merged 2 commits into
mainfrom
claude/remove-env-solo-refs-t1xg7k
Sep 14, 2026
Merged

refactor(dashboard): require a database and drop the solo dev mode#68
RedStar071 merged 2 commits into
mainfrom
claude/remove-env-solo-refs-t1xg7k

Conversation

@RedStar071

@RedStar071 RedStar071 commented Sep 12, 2026

Copy link
Copy Markdown
Member

The dashboard could be started without Postgres through dev:solo, which read a checked-in apps/dashboard/.env.solo and turned on the in-memory Better Auth adapter plus an environment-seeded repository store. Running the app is now one path: aube run dev (and every deployment) needs a database, and nothing in the repository turns the in-memory stores on.

Removed apps/dashboard/.env.solo, code-zero.deployment.solo.yml, the dev:solo scripts and turbo task, their .gitignore exceptions, and the CODE_ZERO_SOLO_REPOSITORIES seeding of memoryRepositoryStore, which now starts empty. The memory adapters themselves stay: playwright.config.ts is their only caller, so the e2e suite keeps signing up its own throwaway account through the real /api/auth/** endpoints instead of a live database, off the network and off mutable external state.

Docs follow: the README quick start points at db:migrate and dev rather than a no-database start, and docs/PLAN.md keeps its Fase 0 record with a dated note saying the mode is gone.

Verification: aube run check:repo, aube run lint:ci, aube run typecheck, aube test (154 dashboard tests, 27 tasks), aube run build.

Claude-Session: https://claude.ai/code/session_014mjY3tgLKmA7LDJzb8JrZS

Summary

Why

Verification

  • aube run check:repo
  • aube run lint:ci
  • aube run typecheck
  • aube test
  • aube run build

Safety and compatibility

  • I added or updated deterministic tests for changed behavior.
  • I preserved observe mode as read-only, or explained the policy change above.
  • Runtime commands and target-repository writes remain inside the runner boundary.
  • I did not expose secrets, tokens, personal data, or untrusted output in logs.
  • I updated documentation and Agent Skills when workflows or boundaries changed.

Agent context

  • Agent/tools used:
  • What the agent did, and what you changed or verified yourself:

Reviewer notes

Confidence Score: 5/5

Safe to merge.

The previously reported administrator-bootstrap issue is no longer outstanding: the setup documentation explains enabling signup, promoting the first account to administrator directly in the database, and then configuring repositories. greptile-apps[bot] manually resolved the thread without explanation.

Reviews (2): Last reviewed commit: "docs(readme): document the admin bootstr..." | Re-trigger Greptile

The dashboard could be started without Postgres through `dev:solo`, which
read a checked-in `apps/dashboard/.env.solo` and turned on the in-memory
Better Auth adapter plus an environment-seeded repository store. Running
the app is now one path: `aube run dev` (and every deployment) needs a
database, and nothing in the repository turns the in-memory stores on.

Removed `apps/dashboard/.env.solo`, `code-zero.deployment.solo.yml`, the
`dev:solo` scripts and turbo task, their `.gitignore` exceptions, and the
`CODE_ZERO_SOLO_REPOSITORIES` seeding of `memoryRepositoryStore`, which
now starts empty. The memory adapters themselves stay: `playwright.config.ts`
is their only caller, so the e2e suite keeps signing up its own throwaway
account through the real `/api/auth/**` endpoints instead of a live
database, off the network and off mutable external state.

Docs follow: the README quick start points at `db:migrate` and `dev`
rather than a no-database start, and `docs/PLAN.md` keeps its Fase 0
record with a dated note saying the mode is gone.

Verification: `aube run check:repo`, `aube run lint:ci`, `aube run
typecheck`, `aube test` (154 dashboard tests, 27 tasks), `aube run build`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014mjY3tgLKmA7LDJzb8JrZS
@coldtea-pr-lens

coldtea-pr-lens Bot commented Sep 12, 2026

Copy link
Copy Markdown

◈ PR Lens

🟢 +0 new · 🟠 ~4 changed · 🔴 -1 removed · 1 flow · 7 files · commit 6b41271


Architecture

Architecture diagram for wolfstar-project/code-zero at 6b41271

5 components touched across 3 lanes.

Open the interactive canvas


Inside the changed components — 2 views

Component view — Repository storage

Repository storage details showing in-memory unseeding and direct persistence in PostgreSQL.

Architecture view of Component view — Repository storage in wolfstar-project/code-zero

Component view — Authentication configuration

Better Auth configuration scoping in-memory auth exclusively to Playwright end-to-end tests.

Architecture view of Component view — Authentication configuration in wolfstar-project/code-zero

Data flow

Data flow diagram for wolfstar-project/code-zero at 6b41271

Local development startup with PostgreSQL

Open the interactive canvas


View

  • Architecture lens
  • Data flow lens
  • Expand every detail

Tip

The diagrams are links. Click one to open it on the canvas, then press W or click play to walk through the change.

🪧 More tips
  • Run npx skills add coldteadotai/pr-lens, then tell your coding agent: "Diagram the change you just made with PR Lens and attach it to the pull request."
  • Run npx @coldtea/pr-lens-cli analyze --base origin/main on a branch, then npx @coldtea/pr-lens-cli render .pr-lens/graph.json. Same lenses, your own model key, before the pull request exists.
  • Untick Architecture lens or Data flow lens under View to hide a diagram, or tick Expand every detail to open every section. The comment redraws in a few seconds.
  • Click the link under each diagram to open it on a canvas you can zoom, pan and step through.
  • Open a diagram on the canvas, then press W or click play to walk through the change one step at a time.
  • The CLI's render reads .github/pr-lens.yml and applies your renames, exclusions and lane pins at draw time.
  • Set github.comment.collapsed: true in .github/pr-lens.yml to fold the comment behind one View architecture and data flow row. Drawing still runs on every push.
  • Add .github/workflows/pr-lens.yml with coldteadotai/pr-lens/packages/action@v0 and your model provider's key as its api-key to run PR Lens from your own CI. Any /chat/completions endpoint works.
  • Push a commit and the comment redraws for the new head. A slow older run never overwrites a newer one.
  • Switch GitHub to dark mode and the diagrams follow. The moving dots are this pull request's data in motion.

Thanks for using PR Lens! It's built by Coldtea, free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

@vercel

vercel Bot commented Sep 12, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
agent-zero-dashboard Error Error Sep 13, 2026 10:25am UTC
agent-zero-docs Error Error Sep 13, 2026 10:25am UTC
agent-zero-marketing Ready Ready Preview Sep 13, 2026 10:25am UTC

Comment thread README.md
@macroscopeapp

macroscopeapp Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR removes the in-memory solo dashboard workflow, makes local dashboard startup depend on Postgres, and changes the first-account setup process. It also touches authentication configuration, a sensitive review area that warrants human validation.

Not approved because:

  • Credit balance exhausted. Approvability relies on correctness review in order to determine eligibility

Review your spending limits in Billing settings. You can add or adjust custom eligibility rules. Learn more.

Self-registration (`AUTH_ENABLE_SIGNUP=true`) grants the app-wide `user`
role, never `admin`; `repositories.save` requires `admin` (the same gate
`audit.list` uses in packages/api/src/orpc/router.ts). The quick-start flow
this README documents had the first account sign up and then add a
repository from the dashboard, which that account cannot do — there is no
first-user-becomes-admin bootstrap anywhere in the codebase.

Verified with a Playwright request against the built dashboard: sign-up
returns 200, but repositories.save returns 403 for the fresh account.

Documented the one path that actually works today: promote the account
with a direct `UPDATE "user" SET role = 'admin'` after signing up. This is
documentation only — no code change, since inventing a bootstrap
mechanism is a separate, larger change than the solo-mode removal this
branch is otherwise scoped to.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014mjY3tgLKmA7LDJzb8JrZS

Copy link
Copy Markdown
Member Author

Two Vercel deployment statuses are red on this commit (6b41271) — neither is caused by this branch's diff, and I don't have a way to retrigger either from here:

  • Vercel – agent-zero-dashboard: fails in ~1s with BUILD_FAILED/"Resource provisioning failed" and zero build log lines — the build command never actually runs. I checked this project's last 20 deployments: every non-main preview build fails identically, across many unrelated commits going back weeks (i18n fixes, poller fixes, a mise.toml bump, plain main merges), while pushes straight to main deploy fine. Pre-existing Vercel project/infra issue, unrelated to any code change here.
  • Vercel – agent-zero-docs: build actually completes ("✨ Build complete!", output written to .vercel/output), then Vercel's deploy step errors with STATIC_BUILD_NO_OUT_DIR ("No Output Directory named "dist" found"). This branch's previous commit (b8d899a) — with byte-identical apps/docs content, since only README.md changed since — deployed successfully (READY) on this same project. Looks like non-determinism in Vercel's own build/deploy step, not this PR's code.

Both are commit statuses, not required GitHub Actions checks — all of those (build, lint, typecheck, unit tests, unused-code, i18n, PR title, security scans) are green. I don't have a Vercel redeploy/retry tool available in this session to force a re-run, so I'm not spending a push on it; flagging here and keeping the PR watched.


Generated by Claude Code

@RedStar071
RedStar071 merged commit f3ba6d8 into main Sep 14, 2026
20 of 22 checks passed
@RedStar071
RedStar071 deleted the claude/remove-env-solo-refs-t1xg7k branch September 14, 2026 11:39
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