forked from farhoodlabs/paperclip
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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user