@@ -37,6 +37,7 @@ import * as _changelog from '../../changelog/index.ts';
3737import * as _prAutomerge from '../pr/automerge.ts' ;
3838import type { ResultWithPr } from '../pr/index.ts' ;
3939import * as _prWorker from '../pr/index.ts' ;
40+ import * as artifacts from './artifacts.ts' ;
4041import * as _automerge from './automerge.ts' ;
4142import * as _checkExisting from './check-existing.ts' ;
4243import * as _commit from './commit.ts' ;
@@ -949,7 +950,11 @@ describe('workers/repository/update/branch/index', () => {
949950 } ) ;
950951
951952 it ( 'returns if branch automerge is pending' , async ( ) => {
952- expect . assertions ( 1 ) ;
953+ expect . assertions ( 2 ) ;
954+ const setArtifactErrorStatus = vi . spyOn (
955+ artifacts ,
956+ 'setArtifactErrorStatus' ,
957+ ) ;
953958 getUpdated . getUpdatedPackageFiles . mockResolvedValueOnce (
954959 partial < PackageFilesResult > ( {
955960 updatedPackageFiles : [ partial < FileChange > ( ) ] ,
@@ -972,6 +977,7 @@ describe('workers/repository/update/branch/index', () => {
972977 result : 'done' ,
973978 commitSha : null ,
974979 } ) ;
980+ expect ( setArtifactErrorStatus ) . not . toHaveBeenCalled ( ) ;
975981 } ) ;
976982
977983 it ( 'returns if PR creation failed' , async ( ) => {
@@ -1027,6 +1033,10 @@ describe('workers/repository/update/branch/index', () => {
10271033 } ) ;
10281034
10291035 it ( 'retries setting branch status checks after PR creation' , async ( ) => {
1036+ const setArtifactErrorStatus = vi . spyOn (
1037+ artifacts ,
1038+ 'setArtifactErrorStatus' ,
1039+ ) ;
10301040 getUpdated . getUpdatedPackageFiles . mockResolvedValueOnce (
10311041 partial < PackageFilesResult > ( {
10321042 updatedPackageFiles : [ partial < FileChange > ( ) ] ,
@@ -1056,6 +1066,7 @@ describe('workers/repository/update/branch/index', () => {
10561066 } ) ;
10571067 // Called twice: once before ensurePr, once after PR creation
10581068 expect ( platform . setBranchStatus ) . toHaveBeenCalledTimes ( 2 ) ;
1069+ expect ( setArtifactErrorStatus ) . not . toHaveBeenCalled ( ) ;
10591070 } ) ;
10601071
10611072 it ( 'does not retry setting branch status checks when PR is not created' , async ( ) => {
@@ -1091,7 +1102,11 @@ describe('workers/repository/update/branch/index', () => {
10911102 } ) ;
10921103
10931104 it ( 'returns if branch exists but updated' , async ( ) => {
1094- expect . assertions ( 3 ) ;
1105+ expect . assertions ( 4 ) ;
1106+ const setArtifactErrorStatus = vi . spyOn (
1107+ artifacts ,
1108+ 'setArtifactErrorStatus' ,
1109+ ) ;
10951110 getUpdated . getUpdatedPackageFiles . mockResolvedValueOnce (
10961111 partial < PackageFilesResult > ( {
10971112 updatedPackageFiles : [ partial < FileChange > ( ) ] ,
@@ -1119,10 +1134,15 @@ describe('workers/repository/update/branch/index', () => {
11191134
11201135 expect ( automerge . tryBranchAutomerge ) . toHaveBeenCalledTimes ( 0 ) ;
11211136 expect ( prWorker . ensurePr ) . toHaveBeenCalledTimes ( 0 ) ;
1137+ expect ( setArtifactErrorStatus ) . toHaveBeenCalledTimes ( 1 ) ;
11221138 } ) ;
11231139
11241140 it ( 'updates branch when no fingerprint match' , async ( ) => {
1125- expect . assertions ( 3 ) ;
1141+ expect . assertions ( 4 ) ;
1142+ const setArtifactErrorStatus = vi . spyOn (
1143+ artifacts ,
1144+ 'setArtifactErrorStatus' ,
1145+ ) ;
11261146 getUpdated . getUpdatedPackageFiles . mockResolvedValueOnce (
11271147 partial < PackageFilesResult > ( {
11281148 updatedPackageFiles : [ partial < FileChange > ( ) ] ,
@@ -1151,6 +1171,7 @@ describe('workers/repository/update/branch/index', () => {
11511171
11521172 expect ( automerge . tryBranchAutomerge ) . toHaveBeenCalledTimes ( 0 ) ;
11531173 expect ( prWorker . ensurePr ) . toHaveBeenCalledTimes ( 0 ) ;
1174+ expect ( setArtifactErrorStatus ) . toHaveBeenCalledTimes ( 1 ) ;
11541175 } ) ;
11551176
11561177 it ( 'updates branch when forceRebase=true' , async ( ) => {
0 commit comments