Skip to content

feat(catalog): read catalog v4 and show only apps for the current platform - #84

Merged
egdev6 merged 9 commits into
mainfrom
feat/catalog-v4
Nov 21, 2026
Merged

egdev6 merged 9 commits into
mainfrom
feat/catalog-v4

Conversation

@egdev6

@egdev6 egdev6 commented Nov 21, 2026

Copy link
Copy Markdown
Owner

Linked issue

Closes #83

Requires egdev6/nexo-catalog#11 (publishes v4/catalog.json) to be merged and deployed before Nexo 0.2.0 ships.

Type of change

  • type:bug
  • type:feature
  • type:docs
  • type:refactor
  • type:breaking-change
  • type:chore
  • type:test

Summary

Nexo 0.2.0 reads only catalog v4 (https://egdev6.github.io/nexo-catalog/v4/catalog.json), where each app declares one entry per platform. The hub resolves its own platform key at runtime (windows-x86_64, darwin-aarch64, …) and shows only the apps that have an entry for it. Apps without one are hidden everywhere: catalog, Mis apps, Novedades and update checks. Today every app is Windows-only, so on Windows nothing visible changes.

Changes

Area Change
crates/nexo-catalog parse_catalog_v4 validates the v4 wire format, reusing the existing domain checks per entry: release-asset URLs, updater key, semver, dates, detection. project_catalog_v4 turns a v4 document plus a platform key into the existing flat catalog (schemaVersion: 4), so consumers stay unchanged. The schema copy is synced with nexo-catalog.
Shared corpus fixtures/v4.json and fixtures/parity-v4.json (validity cases plus the expected projection per platform), run by both the Rust and the TS test suites.
Hub (Rust) New platform_key command (OS/ARCH → Tauri updater key). The install feed fetches only v4 and projects it before selection. There is a single v4 cache (read_catalog_v4_cache); write_catalog_cache accepts only valid v4. The read_catalog_cache, read_catalog_v2_cache and read_catalog_v3_cache commands and the v1/v2/v3 fallback chain are removed.
Hub (TS) parseCatalogV4 / projectCatalogV4. The loader uses only the v4 endpoint and cache and projects with platform_key. schemaVersion === 3 gates now accept v4. The i18n key install.v3Required is renamed to install.catalogUpdateRequired.
Docs docs/catalog.md describes v4. catalog.json, v2/ and v3/ stay published for Nexo 0.1.x.

Test evidence

  • cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings: clean.
  • cargo test --workspace: 336 passed, including the 4 v4 parity tests.
  • apps/hub: npx vitest run (47 files, 612 tests), npx tsc --noEmit, npm run build and npm run ds:doctor: all pass.
  • Independent verification: a differential probe of 161 cases (platform keys, URL smuggling, updater keys, detection, duplicate keys) gave identical Rust and TS results and projections. The published v4 catalog projects Antena and Quorb for windows-x86_64 and nothing for darwin-aarch64.
  • Not run locally: #[cfg(windows)] code (apps.rs official_catalog, the Windows invoke_handler registration in lib.rs). The WSL host has no MSVC lib.exe. The native Windows CI jobs on this PR are the proof.

Risks and follow-ups

  • Security-relevant path. Installer selection and updater-key validation now go through v4 parsing and platform projection. Selection still requires a key and a per-user _x64-setup.exe, and this rule stays at selection time: one bad entry cannot reject the whole catalog.
  • Upgrade cache. On upgraded machines the old v1–v3 cache files are ignored, not migrated. The first run without network shows no catalog until v4 has been fetched once.
  • Display-only platforms. Native install remains Windows/NSIS-only, so darwin-* and linux-* entries are display-only.
  • Two catalogs to maintain. Until 0.1.x is retired, every app update must be written to both v3/catalog.json and v4/catalog.json in nexo-catalog.

Review notes

  • Size. About 2.1k changed lines, mostly tests. Review commit by commit: shared corpus → crate → hub Rust → hub TS → docs.
  • Where to look. crates/nexo-catalog/src/lib.rs (v4 rules and projection), install_feed.rs and catalog_cache.rs (fetch and cache boundaries), apps/hub/src/catalog/format.ts and loader.ts.

AI assistance

The el Gentleman harness on Pi drafted this change: contract, shared corpus, Rust and TS implementation via workers, and an independent verifier pass. The maintainer reviews it and carries responsibility for the final decision.

@egdev6 egdev6 added type:feature New user-facing feature size:exception Maintainer-approved exception to the PR size budget labels Nov 21, 2026
@egdev6
egdev6 merged commit df706ca into main Nov 21, 2026
4 checks passed
@egdev6
egdev6 deleted the feat/catalog-v4 branch November 21, 2026 16:24
@egdev6 egdev6 mentioned this pull request Nov 21, 2026
1 task done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:exception Maintainer-approved exception to the PR size budget type:feature New user-facing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Catálogo v4: apps, versiones y novedades por sistema operativo

1 participant