When a madd letter is followed immediately by a hamzah in the same word, the rule is madd muttasil, also called wajib muttasil. The word boundary is decisive: a hamzah elsewhere is not enough, and the letter preceding it must actually be a madd letter.
«جَاءَ» — madd alif followed by hamzah within one word.
«سُوءَ» — madd waw followed by hamzah within one word.
«جِيءَ» — madd ya followed by hamzah within one word.
The traditional treatment discusses measures of three or four alifs in the relevant reading methods. A reciter should consistently follow the length taught within a selected transmitted mode rather than mix lengths at random. “Wajib” need not mean that every reading tradition employs one identical numerical duration.