Conversation
This seems like not enough.
# Conflicts: # mise-tasks/lib/env-vars.sh
# Conflicts: # mise-tasks/services/realm-server # packages/realm-server/scripts/start-all-except-optional.sh # packages/realm-server/scripts/start-all.sh # packages/realm-server/scripts/start-worker-development.sh
# Conflicts: # mise-tasks/services/realm-server
Preview deployments |
Host Test Results 1 files ±0 1 suites ±0 2h 17m 40s ⏱️ -7s For more details on these errors, see this check. Results for commit a621dd0. ± Comparison against base commit 022ad24. ♻️ This comment has been updated with latest results. |
README.md
Outdated
| | :4221 | Prerender server | 🚫 | 🚫 | | ||
| | :4222 | Prerender manager | 🚫 | 🚫 | | ||
| | :4221 | Prerender server | ✅ | 🚫 | | ||
| | :4222 | Prerender manager | ✅ | 🚫 | |
There was a problem hiding this comment.
These have been part of start:all for a while, this just reflects that.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4d1498f5f3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This PR migrates the project’s development orchestration from ad-hoc pnpm/shell scripts to mise file-based tasks, centralizing environment-mode configuration and reorganizing how services are started for local development and test suites.
Changes:
- Introduces
mise-tasks/structure (infra/services/lib) and new top-level flows likemise run devandmise run dev-all. - Centralizes environment slug + env var derivation (Traefik hostnames, DB names, ports, paths) and updates multiple scripts to consume it.
- Updates package scripts and documentation to point developers to mise-based commands; removes several legacy realm-server dev scripts.
Reviewed changes
Copilot reviewed 58 out of 58 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/stop-environment.sh | Switches usage guidance to mise + reuses shared slug helper. |
| scripts/env-slug.sh | Adds shared slug computation/resolution helpers for env-mode. |
| scripts/ensure-branch-db.sh | Reuses shared slug computation and supports ENV_SLUG. |
| packages/realm-server/scripts/wait-for-prerender.sh | Removes legacy prerender wait helper (replaced by mise infra task). |
| packages/realm-server/scripts/wait-for-pg.sh | Removes legacy pg wait helper (replaced by mise infra task). |
| packages/realm-server/scripts/start-worker-test.sh | Removes legacy worker-test startup script (replaced by mise task). |
| packages/realm-server/scripts/start-services-for-matrix-tests.sh | Removes legacy matrix-test services script (replaced by mise task). |
| packages/realm-server/scripts/start-prerender-manager-dev.sh | Removes legacy prerender manager startup script (replaced by mise task). |
| packages/realm-server/scripts/start-prerender-dev.sh | Removes legacy prerender startup script (replaced by mise task). |
| packages/realm-server/scripts/start-matrix.sh | Uses shared env slug resolution for env-mode. |
| packages/realm-server/scripts/start-icons.sh | Uses shared env slug resolution for env-mode. |
| packages/realm-server/scripts/start-all.sh | Removes legacy “start everything” orchestration (replaced by mise run dev). |
| packages/realm-server/scripts/start-all-except-optional.sh | Removes legacy minimal orchestration (replaced by mise run dev-minimal). |
| packages/realm-server/scripts/ensure-traefik.sh | Removes legacy Traefik ensure helper (replaced by mise infra task). |
| packages/realm-server/package.json | Redirects multiple start scripts to mise run ... tasks. |
| packages/matrix/scripts/start-synapse.sh | Uses shared env slug resolution for per-env Synapse data dirs. |
| packages/matrix/scripts/register-realm-users.sh | Uses shared env slug resolution for env-specific Synapse container naming. |
| packages/matrix/scripts/assert-synapse-running.sh | Uses shared env slug resolution for env-specific Synapse container naming. |
| packages/host/scripts/traefik-helpers.js | Adds shared JS helpers for Traefik registration + env slug in host scripts. |
| packages/host/scripts/serve-dist.js | Refactors Traefik registration to shared helpers. |
| packages/host/scripts/ember-serve.js | Refactors Traefik registration to shared helpers. |
| packages/host/config/environment.js | Prefers ENV_SLUG for env-mode defaults; adjusts icons URL selection. |
| packages/bot-runner/package.json | Removes development start script in favor of mise. |
| packages/bot-runner/README.md | Updates instructions to use mise tasks. |
| packages/ai-bot/scripts/start-development.sh | Uses shared env slug resolution for env-mode Synapse discovery. |
| packages/ai-bot/package.json | Removes development start script in favor of mise. |
| mise-tasks/test-services-matrix | New mise task to start services needed for matrix tests. |
| mise-tasks/test-services-host | Updates host-test services orchestration for mise + env-vars. |
| mise-tasks/stop-environment | Adds mise wrapper task for stopping an environment. |
| mise-tasks/services/worker-test | New mise task for test worker manager. |
| mise-tasks/services/worker-base | Migrates worker-base startup to mise with infra dependencies. |
| mise-tasks/services/worker | Migrates dev worker startup to mise with infra dependencies. |
| mise-tasks/services/test-realms | Migrates test realms startup to mise with infra dependencies. |
| mise-tasks/services/realm-server-base | Migrates base realm server startup to mise with infra dependencies. |
| mise-tasks/services/realm-server | Migrates dev realm server startup to mise with infra dependencies. |
| mise-tasks/services/prerender-mgr | New mise task to start the prerender manager. |
| mise-tasks/services/prerender | New mise task to start the prerender server. |
| mise-tasks/services/icons | New mise wrapper task to start icons server. |
| mise-tasks/services/host-build | New mise task to build/watch host app output. |
| mise-tasks/services/bot-runner | New mise task to start bot-runner with shared env vars. |
| mise-tasks/services/ai-bot | New mise task to start ai-bot with shared env vars. |
| mise-tasks/lib/env-vars.sh | Expands shared env vars (URLs/ports/paths) used by all mise tasks. |
| mise-tasks/lib/dev-common.sh | Adds shared readiness URL construction + env-mode bootstrap. |
| mise-tasks/infra/wait-for-prerender | New infra task for prerender readiness waiting. |
| mise-tasks/infra/stop-synapse | New infra task to stop Synapse via matrix scripts. |
| mise-tasks/infra/stop-pg | New infra task to stop Postgres container. |
| mise-tasks/infra/stop-admin | New infra task to stop/remove admin console container. |
| mise-tasks/infra/start-synapse | New infra task to start Synapse via matrix scripts. |
| mise-tasks/infra/start-admin | New infra task to start the Matrix admin console. |
| mise-tasks/infra/ensure-traefik | New infra task to ensure Traefik is running in env-mode. |
| mise-tasks/infra/ensure-synapse | New infra task ensuring Synapse + env-mode user registration. |
| mise-tasks/infra/ensure-pg | New infra task waiting for Postgres readiness. |
| mise-tasks/infra/ensure-db | New infra task ensuring per-env database exists. |
| mise-tasks/dev-without-matrix | New orchestration task omitting Matrix/SMTP startup. |
| mise-tasks/dev-minimal | New orchestration task skipping optional realms. |
| mise-tasks/dev-all | New orchestration task that starts host first, then dev stack. |
| mise-tasks/dev | New orchestration task for full dev stack. |
| README.md | Updates developer docs to prefer mise tasks and new workflows. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
probably i'll want to use this for any CLI that I add for the software factory. I'll pay close attention to your followup PR's for a repeatable pattern here. |
👍🏻 I’m open to suggestions for approach too, part of my goal here is to rationalise the chaotic collection of scripts that we have, this only partially achieves that. |
yeah and I love that you are doing this! it makes it much easier to understand what all scripts we have |
This is a significant rearrangement, it changes most of the commands used to run in development. There are subdirectories in
mise-tasks/for:infra/: external services like Postgres, Synapselib/: shared setup scriptsservices/: scripts to start the various applications inpackages/But for the simplest case of wanting to run host and realm server, run
mise run dev-all. The realm server doesn’t start until the host application is ready.The best way to review this is run it locally to make sure it covers your development needs.
Also, look at the README changes (probably in “rich diff” mode but I can’t link to that directly), it shows everywhere that commands have changed:
Forthcoming work
Since this is large, I’ve stopped here instead of converting everything. To come:
start-server-and-testto 2.x for its support of three phases, will simplifydev-allmise runinstead of scripts inpackage.jsonpackages/realm-server/scripts/with mise tasks