@@ -900,6 +900,54 @@ describe("ci workflow guards", () => {
900900 } ) ;
901901 } ) ;
902902
903+ it ( "runs the PR context and evidence gate only for relevant PR changes" , ( ) => {
904+ const workflow = readRealBehaviorProofWorkflow ( ) ;
905+
906+ expect ( workflow . name ) . toBe ( "PR context and evidence" ) ;
907+ expect ( workflow . jobs [ "real-behavior-proof" ] . name ) . toBe ( "PR context and evidence" ) ;
908+ expect ( workflow . on . pull_request_target . types ) . toEqual ( [
909+ "opened" ,
910+ "edited" ,
911+ "synchronize" ,
912+ "reopened" ,
913+ "ready_for_review" ,
914+ ] ) ;
915+ expect ( workflow . concurrency . group ) . toBe (
916+ "${{ github.workflow }}-${{ github.event.pull_request.number }}" ,
917+ ) ;
918+ expect ( workflow . concurrency [ "cancel-in-progress" ] ) . toBe (
919+ "${{ github.event.action == 'synchronize' }}" ,
920+ ) ;
921+ } ) ;
922+
923+ it ( "isolates auto-response per item and ignores ClawSweeper PR label feedback" , ( ) => {
924+ const workflow = readWorkflow ( ".github/workflows/auto-response.yml" ) ;
925+ const guard = workflow . jobs [ "auto-response" ] . if ;
926+
927+ expect ( workflow . on . issues . types ) . toEqual ( [ "opened" , "edited" , "labeled" ] ) ;
928+ expect ( workflow . on . issue_comment . types ) . toEqual ( [ "created" ] ) ;
929+ expect ( workflow . on . pull_request_target . types ) . toEqual ( [
930+ "opened" ,
931+ "edited" ,
932+ "synchronize" ,
933+ "reopened" ,
934+ "labeled" ,
935+ "unlabeled" ,
936+ ] ) ;
937+ expect ( workflow . concurrency . group ) . toBe (
938+ "${{ github.workflow }}-${{ github.event.issue.number || github.event.pull_request.number }}" ,
939+ ) ;
940+ expect ( workflow . concurrency [ "cancel-in-progress" ] ) . toBe (
941+ "${{ github.event_name == 'pull_request_target' && github.event.action == 'synchronize' }}" ,
942+ ) ;
943+ expect ( guard ) . toContain ( "github.event_name != 'pull_request_target'" ) ;
944+ expect ( guard ) . toContain ( "github.event.action != 'labeled'" ) ;
945+ expect ( guard ) . toContain ( "github.event.action != 'unlabeled'" ) ;
946+ expect ( guard ) . toContain ( "github.actor != 'clawsweeper[bot]'" ) ;
947+ expect ( guard ) . toContain ( "github.actor != 'openclaw-clawsweeper[bot]'" ) ;
948+ expect ( guard ) . not . toContain ( "openclaw-barnacle[bot]" ) ;
949+ } ) ;
950+
903951 it ( "routes stale bug issues through ClawSweeper instead of Barnacle closure" , ( ) => {
904952 const staleWorkflow = readWorkflow ( ".github/workflows/stale.yml" ) ;
905953 const staleSteps = staleWorkflow . jobs . stale . steps as WorkflowStep [ ] ;
0 commit comments