Pathology

A 25-year-old man experiences acute onset of fever, cough, dyspnea, headache, and malaise a day after moving into a new apartment. His symptoms subside over 3 days when he visits a friend in another city. On the day of his return, the symptoms recur. There are no remarkable findings on physical examination. A chest radiograph also is unremarkable. Which of the following pathogenic mechanisms is most likely to produce these findings?