Skip to content

feat(cli): unify polyglot workspaces with mise and hk - #31

Merged
caorushizi merged 3 commits into
masterfrom
codex/mise-polyglot-workspaces
Sep 14, 2026
Merged

caorushizi merged 3 commits into
masterfrom
codex/mise-polyglot-workspaces

Conversation

@caorushizi

Copy link
Copy Markdown
Contributor

Bundle the pinned mise runtime and preserve existing one commands while preparing project tools and dependencies.

Initialize Go and Node workspace support as projects are added, integrate native hk checks and Git hooks, simplify creation paths, and remove default Changesets tooling.

Bundle the pinned mise runtime and preserve existing one commands while preparing project tools and dependencies.

Initialize Go and Node workspace support as projects are added, integrate native hk checks and Git hooks, simplify creation paths, and remove default Changesets tooling.
Copilot AI lite review requested due to automatic review settings September 14, 2026 14:39
@vercel

vercel Bot commented Sep 14, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
one-cli-docs Ready Ready Preview Sep 14, 2026 3:25pm UTC

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

One or more issues must be addressed before approval.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Unifies new workspaces around bundled mise and hk while preserving builtin behavior for legacy workspaces.

Changes:

  • Adds pinned mise synchronization, embedding, and runtime execution.
  • Generates language-specific Go/Node, hk, Git hook, and mise configuration.
  • Updates CLI help, templates, snapshots, and integration tests.
File summaries
File Description
third_party/mise/LICENSE Updated as part of this pull request.
Taskfile.yml Updated as part of this pull request.
packages/templates/react-spa/README.md Updated as part of this pull request.
packages/templates/nextjs-app/README.md Updated as part of this pull request.
packages/templates/astro-site/README.md Updated as part of this pull request.
packages/cli/tools/sync-mise/main.go Updated as part of this pull request.
packages/cli/tools/sync-mise/main_test.go Updated as part of this pull request.
packages/cli/tests/e2e/snapshot_e2e_ux_test.go Updated as part of this pull request.
packages/cli/tests/e2e/snapshot_e2e_dev_test.go Updated as part of this pull request.
packages/cli/tests/e2e/snapshot_e2e_create_test.go Updated as part of this pull request.
packages/cli/tests/e2e/mise_runtime_unix_test.go Updated as part of this pull request.
packages/cli/tests/e2e/e2e_helpers_test.go Updated as part of this pull request.
packages/cli/testdata/reference/help/run.txt Updated as part of this pull request.
packages/cli/testdata/reference/help/mise.txt Updated as part of this pull request.
packages/cli/testdata/reference/help/hk.txt Updated as part of this pull request.
packages/cli/testdata/reference/help/configure.txt Updated as part of this pull request.
packages/cli/testdata/reference/help/configure_mise.txt Updated as part of this pull request.
packages/cli/testdata/reference/help/configure_hooks.txt Updated as part of this pull request.
packages/cli/testdata/reference/create-default.json Updated as part of this pull request.
packages/cli/internal/transport/cobra/run/exec.go Updated as part of this pull request.
packages/cli/internal/transport/cobra/run/cmd.go Updated as part of this pull request.
packages/cli/internal/transport/cobra/mise/passthrough.go Updated as part of this pull request.
packages/cli/internal/transport/cobra/mise/cmd.go Updated as part of this pull request.
packages/cli/internal/transport/cobra/hooks/cmd.go Updated as part of this pull request.
packages/cli/internal/transport/cobra/hooks/cmd_test.go Updated as part of this pull request.
packages/cli/internal/transport/cobra/dev/cmd.go Updated as part of this pull request.
packages/cli/internal/transport/cobra/create/result.go Updated as part of this pull request.
packages/cli/internal/transport/cobra/create/preset.go Updated as part of this pull request.
packages/cli/internal/transport/cobra/create/create.go Updated as part of this pull request.
packages/cli/internal/transport/cobra/configure/cmd.go Updated as part of this pull request.
packages/cli/internal/transport/cobra/configure/cmd_test.go Updated as part of this pull request.
packages/cli/internal/ports/runtime/runtime.go Updated as part of this pull request.
packages/cli/internal/platform/process/forward.go Updated as part of this pull request.
packages/cli/internal/platform/process/exit_windows.go Updated as part of this pull request.
packages/cli/internal/platform/process/exit_unix.go Updated as part of this pull request.
packages/cli/internal/platform/process/cancel_windows.go Updated as part of this pull request.
packages/cli/internal/platform/process/cancel_unix.go Updated as part of this pull request.
packages/cli/internal/platform/i18n/locales/zh-CN.json Updated as part of this pull request.
packages/cli/internal/platform/i18n/locales/en-US.json Updated as part of this pull request.
packages/cli/internal/platform/fsutil/plan.go Updated as part of this pull request.
packages/cli/internal/platform/fsutil/plan_test.go Updated as part of this pull request.
packages/cli/internal/platform/errors/codes.go Updated as part of this pull request.
packages/cli/internal/modules/miseconfig/config_test.go Updated as part of this pull request.
packages/cli/internal/modules/hooks/service.go Updated as part of this pull request.
packages/cli/internal/modules/hooks/native_unix_test.go Updated as part of this pull request.
packages/cli/internal/modules/hooks/legacy.go Updated as part of this pull request.
packages/cli/internal/modules/hooks/install.go Updated as part of this pull request.
packages/cli/internal/modules/hooks/config.go Updated as part of this pull request.
packages/cli/internal/modules/gowork/workspace.go Updated as part of this pull request.
packages/cli/internal/modules/gowork/workspace_test.go Updated as part of this pull request.
packages/cli/internal/modules/development/process/supervisor.go Updated as part of this pull request.
packages/cli/internal/modules/development/process/supervisor_windows.go Updated as part of this pull request.
packages/cli/internal/modules/development/process/supervisor_unix.go Updated as part of this pull request.
packages/cli/internal/modules/development/process/ops.go Updated as part of this pull request.
packages/cli/internal/modules/creation/workspace_files.go Updated as part of this pull request.
packages/cli/internal/modules/creation/workspace_files_test.go Updated as part of this pull request.
packages/cli/internal/modules/creation/workspace_content.go Updated as part of this pull request.
packages/cli/internal/modules/creation/service.go Updated as part of this pull request.
packages/cli/internal/modules/creation/service_test.go Updated as part of this pull request.
packages/cli/internal/modules/creation/project.go Updated as part of this pull request.
packages/cli/internal/modules/creation/languages.go Updated as part of this pull request.
packages/cli/internal/modules/creation/languages_test.go Updated as part of this pull request.
packages/cli/internal/modules/creation/artifacts.go Updated as part of this pull request.
packages/cli/internal/core/workspace/summary.go Updated as part of this pull request.
packages/cli/internal/core/workspace/summary_test.go Updated as part of this pull request.
packages/cli/internal/core/workspace/manifest.go Updated as part of this pull request.
packages/cli/internal/core/workspace/hooks.go Updated as part of this pull request.
packages/cli/internal/core/template/go_template_test.go Updated as part of this pull request.
packages/cli/internal/bootstrap/cli/root.go Updated as part of this pull request.
packages/cli/internal/bootstrap/cli/dependencies.go Updated as part of this pull request.
packages/cli/internal/application/execution/runtime.go Updated as part of this pull request.
packages/cli/internal/application/execution/runtime_test.go Updated as part of this pull request.
packages/cli/internal/application/execution/operation.go Updated as part of this pull request.
packages/cli/internal/adapters/runtime/mise/release.go Updated as part of this pull request.
packages/cli/internal/adapters/runtime/mise/miserelease/release.go Updated as part of this pull request.
packages/cli/internal/adapters/runtime/mise/mise.go Updated as part of this pull request.
packages/cli/internal/adapters/runtime/mise/mise_test.go Updated as part of this pull request.
packages/cli/internal/adapters/runtime/mise/install.go Updated as part of this pull request.
packages/cli/internal/adapters/runtime/mise/install_test.go Updated as part of this pull request.
packages/cli/internal/adapters/runtime/mise/embed_windows_amd64.go Updated as part of this pull request.
packages/cli/internal/adapters/runtime/mise/embed_other.go Updated as part of this pull request.
packages/cli/internal/adapters/runtime/mise/embed_linux_arm64.go Updated as part of this pull request.
packages/cli/internal/adapters/runtime/mise/embed_linux_amd64.go Updated as part of this pull request.
packages/cli/internal/adapters/runtime/mise/embed_darwin_arm64.go Updated as part of this pull request.
packages/cli/internal/adapters/runtime/mise/embed_darwin_amd64.go Updated as part of this pull request.
packages/cli/go.sum Updated as part of this pull request.
packages/cli/go.mod Updated as part of this pull request.
packages/cli/cmd/one/main.go Updated as part of this pull request.
docs/plans/2026-09-14-mise-runtime-adoption.md Updated as part of this pull request.
CONTRIBUTING.md Updated as part of this pull request.
apps/docs/public/llms.txt Updated as part of this pull request.
apps/docs/content/docs/zh/run.md Updated as part of this pull request.
apps/docs/content/docs/zh/meta.json Updated as part of this pull request.
apps/docs/content/docs/zh/installation.md Updated as part of this pull request.
apps/docs/content/docs/zh/hk.md Updated as part of this pull request.
apps/docs/content/docs/zh/error-codes.md Updated as part of this pull request.
apps/docs/content/docs/zh/dev.md Updated as part of this pull request.
apps/docs/content/docs/zh/create.md Updated as part of this pull request.
apps/docs/content/docs/zh/configure.md Updated as part of this pull request.
apps/docs/content/docs/zh/cli-overview.md Updated as part of this pull request.
apps/docs/content/docs/zh/add.md Updated as part of this pull request.
.goreleaser.yaml Updated as part of this pull request.
.gitignore Updated as part of this pull request.
Review details

Suppressed comments (6)

Taskfile.yml:373

  • build-all runs sync-mise-all alongside sync-bundled, whose dependency is sync-mise; on a fresh checkout both can fetch the host archive concurrently. Since syncArchive only waits 100ms for its lock, one task can fail with could not lock ... instead of reusing the result. Serialize the shared local-target sync (for example, make sync-mise-all depend on sync-mise) before the all-target loop.
  sync-mise-all:
    desc: Fetch and verify mise archives for all release platforms
    run: once

packages/cli/internal/modules/creation/project.go:154

  • An existing empty project directory is allowed through the dirNonEmpty check, but createdFromScratch remains false. If any later planning step (for example the generated hk/mise plan) fails after template.Render has populated that directory, the deferred cleanup skips it, leaving a partial project that is now non-empty and cannot be retried. Treat an initially empty directory as owned for rollback, while continuing to reject non-empty directories.
    packages/cli/internal/modules/creation/service.go:145
  • CreateWorkspace starts writing the target with generateWorkspaceFiles without holding the workspace creation lock. Two concurrent create/add operations can both pass the empty-target/manifest checks and then overwrite the manifest and generated configuration, producing a partially mixed workspace. Serialize the whole workspace-creation mutation with the same workspace lock used by project/configuration mutations, accounting for preset calls that currently acquire that lock internally.
    packages/cli/internal/modules/dependencies/service.go:142
  • In workspace mode this is the only dependency-loading command, but -mod=readonly prevents Go from adding missing checksums to go.work.sum/go.sum. A fresh workspace with an external dependency can therefore fail during one dev instead of preparing its graph, contradicting the surrounding promise that workspace sums are maintained. Run a controlled download step with the workspace active before the readonly package load, while still preserving go.mod and avoiding tidy.
    packages/cli/internal/modules/hooks/install.go:86
  • The managed-launcher hash is calculated over body, which includes the absolute binary path. As soon as One is upgraded, moved, or invoked through a different symlink, the existing launcher still has the old path but validateManaged rejects it as user-modified, so one configure hooks cannot refresh the managed hook and Git may fall back to a stale/nonexistent one. Hash a path-independent canonical launcher (or otherwise allow the managed binary path to change) while continuing to detect edits to the launcher logic.
    packages/cli/internal/modules/miseconfig/config.go:215
  • This only adds Node to the generated mise tool map. nodePackageManager can select yarn or bun from an existing lockfile when the root package.json has no packageManager; the manifest then records that manager, and one dev invokes it through mise without any generated yarn/bun version. Such workspaces fail unless the manager happens to be installed globally. Preserve or infer an exact manager version, or reject the unpinned case before selecting mise.
  • Files reviewed: 108/110 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/cli/internal/platform/process/forward.go
@caorushizi
caorushizi merged commit 1296a46 into master Sep 14, 2026
8 checks passed
@caorushizi
caorushizi deleted the codex/mise-polyglot-workspaces branch September 14, 2026 15:58
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