---
digest: >
  v0.33.3 is a maintenance release of one Change Request, CR140, carried by a
  contributor's pull request. Mirror read its own install path from
  `URL.pathname`, which spells a space as `%20`, `Código` as `C%C3%B3digo`, and
  `C:\` as `/C:/`. Under such a path a checkout or a package read as `Install:
  unknown`, the welcome card showed no update, and `runtime update` refused for
  a reason that was not true. The path is now a filesystem path, a guard keeps
  the idiom out of the code, and an `unknown` install names the path it looked
  up from. On Windows, npm's global layout is recognized and npm runs with no
  shell, verified on Windows in CI for the two files they touch; there is still
  no Windows product. People under such a path update once by hand; everyone
  else as usual. No migration.
---

# v0.33.3 — Mirror Finds Itself Under Any Path

**Date:** 2026-10-16

## Highlights

- **Mirror recognizes its own install under any path** (CR140, PR #42 by
  @rodrigoimmaginario, with the macOS reproduction by @lgarciasbr). A checkout or a
  package under `My Projects`, `Código`, or `C:\Users\John Doe` read as `Install:
  unknown`; it reads as what it is.
- **An `unknown` install names the path it looked up from.** `Install: unknown (<reason>;
  looked up from <path>)`, with the path spelled as the detector saw it, so a wrong
  spelling is wrong in the report instead of hidden behind `not a git checkout`.
- **The idiom cannot come back.** A retired-surface row, `url-pathname-as-path`, sweeps
  `ts/src/` and `ts/scripts/` for a URL's pathname read as a filesystem path. Widening it
  to the scripts caught a second instance on the first run.
- **On Windows, the install answers too.** npm's Windows global layout
  (`<prefix>\node_modules\<name>` and a `<prefix>\<bin>.cmd` shim) is recognized, and npm
  runs with no shell, as `node.exe` running `npm-cli.js`. Both run on Windows in CI, for
  the two test files they touch. There is still no Windows product.
- **People this release is for cannot take it the usual way.** Their `runtime update`
  refuses them; see Upgrading.

## Where We Started

Every route that asks "how is this Mirror installed" hands the detector the front door's
own path, and two of them computed it as `new URL("…/cli.ts", import.meta.url).pathname`.
A URL's pathname is not a filesystem path: it percent-encodes every reserved or non-ASCII
character, and on Windows it spells a drive as `/C:/`. None of those paths exist, so no
`.git` was found above the front door, no manifest either, and the install was `unknown`
with a reason that was false for a checkout whose branch the same command named a few
lines down.

Three surfaces failed together. `runtime status` printed `Install: unknown`, and since
`v0.33.2` the repository rows went blank with it. The welcome card skips the remote update
check for an `unknown` install, so nobody under such a path was told an update existed.
And `runtime update` refused at its status gate, so the updater could not ship its own
fix to the people it affected.

It was reported twice within a day, independently: on Windows 11, where it first looked
Windows-specific, and on macOS under `~/Documents/Código/mirror` at `0.32.1` and `0.33.2`.
Review found the common case neither report named: a space. `/tmp/space only` read as
`unknown` the same way, and on Windows that is most home directories.

## What Changed

**The path never enters URL form.** One `thisFrontDoorPath()` in
`ts/src/runtime/installKind.ts` joins from `import.meta.dirname`, and every route hands
the detector that. The first version of the fix converted out of the URL with
`fileURLToPath`; the review asked for the form in which the class of bug is not possible,
which is the idiom `ts/src/runtime/treeRoot.ts` already used.

**A guard, not a memory.** The retired-surface table gained its first row that retires an
idiom rather than a deleted file: `url-pathname-as-path`, with the code shapes as patterns
so prose may still name `URL.pathname`. Its live-tree sweep runs in the suite. We checked
the pin by putting `.pathname` back locally and watching it fail.

**The `unknown` reason carries evidence.** It ends with `; looked up from <path>`. Had
that line existed, the first report would have carried its own diagnosis.

**Windows, honestly scoped.** The layout detector accepts npm's Windows shape, with the
shim's own text as the evidence that the bin reaches into this package, since nothing
resolves. npm is spawned as `npm.cmd` itself spawns it, `npm-cli.js` beside `node.exe`
through the running node: no shell, so the welcome card's timeout kills npm itself rather
than a shell above it (CVE-2024-27980 is why Node refuses `.cmd` without one). When no
`npm-cli.js` sits beside the node, the answer is a named absence reported as "npm
unavailable", not a module-not-found stack. One accepted difference from `npm.cmd`: it
runs the npm bundled with the running node, not one the person upgraded under the
prefix.

A `windows-install-kind` job on `windows-latest` runs `installKind.test.ts` and
`packageStrategy.test.ts`, about 25 seconds. On its first run on `main` it failed: on a
test written on macOS the same day, by the reviewer who asked for the job, comparing a
fixture against its POSIX spelling where Windows adds a drive. Fixed the way the PR had
fixed six others.

**Verified where it matters.** The install-from-nothing smoke, which packs this tree and
installs it into a scratch prefix, was run under `/tmp/mirror pkg Código`: 76 checks, all
passing, through `init`, `seed`, `status`, every runtime's hooks, and the MCP launcher.
The smoke itself needed one fix first: its Gemini section split the work directory on
the space, the same assumption this release removes from the product.

### What you will notice

- Under a path with a space or an accent, `runtime status` reads `Install: clone (…)` or
  `Install: package (…)`, the welcome card checks for updates again, and `runtime update`
  works, after the one manual update below.
- Under any other path, nothing. The POSIX layout is checked first and is unchanged.
- An install that is still `unknown` tells you where it looked.

## Upgrading

If your Mirror lives under a path with a space or a non-ASCII character anywhere above
it, the version you have cannot update itself: `runtime update` refuses it. Once, by
hand:

```bash
# a clone: in the checkout
git fetch origin
git merge --ff-only origin/stable   # origin/main if the clone follows main
# a package
npm install -g mirror-mind@latest
```

From then on `mirror runtime update` works as documented. Everyone else:

```bash
mirror runtime update          # or: npm install -g mirror-mind
```

There is no database migration and no runtime wiring change.

*Corrected on 2026-10-29:* the clone line first read `git pull --ff-only`. A clone follows
`stable` unless you chose `main`. On `main`, that command pulls past the release, so the
next `runtime update` refused with `plan: local commits present` (CR186). If that happened
to you, your checkout is fine. Every later release contains the commits it pulled, so
`runtime update` works again from the next release on. `mirror runtime channel main`
follows `main` instead.

## Conscious Exclusions

- **A Windows product.** REFERENCE.md's platform envelope stands: POSIX. The Windows
  changes here are correct where they run and verified on Windows for their two files;
  the hook wrappers, the plugin's MCP entry, `init`'s wiring, and the suite as a whole
  are not. The contributor describes a series toward that; its shape is not decided.
- **The `frame-installer` guard row's `absentSuffixes`** (`.cmd`, `.ps1`) will meet that
  series and is to be raised there, not here.
- **The guard's `identifier.pathname` pattern** would also flag a legitimate
  `request.pathname` if `ts/src` ever grows HTTP routing. The row's `exemptions` field is
  for that day.
- **Counting verdicts as front-door errors** (CR139), unchanged from `v0.33.2`.

## What We Learned

A diagnostic that names a conclusion is a diagnostic that lies when the conclusion is
wrong. `not a git checkout` was false, and nothing in the line let anyone see why. A
diagnostic that names evidence, the path it walked, is true even when the detector is
wrong, and it turns a two-platform debugging session into one line read once.

The strong form of a fix removes the class, not the instance. `fileURLToPath` fixed every
path that exists; `import.meta.dirname` made the question of URL spelling unaskable, and
the guard made the answer durable. The review asked for the second, and the contributor
delivered it with a guard that found a second instance on its own.

A CI job earns its place on its first catch, and this one's first catch was the person
who asked for it.

## Next Horizon

CR139, the verdict loop, is the visible next step in RS010. The contributor's Windows
series, if it comes, begins with the suite on `windows-latest`.
