Skip to content

K2GO-437 feat(code-assets): serve Code on the Go build assets offline at /code-assets - #619

Merged
luisguzman-adfa merged 3 commits into
mainfrom
feat/K2GO-437-code-assets
Oct 2, 2026
Merged

luisguzman-adfa merged 3 commits into
mainfrom
feat/K2GO-437-code-assets

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

What

Serve Code on the Go's release build environment (9 brotli assets, ~0.78 GiB)
offline on the box LAN at /code-assets, parallel to /code-addons. A device on
the box network can set up CoGo with no internet.

Why

A fully offline box must provide the CoGo build env locally. The assets live at
appdevforall.org/dev-assets/release/ (per-file .md5, no index), moving to R2
soon, so the source base is a single swappable variable.

Changes

  • Role code_assets (overlay in tools/upstream-patches/overlays/): manifest-driven
    mirror_code_assets.py downloads each asset, verifies against its sibling .md5,
    writes an .md5 sidecar, reuses unchanged files by md5 (--reuse-from, short-circuits
    up-to-date), and generates a self-contained browse page (cards, light/dark, favicon +
    header logo). nginx serves .br/zip/jar as application/octet-stream (no
    Content-Encoding) and .md5 as text/plain.
  • Bake on Full only: iiab-android enables the role on *_large* and runs
    runrole code_assets post-install (non-fatal). The role tree ships on every tier via
    the overlay, so on-demand install works anywhere; only Full bakes it.
  • dash-node 1.3.10: /code-assets/refresh (start/status/cancel) + code-assets-refresh.sh
    wrapper. Install and browsing do NOT depend on the dash-node version; only the "Update
    build assets" action uses the refresh endpoint and degrades gracefully on older builds.
  • App: /code-assets module card + action-sheet/detail "Update build assets" (clone of
    add-ons), Home card, generic /code-assets/ navigation. 11 new strings localized to all
    33 locales.
  • ADR: controller/docs/ADR-code-assets-offline-build-env.md.

Scope / not included

CoGo has no runtime asset URL today (release APK bundles the build env at build time).
A CoGo-side runtime downloader with a configurable base URL is a separate future change.

Verification

  • :app:assembleStandardDebug green; aapt resource merge green (33 locales).
  • End-to-end on a OnePlus (hand-deployed role): runrole mirrored all 9 assets (md5-verified),
    generated the page, installed the nginx conf; /code-assets serves 200, .br returns
    application/octet-stream with no Content-Encoding; browse page renders in the in-app
    WebView (light/dark).
  • Full rebake validation (runrole-at-bake path + fleet dash-node 1.3.10) pending.

… at /code-assets

Mirror the release build set (Gradle, SDK, bootstrap, Maven repo, docs, templates) into
/library/www/code-assets with a browse page, served on the LAN so a device can set up Code
on the Go with no internet. Role ships as an overlay, baked on Full via runrole; dash-node
drives an incremental "Update build assets" refresh (dash-node 1.3.10).
Installing (runrole) and browsing (WebView) code_assets do not use the
/code-assets/refresh endpoints; only the "Update build assets" action does, and
it degrades to a 404 -> "could not update" on an older dash-node. So installing
and viewing are no longer blocked by DashNodeGate on the dash-node version.
Migrate the 11 code_assets UI strings from strings_untranslated.xml into
strings.xml and add translations to all 33 language locales, so MissingTranslation
is satisfied and the tracker is empty. Translations are machine-generated, pending
human review; Yoruba (yo) and Swahili (sw) are the roughest and most worth a check.
@luisguzman-adfa
luisguzman-adfa merged commit 087362a into main Oct 2, 2026
4 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the feat/K2GO-437-code-assets branch October 2, 2026 23:18
@luisguzman-adfa
luisguzman-adfa restored the feat/K2GO-437-code-assets branch October 3, 2026 04:09
@luisguzman-adfa
luisguzman-adfa deleted the feat/K2GO-437-code-assets branch October 3, 2026 04:36
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