Skip to content

chore: land post-install checks and Chromium/Quarto fixes - #22

Merged
emmanuelbruno merged 15 commits into
developfrom
feat/post-install-checks
Sep 10, 2026
Merged

chore: land post-install checks and Chromium/Quarto fixes#22
emmanuelbruno merged 15 commits into
developfrom
feat/post-install-checks

Conversation

@emmanuelbruno

Copy link
Copy Markdown
Contributor

Merges feat/post-install-checks into develop, including PR #21 chrome-headless-shell fix validated by the notebook-ci canary.

emmanuelbruno and others added 15 commits September 4, 2026 10:10
The generated wrapper derived the .real target from dirname("$0"),
which breaks when the shim is invoked via the /usr/local/bin or
~/.local/bin symlinks (the common PATH resolution route): $0 points at
the symlink, so the wrapper looked for <bin>.real in the symlink
directory and failed with exit 127. The wrapper now resolves its own
canonical path via readlink -f first.

Verified in-container with a fake binary: old logic failed via symlink
(exec: /usr/local/bin/chrome.real: not found, rc=127); new logic passes
via both symlinks and direct invocation, and re-wrap idempotency /
original-restoration scenarios still pass.
fix(quarto-chromium): CI-safe headless Chromium for typst/mermaid renders
Copilot AI lite review requested due to automatic review settings September 10, 2026 17:59

Copilot AI 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.

🟡 Changes recommended

The new post-install check runner currently doesn’t reliably run checks in the target user environment (notably HOME/quoting in fallbacks), which can cause false failures for otherwise-correct features.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR lands a “post-install contract check” mechanism into the generated Dockerfiles and CI build workflow, while also addressing Quarto/Chromium reliability issues for headless rendering and updating several pinned tool versions.

Changes:

  • Add feature postInstallCheck collection in solen-cli and wire it into generated Dockerfiles (optional build-time gating and an image entrypoint runner).
  • Improve Quarto runtime behavior (Chromium shared libs + shim + functional smoke check; expose bundled typst on PATH).
  • Bump pinned versions (Quarto, TinyTeX, IJava) and refresh corresponding checksums and validation workflow coverage.
File summaries
File Description
versions/versions.yaml Bumps tool versions in the versions source-of-truth.
versions.json Regenerated pinned version map to match versions.yaml.
checksums.json Updates pinned versions and adds new checksums for Quarto/IJava/TinyTeX.
scripts/utils/update-checksums.sh Updates example/comment to reflect new Quarto version.
solen-cli/solen/core/feature.py Adds collect_post_install_checks and enhances maintainer normalization.
solen-cli/solen/generators/dockerfile_gen.py Collects post-install checks per profile and base64-encodes commands for templates.
solen-cli/solen/generators/dockerfile_template.j2 Adds post-install check runner scripts and optional build-time execution wiring.
tests/test_postinstall_check_collection.py Adds unit tests for post-install check collection behavior.
docs/TESTING.md Documents the new testing layers and post-install check mechanism.
.github/workflows/ci-validate.yml Expands ruff lint scope to include tests/.
.github/workflows/ci-build.yml Adds optional workflow input and step to run post-install checks in built images; improves tag extraction.
features/quarto-cli/feature.json Updates default Quarto version option to 1.10.18.
features/quarto-cli/install.sh Discovers Quarto bundled tools dir (typst, etc.) and appends it to PATH via wrappers/profile.d.
features/quarto-chromium/install.sh Installs Chromium runtime libs, improves Quarto binary discovery, adds shim wrapping and symlink strategy.
features/quarto-chromium/feature.json Replaces existence check with functional headless smoke test and better stderr surfacing.
features/quarto-common/feature.json Adjusts post-install check path for the shared Quarto templates directory.
features/system-essentials/install.sh Makes apt package list path more flexible (apt-packages/base fallback).
features/texlive/install.sh Updates TinyTeX version and switches default CTAN mirror; adjusts install relocation behavior.
features/prompt-helpers/install.sh Updates arch token probing, changes install/cache path, and adds /usr/local/bin/gitstatusd symlink.
features/prompt-helpers/feature.json Updates post-install check to accept user-local gitstatusd location as fallback.
features/my-utils/feature.json Updates post-install check target name (gitpull.sh).
features/kubernetes-dev/install.sh Refactors version resolution to prefer centralized helper with explicit fallbacks; skips cleanly if unresolved.
features/kubernetes-client/install.sh Refactors version resolution similarly; skips cleanly when nothing resolves.
features/java-kernel/install.sh Updates defaults (IJava + JDK), improves GitHub release URL probing, and supports release-provided install.py.
features/java-kernel/feature.json Updates defaults and replaces check with a more functional kernelspec + jar existence validation.
features/java-kernel/test-java-kernel.sh Adds a feature-level test script to validate Java runtime and kernel registration.
features/buildah/feature.json Changes post-install check behavior to skip on amd64 (matching install-time workaround).
features/build-essentials/install.sh Adds fd-find/ripgrep and ensures fd is available via symlink on Debian/Ubuntu.
Review details
  • Files reviewed: 28/28 changed files
  • Comments generated: 4
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +34 to +45
user_home="/home/${user}"
extra_path="${user_home}/.local/bin:${user_home}/bin:${user_home}/.quarto/bin:${user_home}/miniforge3/bin:${user_home}/.linuxbrew/bin:${user_home}/.linuxbrew/opt/bin:/opt/quarto/bin:/usr/local/bin"

for d in "${user_home}/.TinyTeX"/bin/*/; do
if [ -d "${d}" ]; then
extra_path="${d%/}:${extra_path}"
break
fi
done

export PATH="${extra_path}:${PATH}"

gid="$(id -g "$user")"
setpriv --reuid="$uid" --regid="$gid" --init-groups "$wrapper" "$user" "$check_cmd"
else
su -s /bin/bash "$user" -c "\"$wrapper\" \"$user\" \"$check_cmd\""
Comment on lines 20 to 23
"postInstallCheck": {
"command": "buildah --version",
"command": "sh -c 'case \"$(uname -m)\" in x86_64|amd64) exit 0;; *) buildah --version;; esac'",
"description": "Verify buildah is installed"
},
Comment on lines 15 to 17
"postInstallCheck": {
"command": "test -x /usr/local/bin/gitstatusd",
"command": "test -x /usr/local/bin/gitstatusd || test -x ${HOME}/.local/share/gitstatus/gitstatusd",
"description": "Verify gitstatusd binary is installed and executable"
@emmanuelbruno
emmanuelbruno merged commit 94457ad into develop Sep 10, 2026
6 checks passed
@emmanuelbruno
emmanuelbruno deleted the feat/post-install-checks branch September 10, 2026 21:50
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.

2 participants