@@ -1435,26 +1435,12 @@ test("mutation actor guard accepts only trusted bot identities", () => {
14351435 assert . equal ( normalizeGitHubActor ( "ClawSweeper[bot]" ) , "clawsweeper" ) ;
14361436 assert . equal ( isAllowedMutationActor ( "ClawSweeper[bot]" , trustedBots ) , true ) ;
14371437 assert . equal ( isAllowedMutationActor ( "clawsweeper[bot]" , trustedBots ) , true ) ;
1438- assert . equal ( isAllowedMutationActor ( "clawsweeper[bot][bot]" , trustedBots ) , false ) ;
14391438 assert . equal ( isAllowedMutationActor ( "clawsweeper" , trustedBots ) , false ) ;
14401439 assert . equal ( isAllowedMutationActor ( "openclaw-clawsweeper[bot]" , trustedBots ) , true ) ;
14411440 assert . equal ( isAllowedMutationActor ( "steipete" , trustedBots ) , false ) ;
14421441 assert . equal ( isAllowedMutationActor ( "github-actions[bot]" , trustedBots ) , false ) ;
14431442} ) ;
14441443
1445- test ( "normalizeGitHubActor is idempotent for repeated [bot] suffixes" , ( ) => {
1446- // Single-suffix strip left a residual on a doubled suffix, so a second pass changed it.
1447- assert . equal ( normalizeGitHubActor ( "x[bot][bot]" ) , "x" ) ;
1448- const once = normalizeGitHubActor ( "x[bot][bot]" ) ;
1449- assert . equal ( normalizeGitHubActor ( once ) , once ) ;
1450- // Unregressed: a single real bot suffix still strips exactly once.
1451- assert . equal ( normalizeGitHubActor ( "foo[bot]" ) , "foo" ) ;
1452- assert . equal ( normalizeGitHubActor ( " Foo[bot] " ) , "foo" ) ;
1453- assert . equal ( normalizeGitHubActor ( "x[bot][bot]tail" ) , "x[bot][bot]tail" ) ;
1454- assert . equal ( normalizeGitHubActor ( null ) , "" ) ;
1455- assert . equal ( normalizeGitHubActor ( 123 ) , "123" ) ;
1456- } ) ;
1457-
14581444test ( "mutation actor guard recognizes GitHub App integration auth shape" , ( ) => {
14591445 assert . equal (
14601446 isGitHubAppIntegrationAuthError ( "gh: Resource not accessible by integration (HTTP 403)" ) ,
0 commit comments