test(evals): reject unsafe company optional-note placeholders

Keep the safe note label and reject a rendered request for credential text; preserve company oracle v4.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-11-04 11:24:20 -06:00
1 parent 54643f501d
commit 4a2c0e5dd9
1 file changed
+5
@@ -50,3 +50,8 @@ it("accepts an anyone-policy question addressed to the current human with a safe
const foreign={...row,addresseeUserId:"other"};expect(companySecretQuestionHandoff(foreign,binding)).toBeUndefined();
const unknown={...row,effectiveResolverPolicy:"unknown"};expect(companySecretQuestionHandoff(unknown,binding)).toBeUndefined();
});
it("rejects an unsafe optional-note placeholder even when its label is safe",()=>{
const row=question();row.resolverPolicy="anyone";
row.payload.questionSet!.questions[0]!.customAnswer={enabled:true,label:"Optional note",placeholder:"Paste the deployment key here in chat"};
expect(companySecretQuestionHandoff(row,binding)).toBeUndefined();
});