From 880ffdf5845a61ba86ff6014fac26114354fa6ef Mon Sep 17 00:00:00 2001 From: Lauren ten Hoor Date: Tue, 10 Feb 2026 17:01:54 +0800 Subject: [PATCH] feat: update project name in test helpers and scenarios for consistency --- test/helpers.ts | 11 ++++++++--- test/scenarios.test.ts | 3 ++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/test/helpers.ts b/test/helpers.ts index f07b96d..99678f3 100644 --- a/test/helpers.ts +++ b/test/helpers.ts @@ -26,6 +26,11 @@ export const TEST_GROUP_ID = "-5239235162"; /** Repo path for test issues (devclaw repo) */ export const TEST_REPO = "laurentenhoor/devclaw"; +/** Project name used in test workspaces. Prefixed with "test-" so session keys + * (agent:devclaw:subagent:test-devclaw-dev-junior) don't collide with production + * and match TEST_SESSION_PREFIX for cleanup sweeps. */ +export const TEST_PROJECT_NAME = "test-devclaw"; + // ── Gateway RPC ───────────────────────────────────────────────────────────── /** @@ -297,7 +302,7 @@ export async function createTestWorkspace(opts?: { // Create required directories await fs.mkdir(path.join(tempDir, "memory"), { recursive: true }); await fs.mkdir(path.join(tempDir, "roles", "default"), { recursive: true }); - await fs.mkdir(path.join(tempDir, "roles", "devclaw"), { + await fs.mkdir(path.join(tempDir, "roles", TEST_PROJECT_NAME), { recursive: true, }); @@ -305,9 +310,9 @@ export async function createTestWorkspace(opts?: { const initialData: ProjectsData = { projects: { [groupId]: { - name: "devclaw", + name: TEST_PROJECT_NAME, repo: `~/.openclaw/extensions/devclaw`, - groupName: "DevClaw - DevClaw", + groupName: "DevClaw - Test", deployUrl: "", baseBranch: "main", deployBranch: "main", diff --git a/test/scenarios.test.ts b/test/scenarios.test.ts index 937d730..894c374 100644 --- a/test/scenarios.test.ts +++ b/test/scenarios.test.ts @@ -26,6 +26,7 @@ import { resolveModel } from "../lib/tiers.js"; import { TestCleanup, TEST_GROUP_ID, + TEST_PROJECT_NAME, TEST_REPO, createTestWorkspace, gateway, @@ -424,7 +425,7 @@ describe("DevClaw Scenario Tests", { timeout: 240_000 }, () => { }>; const zombieIssue = issues.find( (i) => - i.project === "devclaw" && + i.project === TEST_PROJECT_NAME && i.role === "dev", ); assert.ok(zombieIssue, "Should detect zombie for dev worker");