Skip to content

fix: typed 404 classification and package-manager guidance for self-update - #33

Merged
MotherSphere merged 1 commit into
mainfrom
fix/packaged-install-and-typed-404
Jul 20, 2026
Merged

MotherSphere merged 1 commit into
mainfrom
fix/packaged-install-and-typed-404

Conversation

@MotherSphere

Copy link
Copy Markdown
Member

Contexte (audit 2026-07-20, vague B - lot 3, dernier)

  1. 404 typé - la détection not-found faisait contains("404") sur des erreurs stringifiées à 4 endroits : un body contenant « 404 » par hasard classait un repo vivant comme sans-manifest, le faisait disparaître du catalogue et réécrivait le cache offline sans lui. cached_get porte maintenant un HttpStatus typé dans la chaîne anyhow, et les appelants classifient via is_not_found() (test unitaire inclus : un body « 404 » sur un statut 500 n'est plus un not-found).
  2. Guidance pacman - une install AUR (/usr/bin/colony) se voyait proposer le flux self-update complet, qui télécharge des Mo puis meurt en EACCES sur le rename de l'exe. Détection au boot (/usr ou /opt) : le bouton Settings devient un hint « mets à jour via pacman -Syu », le toast de disponibilité dit pareil, et DownloadLauncherUpdate refuse en défense en profondeur. Clés i18n FR+EN (test de parité vert).

Validation

Build + clippy 0 warning, 91 tests verts (nouveau test du downcast 404).

…pdate

- GitHub not-found detection matched the substring '404' against
  stringified errors at four call sites: any response body that merely
  contained '404' classified a live repo as manifest-less, silently
  dropping it from the catalog and then rewriting the offline cache
  without it. cached_get now carries a typed HttpStatus in the anyhow
  chain and callers classify via is_not_found(), which only matches a
  real HTTP 404.
- AUR/pacman installs (exe under /usr or /opt) were offered the full
  self-update flow, which downloads megabytes and then always dies with
  EACCES on the backup rename of the running exe. The install location
  is detected once at boot; the Settings button is replaced with
  'update via pacman' guidance, the availability toast says the same,
  and DownloadLauncherUpdate refuses as defense in depth.
@MotherSphere
MotherSphere force-pushed the fix/packaged-install-and-typed-404 branch from 9ab979d to f98e54f Compare July 20, 2026 16:24
@MotherSphere
MotherSphere merged commit 315bc4d into main Jul 20, 2026
3 checks passed
@MotherSphere
MotherSphere deleted the fix/packaged-install-and-typed-404 branch July 20, 2026 16:30
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