Commit Graph

8 Commits

Author SHA1 Message Date
akfoster
8607c509f0 fix(pm): avoid delaying available mirrors 2026-10-24 18:47:41 -07:00
akfoster
938be3a6d4 fix(pm): tolerate failed periodic checkpoints 2026-10-24 18:47:41 -07:00
akfoster
e5470c9888 feat(pm): preserve progress across interrupted downloads 2026-10-24 18:47:41 -07:00
Teknium
300228d24c fix: drop the VPN/proxy advice from the CDN-block message
The message names the host's CDN and says the install is fine; "retry from
another network" is the only next step it suggests.
2026-10-14 08:50:46 -07:00
Teknium
ec5fa1e437 fix: scope the no-cf-cache-status block signal to our R2 host; keep it on 429s
Review follow-up on the CDN-block message (Greptile, #138420):

- A Cloudflare 403 with no cf-cache-status means "never reached the bucket"
  only on an R2 custom domain (that is what Cloudflare's R2 troubleshooting
  docs promise). Other Cloudflare-fronted hosts the PM downloads from, or a
  user's mirror, can answer an ordinary origin 403 without it, so that
  fallback now applies to hermes-assets.nousresearch.com only. The explicit
  cf-mitigated / x-vercel-mitigated headers still count on any host.
- DownloadTransportError dropped the explanation on an exhausted 429 (Vercel
  challenges are 429s) because the reason was gated on 401/403. It now
  appends the CDN explanation whenever there is one.
2026-10-14 08:50:46 -07:00
Teknium
5ac6af436d fix: name a CDN firewall block instead of a bare HTTP 403 (#128295)
Users on networks that Cloudflare (hermes-assets.nousresearch.com) or
Vercel (portal.nousresearch.com) refuse saw "Channel read unavailable:
HTTP 403", "download failed ...; the host refused access" and, from
`hermes debug share --nous`, "The Nous diagnostics service may be
unavailable or not yet provisioned". Every one of those reads as a broken
install or a server outage, so reporters (and we) debugged the wrong thing.

pm.network.edge_block recognises the refusal from the CDN's own headers:
`cf-mitigated` (Cloudflare challenge), a `server: cloudflare` 403/429 with
no `cf-cache-status` (never reached the R2 bucket, per Cloudflare's R2
troubleshooting docs), and `x-vercel-mitigated` (Vercel firewall). The
channel reader, the PM downloader and `debug share --nous` now say which
host's CDN refused this network and that the install itself is fine. An
origin 403 (cf-cache-status present, S3, anything else) keeps its old text.
2026-10-14 08:50:46 -07:00
Maciej Lisiewski
9eab688b42 ci: ruff UP017 fixes 2026-10-09 17:34:36 +02:00
ethernet
8e4a804f53 fix(pm): retry transient network failures
A transient HTTP 500 during the range probe aborted bundle staging.
Retry PM-owned requests and body transfers with one bounded policy,
instead of retrying complete installs or stacking caller retry loops.

Keep partial ranges across attempts and interrupt backoff on pause.
Keep the CDN serial fallback active until its source finishes. Do not
retry permanent HTTP errors, certificate failures, bad hashes or disk
errors. Use the same policy for metadata reads and artifact hashing.

Verified: 217 focused tests passed, 1 skipped, and Ruff passed on the
changed Python files. The pinned Windows ARM64 uv archive also survived
an injected HTTP 500 through the PM CLI and its installed binary ran.
The full suite and desktop release build were not run.
2026-09-09 12:54:08 -04:00