Skip to content

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

Merged
evereq merged 18 commits into
masterfrom
stage
Nov 21, 2026
Merged

evereq merged 18 commits into
masterfrom
stage

Conversation

@evereq

@evereq evereq commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Promotes stage to master for v0.24.1, the whole branch: everything in #642 (develop → stage, merge be74b906), i.e. #638 (Ever Connect / Ever ID race fixes from the 0.24.0 review), #644 (the two Greptile findings of #642), #641 (version + changelog) and the webapp Maintenance operations and My data exports sections (#637). Changelog: docs/changelog.md → 0.24.1.

No database migrations (git diff master stage -- api/src/migrations is empty).

Merges after the stage image build and docs-stage.traduora.co are verified (security headers, /.well-known/security.txt, changelog 0.24.1). On master the in-cluster build publishes ever-traduora:prod / ever-traduora-docs:prod, and Image Updater rolls docs.traduora.co.

🤖 Generated with Claude Code


Summary by cubic

Promotes stage to master releasing v0.24.1, with Ever Connect / Ever ID race fixes, the webapp Maintenance operations and My data exports sections, and no database migrations.

  • Ever Connect / Ever ID – Fixes race conditions found in the 0.24.0 review: person deletions and subject-only logouts now end in-flight sign-ins, integration refreshes no longer overwrite a local decision made while reading Ever Platform, and long background rounds renew their lease and stop when another API process takes over.
  • Webapp – Adds a Maintenance operations section to the Ever Platform page for the operator (opt-in, kinds, windows, backup directory, recent operations) and a My data exports section in account settings for each user; both hide when the connection module is not loaded.

Written for commit be74b90. Summary will update on new commits.

View guided diff Turn on auto-fix

evereq and others added 18 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>
…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>
fix: end in-flight Ever ID sign-ins on subject logout, renew lease before result resends (0.24.1)
release(stage): v0.24.1 (Ever Connect / Ever ID race fixes, Maintenance operations and My data exports in the webapp)
@coderabbitai

coderabbitai Bot commented Nov 21, 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: b5bfc99f-d93c-45cd-a659-432e813e948b

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

@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#645

Approve — release promotion v0.24.0 → v0.24.1 with well-scoped race-condition fixes; no exposed secrets, no database migrations, but critical auth/session and Ever Connect scheduler paths are touched.

File notes:

  • api/src/controllers/auth.controller.ts — signedInAt is captured before verifyOidcCode and threaded through signOidcUserToken → openSession, so a subject-only logout landing mid-sign-in ends the sign-in. The signup-confirmation path reconstructs signedInAt from pending.exp when the sealed value is not a number — a sensible fallback, but confirm the seal persists signedInAt as a number in all code paths.
  • api/src/services/ever-id-session.service.ts — revokeIdentity writes the subject-logout marker row (issuedAt = now) before revoking sessions, establishing the cutoff; openSession rejects sign-ins whose signedInAt is at or before the marker. Correct ordering. The subject === undefined branch also checks signedInAt, but subjectLogoutKey(issuer, undefined) would be meaningless — harmless since signedInAt is only set with a defined subject, though guarding with subject !== undefined would be clearer.
  • api/src/services/ever-id-session.service.ts — revokeIdentity's insert path catches isUniqueViolation and re-runs advance, handling the concurrent-marker race. The marker row uses userId: '' and revokedAt = now; ensure openSessionWithKey and other readers do not treat this marker as a real session.
  • api/src/ever-connect/ever-connect-service.ts — refreshIntegrations now uses optimistic concurrency: reads each row's decision before fetching remote states, skips rows that changed meanwhile, and writes with a conditional update (or insert with unique-violation fallback). Retries up to 3 attempts. The JSDoc says "twice at most" but attempt 0, 1, 2 allows three reads — update the comment to match.
  • api/src/ever-connect/ever-connect-scheduler.service.ts — renew() re-acquires the lease before each Ever Platform call and before managed runDue; the round stops when another process holds the lease or the connection is no longer active. Correct lease discipline for multi-process deployments.
  • api/src/ever-connect/ever-connect-person.service.ts — deleteIdentities locks accounts in sorted userId order before removing identities, preventing deadlocks between concurrent deletions and sign-ins that open sessions. Good.
  • api/src/ever-connect/ever-connect-managed.service.ts — The resend loop calls stillCurrent() before each send; stillCurrent is not defined in this diff (pre-existing). Verify it checks the lease/connection state so a resend round stops when another process takes over.
  • api/src/ever-connect/ever-connect-person.service.spec.ts — New test verifies syncLinks stops a round once the scheduler lost its lease. Good coverage for the lease-loss path.
  • api/test/ever-id.e2e-spec.ts — New e2e test mocks findIdentity to revoke the identity mid-sign-in and expects session_ended. Validates the subject-only logout race fix end to end.
  • webapp/src/app/auth/components/my-data-exports/my-data-exports.component.html — New My data exports component. Download button disables while downloading (downloading === row.jobId). Ensure the component handles 404/410 for expired exports and the API route returns 404 when the connection module is not loaded, as documented.
  • docs/changelog.md — 0.24.1 entry added, matches the PR description including "No database migrations". Consistent with version bumps across package.json files and lerna.json.
  • api/test/ever-connect-managed.e2e-spec.ts — backup keys sort changed from .sort() to .sort((a, b) => a.localeCompare(b)). Minor deterministic-ordering improvement; fine.

Work: Ever Traduora

@greptile-apps

greptile-apps Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The PR affects Ever ID sign-in, Ever Connect operations, and personal export access in bounded workflows.

Cover long-running maintenance operations with lease renewal before merging.

Findings

  1. P1 Maintenance work can overlap ▶

Summary

Releases 0.24.1 with new account and operator pages, plus fixes for Ever ID and Ever Platform races.

  • Ever ID sign-ins respect logouts and identity removals that happen at the same time.
  • Ever Connect keeps local integration changes made during a remote refresh.
  • Ever Connect background work stops when another API process takes over.
  • Installation operators can set maintenance rules and review recent operations.
  • Signed-in users can find and download their available personal data exports.
  • The release updates version labels and Ever Platform documentation.

Diagram

sequenceDiagram
  participant A as API process A
  participant DB as Shared database
  participant B as API process B
  A->>DB: Renew lease for two minutes
  A->>A: Start backup and hash
  Note over A,DB: Backup takes longer than two minutes
  B->>DB: Take expired lease
  B->>B: Start other maintenance work
  Note over A,B: Both processes are running maintenance work
Loading

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

@evereq

evereq commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Review pass before promoting 0.24.1 to master (lane traduora):

  • Greptile 4/5, 1 finding (maintenance work can overlap): answered on the thread. It is not a regression: 0.24.0 on master renews nothing during a round, and 0.24.1 narrows the window. It needs several API processes on one SQLite database plus an operation longer than 2 minutes, and each operation is still claimed once. The fix is follow-up fix(ever-connect): renew the scheduler lease on a timer while a round runs #646 → develop for 0.24.2. Thread resolved.
  • Ever Works AI review: approved. Its notes are either confirmations or already true in the code:
    • The sealed sign-up record stores signedInAt as Date.now(), a number, and the fallback only covers records sealed before 0.24.1.
    • The subject === undefined branch of openSession returns before any cutoff check.
    • The logout marker row (sub-<sha256>, userId '') cannot be confused with a session: session keys are a bare sha256 or local-<hex>, and isRevoked / openSessionWithKey refuse a row of another user.
    • "Twice at most" in the refreshIntegrations doc counts the re-reads after the first (3 attempts in all), which matches the code.
    • stillCurrent is the 4th parameter of runDue, and the scheduler passes "renew the lease and still the active connection".
    • My data exports hides itself on 404 and shows an expired export as gone.
  • SonarCloud: PR gate passed (0 new issues). Codacy: 0 new issues on this diff (markdown style only on earlier PRs). CodeRabbit: skips non-default base branches. Every PR in this release had its own CodeRabbit review (feat(webapp): maintenance operations panel and My data exports #637, fix(api): Ever Connect / Ever ID races found in the 0.24.0 release review #638, chore(release): 0.24.1 #641, fix: end in-flight Ever ID sign-ins on subject logout, renew lease before result resends (0.24.1) #644).
  • CI: CircleCI test green. ci-builds/k8s-build.yml green (the stage images). The in-cluster ci.yml for this exact content is green on fix: end in-flight Ever ID sign-ins on subject logout, renew lease before result resends (0.24.1) #644's merge ref (unit, e2e on sqlite/postgres/mysql, webapp). This PR's own run is queued on the shared PR pool.
  • Stage verified 08:1xZ: docs-stage.traduora.co serves 5 security headers + HSTS, /.well-known/security.txt (200 text/plain), and /changelog/ lists 0.24.1 with "No database migrations".

No migrations, so no database step. Merging.

@evereq
evereq merged commit 85ccc03 into master Nov 21, 2026
13 of 15 checks passed
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