Simpl-Resultat/docs/adr
le king fu e24c30fe6a feat(license): online revocation check — a revoked key falls back to Free (#365)
A refunded license was revoked on the server but kept working in the app:
the edition is resolved offline from the key alone, and the flag added by
#347 lasted the session only and never touched the edition.

Rust
- license.check, next to the key, holds what the license server last said
  about it: {key_sha256, attempted_at, revoked}. Never the key itself. A
  missing, unreadable or invalid file, or a state about another key, reads
  as "no state": not revoked, check due.
- entitlements_from_dir resolves a revoked key to ("free", []), which also
  locks auto-update. read_license and store_license report the state.
- check_license_revocation: POST /v1/licenses/verify with the product and
  the key only. Nothing is sent without a stored key that validates, nor
  within 24 h of the last attempt, which is written before the request.
  Fail-open: only "valid" lifts the state, only "revoked" sets it.
- Activation, machine list and deactivation record a license_revoked answer
  under the key they sent.
- fetch_price reads error.code of a 403 and names license_revoked instead of
  premium_required. It records nothing: the price route judges the license
  of the activation token, which the client cannot tie to the stored key,
  and 0.15.0 left the token of a previous key next to a new one (#367).

Front
- LicenseContext takes the revoked state from Rust (info.revoked); the
  session flag and markRevoked are gone. The check starts once per app
  start, writes its outcome to the in-app log, and reloads the context only
  when the state changed. A revoked key entered again stays Free.
- UpsellGate and the License card name the revocation.

Docs: ADR 0017 amendment (D13 replaced, the first unsolicited request and
its bounds), architecture, user guide, price contract annex, changelogs.

Refs #365

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 14:45:34 -04:00
..
0001-tauri-v2.md docs: organize technical documentation into docs/ folder 2026-02-19 07:34:01 -05:00
0002-useReducer-vs-redux.md docs: organize technical documentation into docs/ folder 2026-02-19 07:34:01 -05:00
0003-sqlx-migrations.md docs: organize technical documentation into docs/ folder 2026-02-19 07:34:01 -05:00
0004-aes-256-gcm-encryption.md docs: organize technical documentation into docs/ folder 2026-02-19 07:34:01 -05:00
0005-multi-profile-db.md docs: organize technical documentation into docs/ folder 2026-02-19 07:34:01 -05:00
0006-oauth-tokens-keychain.md docs: ADR 0006 + changelog + architecture for OAuth keychain (#82) 2026-04-14 08:26:21 -04:00
0007-reports-hub-refactor.md docs: polish + changelog + ADR + legacy cleanup for reports refactor (#76) 2026-04-14 15:29:49 -04:00
0008-modified-dietz-pour-rendement.md docs(adr): add ADRs 0008-0010 (Modified Dietz, proxy price-fetching, FK RESTRICT) 2026-04-25 17:06:40 -04:00
0009-proxy-price-fetching-via-maximus-api.md docs(adr): add ADRs 0008-0010 (Modified Dietz, proxy price-fetching, FK RESTRICT) 2026-04-25 17:06:40 -04:00
0010-fk-restrict-balance-transfers.md docs(adr): add ADRs 0008-0010 (Modified Dietz, proxy price-fetching, FK RESTRICT) 2026-04-25 17:06:40 -04:00
0011-providers-best-effort-yahoo.md docs(prices): commit /v1/prices contract + ADR 0011 2026-04-27 08:06:03 -04:00
0012-balance-two-level-model.md docs(balance): ADR 0014 + reject 0012 + guide + changelog (#205) 2026-06-01 21:15:06 -04:00
0013-stocks-provider-evaluation.md docs(adr): 0013 — stocks provider evaluation, AV retained as bascule target (#196) 2026-05-09 12:40:08 +00:00
0014-balance-vehicule-attribut.md docs(balance): ADR 0014 + reject 0012 + guide + changelog (#205) 2026-06-01 21:15:06 -04:00
0015-balance-detail-par-titre.md docs(balance): ADR 0015 + guide + architecture + CHANGELOG for per-security detail (#218) 2026-06-06 14:17:03 -04:00
0016-persistance-etat-ui-par-profil.md docs(collapse): ADR 0016 per-profile UI state + guide, architecture, i18n 2026-07-18 14:43:24 -04:00
0017-feature-gating-par-tier.md feat(license): online revocation check — a revoked key falls back to Free (#365) 2026-10-02 14:45:34 -04:00
0018-suppression-advisories-non-atteignables.md fix(deps): resolve the quick-xml advisories, unyank deep-link and spin 2026-08-15 11:51:46 -04:00
0019-format-import-persiste.md docs: architecture, ADR 0019, user guide and changelog for the import format 2026-08-14 11:13:25 -04:00
0020-identifiant-machine-derive.md fix(license): apply the review of #366 2026-10-01 21:12:32 -04:00