diff --git a/docs/development/data.md b/docs/development/data.md index bf9f234..651da72 100644 --- a/docs/development/data.md +++ b/docs/development/data.md @@ -46,6 +46,8 @@ GTT rotates trip IDs between daily exports while stop IDs stay stable, and most ### Publication +**Status (2026-11): no mirror is configured and the workflow is disabled.** GTT's static-export host refuses connections from GitHub-hosted runners (two runs failed with a TCP connect timeout while the same URL answered from an Italian connection), so the pipeline cannot build in GitHub Actions. `TIMETABLE_MIRRORS` is empty, so devices make no mirror requests; timetable freshness comes with app releases, and rotated trip IDs are handled by the direct GTT identity remap. Re-enabling requires running the pipeline from a host that can reach GTT and listing the mirrors again. + Mirrors are an optional freshness layer: boards work fully without them (bundled package, direct GTT identity remap below, GTT realtime). The app reads an ordered list of mirrors from `TIMETABLE_MIRRORS` in `src/transit-data/config.ts` and uses the next one only when one fails: GitHub Pages (`manifest.json`, `packages/gtt-.json`), then the assets of one rolling GitHub **prerelease** tagged `gtt-timetable` (`manifest.json`, `gtt-.json`; release assets cannot contain `/`). The data prerelease is created with `--prerelease --latest=false`, re-asserted on every run, and its assets are replaced in place (packages first, then the manifest, then stale assets removed), so release trackers such as Obtainium keep following the app's own latest release. Its notes say it is not an app release. `.github/workflows/gtt-timetable.yml` runs at 03:15, 06:15, 12:15 and 18:15 UTC and on manual dispatch. `scripts/gtt-pipeline.py` downloads the ZIP with `If-None-Match`/`If-Modified-Since` from the published manifest, builds and validates the package, and publishes to GitHub Pages only when the package hash changed, or when the published upstream confirmation is older than 20 hours (a manifest-only heartbeat, so devices can tell an unchanged upstream from a stalled pipeline). Previous packages are re-downloaded, re-verified and kept beside the current one. The workflow uses no secrets and never receives signing credentials; the release-mirror job alone has `contents: write` (needed for release assets), checks out no code and only uploads the verified files. The Pages deployment is opt-in: set **Settings → Pages → Build and deployment → Source: GitHub Actions**, then the repository variable `GTT_PAGES_ENABLED` to `true`. Without it only the Releases mirror is updated, and because the pipeline reads the previous manifest from Pages, each run then publishes a fresh package set without carried rollback packages. diff --git a/src/services/notices.ts b/src/services/notices.ts index cd268e1..ccde398 100644 --- a/src/services/notices.ts +++ b/src/services/notices.ts @@ -9,7 +9,7 @@ export const PROVIDER_NOTICES = [ { name: 'Luoghi', text: `Overture Maps Foundation. Pacchetto di ${manifest.places.count.toLocaleString('it-IT')} record, release ${manifest.places.release}; estensione indicata dal confine tratteggiato sulla mappa. Dati incompleti; fonti e licenze conservate per ogni luogo.`, url: 'https://docs.overturemaps.org/attribution/' }, { name: 'Ricerca online', text: 'Photon / OpenStreetMap: se la ricerca online è abilitata, nomi e indirizzi cercati e area vengono inviati al servizio. Le categorie sono cercate nel pacchetto locale. Nessuna disponibilità garantita.', url: 'https://photon.komoot.io' }, { name: 'Percorsi stradali', text: 'FOSSGIS / OpenStreetMap: partenza e destinazione inviate al servizio e registrate nei log. Massimo una richiesta al secondo; servizio pubblico per uso moderato.', url: 'https://www.openstreetmap.org/fixthemap' }, - { name: 'Fermate e previsioni', text: `Data source: GTT S.p.A. – Gruppo Torinese Trasporti. Dati per uso non commerciale. Orari programmati GTT ${manifest.gtt.version} inclusi nell’app; versioni più recenti verificate tramite hash vengono scaricate da ${mirrorHosts().join(', ')} (il server vede indirizzo IP e ora della richiesta, non la fermata né la posizione). Il feed tempo reale è scaricato per l’intera città: non contiene la tua posizione né la fermata scelta.`, url: 'https://www.gtt.to.it' }, + { name: 'Fermate e previsioni', text: `Data source: GTT S.p.A. – Gruppo Torinese Trasporti. Dati per uso non commerciale. Orari programmati GTT ${manifest.gtt.version} inclusi nell’app; ${mirrorHosts().length ? `versioni più recenti verificate tramite hash vengono scaricate da ${mirrorHosts().join(', ')} (il server vede indirizzo IP e ora della richiesta, non la fermata né la posizione).` : 'gli aggiornamenti arrivano con le nuove versioni dell’app; quando GTT cambia i codici delle corse l’app legge da gtt.to.it solo l’elenco corse e i calendari (non la fermata né la posizione).'} Il feed tempo reale è scaricato per l’intera città: non contiene la tua posizione né la fermata scelta.`, url: 'https://www.gtt.to.it' }, { name: STOP_LIVE_SETTING, text: STOP_LIVE_DISCLOSURE, url: 'https://www.gtt.to.it' }, { name: 'Orari GTT: identità delle corse', text: 'Quando GTT riassegna gli identificativi delle corse, l’app legge direttamente dall’archivio orari ufficiale GTT (www.gtt.to.it) solo l’elenco corse e i calendari, con richieste parziali condizionali al massimo una volta al giorno (con «Aggiorna orari», al massimo ogni 10 minuti) e solo con una bacheca aperta. Non invia fermata né posizione; GTT vede indirizzo IP e ora della richiesta.', url: 'https://www.gtt.to.it/open_data/gtt_gtfs.zip' }, { name: 'Treni e ricerca su Transitous', text: 'Transitous (servizio comunitario, uso non commerciale) riceve solo su tua richiesta: il codice della stazione o fermata quando apri una bacheca treni o scegli «Cerca su Transitous», il codice della corsa quando ne apri le fermate, il testo digitato quando cerchi una fermata per nome. Mai la tua posizione. Transitous registra indirizzo IP, ora, URL della richiesta e User-Agent (nome e versione dell’app) e conserva i log fino a 2 giorni. Dati da BusOne (https://busone.app) and Trenitalia; BusOne (https://busone.app) and GTT. Fonti complete al link.', url: 'https://transitous.org/sources/' }, diff --git a/src/transit-data/config.ts b/src/transit-data/config.ts index 0c56cee..877bd81 100644 --- a/src/transit-data/config.ts +++ b/src/transit-data/config.ts @@ -13,12 +13,14 @@ export interface TimetableMirror { /** Hosts that also receive the request through redirects (for privacy notices). */ redirectHosts?: readonly string[]; } -export const TIMETABLE_MIRRORS: readonly TimetableMirror[] = [ - { base: 'https://avoid-quest.github.io/maps/gtt/', layout: 'tree' }, - // Assets of the rolling `gtt-timetable` prerelease (never marked "latest"). - // Release downloads redirect to GitHub's asset CDN, which also sees the request. - { base: 'https://github.com/avoid-quest/maps/releases/download/gtt-timetable/', layout: 'flat', redirectHosts: ['release-assets.githubusercontent.com', 'objects.githubusercontent.com'] }, -]; +/** + * No mirror is configured: GTT's static-export host refuses connections from GitHub-hosted + * runners, so the CI pipeline cannot build packages (the workflow is disabled). Phones reach GTT + * directly, so boards rely on the bundled package plus the identity remap read from GTT. To + * re-enable, publish packages from a host that can reach GTT and list the mirrors here, e.g. + * `{ base: 'https://avoid-quest.github.io/maps/gtt/', layout: 'tree' }`. + */ +export const TIMETABLE_MIRRORS: readonly TimetableMirror[] = []; export const manifestUrl = (mirror: TimetableMirror) => `${mirror.base}manifest.json`; /** `packagePath` is validated as `packages/gtt-.json` before this is called. */