Skip to content

LATU: add a generic dual-translator status manager - #369

Merged
LaurenIsACoder merged 3 commits into
lat-opensource:masterfrom
LaurenIsACoder:lauren/latu-runtime-foundation
Aug 4, 2026
Merged

LATU: add a generic dual-translator status manager#369
LaurenIsACoder merged 3 commits into
lat-opensource:masterfrom
LaurenIsACoder:lauren/latu-runtime-foundation

Conversation

@LaurenIsACoder

@LaurenIsACoder LaurenIsACoder commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add an independent latu-runtime-manager command; no overlapping latu wrapper is installed
  • report latx-x86_64 and latx-i386 separately through a stable, distribution-neutral status contract
  • support translators installed through alternatives or other valid executable symlinks
  • keep this layer limited to translator facts; runtime readiness, catalog selection, and provisioning remain follow-up work
  • install the manager through Meson and exercise it in every existing LoongArch CI container

Behavior

$ latu-runtime-manager status
translator_x86_64=present
translator_i386=missing

Each value is present, missing, or unknown. unknown means the selected translator path could not be inspected safely, such as a root escape. status exits successfully when either translator is absent or unknown because those are query results, not command failures. Invalid arguments or an invalid --root return status 2. --root ROOT exists for inspecting a filesystem tree and tests; normal host use does not require it.

In normal host mode, the manager resolves its own final symlink before probing sibling translators, so invocation through /usr/local/bin or an alternatives-style link still inspects the actual installation directory. A translator symlink is present when its resolved target is a regular executable file.

In --root mode, translator symlinks are followed only when their resolved targets remain inside the selected root. A symlink that escapes the root or cannot be resolved safely is reported as unknown, not missing or present.

The implementation does not read os-release, branch on ID or ID_LIKE, contain a distribution allowlist, or infer runtime readiness from translator presence. Distribution names occur only in the existing CI image matrix, where they identify test environments.

Series

PR1 and PR2 can be reviewed and merged in either order. PR3 is now published as a draft for early review; it should not be merged until both foundations are accepted.

Commit structure

  1. runtime: report both LATX translators — command contract and focused source-tree matrix
  2. build: install and exercise the runtime manager — Meson installation, installed-layout regression, and CI wiring
  3. runtime: support symlinked translator installs — alternatives-compatible probing, root containment, and manager-symlink discovery

Validation

  • deterministic RED: valid translator symlink was reported missing
  • deterministic RED: a translator symlink escaping --root was incorrectly reported present
  • deterministic RED: manager invocation through a symlink probed the alias directory instead of the actual installation directory
  • GREEN on macOS: complete source-tree dual-translator matrix passed, including all three symlink regressions
  • GREEN on native LoongArch: source-tree matrix passed at commit 4bc4146f89a
  • native LoongArch product builds with tests disabled: latx-x86_64 and latx-i386 passed
  • native LoongArch installed-layout tests passed for both x86_64 and i386 build trees
  • native LoongArch focused Meson tests: 2/2 passed for both x86_64 and i386 build trees
  • native LoongArch lat-pr-fast: x86_64 13/13 and i386 6/6 passed
  • installed-layout tests verify the configured bindir, sibling discovery, both output keys, and absence of a generated latu command
  • native release packaging passed; the archive contains latu-runtime-manager, latx-x86_64, and latx-i386
  • sh -n runtime/latu-runtime-manager tests/runtime/test-latu-runtime-manager.sh
  • git diff --check
  • checkpatch: 0 errors; only the expected new-file/MAINTAINERS warnings

@LaurenIsACoder
LaurenIsACoder force-pushed the lauren/latu-runtime-foundation branch from 7387c5c to a3b6e60 Compare August 3, 2026 08:24
@LaurenIsACoder LaurenIsACoder changed the title LATU: add AOSC runtime prerequisite diagnostics LATU: add portable runtime prerequisite diagnostics Aug 3, 2026
@LaurenIsACoder
LaurenIsACoder force-pushed the lauren/latu-runtime-foundation branch from a3b6e60 to 6e4f097 Compare August 4, 2026 05:13
@LaurenIsACoder LaurenIsACoder changed the title LATU: add portable runtime prerequisite diagnostics LATU: add a generic dual-translator status manager Aug 4, 2026
@LaurenIsACoder
LaurenIsACoder force-pushed the lauren/latu-runtime-foundation branch from 6e4f097 to 00bbd84 Compare August 4, 2026 05:19
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
@LaurenIsACoder
LaurenIsACoder force-pushed the lauren/latu-runtime-foundation branch from 00bbd84 to fe8189f Compare August 4, 2026 05:24
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
@LaurenIsACoder
LaurenIsACoder marked this pull request as ready for review August 4, 2026 12:43
@LaurenIsACoder
LaurenIsACoder merged commit f7f5dcd into lat-opensource:master Aug 4, 2026
20 checks passed
@LaurenIsACoder
LaurenIsACoder deleted the lauren/latu-runtime-foundation branch August 4, 2026 12:43
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