Skip to content

Change scripts and tasks to use mise#4193

Open
backspace wants to merge 45 commits intomainfrom
mise-tasks-cs-10177
Open

Change scripts and tasks to use mise#4193
backspace wants to merge 45 commits intomainfrom
mise-tasks-cs-10177

Conversation

@backspace
Copy link
Contributor

@backspace backspace commented Mar 16, 2026

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, Synapse
  • lib/: shared setup scripts
  • services/: scripts to start the various applications in packages/

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:

boxel 2026-03-17 10-52-43

Forthcoming work

Since this is large, I’ve stopped here instead of converting everything. To come:

  • updating start-server-and-test to 2.x for its support of three phases, will simplify dev-all
  • change CI to use mise run instead of scripts in package.json
  • replace the non-deployment files in packages/realm-server/scripts/ with mise tasks

@github-actions
Copy link

Preview deployments

@github-actions
Copy link

github-actions bot commented Mar 16, 2026

Host Test Results

    1 files  ±0      1 suites  ±0   2h 17m 40s ⏱️ -7s
2 030 tests ±0  1 996 ✅  - 1  15 💤 ±0   0 ❌ ±0  19 🔥 +1 
2 045 runs  ±0  1 992 ✅  - 2  15 💤 ±0  19 ❌ +1  19 🔥 +1 

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 | | 🚫 |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These have been part of start:all for a while, this just reflects that.

@backspace backspace marked this pull request as ready for review March 17, 2026 22:44
@backspace backspace requested a review from a team March 17, 2026 22:45
@habdelra habdelra requested a review from Copilot March 17, 2026 22:51
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 like mise run dev and mise 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.

backspace and others added 6 commits March 17, 2026 16:00
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>
@habdelra
Copy link
Contributor

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.

@backspace
Copy link
Contributor Author

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.

@habdelra
Copy link
Contributor

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

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.

3 participants