Skip to content

release(stage): v0.24.1 (Ever Connect / Ever ID race fixes, Maintenance operations and My data exports in the webapp) - #642

Merged
evereq merged 17 commits into
stagefrom
develop
Nov 21, 2026
Merged

evereq merged 17 commits into
stagefrom
develop

Conversation

@evereq

@evereq evereq commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Promotes develop to stage for v0.24.1 (#641), the whole branch:

  • fix(api): Ever Connect / Ever ID races found in the 0.24.0 release review #638: Ever Connect / Ever ID race fixes from the 0.24.0 review (person deletion and subject-only logout serialized with sign-in session creation; integration refresh compare-and-write with re-read; scheduler lease renewed and honoured by person-link and managed calls). CI green: unit, e2e on SQLite/PostgreSQL/MySQL, webapp.
  • Webapp: Maintenance operations section and My data exports (merged to develop by the Ever Platform lane).
  • fix: end in-flight Ever ID sign-ins on subject logout, renew lease before result resends (0.24.1) #644: the 2 Greptile findings of this PR (existing-account Ever ID sign-in honours a subject-only logout that lands while it is under way; saved-result resends renew the lease first), plus the Ever Works notes (person-link round checks the connection, refresh warns when retries run out). CI green: CircleCI, in-cluster unit, e2e on SQLite/PostgreSQL/MySQL, webapp.

No migrations.

🤖 Generated with Claude Code


Summary by cubic

Promotes develop to stage for v0.24.1, covering the Ever Connect / Ever ID race fixes from the 0.24.0 review and new webapp sections. No migrations.

  • Ever ID: a person deletion and a subject-only logout now serialize against sign-in session creation, and a logout that lands while a sign-in to an existing account is under way ends it too. A sign-in started after the logout opens its session as before.
  • Ever Connect: an integration refresh no longer overwrites a decision made while it was reading Ever Platform, and re-reads (twice at most) when a row changed concurrently.
  • Scheduler: the lease is renewed before long background rounds, each call in them, and each saved-result resend; a round stops once another API process holds the lease.
  • Webapp: the operator's Ever Platform page gains a Maintenance operations section (opt-in, kinds, windows, backup directory, recent operations), and account settings show My data exports for each user to download their own exports as JSON.

Written for commit 2756ff4. Summary will update on new commits.

View guided diff Turn on auto-fix

evereq and others added 15 commits November 20, 2026 17:27
- Ever Platform page: a Maintenance operations section for the operator,
  shown with the Connection section. It reads GET /ever-connect/managed,
  edits the opt-in, the kinds allowed, the weekly windows (UTC) and the
  write-only backup directory (set, replace, remove), checks windows and
  the directory before saving with PUT, shows the API's reason when it
  refuses a value, and lists the recent operations. Hidden where the API
  answers 404 (an installation Ever operates).
- Account settings: a My data exports section for every signed-in user.
  It lists GET /ever-connect/me/exports (made, available until) and
  downloads one from /me/exports/<id> as a JSON file. The status probe
  answers the operator only, so the list itself is the probe: a 404
  means the connection module is not loaded and the section stays hidden.
- Unit tests for both sections and the page; docs and changelog no longer
  describe these as API-only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Lock the maintenance fields while a save runs: its answer replaces the
  form, so an edit made meanwhile would be lost.
- One source of truth for "changed": the request the form would send,
  backup directory included.
- The directory hint names a Windows path too.
- My data exports: only a 404 hides the section; a request with no answer
  shows "Try again" like any other error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Injected service fields are readonly.
- Optional chaining when reading the API's error envelope.
- Specs use toHaveSize for list lengths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…b app

Without the connection module, an API that serves the web app answers
GET /ever-connect/me/exports with the app's own index.html (200, not
JSON). The list now reads like the status probe: a 404, that answer, or
any body other than a list means the module is not loaded, and the
section stays hidden. Other errors still offer "Try again".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Person deletion takes each account's row lock (sorted) before ending sessions and
  removing identities, as a sign-in that opens a session does.
- A subject-only back-channel logout records a per issuer+subject cutoff; a sign-up
  confirmation whose provider sign-in predates it opens no session.
- refreshIntegrations keeps a local decision made while it read Ever Platform: a row whose
  state/updatedAt changed since the read is not overwritten.
- The scheduler renews its lease before the person-link round and before each call in it,
  and the round stops once another API process holds the lease.

Regression tests for each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Client

TestRequest.error() refuses a 2xx status, so the case of an API that answers
an unknown path with the web app's index.html is now tested on the service
with an HttpClient stub that fails with HttpErrorResponse({status: 200}).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- refreshIntegrations compares and writes in one statement (conditional update on the
  decision read; a new row is inserted, a concurrent insert wins), audit/stats only after.
- revokeIdentity: the logout cutoff only moves forward (conditional update, also after a
  unique conflict), and sessions are ended with each account's row locked, as openSession
  locks it, so a session opened concurrently is either ended or sees the cutoff.
- The sealed sign-up record carries when the provider sign-in started (before the code
  exchange and account checks), in ms; confirmation compares that, not the seal time.
- The scheduler renews its lease before the managed calls and in their per-operation
  check; syncLinks renews before its last reporting check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(webapp): maintenance operations panel and My data exports
…again (twice at most)

A newer remote state (a revoked consent) is no longer left behind when an older refresh
stored first; local switch-offs still win (conditional write, pendingRemoteRevoke).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…aces-0.24.1

# Conflicts:
#	docs/changelog.md
fix(api): Ever Connect / Ever ID races found in the 0.24.0 release review
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 680f75b4-4aeb-4c10-bd7f-34f9993578f6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@evereq

evereq commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

Ever Works AI review — ever-co/ever-traduora#642

Approve with minor comments — version bumps are consistent across all packages and the Ever ID/Connect race fixes look sound, but the integration-refresh optimistic locking and session-revocation check-then-insert touch critical auth paths and deserve scrutiny. No exposed secrets; change size is moderate for a release. Touched critical paths: auth sign-in/sign-up, Ever ID session revocation, Ever Connect integration refresh and person-link sync.

File notes:

  • api/src/services/ever-id-session.service.ts — revokeIdentity: advance() and existsBy() are separate non-transactional queries, so a concurrent delete between them can trigger a spurious insert. The unique-violation catch covers concurrent inserts, but wrap the check-then-insert in a transaction to make the cutoff advance atomic.
  • api/src/auth.controller.ts — signOidcUserToken: signedInAt is only passed on the sign-up confirmation path; normal sign-ins pass undefined, so a subject-only logout does not block a fresh sign-in. Confirm this is intended (logout ends current sessions but allows re-sign-in) and document it.
  • webapp/src/app/auth/components/my-data-exports/my-data-exports.component.ts — download: assumes EverPlatformService.myExport unwraps the { data: ... } envelope; if the service ever returns the raw envelope, the saved file would wrap the export in data. Verify the service unwraps or assert the response shape before saving.
  • api/src/ever-connect/ever-connect-person.service.ts — deleteIdentities: lockAccount selects encryptedPassword purely for row locking. Select only id (or add a comment) to make the locking intent clear and avoid reading sensitive data unnecessarily.
  • api/src/ever-connect/ever-connect-scheduler.service.ts — renew: calls acquire(Date.now()) without re-checking connection status or liveness; a long round could renew the lease for a connection that was deactivated meanwhile. Guard renew against renewing a dead lease.
  • api/src/ever-connect/ever-connect-person.service.ts — syncLinks: when leaseLost becomes true during the reporting loop the loop breaks and falls through to return { reported, removed }; this is correct but add an explicit return after the loop for clarity so future readers know the early-exit is intentional.
  • api/src/ever-connect/ever-connect-service.ts — refreshIntegrations: the recursive retry re-reads readAt on each attempt, which is correct, but after the attempt limit is exhausted stale changes are silently dropped and this.integrations() is returned. Log a warning when retries are exhausted so operators notice persistent contention.
  • docs/changelog.md — changelog entry for 0.24.1 omits the 'No migrations' note from the PR body; add it so operators know no schema changes are required.

Work: Ever Traduora

@greptile-apps

greptile-apps Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 3/5

[High impact] The release affects Ever ID session access and connected maintenance workflows.

Fix the existing-account logout race before merging.

Findings

  1. P1 Security Sign-in survives logout ▶
  2. P2 Result retries skip lease checks ▶

Summary

Releases v0.24.1 with Ever ID race fixes, safer integration refreshes, scheduler lease renewal, and new maintenance and personal-export screens.

  • Ever ID logouts and identity removals stop older sign-ins from reopening sessions.
  • Integration refreshes keep newer operator choices when platform reads overlap.
  • Background work stops when another API process takes over the lease.
  • Operators can set maintenance limits and review operation results on the Ever Platform page.
  • Users can download their account exports from account settings.
  • Release files and notes now identify version 0.24.1.

Reviews (1) · Last reviewed commit: "Merge pull request #641 from ever-co/cho..." · Reviewed by Greptile

Comment thread api/src/controllers/auth.controller.ts Resolved
…fore resends

- signInWithOidc: pass the sign-in start time on the existing-account path too, so a
  subject-only logout that lands during the code exchange or account lookup ends it
  (Greptile P1 on #642)
- runDue: check and renew the lease before each saved-result delivery, stop once it is
  lost (Greptile P2 on #642)
- person-link round also stops once the connection is no longer the active one
- refreshIntegrations: warn when the retries are exhausted
- e2e: sort with localeCompare (Sonar S2871); changelog 0.24.1 entries + no-migrations note

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@evereq

evereq commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Review pass before merging this release PR (lane traduora, overnight resume):

Greptile (2 findings): both fixed in #644 → develop (replies on the threads). This PR picks #644 up once it is merged into develop.

Ever Works AI review notes:

Checks:

fix: end in-flight Ever ID sign-ins on subject logout, renew lease before result resends (0.24.1)
@sonarqubecloud

Copy link
Copy Markdown

@evereq

evereq commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Ever Works AI review — ever-co/ever-traduora#642

Approve with minor comments. Release promotion v0.24.0 → v0.24.1 with focused race-fix and feature changes; no migrations, no exposed secrets. Touched critical paths: OIDC sign-in/session revocation, Ever Connect integration refresh compare-and-write, and scheduler lease renewal.

File notes:

  • api/src/services/ever-id-session.service.ts — Verify the retention sweep deletes subject-logout marker rows (sid like 'sub-%') after expiresAt; revokeIdentity inserts them but never removes them, so the EverIdSession table could grow unbounded.
  • api/src/controllers/auth.controller.ts — The signup-confirmation fallback reconstructs signedInAt as (pending.exp - SIGNUP_PENDING_TTL_SECONDS) * 1000; if that constant changes, old pending records get a wrong cutoff. Clear old pending records on deploy or always persist signedInAt.
  • api/src/ever-connect/ever-connect.service.ts — refreshIntegrations retries up to 3 times when rows changed meanwhile but only logs a warning on exhaustion; the caller and UI get no signal that the refresh was incomplete. Surface a refreshIncomplete flag in the integration view.
  • api/src/ever-connect/ever-connect-scheduler.service.ts — renew() calls this.acquire(Date.now()); confirm acquire extends a lease already held by this process (update-if-owned) rather than requiring a free lease, otherwise renew() returns false after the first acquisition and stops all background rounds.
  • webapp/src/app/auth/components/my-data-exports/my-data-exports.component.html — MyDataExportsComponent is declared in auth.module.ts but no route is shown in the diff; verify it is wired into the account settings page or a route, otherwise the My data exports section is unreachable.
  • api/src/ever-connect/ever-connect-managed.service.ts — Confirm stillCurrent() checks both the scheduler lease and the connection's active status; otherwise a deactivated connection could keep sending saved results mid-round.
  • api/test/ever-id.e2e-spec.ts — The new test mocks findIdentity to invoke revokeIdentity for subject 'carol'; ensure 'carol' is not reused by other tests in the file to avoid cross-test state leakage from session revocation.
  • api/src/services/ever-id-session.service.ts — In revokeIdentity, after the insert unique-violation catch, advance() is called without re-checking existsBy; if another process inserted the row with a future issuedAt, the cutoff may not advance. Re-read the row after the catch.

Work: Ever Traduora

@evereq

evereq commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Merging. Since Greptile's review of 3407575, the head has changed only by #644 (2756ff4), and the bots reviewed that delta in #644: Greptile 5/5 with no findings, CodeRabbit nothing actionable, SonarCloud PR gate passed, Ever Works notes answered there. Both Greptile threads here are fixed by it and resolved.

Checks on 2756ff4:

No migrations, so no database step. After the stage image build: verify docs-stage.traduora.co, then the stage → master PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant