Skip to content

fix(os): polish elizaOS live branding and update materialization#7797

Merged
lalalune merged 4 commits into
developfrom
nubs/elizaos-live-final-polish-20260519024904
May 19, 2026
Merged

fix(os): polish elizaOS live branding and update materialization#7797
lalalune merged 4 commits into
developfrom
nubs/elizaos-live-final-polish-20260519024904

Conversation

@NubsCarson
Copy link
Copy Markdown
Member

@NubsCarson NubsCarson commented May 19, 2026

Summary

  • rebrand a few remaining first-boot/live-tool polish strings from inherited Tails wording to elizaOS wording
  • harden app/runtime update materialization with no-follow source opens, temp-file replacement, and manifest-declared digest checks while copying
  • extend static/security smoke checks so these regressions are caught cheaply

Validation

  • ELIZAOS_STATIC_SOURCE_ONLY=1 ./scripts/static-smoke.sh
  • ./scripts/security-smoke.sh passes with the existing production warnings for missing production update keyring and SBOM/provenance artifacts

Notes

This keeps inherited Tails internals and package paths intact; it only changes safe visible polish and the elizaOS-owned update materialization path.

Greptile Summary

This PR rebrands first-boot and launcher UI strings from inherited Tails wording to elizaOS wording, and hardens the update-manager's file materialization path with O_NOFOLLOW source opens, temp-file + atomic-rename writes, and in-flight SHA-256 re-verification against the signed manifest.

  • Branding polish: boot-time Plymouth messages, the live-config 2000-aesthetics hook, the desktop-directory label, and the launcher user-check message are all updated; a new rg-based regression guard in static-smoke.sh ensures they stay clean.
  • Materialization hardening (update-manager): copy_verified_file now opens the source with O_NOFOLLOW, streams through a tempfile.mkstemp temp file, re-hashes the content during the copy, and uses os.replace for an atomic rename.
  • Build system improvements (Justfile): root discovery switches from fragile relative cd to git rev-parse --show-toplevel, a new ELIZAOS_MILADY_APP_ARTIFACT env override is added, and an ensure_plugin_runtime_dist helper builds plugin dists on demand.

Confidence Score: 4/5

Safe to merge with two minor fixes; the materialization hardening is correct and the branding changes are straightforward.

The core security hardening in copy_verified_file is well-designed, but the compound with statement leaves a narrow double-close window on src_fd that masks exceptions, and the temp-file cleanup uses os.path.exists (symlink-following) rather than os.path.lexists/try-except. The CI fetch change drops the depth limit entirely, which can pull full branch history on every PR run.

The update-manager copy_verified_file function deserves the closest read, specifically the fd lifecycle between the compound with setup and the finally cleanup block.

Important Files Changed

Filename Overview
.github/workflows/quality.yml Replaces shallow --depth=1 fetch + three-dot diff with full-history fetch + explicit merge-base computation; improves correctness at the cost of potentially fetching full branch history on each CI run.
packages/os/linux/variants/milady-tails/tails/config/chroot_local-includes/usr/local/lib/elizaos/update-manager Hardens copy_verified_file with O_NOFOLLOW, temp-file materialization, and in-flight SHA-256 re-check; introduces a subtle double-close risk on src_fd and uses os.path.exists (symlink-following) for temp-file cleanup.
packages/os/linux/variants/milady-tails/Justfile Replaces fragile relative-path root discovery with git rev-parse --show-toplevel; adds ensure_plugin_runtime_dist helper and ELIZAOS_MILADY_APP_ARTIFACT override; handles both monorepo and standalone layouts.
packages/os/linux/variants/milady-tails/scripts/security-smoke.sh Extends smoke-test coverage with three new require_fixed checks verifying O_NOFOLLOW, temp-file materialization, and in-flight digest re-check are present in the update-manager.
packages/os/linux/variants/milady-tails/scripts/static-smoke.sh Adds file-existence assertions for new data files, Justfile feature checks, and a new rg-based branding regression guard for first-boot/launcher polish strings.

Reviews (1): Last reviewed commit: "fix homepage smoke scope on shallow PR h..." | Re-trigger Greptile

Greptile also left 3 inline comments on this PR.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 19, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 228ae8e6-a0f0-4537-b7c5-8243a11fd71c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch nubs/elizaos-live-final-polish-20260519024904

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the ci label May 19, 2026
@lalalune lalalune marked this pull request as ready for review May 19, 2026 03:31
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 19, 2026

Claude encountered an error after 0s —— View job


I'll analyze this and get back to you.


git fetch --no-tags --depth=1 origin "${{ github.base_ref }}"
changed_files="$(git diff --name-only "origin/${{ github.base_ref }}...HEAD")"
git fetch --no-tags origin "${{ github.base_ref }}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Unbounded fetch may pull full branch history on every PR run. Without --depth, GitHub Actions' initial shallow clone is expanded to the complete history of the base branch, which can be hundreds of megabytes on an active repo. A bounded deepen (e.g. --deepen=100) is usually enough to resolve the merge-base while keeping fetch fast; the fallback path already handles the rare case where no common ancestor is found.

Suggested change
git fetch --no-tags origin "${{ github.base_ref }}"
git fetch --no-tags --deepen=100 origin "${{ github.base_ref }}"

Comment on lines +264 to +283
with os.fdopen(src_fd, "rb", closefd=True) as src_handle, os.fdopen(
tmp_fd,
"wb",
closefd=True,
) as dst_handle:
src_fd = -1
for chunk in iter(lambda: src_handle.read(1024 * 1024), b""):
digest.update(chunk)
dst_handle.write(chunk)
actual = digest.hexdigest()
if actual.lower() != expected_sha256.lower():
fail(f"verified runtime file changed while copying: {src}")
os.chmod(tmp_name, 0o755 if src_stat.st_mode & 0o111 else 0o644)
os.replace(tmp_name, dst)
tmp_name = None
finally:
if src_fd >= 0:
os.close(src_fd)
if tmp_name and os.path.exists(tmp_name):
os.unlink(tmp_name)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Potential double-close on src_fd when dst_handle setup fails

with os.fdopen(src_fd, …) as src_handle, os.fdopen(tmp_fd, …) as dst_handle: is desugared as nested context managers. If os.fdopen(tmp_fd, "wb", …) raises after src_handle.__enter__() has succeeded, Python calls src_handle.__exit__(), which closes the underlying src_fd. The src_fd = -1 assignment in the body never executes, so the finally block then calls os.close(src_fd) on an already-closed descriptor — raising EBADF and masking the original exception.

Comment on lines +282 to +283
if tmp_name and os.path.exists(tmp_name):
os.unlink(tmp_name)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 os.path.exists follows symlinks, so a dangling symlink planted at tmp_name (between os.replace failing and the finally running) would cause exists() to return False and silently skip cleanup, leaking the temp file. os.path.lexists checks the path itself without following symlinks, or a try/except around os.unlink is even more idiomatic.

Suggested change
if tmp_name and os.path.exists(tmp_name):
os.unlink(tmp_name)
if tmp_name:
try:
os.unlink(tmp_name)
except FileNotFoundError:
pass

@lalalune lalalune merged commit 369bbe1 into develop May 19, 2026
29 of 31 checks passed
@lalalune lalalune deleted the nubs/elizaos-live-final-polish-20260519024904 branch May 19, 2026 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants