Safety officials might not notice the faulty wiring in the walls until a fire breaks out.
The safety officials are the ones doing (or not doing) the action, so in active voice, they are the subject of the sentence.
Defeat in the Spanish-American War marked the end of Spain’s conception of itself as a global power.
In active voice, “Defeat” is the subject of the sentence.