A hard year for federal workers offers a real-time lesson in resilience