harbor run -t scale-ai/hil-bench-swe_23-baselineharbor download scale-ai/hil-bench-swe_23-baselineUnreliable Retrieval of Last Active Persisted Session on Public Pages
The system does not consistently identify and return the most recent persisted user session. In some cases, session data is missing, outdated, or fails to initialize correctly, leading to inconsistent behavior across public pages.
The system should always return the latest valid persisted session, including its identifying information, in a reliable and consistent way. If storage cannot be accessed or session data is invalid, the system should safely return no session while logging an error. When resuming a session, authentication state should only be updated under the appropriate conditions. After resume, auth.setUID must use persistedSession.UID. For resumeSession, localID must be sourced from auth.getLocalID() when authentication state is available.
The system may return incomplete or incorrect session data, fail to select the latest session, or behave unpredictably when storage is missing or corrupted. This results in unreliable initialization of session-dependent behavior on public pages. Additionally, the current implementation may incorrectly update authentication state regardless of whether the session resume was successful.
Type: New Public Function Name: getLastActivePersistedUserSession Path: applications/drive/src/app/utils/lastActivePersistedUserSession.ts Input: None Output: PersistedSessionWithLocalID or null Description: Retrieves the last active persisted user session across any app on public pages, returning the session object if available and valid, or null if there are no active sessions, no eligible fresh sessions, or localStorage is unavailable.