From 542ddb7ec1b8eb2a03314ed92ca9061d4cd23bb4 Mon Sep 17 00:00:00 2001 From: bradygaster Date: Sun, 15 Mar 2026 03:50:45 -0700 Subject: [PATCH 1/2] fix: cross-platform filename and config path issues (#348, #356) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace inline timestamp formatting with safeTimestamp() utility in comms-file-log - Remove machine-specific teamRoot from .squad/config.json (can be computed at runtime) - Update existing config.json to remove absolute path Fixes #348 — Replace colons in log filenames with hyphens for Windows compatibility Fixes #356 — Remove machine-specific teamRoot from config.json Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .squad/config.json | 3 +-- packages/squad-sdk/src/config/init.ts | 1 - packages/squad-sdk/src/platform/comms-file-log.ts | 3 ++- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.squad/config.json b/.squad/config.json index 39e5c2974..817451138 100644 --- a/.squad/config.json +++ b/.squad/config.json @@ -1,4 +1,3 @@ { - "version": 1, - "teamRoot": "C:\\src\\squad-pr" + "version": 1 } \ No newline at end of file diff --git a/packages/squad-sdk/src/config/init.ts b/packages/squad-sdk/src/config/init.ts index 2b068ef60..6f32d058b 100644 --- a/packages/squad-sdk/src/config/init.ts +++ b/packages/squad-sdk/src/config/init.ts @@ -609,7 +609,6 @@ export async function initSquad(options: InitOptions): Promise { } const squadConfig: Record = { version: 1, - teamRoot: teamRoot, }; if (detectedPlatform) { squadConfig.platform = detectedPlatform; diff --git a/packages/squad-sdk/src/platform/comms-file-log.ts b/packages/squad-sdk/src/platform/comms-file-log.ts index bcf45bb88..cf7fe885e 100644 --- a/packages/squad-sdk/src/platform/comms-file-log.ts +++ b/packages/squad-sdk/src/platform/comms-file-log.ts @@ -10,6 +10,7 @@ import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from 'node:fs'; import { join } from 'node:path'; +import { safeTimestamp } from '../utils/safe-timestamp.js'; import type { CommunicationAdapter, CommunicationChannel, CommunicationReply } from './types.js'; export class FileLogCommunicationAdapter implements CommunicationAdapter { @@ -29,7 +30,7 @@ export class FileLogCommunicationAdapter implements CommunicationAdapter { category?: string; author?: string; }): Promise<{ id: string; url?: string }> { - const timestamp = new Date().toISOString().replace(/:/g, '-').replace(/\.\d+Z$/, 'Z'); + const timestamp = safeTimestamp(); const slug = options.title.toLowerCase().replace(/[^a-z0-9]+/g, '-').slice(0, 40); const filename = `${timestamp}-${slug}.md`; const filepath = join(this.commsDir, filename); From 4e1795c52da3cfec14747d36edc206093185a5a5 Mon Sep 17 00:00:00 2001 From: bradygaster Date: Sun, 15 Mar 2026 03:51:25 -0700 Subject: [PATCH 2/2] history: EECOM cross-platform fixes (#348, #356) Document investigation and fixes for Windows filename compatibility issues. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .squad/agents/eecom/history.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.squad/agents/eecom/history.md b/.squad/agents/eecom/history.md index 6c1c3da08..e1b5540c1 100644 --- a/.squad/agents/eecom/history.md +++ b/.squad/agents/eecom/history.md @@ -24,3 +24,24 @@ CLI completeness audit (2026-03-08) confirmed: 26 primary commands routed in cli 📌 **Team update (2026-03-08T21:18:00Z):** FIDO + EECOM released unanimous GO verdict for v0.8.24. Smoke test approved as release gate. FIDO confirmed 32/32 pass + publish.yml wired correctly. EECOM confirmed 26/26 commands + packaging complete (minor gap: "streams" alias untested, non-blocking). +### Cross-Platform Filename and Config Fixes (#348, #356) (2026-03-15T05:30:00Z) + +**Context:** Two cross-platform bugs broke Squad on Windows: (1) log filenames contained colons in ISO 8601 timestamps (illegal on Windows), (2) `.squad/config.json` contained absolute machine-specific `teamRoot` path. + +**Investigation:** +- Searched SDK for all timestamp usage in filenames — found `safeTimestamp()` utility already existed but wasn't consistently used +- `comms-file-log.ts` (line 32) used inline `toISOString().replace(/:/g, '-')` instead of utility +- `init.ts` (line 612) wrote absolute `teamRoot` to config.json on every init +- Session-store already used `safeTimestamp()` correctly (line 71) + +**Fixes:** +1. **Bug #348:** Updated `comms-file-log.ts` to import and use `safeTimestamp()` utility instead of inline timestamp formatting +2. **Bug #356:** Removed `teamRoot` field from config.json (can be computed at runtime via `git rev-parse --show-toplevel`) +3. Updated live `.squad/config.json` in repo to remove machine-specific path + +**Pattern:** Centralized timestamp formatting in `safeTimestamp()` utility (replaces colons + truncates milliseconds). Windows-safe format: `2026-03-15T05-30-00Z` instead of `2026-03-15T05:30:00.123Z`. + +**Test Impact:** All 150 tests pass. Communication adapter test doesn't validate specific filename format (structural test, not behavioral). + +**PR:** #404 opened targeting dev. +