Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

test(#5032): start the Windows fixture from the native realpath (8.3 TEMP on windows-latest); file the preflight follow-up

garrytanbecc8924e4cf
diff --git a/TODOS.md b/TODOS.md
index 0f06decab9..3cceac2684 100644
--- a/TODOS.md
+++ b/TODOS.md
@@ -19,6 +19,8 @@
## Fix wave 5 follow-ups (filed 2026-10-01, follow-up from v0.60.28.0)
+- [ ] **P3 — Windows: unmanaged sync refuses a repo under an 8.3 short path.**
+ **What:** `resolveSyncRepo` (`src/commands/sync/preflight.ts`) compares `realpathSync(scope)` with the git root git reports. On Windows `realpathSync` keeps an 8.3 component (`RUNNER~1`) while git returns the long form, so the scope-entry guard refuses with "resolves outside git repo". Seen on the windows-latest runner, whose TEMP is a short path; the #5032 test fixture now starts from `realpathSync.native(tmpdir())`. **Fix:** compare `realpathSync.native` on both sides. **Effort:** S. **Priority:** P3.
- [ ] **P2 — Codex managed block is a singleton shared by `connect --harness codex` and `bootstrap harness` (#5775 follow-up).**
**What:** `src/core/bootstrap/codex-toml.ts` keeps exactly one `# gbrain:bootstrap-harness-v1 begin/end` pair per file; `writeCodexHttpServerBlock` strips any existing managed block regardless of its server name and writes its own, and `removeCodexHttpServerBlock(path, name)` removes the block whatever name it holds. Writing `[mcp_servers.gbrain]` (connect) then `[mcp_servers.gbrain-framework]` (bootstrap) leaves only the second; removing `gbrain-framework` while the block holds `gbrain` deletes it. `connect --install` refuses over a bootstrap-written block, but `bootstrap harness` and `bootstrap harness --remove` silently replace or remove a connect-installed block. **Fix:** per-name markers, or an ownership check in the bootstrap lane. **Effort:** S-M. **Priority:** P2.
- [ ] **P3 — Expired inline-token warning for `connect --status` (#5775 follow-up).**
diff --git a/test/colon-slug-windows-5032.test.ts b/test/colon-slug-windows-5032.test.ts
index f6ae089ddf..d4f36ce9fd 100644
--- a/test/colon-slug-windows-5032.test.ts
+++ b/test/colon-slug-windows-5032.test.ts
@@ -18,7 +18,7 @@
import { afterAll, beforeAll, describe, expect, test } from 'bun:test';
import { randomUUID } from 'node:crypto';
import { execFileSync } from 'node:child_process';
-import { existsSync, mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs';
+import { existsSync, mkdirSync, mkdtempSync, realpathSync, rmSync, writeFileSync } from 'node:fs';
import { tmpdir } from 'node:os';
import { join } from 'node:path';
import { PGLiteEngine } from '../src/core/pglite-engine.ts';
@@ -37,7 +37,9 @@ import { isolatedPersistencePostgres } from './helpers/persistence-postgres.ts';
import { withEnv } from './helpers/with-env.ts';
const NATIVE_WINDOWS = process.platform === 'win32';
-const home = mkdtempSync(join(tmpdir(), 'gbrain-5032-'));
+// The Windows runner's TEMP is an 8.3 short path (RUNNER~1); git reports the long
+// form, so the fixture starts from the native realpath to keep the two comparable.
+const home = mkdtempSync(join(realpathSync.native(tmpdir()), 'gbrain-5032-'));
const engines: BrainEngine[] = [];
let closePostgres: (() => Promise<void>) | undefined;
const putPage = operations.find((op) => op.name === 'put_page')!;