@@ -759,6 +759,61 @@ describe("Skill Workshop proposal evaluation", () => {
759759 } ) ;
760760 } ) ;
761761
762+ it ( "does not split surrogate pairs when bounding evaluator text" , async ( ) => {
763+ const workspaceDir = await tempDirs . make ( "openclaw-skill-evaluation-surrogate-" ) ;
764+ const proposal = await proposeCreateSkill ( {
765+ workspaceDir,
766+ agentId : "main" ,
767+ name : "Surrogate Bounds" ,
768+ description : "Bound evaluator text without splitting surrogates" ,
769+ content : "# Surrogate Bounds\n" ,
770+ } ) ;
771+ hookMocks . evaluate . mockResolvedValue ( [
772+ {
773+ evaluatorId : "emoji-bounds" ,
774+ pluginId : "evaluation-tests" ,
775+ status : "completed" ,
776+ result : {
777+ summary : `${ "s" . repeat ( 7_999 ) } 🙂` ,
778+ decisionReason : `${ "r" . repeat ( 1_999 ) } 🙂` ,
779+ metrics : { note : `${ "m" . repeat ( 3_999 ) } 🙂` } ,
780+ } ,
781+ } ,
782+ {
783+ evaluatorId : "emoji-error" ,
784+ pluginId : "evaluation-tests" ,
785+ status : "error" ,
786+ error : `${ "e" . repeat ( 1_999 ) } 🙂` ,
787+ } ,
788+ ] ) ;
789+
790+ const evaluated = await evaluateSkillProposal ( {
791+ workspaceDir,
792+ agentId : "main" ,
793+ proposalId : proposal . record . id ,
794+ expectedRevisionHash : proposal . revisionHash ,
795+ } ) ;
796+
797+ expect ( evaluated . evaluation . outcomes ) . toEqual ( [
798+ {
799+ evaluatorId : "emoji-bounds" ,
800+ pluginId : "evaluation-tests" ,
801+ status : "completed" ,
802+ result : {
803+ summary : "s" . repeat ( 7_999 ) ,
804+ decisionReason : "r" . repeat ( 1_999 ) ,
805+ metrics : { note : "m" . repeat ( 3_999 ) } ,
806+ } ,
807+ } ,
808+ {
809+ evaluatorId : "emoji-error" ,
810+ pluginId : "evaluation-tests" ,
811+ status : "error" ,
812+ error : "e" . repeat ( 1_999 ) ,
813+ } ,
814+ ] ) ;
815+ } ) ;
816+
762817 it ( "rejects evaluator results that exceed the aggregate persistence budget" , async ( ) => {
763818 const workspaceDir = await tempDirs . make ( "openclaw-skill-evaluation-size-budget-" ) ;
764819 const proposal = await proposeCreateSkill ( {
0 commit comments