---
digest: >
  v0.39.2 is a patch release about input read the platform's way, most of it on Windows.
  `runtime diagnose` stops warning every Windows install that Node is unresolvable, and a
  PowerShell byte-order mark is no longer stored as identity content (PR #49, Rodrigo
  Immaginario). From that review, CR194: text on stdin is decoded by its mark, UTF-8 or
  UTF-16, and `identity set` and `journey update` gain `--file`, the route for any text
  longer than a line and the only safe one on Windows PowerShell 5.1, whose pipe is ASCII.
  `package-lock.json` names the package at its version after nine releases that left it
  behind (PR #48), and the release doctor now checks it (CR193). No migration, and no model
  or prompt change.
---

# v0.39.2 — Input, Read the Platform's Way

**Date:** 2026-11-03

## Highlights

- **`runtime diagnose` no longer warns every Windows install that Node is unresolvable**
  ([PR #49](https://github.com/mirror-mind-ai/mirror/pull/49), by @rodrigoimmaginario).
  It split the `PATH` on `:` and looked for `node`; on Windows that is `;` and `node.exe`,
  so nothing ever matched. It now looks the platform's way, and the test proves the Windows
  branch on every host.
- **A PowerShell byte-order mark is not content** (PR #49). `identity set` and
  `journey update -` drop the one at the head of stdin instead of storing it as the first
  character of an entry.
- **Text on stdin is decoded by its mark, and `--file` reads a file as bytes**
  ([CR194](../project/refinement/rs010-cv22-oracle-and-port-hygiene/cr194-powershell-stdin-reaches-identity-set-as-utf-16-or-ascii.md)).
  UTF-16, as Windows PowerShell 5.1's `>` writes it, is read as UTF-16. The pipe's ASCII
  default, which turns every accented letter into `?`, cannot be detected, so
  `identity set <layer> <key> --file <path>` and `journey update <slug> --file <path>` read
  the file themselves: the route for anything longer than a line on every platform, and
  the only safe one on PowerShell 5.1. The troubleshooting page names the three PowerShell
  behaviors and the way around each.
- **`package-lock.json` names `mirror-mind` at the package's version**
  ([PR #48](https://github.com/mirror-mind-ai/mirror/pull/48), by @rodrigoimmaginario),
  with a test that keeps it so. Its root had said `mirror-core 0.0.0` through nine releases,
  and the first `npm install` on any clone left the tree dirty.
- **The release doctor fails on a lock left behind**
  ([CR193](../project/refinement/rs010-cv22-oracle-and-port-hygiene/cr193-the-release-doctor-does-not-check-the-lockfile.md)),
  before anything is tagged, naming the command that levels it. This is the first release it
  checked.
- No migration, and no model or prompt change.

## Where We Started

Rodrigo Immaginario's PRs #48 and #49 had waited since 2026-10-19 and 2026-10-21. One
described a lockfile that nine releases in a row had left behind, each rebase of the PR
proving it again, the last of them v0.39.1 the afternoon before it merged. The other
described two inputs misread on Windows: a `PATH` split as if it were POSIX, so `runtime
diagnose` prescribed `MIRROR_NODE` to every healthy Windows install, and a byte-order mark
stored as the first character of an identity entry, repaired by hand on 2026-10-17.

Both were merged as written, each with one maintainer commit: the lock brought to the
current version so the PR's own test was green at merge, and `hookNodeFindings` given the
platform as a parameter so the branch the PR exists for is proved on macOS and Ubuntu,
where CI runs the suite, and not only on a Windows machine.

The review of PR #49 found the two hazards the BOM fix sat beside. In Windows PowerShell
5.1, `>` writes UTF-16LE, and the pipe to a native command goes through `$OutputEncoding`,
whose default is ASCII: Portuguese text arrives with every accent as `?`, and Mirror stored
what arrived. The second is not detectable — a `?` is a character — which is what shaped
CR194.

## What Changed

**One decoder for human text** (`ts/src/frontDoor/textInput.ts`). A UTF-8 or UTF-16 mark
at the head of the bytes chooses the decoding and is dropped; nothing else about the text
is touched. UTF-16 without a mark is not guessed at. `identity set` and `journey update -`
read stdin through it.

**`--file`, the route around the pipe.** Mirror reads the file as bytes, so the shell never
splits, substitutes, or re-encodes the text. `--file` beside `--content`, or beside `-`, is
refused in one line; a path that cannot be read is refused naming the path and nothing from
the error; nothing is written in either case. The skills present `--file` for anything
longer than a line, and keep the pipe for one-liners.

**`runtime diagnose` on Windows** looks for `node.exe` on a `;`-separated `PATH`, and only
`node.exe`: on Windows the executable check is an existence check, and an extensionless
`node` is nothing the system would run.

**The lockfile.** Regenerated once with `npm install --package-lock-only --ignore-scripts`;
`packageLock.test.ts` fails CI when its root and `package.json` disagree; the release doctor
makes the same four comparisons before the tag exists, and the versioning page names the
lock among what a release commit changes.

Validated on 2026-11-03 against a scratch copy of the maintainer's database: UTF-8, UTF-8
with a mark, and UTF-16LE as PowerShell 5.1 writes it, through `--file` and through stdin;
the refusals writing nothing; the one-liner pipe unchanged.

**Post-release Windows validation, 2026-11-03.** Rodrigo Immaginario ran v0.39.2 through
npm's `mirror.ps1` shim on Windows PowerShell 5.1.26100. `--file` preserved both unmarked
UTF-8 and UTF-16LE. The measurement also corrected the pipe documentation: for an
editor-saved unmarked UTF-8 file, UTF-8 `$OutputEncoding` is not enough because
`Get-Content` has already decoded the file through the ANSI code page. The complete pipe
route is `Get-Content -Encoding UTF8` plus UTF-8 `$OutputEncoding`. Evidence:
[PR #49](https://github.com/mirror-mind-ai/mirror/pull/49#issuecomment-6610137363).

## Conscious Exclusions

- At publication, Windows PowerShell 5.1 itself had not been run on the maintainer's side;
  the post-release validation above closed that measurement gap.
- Detecting text the ASCII pipe damaged: not possible without guessing.
- The hook wrappers and the MCP locator still accept a relative `MIRROR_NODE`
  ([CR192](../project/refinement/rs010-cv22-oracle-and-port-hygiene/cr192-the-hook-wrappers-and-the-mcp-locator-accept-a-relative-mirror-node.md),
  captured).
- The JSON stdin readers (`conversations append`, the hooks' payloads) are unchanged: their
  input comes from runtimes, which write UTF-8 without a mark.

## Upgrading

```bash
mirror runtime update
```

## Next Horizon

Rodrigo Immaginario's PRs #50, #53, and #54, all Windows and packaging; CR190 and CR192 in
RS010's backlog. CV24 continues on its branch.
