diff --git a/tests/runner-e2e/chat-catalog-domains/external-company-secret.test.ts b/tests/runner-e2e/chat-catalog-domains/external-company-secret.test.ts index 62b89842418..1d96973da61 100644 --- a/tests/runner-e2e/chat-catalog-domains/external-company-secret.test.ts +++ b/tests/runner-e2e/chat-catalog-domains/external-company-secret.test.ts @@ -121,3 +121,10 @@ it("distinguishes subordinate chat requests from coordinated company warnings", it("rejects a company chat request after an explicit instead boundary", () => { expect(deploymentSecretGuidance("Use secure settings for Morgan's deployment credential environment binding. Do not paste your credential into files and instead send it here in chat.")).toBe(false); }); + +it("retains direct chat object ellipsis without treating progress as a credential", () => { + const context = "Use secure settings for Morgan's deployment credential environment binding. "; + expect(deploymentSecretGuidance(context + "Send your key via secure form and instead share here in chat.")).toBe(false); + expect(deploymentSecretGuidance(context + "Do not paste the credential into files but share here in chat.")).toBe(false); + expect(deploymentSecretGuidance(context + "Send your key via secure form and instead share progress here.")).toBe(true); +}); diff --git a/tests/runner-e2e/chat-catalog-domains/external-credential-language.test.ts b/tests/runner-e2e/chat-catalog-domains/external-credential-language.test.ts index 51a35d4eb9c..a86d6a87423 100644 --- a/tests/runner-e2e/chat-catalog-domains/external-credential-language.test.ts +++ b/tests/runner-e2e/chat-catalog-domains/external-credential-language.test.ts @@ -65,3 +65,13 @@ it("keeps contrast normalization aligned with secure exemptions", () => { it("resets a polite request at the same contrast boundary", () => { expect(solicitsChatCredential("Do not paste your credential into files and instead please send it here in chat.")).toBe(true); }); + +it("retains an omitted credential object only for direct chat destinations", () => { + expect(solicitsChatCredential("Send your key via secure form and instead share here in chat.")).toBe(true); +}); +it("does not inherit a prior prohibition for an independent omitted-object request", () => { + expect(solicitsChatCredential("Do not paste the credential into files but share here in chat.")).toBe(true); +}); +it("retains an explicit noncredential object", () => { + expect(solicitsChatCredential("Send your key via secure form and instead share progress here.")).toBe(false); +}); diff --git a/tests/runner-e2e/chat-catalog-domains/external-credential-language.ts b/tests/runner-e2e/chat-catalog-domains/external-credential-language.ts index fb29dc47cc9..ddbf04a4bbd 100644 --- a/tests/runner-e2e/chat-catalog-domains/external-credential-language.ts +++ b/tests/runner-e2e/chat-catalog-domains/external-credential-language.ts @@ -9,8 +9,8 @@ function positiveCredentialRequest(clause: string, hasKeyContext: boolean, needs ? /\b(?:paste|send|share|provide|enter)\b.{0,70}\b(?:key|credential|token)\b.{0,40}\b(?:chat|message|conversation|here)\b|\b(?:paste|send|share)\b.{0,20}\b(?:here|in chat)\b.{0,40}\b(?:key|credential|token)\b/i : /\b(?:paste|send|share|provide|enter)\b.{0,70}\b(?:key|credential|token)\b/i; const carried = needsChatDestination - ? /\b(?:paste|send|share|provide|enter)\s+(?:it|that|the value)\b.{0,40}\b(?:here|chat|message|conversation)\b/i - : /\b(?:paste|send|share|provide|enter)\s+(?:it|that|the value)\b/i; + ? /\b(?:paste|send|share|provide|enter)\s+(?:(?:it|that|the value)\b.{0,40}\b(?:here|chat|message|conversation)\b|(?:(?:in|into|via|through)\s+)?(?:(?:the|this|your)\s+)?(?:here|chat|message|conversation)\b)/i + : /\b(?:paste|send|share|provide|enter)\s+(?:(?:it|that|the value)\b|(?:(?:in|into|via|through)\s+)?(?:(?:the|this|your)\s+)?(?:here|chat|message|conversation)\b)/i; const match = request.exec(clause) ?? (hasKeyContext ? carried.exec(clause) : null); if (!match) return false; const before = clause.slice(0, match.index).trim(); 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 b039356e53a..5307ecd9e84 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 @@ -249,3 +249,10 @@ it("distinguishes a subordinate chat request from a coordinated warning", () => it("rejects a chat request after an explicit instead boundary", () => { expect(personalSecretGuidance("Open secure personal publishing settings. Do not paste your credential into files and instead send it here in chat.")).toBe(false); }); + +it("rejects an omitted credential object directed into chat", () => { + const context = "Open secure personal publishing settings. "; + expect(personalSecretGuidance(context + "Send your key via secure form and instead share here in chat.")).toBe(false); + expect(personalSecretGuidance(context + "Do not paste the credential into files but share here in chat.")).toBe(false); + expect(personalSecretGuidance(context + "Send your key via secure form and instead share progress here.")).toBe(true); +});