Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .squad/agents/eecom/history.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

3 changes: 1 addition & 2 deletions .squad/config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"version": 1,
"teamRoot": "C:\\src\\squad-pr"
"version": 1
}
1 change: 0 additions & 1 deletion packages/squad-sdk/src/config/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,6 @@ export async function initSquad(options: InitOptions): Promise<InitResult> {
}
const squadConfig: Record<string, unknown> = {
version: 1,
teamRoot: teamRoot,
};
if (detectedPlatform) {
squadConfig.platform = detectedPlatform;
Expand Down
3 changes: 2 additions & 1 deletion packages/squad-sdk/src/platform/comms-file-log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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);
Expand Down
Loading