Skip to content

fix(cli): preserve configured Mint host origin - #778

Open
Zhao0335 wants to merge 1 commit into
pascalorg:mainfrom
Zhao0335:fix/mint-pascal-host-origin
Open

fix(cli): preserve configured Mint host origin#778
Zhao0335 wants to merge 1 commit into
pascalorg:mainfrom
Zhao0335:fix/mint-pascal-host-origin

Conversation

@Zhao0335

@Zhao0335 Zhao0335 commented Sep 8, 2026

Copy link
Copy Markdown

What does this PR do?

Preserves an operator-provided MINT_PASCAL_HOST_ORIGIN when the CLI starts the managed editor process, while retaining the existing pascal.localhost URL as the fallback when no value is configured.

Adds a regression test that starts the managed runtime and verifies the origin received by the spawned editor process.

Fixes #765

How to test

  1. Run: bun --cwd packages/cli test src/runtime.test.ts --test-name-pattern "preserves a configured Mint host origin"
  2. Run: bun --cwd packages/cli run check-types
  3. Run: bun --cwd packages/cli run build

Local verification: the targeted regression test, CLI TypeScript checks, CLI build, and Biome checks for both changed files pass. The full Windows test run reaches the repository's existing platform-specific failures around POSIX permission bits, process-command verification, and URL pathname globbing; the new test passes in that run.

Screenshots / screen recording

Not applicable; this changes CLI process environment propagation only.

Checklist

  • I've tested this locally with bun dev (not applicable to this CLI-only change)
  • My code follows the existing code style (checked with Biome)
  • I've updated relevant documentation (not applicable; behavior is covered by a regression test)
  • This PR targets the main branch

Note

Low Risk
Small CLI environment propagation change with a targeted regression test; no auth or data-path changes.

Overview
When the CLI spawns the managed editor, MINT_PASCAL_HOST_ORIGIN is no longer forced to the local pascal.localhost URL. It now uses an operator-set value from the environment when present, and only falls back to state.url when unset.

A regression test starts the managed runtime with MINT_PASCAL_HOST_ORIGIN configured and asserts the spawned editor process sees that origin (via a test-only /mint-origin handler on the fake runtime server).

Reviewed by Cursor Bugbot for commit 7c07eaf. Bugbot is set up for automated code reviews on this repo. Configure here.

@pascal

pascal Bot commented Sep 8, 2026

Copy link
Copy Markdown

I hit an error while handling your request (Model unavailable on AI Gateway free tier: Free tier users do not have access to this model. Upgrade to paid credits at https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%3Fmodal%3Dtop-up for unrestricted…).

Please try again, rephrase, or reach out if it keeps failing.

Error id: a9468be0-58ae-4c76-9502-f93c0fd6e0d9

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.

MINT_PASCAL_HOST_ORIGIN is unconditionally overwritten, breaking the Mint plugin on any non-loopback deployment

1 participant