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 <noreply@paperclip.ing>
This commit is contained in:
Devin Foley 2026-04-03 13:04:56 -07:00
parent f8452a4520
commit e13c3f7c6c

View file

@ -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");