From cce12540934e53f3db42316d08de8c9d287acee7 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 12 Sep 2026 06:19:20 +0000 Subject: [PATCH] test(cli): drive `migrate account-issuer --json` in the stdout-purity family MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `json-stdout-purity.e2e.test.ts` discovers its family from the source tree — every command that calls `bootSchemaStack` and declares a `--json` flag — and reconciles the discovered set against the hand-listed `FAMILY`, whose values are the argv that actually drive each member through `describe.each`. #17454 landed `os migrate account-issuer`, a new `--json` face on that seam, without a `FAMILY` row, so discovery found 13 members against 12 listed and the reconciliation went red. It merged green because this file is `*.e2e.test.*` and therefore runs only under `OS_TEST_TIERS=nightly`, which no pull request exercises. The row is added with the argv that drives it, not merely listed: the bare form boots (it takes the `os migrate plan` shape — `deferSchemaDdl` + `readOnlyProbe` — so a missing sqlite file is opened as an empty in-memory database rather than created), and the driven run satisfies all three halves of the contract on its own: one JSON document on stdout, no kernel-logger record or `[StandaloneStack]` line there, and every boot diagnostic still on stderr. `CONFIG_MISS_FAMILY` is deliberately unchanged: the pre-boot family is the commands that refuse at `resolveConfigPath()`, and this one never reaches that helper — it does not import `utils/config.js`, and the source-read `discoverConfigMissFamily()` returns the same ten members. The overlap assertion stays `['migrate meta']`. Claude-Session: https://claude.ai/code/session_01TSf4DV7ziu4V5j73e46b7c Co-authored-by: Claude --- packages/cli/test/json-stdout-purity.e2e.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/cli/test/json-stdout-purity.e2e.test.ts b/packages/cli/test/json-stdout-purity.e2e.test.ts index 7958e0a1c39..d30b0f4d06e 100644 --- a/packages/cli/test/json-stdout-purity.e2e.test.ts +++ b/packages/cli/test/json-stdout-purity.e2e.test.ts @@ -81,6 +81,14 @@ const COMMANDS_DIR = resolve(HERE, '../src/commands'); */ const FAMILY: Record = { 'meta resync': [], + // Its bare form boots: it takes the `os migrate plan` shape (`deferSchemaDdl` + // + `readOnlyProbe`), so a fixture with no database file is opened as an + // empty in-memory one rather than being brought into existence. No table + // exists there, so the face driven here is the command's REFUSAL face — the + // `emitJson(…, 1, { compact: true })` branch, which is the noisier of its two + // emit paths and therefore the one worth pinning: every driver and kernel + // diagnostic the failed scan produces is emitted before it. + 'migrate account-issuer': [], 'migrate apply': [], 'migrate files-to-references': [], 'migrate meta': ['--stored'],