As California risked being locked out of the credit markets during the recession, officials sought federal loan guarantees to avert deep spending cuts that threatened to cascade through the biggest U.S. state. Washington turned them away. Six years later, as a Puerto Rico agency veers toward a default as soon as Aug. 1, federal officials in the nation’s capital have echoed a refrain heard during recent state and local fiscal crises: Fix the problem on your own.