Skip to content

build: mise as the toolchain, with bin/setup onboarding - #1670

Open
JoeKarow wants to merge 22 commits into
mainfrom
feat/mise-onboarding
Open

JoeKarow wants to merge 22 commits into
mainfrom
feat/mise-onboarding

Conversation

@JoeKarow

@JoeKarow JoeKarow commented Oct 7, 2026

Copy link
Copy Markdown
Member

Linked Issue

None. This is tooling work with no tracking issue.

Description

mise is now the required toolchain, locally and in CI (docs/adr/0020).

  • bin/setup: an idempotent first-run wizard. It checks platform → mise → tools → deps and codegen → .env → local database → optional extras. On native Windows it points to WSL and exits.
  • mise install: the wizard offers a global install with shell activation, but changes the rc file only after a yes. Contributors who decline use the committed, localized bin/mise (mise generate install-script --localize, marked linguist-vendored).
  • mise.toml + mise.lock:
    • pnpm, pitchfork, usage and watchexec are pinned. Node stays pinned in .nvmrc.
    • The workflow tasks are check, dev, codegen and db:*. Tasks that take arguments have usage specs.
    • [deps.pnpm] reinstalls node_modules before mise run whenever the lockfile changes.
    • src/test/toolchain.test.ts keeps the pnpm pins in sync.
  • Daemons (opt-in, experimental):
    • mise daemons start web gives each git worktree its own port. Read it from mise daemons urls --json or $WEB_PORT.
    • mise run dev --mail reuses or starts one shared Mailpit inbox at http://localhost:8025. Mailpit is installed on first use.
  • Dev loop: mise run dev replaces concurrently, npm-watch and cross-env. pnpm dev is kept as a shim.
  • CI: ci.yml and refresh-bot-list.yml install tools with jdx/mise-action from the lockfile.
  • Removed: the Airtable migration tooling (the cut-over is done) and the netlify dev --live tunnel.
  • Docs: ADR 0020, README/CONTRIBUTING (setup is now bin/setup), CLAUDE.md, and docs/agents/dev-server.md for agents.

Methodology

Onboarding was a manual list of steps. The useful task set lived in one maintainer's gitignored config, so contributors and agents never had it. Parallel worktrees and agents also collided on :9000.

A pinned, repo-local mise means setup no longer depends on a global version manager. Daemons give each worktree its own ports, and agents can read them.

Verification:

  • mise run check (codegen, typecheck, lint, test, knip) and pnpm build pass.
  • bin/setup --yes worked from a fresh clone with mise off PATH, and a second run was a no-op.
  • ./bin/mise run dev works without a global mise.
  • Two worktrees ran web daemons on separate ports at the same time, and both ran db:migrate.
  • With --mail, two worktrees shared one Mailpit and a test send was delivered.

Not verified:

  • The wizard's interactive global-install and rc-append branches.
  • Starting the mail daemon when nothing is listening on :8025.
  • CI on mise-action, which this PR runs for the first time.

Code of Conduct

By submitting this pull request, you agree to follow our Code of Conduct

@JoeKarow
JoeKarow requested review from a team as code owners October 7, 2026 06:47
@netlify

netlify Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for virtual-coffee-io ready!

Name Link
🔨 Latest commit 9bd21a0
🔍 Latest deploy log https://app.netlify.com/projects/virtual-coffee-io/deploys/6ac7de26b548aa0008b497c6
😎 Deploy Preview https://deploy-preview-1670--virtual-coffee-io.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 71 (🔴 down 11 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (🔴 down 8 from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 84.02% 2031 / 2417
🔵 Statements 83.43% 2226 / 2668
🔵 Functions 79.6% 566 / 711
🔵 Branches 81.67% 1524 / 1866
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/data/monthlyChallenges/NaNoWriMo.ts 0% 0% 0% 0% 27-135
src/data/monthlyChallenges/nov-2021.ts 0% 0% 0% 0% 23-86
src/data/monthlyChallenges/oct-2022.ts 0% 100% 0% 0% 16
src/data/monthlyChallenges/pairing-challenge.ts 0% 100% 0% 0% 22-30
src/lib/submissions/attachments.ts 86.84% 87.5% 85.71% 88.23% 132-148
Generated in workflow #1206 for commit 9bd21a0 by the Vitest Coverage Report Action

@greptile-apps

greptile-apps Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[High risk] Replaces the build and development toolchain setup.

The PR appears safe to merge, with all previous findings addressed.

Summary

This PR makes mise the toolchain for local work and CI, adds bin/setup, and gives worktrees separate dev-server ports.

  • Adds pinned tools, shared workflow tasks, and optional background servers.
  • Removes completed Airtable migration scripts and the development tunnel.
  • All three previous findings are fixed. No new actionable issues were found in the follow-up changes.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A["bin/setup"] --> B{"mise installed?"}
  B -->|Yes| C["Use installed mise"]
  B -->|No| D["Offer global or repo-local mise"]
  C --> E["Install tools, dependencies and generated files"]
  D --> E
  E --> F["Keep or create .env"]
  F --> G["Start local server if needed"]
  G --> H["Migrate database and offer sample data"]
  H --> I["Offer optional daemons"]
Loading

Reviews (2) · Last reviewed commit: "build(mise): rerun resource codegen when..." · Reviewed by Greptile

Comment thread bin/setup Outdated
Comment thread bin/setup
Comment thread mise.toml
The cut-over is done (docs/adr/0004). Deletes scripts/airtable, the airtable
dependency, its env keys and the dangling path comments; ADRs 0004 and 0012
point at git history.
It was only needed for auth forwarding, which the local test-user sign-in
replaced. Drops dev:tunnel, local-dev:tunnel and the tunnel-only Next settings.
Pins pnpm and watchexec, reads Node from .nvmrc, and promotes the local
workflows (codegen, checks, dev loop, database, email) from a personal file.
Deletes .tool-versions. A test keeps mise.toml's pnpm equal to packageManager.
package.json's dev is now a shim for `mise run dev`. Drops concurrently,
npm-watch, cross-env and the scripts they served. dev:server derives Next's
port (PORT) and URL from WEB_PORT, so a worktree can run beside the main
checkout.
Generated by `mise generate install-script --localize`; its data lives in the
gitignored .mise/.
Checks the platform (native Windows is pointed at WSL), installs or finds mise,
runs pnpm install and codegen, creates .env without overwriting one, applies
the local migrations, and offers the seed, Mailpit and pitchfork.
port.auto gives the main checkout 9000 and each linked worktree its own slot
(WEB_PORT, stride 10; dev:server puts Next on the port above). Verified with
pitchfork 2.29: the main checkout and a worktree run side by side. The proxy
is off, so there is no WEB_URL; use http://localhost:$WEB_PORT.
Replaces the pnpm/action-setup + setup-node pairs in ci.yml and
refresh-bot-list.yml. mise.lock is committed, so the action installs --locked.
…t take args

Pins usage 6.12.0 and pitchfork 2.29.0. db:generate requires a hyphenated
--name; test, lint and format get typed flags and paths. bin/setup's extra is
now registering and starting the web daemon.
Adds ADR 0020 and its Greptile pointer, docs/agents/dev-server.md, and moves
README, CONTRIBUTING and CLAUDE.md to bin/setup and mise run.
Its state/ links back to the checkout, so Vitest ran every test twice (and two
db tests failed in the duplicate). Excludes it from Vitest, ESLint and tsc, and
tells knip that mise is a toolchain binary, not a dependency.
mailpit is scoped to the mail:server task (not [tools]), so it downloads on
first use only. [daemons.mail] gives the UI an auto port (base 8025) and SMTP
the port above it; dev --mail starts it and exports SMTP_HOST/SMTP_PORT, which
win over .env. bin/setup's brew extra becomes a pointer.
[daemons.mail] uses Mailpit's defaults (UI 8025, SMTP 1025). dev --mail reuses
whatever already answers on :8025 and only starts the daemon otherwise, so a
second worktree never fights over the port.
Signed-off-by: Joe Karow <58997957+JoeKarow@users.noreply.github.com>
@JoeKarow
JoeKarow force-pushed the feat/mise-onboarding branch from b265ca8 to 9bd21a0 Compare October 8, 2026 18:17

This branch has not been deployed

No deployments
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.

1 participant