Skip to content

[codex] Add catalog-driven app package installs#70

Open
n30nex wants to merge 7 commits into
ItsLimitlezz:mainfrom
n30nex:codex/app-catalog-package-install
Open

[codex] Add catalog-driven app package installs#70
n30nex wants to merge 7 commits into
ItsLimitlezz:mainfrom
n30nex:codex/app-catalog-package-install

Conversation

@n30nex

@n30nex n30nex commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • merge the canonical app catalog stack with the verified package installer stack
  • add a bounded T-Deck app package fetch transport that streams catalog HTTPS packages to local temp files
  • wire catalog entries to verified install/update transactions, serial app catalog install[-test], and App Store GET/UPDATE/OPEN state
  • add native selftest coverage for catalog metadata -> package install/update rollback

Stack

This branch includes the existing open-pr commits for:

New work is in c38904e on top of merge commit 759c251.

Validation

  • git diff --check
  • python -m py_compile scripts\validate_app_catalog.py scripts\build_app_package.py
  • python scripts\validate_app_catalog.py docs\examples\app-catalog-index.json
  • python scripts\validate_local_app_samples.py
  • python scripts\build_app_package.py examples\local-apps\weather-mesh --out .pio\weather-mesh-test.zip --device-path /sd/limitlezz/packages/weather.mesh.zip
  • pio run -e native
  • .pio\build\native\program.exe --selftest
  • .pio\build\native\program.exe --simtest
  • pio run -e tdeck (RAM 248592 / 327680, Flash 1729113 / 5242880)
  • pio run -e tdeck-meshcore (RAM 248592 / 327680, Flash 1730721 / 5242880)

Hardware plan

After Firmware CI publishes the exact tdeck-meshcore artifact for this commit, flash that artifact on COM8 only and run serial smoke including app catalog status, app catalog test, app catalog install-test, and app package test.

@n30nex n30nex marked this pull request as ready for review June 20, 2026 23:19
@n30nex

n30nex commented Jun 20, 2026

Copy link
Copy Markdown
Contributor Author

Validation update for 0a97df8e096014be29351f0b773b0d31ff2678c2:

Local checks passed:

  • git diff --check
  • python scripts\validate_app_catalog.py docs\examples\app-catalog-index.json
  • python scripts\validate_local_app_samples.py
  • python scripts\tdm_airtime_smoke.py --selftest
  • pio run -e native
  • .pio\build\native\program.exe --selftest
  • .pio\build\native\program.exe --simtest

Remote firmware build passed:

  • Firmware CI run 27886825531 on ItsLimitlezz/LimitlezzOS
  • downloaded artifact tdeck-firmware-0a97df8e096014be29351f0b773b0d31ff2678c2
  • artifact manifest verified sha=0a97df8e096014be29351f0b773b0d31ff2678c2, run_id=27886825531, budget=pass

COM8 hardware validation passed from the Actions artifact only:

  • flashed with python scripts\tdeck_smoke.py --port COM8 --no-stub-upload --skip-build --artifact-dir .pio\ci-artifacts\tdeck-0a97df8 --commands "id" "app catalog status" "app catalog test" "app catalog install-test" "app package test"
  • serial PASS with app catalog install-test -> PASS version=2.0.0 files=3
  • serial PASS with app package test -> PASS version=2.0.0 files=3
  • follow-up no-reflash COM8 serial PASS for id, sys, ota status, ota test, feedback status, feedback test, security status, security test, and power

COM11 and COM29 were not used.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0a97df8e09

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/services/store.c
Comment on lines +2271 to +2272
if(!app_catalog_find_entry(id, entry, err, sizeof err))
goto fail;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject catalog rows for other targets

When the cached catalog contains an entry whose compatibility.targets is only sim, app_catalog_find_entry() still returns it because parsing only records target_tdeck/target_sim; this install path then continues to fetch and promote it on a T-Deck without checking the current build target. That makes incompatible packages installable from both UI and serial catalog installs, so reject entries whose target flag does not match the running build before continuing.

Useful? React with 👍 / 👎.

Comment thread src/services/store.c
Comment on lines +2305 to +2306
if(!lz_store_install_app_package(entry->id, selected, entry->package_sha256,
entry->package_bytes, r)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Enforce catalog permissions before promotion

For catalog installs, this call verifies only the package id/hash/size and then promotes whatever permissions the embedded manifest declares. If the catalog row says a package is display-only but the downloaded manifest requests storage or network_wifi, the install succeeds and the app later runs with the broader manifest permissions, so the validated catalog metadata is not actually enforced. Compare the extracted manifest's permission/API metadata with entry and roll back on mismatch before treating the catalog install as successful.

Useful? React with 👍 / 👎.

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