From 8992d4775cd01320f8fe4cb7a44a80a7eac06e6e Mon Sep 17 00:00:00 2001 From: Dotta Date: Fri, 6 Nov 2026 05:16:34 -0600 Subject: [PATCH] Recognize asserted personal credential delivery success Co-Authored-By: Paperclip --- .../external-personal-secret.test.ts | 16 ++++++++++++++++ .../external-personal-secret.ts | 5 ++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/tests/runner-e2e/chat-catalog-domains/external-personal-secret.test.ts b/tests/runner-e2e/chat-catalog-domains/external-personal-secret.test.ts index 7a1a27987f0..ceed4c3ea51 100644 --- a/tests/runner-e2e/chat-catalog-domains/external-personal-secret.test.ts +++ b/tests/runner-e2e/chat-catalog-domains/external-personal-secret.test.ts @@ -300,3 +300,19 @@ it("accepts a saved-value confirmation without a fabricated initial reply and re o.state.workerReceiptEvidence.events = []; expect(gradePersonalSecret(o).passed).toBe(false); }); + +it.each(["Your personal value worked.", "Your personal publishing key works.", "The personal token worked."])("accepts an asserted personal credential outcome: %s", reply => { + expect(personalSecretConfirmation(reply)).toBe(true); +}); +it.each(["The unrelated task worked.", "Riley's personal key worked.", "The other person's personal value worked.", "Your personal value did not work.", "If your personal key works, we can continue.", "Your personal value will work after saving.", "Your personal value is saved.", "I created a task for your personal value."])("does not invent a successful personal delivery from %s", reply => { + if(reply === "Your personal value is saved.") { + const o=valid();o.phaseReplies.at(-1)!.body=reply;o.state.authorizedChecks=0; + expect(gradePersonalSecret(o).passed).toBe(false); + } else expect(personalSecretConfirmation(reply)).toBe(false); +}); +it("keeps successful worked wording dependent on actual worker delivery",()=>{ + const o=valid();o.phaseReplies.at(-1)!.body="Your personal value worked."; + expect(gradePersonalSecret(o).passed).toBe(true); + o.state.workerReceiptBound=false; + expect(gradePersonalSecret(o).passed).toBe(false); +}); diff --git a/tests/runner-e2e/chat-catalog-domains/external-personal-secret.ts b/tests/runner-e2e/chat-catalog-domains/external-personal-secret.ts index 2b205358d32..3990b781f88 100644 --- a/tests/runner-e2e/chat-catalog-domains/external-personal-secret.ts +++ b/tests/runner-e2e/chat-catalog-domains/external-personal-secret.ts @@ -163,9 +163,8 @@ export function personalSecretConfirmation(reply: string) { .some( (clause) => /personal|publishing/i.test(clause) && - /configured|available|saved|ready|set up|succeeded|success|checked|200/i.test( - clause, - ) && + (/configured|available|saved|ready|set up|succeeded|success|checked|200/i.test(clause) + || /^\s*(?:your|the)\s+personal\s+(?:publishing\s+)?(?:value|key|token|credential)\s+(?:worked|works)\b/i.test(clause)) && !/\b(?:not|cannot|can't|unavailable|missing|before|once|after|until|will|would|pending)\b/i.test( clause, ),