From e13c3f7c6c8f6907f316c008581d1d6f8f1be6dd Mon Sep 17 00:00:00 2001 From: Devin Foley Date: Fri, 3 Apr 2026 13:04:56 -0700 Subject: [PATCH] fix: use deterministic UUID in feedback-service test to avoid phone redaction The PII sanitizer's phone regex matches digit pairs like "4880-8614" that span UUID segment boundaries. Random UUIDs occasionally produce these patterns, causing flaky test failures where sourceRun.id gets partially redacted as [REDACTED_PHONE]. Use a fixed hex-letter-heavy UUID for runId so no cross-boundary digit sequence triggers the phone pattern. Co-Authored-By: Paperclip --- server/src/__tests__/feedback-service.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/src/__tests__/feedback-service.test.ts b/server/src/__tests__/feedback-service.test.ts index 898ae0aa..03b4f4c6 100644 --- a/server/src/__tests__/feedback-service.test.ts +++ b/server/src/__tests__/feedback-service.test.ts @@ -187,7 +187,11 @@ describe("feedbackService.saveIssueVote", () => { const targetCommentId = randomUUID(); const earlierCommentId = randomUUID(); const laterCommentId = randomUUID(); - const runId = randomUUID(); + // Use a deterministic UUID whose hyphen-separated segments cannot be + // mistaken for a phone number by the PII redactor's phone regex. + // Random UUIDs occasionally produce digit pairs like "4880-8614" that + // cross segment boundaries and match the phone pattern. + const runId = "abcde123-face-beef-cafe-abcdef654321"; const instructionsDir = fs.mkdtempSync(path.join(os.tmpdir(), "paperclip-feedback-instructions-")); tempDirs.push(instructionsDir); const instructionsPath = path.join(instructionsDir, "AGENTS.md");