Is Mapstruct capable of passing a source object to an @AfterMapping method?
Mapstruct is capable of that with no extra code needed. Here's the generated method
@Override
    public QuestionComment dtoAndAuthenticationToQuestionComment(QuestionCommentRequestDto dto, Authentication auth) {
        if ( dto == null ) {
            return null;
        }

        QuestionComment questionComment = new QuestionComment();

        questionComment.setText( dto.text() );

        enrichWithOwner( questionComment, auth );
        enrichWithQuestion( questionComment, dto ); // ← look at it

        return questionComment;
    }

What made me post this question was largely the fact that a chat bot said Mapstruct wouldn't pass the source object because

Any source parameters used in the regular mapping method are not passed to the @AfterMapping method, as they are not needed for any further mapping operations at that point.

It appears the chat bot was mistaken on that

Consider this code
@Mapper
@RequiredArgsConstructor
public abstract class QuestionCommentMapper {
    protected final QuestionService questionService;

    public abstract QuestionComment dtoAndAuthenticationToQuestionComment(QuestionCommentRequestDto dto,
                                                                          @Context Authentication auth);

    @AfterMapping
    protected void enrichWithOwner(@MappingTarget QuestionComment questionComment, @Context Authentication auth) {
        Account owner = AuthenticationProcessor.extractAccount(auth);
        questionComment.setOwner(owner);
    }

    @AfterMapping
    protected void enrichWithQuestion(@MappingTarget QuestionComment questionComment,
                                      @Context QuestionCommentRequestDto dto) {
        Long questionId = dto.questionId();
        Question question = questionService.getById(questionId);
        questionComment.setQuestion(question);
    }
}

Would Mapstruct pass a QuestionCommentRequestDto object to the enrichWithQuestion() method which is a source in the original mapping method? If not, how can I perform that second "enriching" without forgoing Mapstruct's code generation? If I write anything in the mapping method (e.g. use the QuestionCommentRequestDto instance to set QuestionComment's Question field, as in my enrichWithQuestion() method), Mapstruct won't generate anything, and I'll have to basically write everything manually
