This year’s stock rally has withstood war, inflation and uncertainty surrounding the tech sector’s massive artificial-intelligence investments. The question now is: Have investors finally reached their limit? Major stock indexes have posted healthy gains this year. But the S&P 500 and Nasdaq composite both fell last week for the second time in a row—their first consecutive weeks of declines since March, in the initial aftermath of the U.S.-Israeli attacks on Iran. The catalysts behind the declines weren’t surprising new developments, but rather the same threats that have dogged investors for months, only dialed up a little further. Those include the…