Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
doctor minions_migration: an opt-out version is unknown without an engine
garrytan78273664851f
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 1fa67291b8..4a5e0ad09f 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -18,6 +18,7 @@ identifiers and attribution are available in the pre-removal Git revision- `timeline_history`: on a brain with more than 10,000 pages carrying database-only timeline rows, a pass keeps only the first 10,000 for its final recount. It used to report that recount as exact, and a pass whose kept pages had been repaired was recorded as clean while the rest still held database-only rows. Such a pass now reports its counts as a lower bound ("at least"), keeps warning, and is never trusted as clean. Reported by @Masashi-Ono0611 (#8511).- `conversation_format_coverage`: the sample now includes pages stored under the granular conversation types the extractor already reads (`slack-thread`, `slack-dm-day`, `email-digest`), so unparseable transcripts on a brain that never ran the type-consolidation pack are reported instead of silently skipped. Reported by @Masashi-Ono0611 (#8519).+- `minions_migration` under `gbrain doctor --fast`: a migration the brain's config can decline (v0.53.0, `shared_skills.migration.enabled`) is no longer listed as not run. Without a database connection the check cannot read that setting, and `gbrain apply-migrations --yes` skips a declined migration, so the warning could never clear. The full `gbrain doctor` still reports it when it is not declined. Reported by @Masashi-Ono0611 (#8721).## [0.60.620.0] - 2026-11-09diff --git a/docs/architecture/key-files/commands-4.md b/docs/architecture/key-files/commands-4.mdindex 98312c7f12..3be86004cd 100644--- a/docs/architecture/key-files/commands-4.md+++ b/docs/architecture/key-files/commands-4.md@@ -27,7 +27,7 @@ Current behavior and load-bearing invariants; history belongs in Git and CHANGEL- `src/commands/migrate-engine.ts` — Legacy engine copier (`gbrain migrate --to pglite`, and PGLite → Postgres when `migrate.graduation` is `false`). A PGLite → Postgres move routes to `src/commands/migrate-graduation.ts` (engine graduation) before connect and never reaches this file. Copies the complete source catalog FIRST (`copyMigrationSources` — every `sources` row incl. archived rows and sync/routing metadata, `ON CONFLICT (id) DO UPDATE`, `default` ordered first) so every page write has a valid `pages.source_id` FK parent and the target preserves per-source behavior; pages copy afterward: `listAllPageRefs` lists every live page's `(source_id, slug)` in one uncapped query, `copyMigrationPages` reads each body with `getPage(slug, { sourceId })` (a page soft-deleted after the listing reads null and is skipped, reported, and kept out of the link copy; it is not a failure), and each page is tracked in the resume manifest by composite `(source_id, slug)` key. Link copy preserves each row's `to_source_id` (falling back to the origin source only for legacy rows without it), and failed-target filtering uses that same target composite key, so cross-source links migrate without being rebound to the origin source. The resume manifest is target-aware: `migrationTargetId(config)` hashes `(engine, locator)` (`database_url` for Postgres, resolved `database_path` for PGLite) and `manifestMatchesTarget` requires `schema_version === 2` plus a matching `target_id` — a legacy engine-only manifest, or one from a DIFFERENT target of the same engine kind, starts fresh instead of skipping "completed" pages the new target never received. After links, `copyMigrationFacts` carries the facts table verbatim (conversation facts have no markdown fence to re-sync from): source∩target column intersection via information_schema (older source schemas still copy), delete-and-recopy so every re-run converges to source truth, two-pass `superseded_by` restore (the self-FK points old→newer id, so id-ordered single-pass inserts would violate it), embeddings round-tripped as text into whichever physical type (`vector`/`halfvec`) the target column has with a NULL-embedding retry on per-row cast failure, and a `setval` bump so post-migration inserts don't collide with copied ids; fact-row failures block the config flip and force a non-zero exit, same contract as page failures. Takes are deliberately NOT copied (fence-canonical, keyed on target-reassigned `page_id`; the next extract cycle rebuilds them). `copyMigrationConfig` then copies EVERY DB-plane config row except the explicit engine-local denylist `MIGRATE_CONFIG_ENGINE_LOCAL_KEYS` (`engine`, `version` = target-owned schema ledger, `embedding_columns` + `search_embedding_column` = physical-column registry the copy doesn't materialize); skipped keys print in the end-of-run per-table copied-count summary, so nothing is dropped silently. Pinned by `test/migrate-engine-resume.test.ts` (manifest identity) + `test/e2e/migrate-engine-sources-postgres.test.ts` (source catalog lands before overlapping-slug pages, PGLite → real Postgres) + `test/e2e/multi-source-bug-class.test.ts` (cross-source links) + `test/migrate-engine-completeness.serial.test.ts` (facts chains/embeddings/sequence, config copy-all + denylist, summary) + `test/migrate-engine-pagination.serial.test.ts` (no listing cap; a page deleted mid-copy). Legacy engine copies explicitly include stored unverified chunks and queue sanitized text rebuilding under the target revision; retrieval stays gated until rebuilt. #6286: `copyPageToTarget` forwards the full page row (`page_kind`, `source_path`, effective date and its source, `import_filename`, `source_kind`/`source_uri`/`ingested_via`, `ingested_at` restored in the timestamp UPDATE), the frontmatter aliases (`setPageAliases`) and each chunk's code metadata (`carryChunkMetadata`). A page sealed on the source is queued `engine_migration`; one the source had not sealed is queued `engine_migration_source_unsealed` and keeps its verbatim chunks and vectors. Before the config flip, while autopilot is paused, `runMigrateEngine` runs `drainProjections` (moved to `src/core/page-state/projections.ts`; `commands/projections.ts` re-exports it) on the target for the `engine_migration` and `rebuild_failed` reasons, keyless; the rebuild keeps chunk ids and vectors whose identity and embedding input match, so the first sync after the flip skips unchanged pages. A failed rebuild blocks the flip with exit 1, like a page that failed to copy. Pinned by `test/migrate-full-row-projections.serial.test.ts`, `test/e2e/migrate-full-row-projections-postgres.test.ts` and a D2 case in `test/e2e/migrate-engine-pglite-to-postgres.test.ts`. Open-loop and loop-suppression rows the target refuses (`copyMigrationSimpleTable`, per-row `ItemRun` site `migrate_engine.loop_rows`) are printed with their id and reason, block the config flip and set exit 1; a run-scoped failure stops the copy (`test/pathological/a31-migrate-loop-rows.serial.test.ts`). Both source and target refuse any durable request history, withdrawal ledger, or ownership record before copying/clearing because this copier cannot preserve those identities.-- `src/commands/migrations/` — TS migration registry (compiled into the binary; no runtime walk of `skills/migrations/*.md`). `index.ts` lists migrations in semver order. `v0_11_0.ts` = Minions adoption orchestrator (8 phases). `v0_12_0.ts` = Knowledge Graph auto-wire orchestrator (5 phases: schema → config check → backfill links → backfill timeline → verify); `phaseASchema` has a 600s timeout for duplicate-heavy brains; the config check reads `auto_link` in-process (file/env plane, then the database), never through a `gbrain config get` child. `v0_12_2.ts` = JSONB double-encode repair orchestrator (4 phases: schema → repair-jsonb → verify → record). `v0_14_0.ts` = shell-jobs + autopilot cooperative (pending-host-work ping for skills/migrations/v0.14.0.md; raises `minion_jobs.max_stalled`'s default to 3 only when it is below 3, so it never lowers schema v15's 5). Fresh installs (E8): `Migration.fresh_install_noop: true` marks an orchestrator that changes nothing on a brain `gbrain init` just created; `fresh-install.ts:recordFreshInstallMigrations` (one call in each init engine path, only when init created the database) appends a `complete` ledger entry with `fresh_install: true` + `installed_version` for each, and every other migration lists as `pending_fresh_install` (`src/core/migration-ledger.ts:freshInstallVersion`/`isPendingFreshInstall`) in `apply-migrations --list [--json]`/`--dry-run`, `get_health.migrations` and doctor's `minions_migration` (an `ok`/`info` row with `gbrain apply-migrations --yes --no-autopilot-install`); stamps never count as forward progress over a real partial. Each flag is proven by `test/migrations-fresh-install-audit.serial.test.ts` (schema, row counts, config table and GBRAIN_HOME file tree unchanged by the real orchestrator on a keyless `init --pglite --no-embedding` brain); unit coverage `test/migrations-fresh-install.test.ts`. `shared-content.ts` names its read-only next step as phase `argv` (`SHARED_CONTENT_INSPECT_ARGV`), which the runner prints and the ledger keeps. #6466 opt-out: `Migration.optOut: { key }` names a brain-level DB config key (`shared-content.ts`: `shared_skills.migration.enabled`, the registry-free table `MIGRATION_OPT_OUT_KEYS` in `src/core/migration-ledger.ts`, pinned to every module's `optOut`); an explicit off value (`false`/`0`/`off`/`no`, `isMigrationDeclinedValue`) puts the migration in the plan's `declined` bucket (`opt-out.ts:readDeclinedMigrations`, read before `buildPlan`; an unreachable brain declines nothing), so the runner never calls its orchestrator, reconcile included, `--list [--json]` and `--dry-run` show it `declined` with `opt_out.key`, and an explicit `--migration <v>` refuses `migration_declined` (exit 3, `fix.next: ask_user`, `gbrain config set <key> true`, verify `--list --json`). `migrationLedgerSummary(VERSION, declined)` gives `get_health.migrations.declined` and doctor's `minions_migration` an `ok` row with `details.declined`. Tests: `test/shared-skills-migration-decline-6466.test.ts`. All orchestrators are idempotent and resumable from `partial` status. The RUNNER owns all ledger writes — orchestrators return `OrchestratorResult` and `apply-migrations.ts` persists a canonical `{version, status, phases}` shape (orchestrators never call `appendCompletedMigration`). `statusForVersion` prefers `complete` over `partial` (never regresses); 3 consecutive partials → wedged → `--force-retry <version>` writes a `'retry'` reset marker. Schema-only migrations v14 (`pages_updated_at_index`) + v15 (`minion_jobs_max_stalled_default_5` with UPDATE backfill) live in `src/core/schema-migrations/v014-pages-updated-at-index.ts` and `v015-minion-jobs-max-stalled-default-5.ts` (one file per schema migration; `migrate.ts` is the runner). `in-process.ts` exports `runMigrateOnlyCore({timeoutMs?})` — single source of truth for "bring schema to head" (`configureGateway` → `createEngine` → `connect` → `initSchema` → `disconnect`, idempotent, 600s `MIGRATE_ONLY_TIMEOUT_MS` guard, throws `MigrateOnlyError` on no-config / timeout); the orchestrators' 9 schema phases AND `init.ts:initMigrateOnly` both delegate to it so schema bring-up can't drift (in-process, so no spawn can die with `getaddrinfo ENOTFOUND` on Windows + bun + Supabase pooler). `runGbrainSubprocess` is the diagnostic wrapper for the remaining non-schema spawns (extract/repair/stats): captures child stderr (64MB buffer) into the thrown error. `v0_13_1.ts` is an idempotent no-op since #7814: it records completion and writes no page (it used to stamp `validate: false` into every page on any brain whose ledger never recorded v0.13.1). Pinned by `test/migrations-v0_13_1.test.ts` and the upgrade contract `test/upgrade-preserves-pages-7814.slow.test.ts`.+- `src/commands/migrations/` — TS migration registry (compiled into the binary; no runtime walk of `skills/migrations/*.md`). `index.ts` lists migrations in semver order. `v0_11_0.ts` = Minions adoption orchestrator (8 phases). `v0_12_0.ts` = Knowledge Graph auto-wire orchestrator (5 phases: schema → config check → backfill links → backfill timeline → verify); `phaseASchema` has a 600s timeout for duplicate-heavy brains; the config check reads `auto_link` in-process (file/env plane, then the database), never through a `gbrain config get` child. `v0_12_2.ts` = JSONB double-encode repair orchestrator (4 phases: schema → repair-jsonb → verify → record). `v0_14_0.ts` = shell-jobs + autopilot cooperative (pending-host-work ping for skills/migrations/v0.14.0.md; raises `minion_jobs.max_stalled`'s default to 3 only when it is below 3, so it never lowers schema v15's 5). Fresh installs (E8): `Migration.fresh_install_noop: true` marks an orchestrator that changes nothing on a brain `gbrain init` just created; `fresh-install.ts:recordFreshInstallMigrations` (one call in each init engine path, only when init created the database) appends a `complete` ledger entry with `fresh_install: true` + `installed_version` for each, and every other migration lists as `pending_fresh_install` (`src/core/migration-ledger.ts:freshInstallVersion`/`isPendingFreshInstall`) in `apply-migrations --list [--json]`/`--dry-run`, `get_health.migrations` and doctor's `minions_migration` (an `ok`/`info` row with `gbrain apply-migrations --yes --no-autopilot-install`); stamps never count as forward progress over a real partial. Each flag is proven by `test/migrations-fresh-install-audit.serial.test.ts` (schema, row counts, config table and GBRAIN_HOME file tree unchanged by the real orchestrator on a keyless `init --pglite --no-embedding` brain); unit coverage `test/migrations-fresh-install.test.ts`. `shared-content.ts` names its read-only next step as phase `argv` (`SHARED_CONTENT_INSPECT_ARGV`), which the runner prints and the ledger keeps. #6466 opt-out: `Migration.optOut: { key }` names a brain-level DB config key (`shared-content.ts`: `shared_skills.migration.enabled`, the registry-free table `MIGRATION_OPT_OUT_KEYS` in `src/core/migration-ledger.ts`, pinned to every module's `optOut`); an explicit off value (`false`/`0`/`off`/`no`, `isMigrationDeclinedValue`) puts the migration in the plan's `declined` bucket (`opt-out.ts:readDeclinedMigrations`, read before `buildPlan`; an unreachable brain declines nothing), so the runner never calls its orchestrator, reconcile included, `--list [--json]` and `--dry-run` show it `declined` with `opt_out.key`, and an explicit `--migration <v>` refuses `migration_declined` (exit 3, `fix.next: ask_user`, `gbrain config set <key> true`, verify `--list --json`). `migrationLedgerSummary(VERSION, declined)` gives `get_health.migrations.declined` and doctor's `minions_migration` an `ok` row with `details.declined`; with no engine (`doctor --fast`) the config is unreadable, so `minions_migration` leaves every `MIGRATION_OPT_OUT_KEYS` version out of its not-run list (#8720). Tests: `test/shared-skills-migration-decline-6466.test.ts`, `test/doctor-fast-declined-migration-8720.test.ts`. All orchestrators are idempotent and resumable from `partial` status. The RUNNER owns all ledger writes — orchestrators return `OrchestratorResult` and `apply-migrations.ts` persists a canonical `{version, status, phases}` shape (orchestrators never call `appendCompletedMigration`). `statusForVersion` prefers `complete` over `partial` (never regresses); 3 consecutive partials → wedged → `--force-retry <version>` writes a `'retry'` reset marker. Schema-only migrations v14 (`pages_updated_at_index`) + v15 (`minion_jobs_max_stalled_default_5` with UPDATE backfill) live in `src/core/schema-migrations/v014-pages-updated-at-index.ts` and `v015-minion-jobs-max-stalled-default-5.ts` (one file per schema migration; `migrate.ts` is the runner). `in-process.ts` exports `runMigrateOnlyCore({timeoutMs?})` — single source of truth for "bring schema to head" (`configureGateway` → `createEngine` → `connect` → `initSchema` → `disconnect`, idempotent, 600s `MIGRATE_ONLY_TIMEOUT_MS` guard, throws `MigrateOnlyError` on no-config / timeout); the orchestrators' 9 schema phases AND `init.ts:initMigrateOnly` both delegate to it so schema bring-up can't drift (in-process, so no spawn can die with `getaddrinfo ENOTFOUND` on Windows + bun + Supabase pooler). `runGbrainSubprocess` is the diagnostic wrapper for the remaining non-schema spawns (extract/repair/stats): captures child stderr (64MB buffer) into the thrown error. `v0_13_1.ts` is an idempotent no-op since #7814: it records completion and writes no page (it used to stamp `validate: false` into every page on any brain whose ledger never recorded v0.13.1). Pinned by `test/migrations-v0_13_1.test.ts` and the upgrade contract `test/upgrade-preserves-pages-7814.slow.test.ts`.- `src/commands/migrations/v0_46_3.ts` — idempotent no-op for a retired notification. Returns a complete migration with a skipped notice phase; performs no database, config, provider, vector or pending-work writes. Its feature pitch points to read-only status and explicit-target migration previews.- `src/commands/migrations/v0_60_31.ts` — the security fix wave orchestrated migration (ledger `0.60.31`), two phases. `credential_projection`: runs `runMigrateOnlyCore` first (schema v189 marks the pages; PGLite skips the runner's schema pre-flight), then `resealCredentialProjections`, provider-free and never embedding; a dry run reports the count; a page whose re-chunk fails item-scoped is held (`credential-reseal.ts`) and the phase completes with `held: N` and the codes in its detail (doctor `text_projection_readiness` lists the pages, `gbrain repair safe-chunks --source <id> --apply` retries them); a run-scoped failure or a systemic one (`item_failures_systemic`) fails the phase with its code, so the run is `partial` and `gbrain apply-migrations --yes --no-autopilot-install` retries it, and re-sealed pages are no longer pending, so a rerun resumes. `google_file_modes_notice`: `googleFileModesNoticePhase` from `v0_60_31-google-file-modes.ts`. A brain without config completes with the phase skipped. Agent instructions: `skills/migrations/v0.60.31.0.md`.diff --git a/docs/guides/minions-fix.md b/docs/guides/minions-fix.mdindex d49e335078..2c35d9e200 100644--- a/docs/guides/minions-fix.md+++ b/docs/guides/minions-fix.md@@ -453,9 +453,13 @@ is pending again, and doctor warns that it has not run yet with the plaina host migration that a newer one already ran past, so it never ran:```-[WARN] minions_migration: 1 host migration(s) not run yet: 0.53.0. Run: gbrain apply-migrations --yes+[WARN] minions_migration: 1 host migration(s) not run yet: 0.46.3. Run: gbrain apply-migrations --yes```+`gbrain doctor --fast` has no database connection, so it cannot read the+brain config that declines an opt-out migration (v0.53.0) and leaves such a+version out of that list; the full `gbrain doctor` reports it.+(Missing `~/.gbrain/preferences.json` on a fresh install is a validpre-`apply-migrations` state — doctor deliberately does NOT fail on thatalone; the partial-migration record is the canonical half-migration signal.)diff --git a/docs/guides/shared-brain-skills.md b/docs/guides/shared-brain-skills.mdindex a5a25ec922..482e60df7a 100644--- a/docs/guides/shared-brain-skills.md+++ b/docs/guides/shared-brain-skills.md@@ -423,7 +423,8 @@ uses that database. From then on `gbrain apply-migrations` (including thev0.53.0 entirely: no inventory, no `shared_skills.migration.v1*` configwrites, and the applied-migration re-check does not run. `gbrainapply-migrations --list` and `--dry-run` show it as `declined` with the key,-`gbrain doctor` reports `minions_migration` ok with `declined: ['0.53.0']`,+`gbrain doctor` reports `minions_migration` ok with `declined: ['0.53.0']`+(`gbrain doctor --fast` cannot read the key and never lists v0.53.0 as not run),and `get_health.migrations.declined` lists it. An explicit `gbrainapply-migrations --migration 0.53.0` refuses with `migration_declined` (exit3) and the command that turns it back on instead of overriding the owner'sdiff --git a/src/commands/doctor/checks/local-runtime.ts b/src/commands/doctor/checks/local-runtime.tsindex e44914d7d5..a3f515f6b3 100644--- a/src/commands/doctor/checks/local-runtime.ts+++ b/src/commands/doctor/checks/local-runtime.ts@@ -182,9 +182,12 @@ async function runMinionsMigration(ctx: DoctorContext): Promise<Check[]> {// entry, or reset by a retry marker) that a NEWER migration already ran// past were skipped, not merely not reached yet. Versions above the newest// run are the next apply-migrations' ordinary work and stay quiet here.+ // #8720: without an engine (--fast) the config that declines an opt-out+ // migration is unreadable, so such a version is unknown, never pending.const newestRun = completedVersions.reduce<string | null>((a, v) => (a === null || compareVersions(v, a) > 0 ? v : a), null);const pending = completed.length === 0 ? [] : migrationLedgerSummary(VERSION, declined).pending.filter(v =>- (newestRun !== null && compareVersions(v, newestRun) < 0) || history.get(v)?.at(-1)?.status === 'retry');+ (engine || !(v in MIGRATION_OPT_OUT_KEYS))+ && ((newestRun !== null && compareVersions(v, newestRun) < 0) || history.get(v)?.at(-1)?.status === 'retry'));if (declined.size > 0) {const keys = [...declined].map(v => `${MIGRATION_OPT_OUT_KEYS[v]}=false`);diff --git a/test/doctor-fast-declined-migration-8720.test.ts b/test/doctor-fast-declined-migration-8720.test.tsnew file mode 100644index 0000000000..e3d7fbb6e7--- /dev/null+++ b/test/doctor-fast-declined-migration-8720.test.ts@@ -0,0 +1,47 @@+/**+ * #8720: `doctor --fast` runs without an engine, so the brain config that+ * declines an opt-out migration (MIGRATION_OPT_OUT_KEYS) is unreadable. The+ * check listed such a version as "not run yet" with `apply-migrations --yes`,+ * which skips a declined migration and so can never clear the warning.+ * Without an engine an opt-out version is unknown, not pending; with an+ * engine an undeclined one is still reported.+ */+import { afterAll, beforeAll, expect, test } from 'bun:test';+import { mkdirSync, rmSync, writeFileSync } from 'node:fs';+import { join } from 'node:path';+import { PGLiteEngine } from '../src/core/pglite-engine.ts';+import { MIGRATION_OPT_OUT_KEYS } from '../src/core/migration-ledger.ts';+import { minionsMigrationEntry } from '../src/commands/doctor/checks/local-runtime.ts';+import type { DoctorContext } from '../src/commands/doctor/context.ts';+import type { Check } from '../src/commands/doctor.ts';+import { emptyHome, withEnv } from './helpers/with-env.ts';++const OPT_OUT = Object.keys(MIGRATION_OPT_OUT_KEYS)[0]!;+let home: string;+let engine: PGLiteEngine;++beforeAll(async () => {+ home = emptyHome();+ mkdirSync(join(home, '.gbrain', 'migrations'), { recursive: true });+ writeFileSync(join(home, '.gbrain', 'migrations', 'completed.jsonl'),+ JSON.stringify({ version: '0.60.31', status: 'complete', ts: '2026-01-01T00:00:00Z' }) + '\n');+ engine = new PGLiteEngine();+ await engine.connect({});+ await engine.initSchema();+}, 60_000);+afterAll(async () => { await engine.disconnect(); rmSync(home, { recursive: true, force: true }); });++const pendingChecks = (engineOrNull: PGLiteEngine | null) => withEnv({ GBRAIN_HOME: home }, async () => {+ const ctx = { engine: engineOrNull, progress: { heartbeat() {}, finish() {} }, args: engineOrNull ? [] : ['--fast'] } as unknown as DoctorContext;+ return (await minionsMigrationEntry.run(ctx) as Check[]).filter(c => c.name === 'minions_migration' && c.status === 'warn');+});++test('without an engine an opt-out migration is not reported as not run', async () => {+ const warns = await pendingChecks(null);+ expect(warns.map(c => c.message).join(' ')).not.toContain(OPT_OUT);+});++test('with an engine and the migration not declined it is still reported as not run', async () => {+ const warns = await pendingChecks(engine);+ expect(warns.map(c => c.message).join(' ')).toContain(OPT_OUT);+});diff --git a/test/doctor-minions-check.test.ts b/test/doctor-minions-check.test.tsindex 256f3a2d61..25139db83d 100644--- a/test/doctor-minions-check.test.ts+++ b/test/doctor-minions-check.test.ts@@ -252,20 +252,21 @@ describe('gbrain doctor — half-migrated Minions detection', () => {});test('C-NEW-2: after --force-retry the version is pending, not still wedged', async () => {- seedLedger(['partial', 'partial', 'partial', 'retry'].map(status => ({ version: '0.53.0', status })));+ // #8720: an opt-out version (0.53.0) is unknown without an engine, so these use a plain host migration.+ seedLedger(['partial', 'partial', 'partial', 'retry'].map(status => ({ version: '0.46.3', status })));const result = await runFastChecks();const minions = result.checks.find(c => c.name === 'minions_migration');expect(minions!.status).toBe('warn');- expect(minions!.message).toBe('1 host migration(s) not run yet: 0.53.0. Run: gbrain apply-migrations --yes');+ expect(minions!.message).toBe('1 host migration(s) not run yet: 0.46.3. Run: gbrain apply-migrations --yes');expect(result.exitCode).toBe(0);});test('C-NEW-3: a host migration a newer one skipped past is reported as never run', async () => {- seedLedger(MIGRATION_VERSIONS.filter(v => v !== '0.53.0').map(version => ({ version, status: 'complete' })));+ seedLedger(MIGRATION_VERSIONS.filter(v => v !== '0.46.3').map(version => ({ version, status: 'complete' })));const minions = (await runFastChecks()).checks.find(c => c.name === 'minions_migration');expect(minions!.status).toBe('warn');- expect(minions!.message).toBe('1 host migration(s) not run yet: 0.53.0. Run: gbrain apply-migrations --yes');- expect((minions!.details as { pending: string[] }).pending).toEqual(['0.53.0']);+ expect(minions!.message).toBe('1 host migration(s) not run yet: 0.46.3. Run: gbrain apply-migrations --yes');+ expect((minions!.details as { pending: string[] }).pending).toEqual(['0.46.3']);});test('human output: prints MINIONS HALF-INSTALLED loud banner', async () => {