fix: end in-flight Ever ID sign-ins on subject logout, renew lease before result resends (0.24.1)
Merged
EV
2d ago+68+68+01234567890123456789-6-6-0123456789
Fixes the two Greptile findings on the 0.24.1 release PR #642, before it is merged to stage. Part of 0.24.1 (no version change; changelog entries added under 0.24.1).
Changes
- Sign-in survives logout (Greptile P1, #642
auth.controller.ts~866).signInWithOidcrecordssignedInAtbefore the code exchange, but the existing-account branch calledsignOidcUserTokenwithout it, soopenSessionskipped the subject-logout cutoff. It now passesnew Date(signedInAt), as the sign-up confirmation path already did. A sign-in that starts after the logout works as before.
Test:test/ever-id.e2e-spec.ts"ends a sign-in to an existing account when a logout naming only the subject lands while it is under way" (the logout is injected during the account lookup ā 400session_ended, no session row; the next sign-in ā 201 and a working token). - Result retries skip lease checks (Greptile P2, #642
ever-connect-scheduler.service.ts~198 /runDue).runDuenow calls the lease callback before each saved-result (unsentResult) delivery and stops the whole round (no due work either) once the lease or the connection is lost; the next round that holds the lease sends the rest.
Test:ever-connect-managed.service.spec.ts"checks the lease before each saved result it sends again, and stops once another process holds it". - From the Ever Works review on #642: the person-link round's callback now also checks that the connection is still the active one (as the maintenance round does), and
refreshIntegrationslogs a warning when its 3 attempts are exhausted. Changelog 0.24.1 says "No database migrations" (verified:git diff master develop -- api/src/migrationsis empty). - Sonar S2871 (critical, new code on develop):
sort()withlocaleCompareintest/ever-connect-managed.e2e-spec.ts.
Verified locally (Node 24, SQLite)
- Unit:
ever-connect-managed,ever-connect-person,ever-connect.service,ever-id-sessionspecs: 4 suites, 68 tests passed. - E2E:
ever-id,ever-connect-managed,ever-connect-person,ever-connect: 4 suites, 31 tests passed. prettier --checkon every changed.ts.
CircleCI and in-cluster ci.yml (unit, e2e on sqlite/postgres/mysql, webapp) run on this PR.
No migrations, no new settings, no public API change.
š¤ Generated with Claude Code
Summary by cubic
Fixes the two Greptile findings on the 0.24.1 release before it merges to stage, for Ever ID sessions and Ever Connect lease handling.
- Ever ID sign-in to an existing account now ends if a logout naming only the subject lands during the code exchange or account lookup; previously only a sign-up waiting for confirmation was ended.
- Ever Connect renews the lease before each saved-result delivery and stops the round once the lease or the connection is lost; the next round holding the lease sends the rest.
- The person-link round also stops once the connection is no longer the active one.
refreshIntegrationslogs a warning when its 3 retries are exhausted.- Fixes a Sonar S2871 critical on
sort()in an e2e spec and adds 0.24.1 changelog entries. No database migrations.