Skip to content

chore(deps): bump ratatui, assert_cmd, rexpect, libnss and ping - #12229

Merged
basvandijk merged 2 commits into
bas/replace-rustls-pemfilefrom
bas/bump-ratatui-assert-cmd-libnss
Nov 24, 2026
Merged

basvandijk merged 2 commits into
bas/replace-rustls-pemfilefrom
bas/bump-ratatui-assert-cmd-libnss

Conversation

@basvandijk

@basvandijk basvandijk commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

Bumps the third-party crates used by IC-OS tools and releases two of the Bazel-only holds left by #12177 (assert_cmd 2.0.16, ping 0.5.0). This removes lru 0.12.5 (RUSTSEC-2026-0253, RUSTSEC-2026-0002), which only ratatui 0.29 used; ratatui 0.30 uses lru 0.18.5, which both advisories list as patched.

Changes

  • ratatui 0.29.0 → 0.30.2, and tui-textarea 0.7.0 (which requires ratatui ^0.29) → ratatui-textarea 0.9.4, the Ratatui organisation's fork with the same TextArea API. manual_guestos_recovery switches its import and uses HorizontalAlignment, 0.30's name for Alignment. Both manifests drop ratatui's default underline-color feature (ratatui-crossterm still enables it in ratatui-core), which would only add never-built termwiz/termina packages to the lock files.
  • ping 0.5.2 (Cargo) / 0.5.0 (Bazel) → 0.10.0: network replaces the deprecated dgramsock::ping with a Pinger using SocketType::DGRAM.
  • libnss 0.5.0 → 0.9.0: its macros reach lazy_static and paste through libnss::_macro_internal, so nss_icos drops both dependencies.
  • rexpect 0.6.4 → 0.7.1: bare_metal_deployment removes the unused BareMetalIpmiSession::process_id(), which read a now-private field.
  • assert_cmd 2.0.16 → 2.2.2 in Bazel: Command::cargo_bin now panics instead of returning Err when CARGO_BIN_EXE_<name> is unset and no binary of that name sits next to the test executable, so //rs/ic_os/os_tools/fstrim_tool:fstrim_tool_integration and //rs/replica:replica_integration set CARGO_BIN_EXE_<name> to their binary's rootpath, and their tests drop the Err fallbacks.

Behaviour changes

  1. nss_icos (GuestOS, HostOS):
    • Builds with debug assertions on (the repository default, e.g. //rs/ic_os/networking/nss_icos) aborted on master 87617d5 in every lookup that returns hostos, on a misaligned pointer dereference in libnss 0.5.0. They now give the same results as the release build: libnss 0.6.0 (Fix pointer alignment in hostname lookup csnewman/libnss-rs#16) writes the h_addr_list array, still unaligned for hostos, with ptr.write, which the debug check does not cover. The images install the release build (//rs/ic_os/release:nss_icos, debug assertions off), whose forward and reverse lookups return the same results as master's.
    • Enumeration (gethostent_r): glibc's retry after a too-small buffer (TRYAGAIN/ERANGE) now gets the same entry instead of the next one; with an 8-byte buffer, master's release build skipped hostos. getent hosts lists both names with either release build.
  2. hostos_tool manual-recovery TUI: the terminal backend moves from crossterm 0.28.1 to 0.29.0. Spans no longer render control characters (ratatui 0.30.0), which can only affect output from the recovery process, such as its log lines.
  3. SetupOS/HostOS uplink detection (has_ipv6_connectivity): Bazel builds used ping 0.5.0, which read one packet and succeeded if it was an ICMPv6 echo reply. 0.10.0 binds the socket to [::]:0, reads back the kernel-assigned identifier, and waits, up to the timeout, for a reply matching that identifier, the sequence number and an 8-byte random nonce, skipping other packets. The request carries the nonce plus 48 zero bytes instead of 24 random bytes.
  4. Bazel feature unification: with one crate_universe feature set for the whole repository, ratatui 0.30's dependencies add local-offset to time 0.3.55 and allocator-api2, equivalent and raw-entry to hashbrown 0.17.1, which the replica and the canister sandbox use through wasmtime, cranelift and wasmparser.

FYI @dfinity/node (rs/ic_os), @dfinity/dre (nss_icos), @dfinity/infra (bazel/rust.MODULE.bazel), @dfinity/core-protocol (rs/replica tests, hashbrown/time features)

🤖 Generated with Claude Code

@basvandijk basvandijk added the CI_ALL_BAZEL_TARGETS Runs all bazel targets label Nov 22, 2026
@github-actions github-actions Bot added the chore label Nov 22, 2026
@basvandijk
basvandijk requested review from a team and a balanced review from Copilot November 22, 2026 17:27

Copilot AI left a comment

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.

🔵 Needs a closer look

Boot-critical uplink, production NSS ABI, and shared hashbrown/time changes require owner review and nested-image/system-test validation beyond the reported smoke-test coverage.

No open issues 🎉

What changed in this PR

Updates dependencies used by IC-OS tools and completes the assert_cmd and ping upgrades deferred from #12177, aligning their Cargo and Bazel versions.

Changes:

  • Upgrades the terminal UI dependencies and replaces tui-textarea with ratatui-textarea, removing the old lru dependency.
  • Migrates connectivity checks to Pinger, removes obsolete NSS macro dependencies, and deletes an unused rexpect-dependent method.
  • Configures explicit binary paths for Bazel CLI tests and refreshes dependency locks.
File Description
rs/​replica/​tests/​cli.rs Removes the obsolete binary lookup fallback.
rs/​replica/​BUILD.bazel Supplies the replica binary path to integration tests.
rs/​ic_os/​os_tools/​manual_guestos_recovery/​src/​ui.rs Updates textarea imports and alignment names.
rs/​ic_os/​os_tools/​manual_guestos_recovery/​src/​lib.rs Imports the replacement textarea crate.
rs/​ic_os/​os_tools/​manual_guestos_recovery/​Cargo.toml Replaces the Cargo textarea dependency.
rs/​ic_os/​os_tools/​manual_guestos_recovery/​BUILD.bazel Replaces Bazel textarea dependencies.
rs/​ic_os/​os_tools/​fstrim_tool/​tests/​integration_tests.rs Removes the obsolete binary lookup fallback.
rs/​ic_os/​os_tools/​fstrim_tool/​BUILD.bazel Declares the test binary as data and supplies its path.
rs/​ic_os/​networking/​nss_icos/​src/​lib.rs Removes the legacy lazy_static macro import.
rs/​ic_os/​networking/​nss_icos/​Cargo.toml Drops unnecessary direct macro dependencies.
rs/​ic_os/​networking/​nss_icos/​BUILD.bazel Drops corresponding Bazel macro dependencies.
rs/​ic_os/​networking/​network/​src/​interfaces.rs Uses the new datagram Pinger API.
rs/​ic_os/​dev_test_tools/​bare_metal_deployment/​src/​lib.rs Removes the unused process-ID accessor.
Cargo.toml Updates workspace dependency versions and Ratatui features.
Cargo.lock Refreshes Cargo’s resolved dependency graph.
Cargo.Bazel.toml.lock Refreshes Bazel’s resolved package versions.
Cargo.Bazel.json.lock Updates generated dependency and feature metadata.
bazel/​rust.MODULE.bazel Aligns Bazel dependency specifications with the upgrades.

Review effort: Balanced

@zeropath-ai

zeropath-ai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

✅ No security or compliance issues detected. Reviewed everything up to 25a329f.

Security Overview
Detected Code Changes
Change Type Relevant files
Enhancement ► Cargo.Bazel.json.lock
    Update checksums and add new target configurations for macOS/iOS/freebsd
► Cargo.Bazel.toml.lock
    Add new package entries (approx 0.5.1) and update dependencies/versions
► Cargo.toml.lock equivalents in Bazel lock file updates
    Reflect updated crate versions and dependencies

@zeropath-ai

zeropath-ai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

✅ No security or compliance issues detected. Reviewed 6 of 11 changed files (5 skipped) up to 25a329f.

Security Overview
Detected Code Changes
Change Type Relevant files
Enhancement ► Cargo.Bazel.json.lock
    Update checksums and add new target configurations for macOS/iOS/freebsd
► Cargo.Bazel.toml.lock
    Add new package entries (approx 0.5.1) and update dependencies/versions
► Cargo.toml.lock equivalents in Bazel lock file updates
    Reflect updated crate versions and dependencies

@basvandijk basvandijk removed the CI_ALL_BAZEL_TARGETS Runs all bazel targets label Nov 23, 2026

@pietrodimarco-dfinity pietrodimarco-dfinity left a comment

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.

LGTM from DRE for nss_icos. I diffed libnss 0.5.0 against 0.9.0: the exported _nss_icos_* symbols and signatures are unchanged, and the only behavioural changes are the h_addr_list write fix and the gethostent_r retry on TRYAGAIN, as described.

Non-blocking: nss_icos has no automated tests, which would be worth adding as a follow-up.

@pierugo-dfinity pierugo-dfinity left a comment

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.

Approving under rs/replica

Copilot AI left a comment

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.

🔵 Needs a closer look

Boot-critical NSS and uplink-detection changes, plus time/hashbrown feature changes affecting replica and sandbox, require owner review and shipped-image/nested-boot runtime and ABI validation beyond the available static evidence.

No open issues 🎉

Review effort: Balanced

basvandijk and others added 2 commits November 24, 2026 14:34
Bump ratatui 0.29 -> 0.30.2 and replace tui-textarea 0.7 (stale, pinned
to ratatui 0.29) with ratatui-textarea 0.9.4 in the HostOS manual-recovery
TUI. This removes lru 0.12.5 (RUSTSEC-2026-0253, RUSTSEC-2026-0002) from
both lock files.

Bump rexpect 0.6 -> 0.7.1 (drop the unused process_id(), which read a
field that is private now), libnss 0.5 -> 0.9.0 in nss_icos (its macros
bring their own lazy_static and paste) and ping 0.5 -> 0.10.0 (SetupOS and
HostOS uplink detection now uses ping's Pinger API with a datagram
socket). Bazel's assert_cmd moves from 2.0.16 to 2.2.2.

assert_cmd 2.2's Command::cargo_bin panics instead of returning an error
when it cannot find a binary, so the fstrim_tool and replica integration
tests get CARGO_BIN_EXE_<name> from Bazel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ratatui's underline-color feature names the termwiz and termina backends
as weak dependency features, which puts 33 packages that no target builds
into Cargo.lock and Cargo.Bazel.toml.lock: termwiz, termina, wezterm-*,
terminfo and their dependencies, plus an atomic dependency of uuid. Both
manifests now request ratatui's other default features explicitly.
ratatui-crossterm's own defaults still enable
ratatui-core/underline-color, so the compiled TUI is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@basvandijk
basvandijk changed the base branch from master to bas/replace-rustls-pemfile November 24, 2026 14:40
@basvandijk
basvandijk added this pull request to stack #12280 November 24, 2026 14:40
@basvandijk
basvandijk force-pushed the bas/bump-ratatui-assert-cmd-libnss branch from 480c0fa to 25a329f Compare November 24, 2026 14:40
Copilot AI balanced review requested due to automatic review settings November 24, 2026 14:40

Copilot AI left a comment

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.

🔵 Needs a closer look

Boot-critical IPv6 uplink detection, glibc NSS ABI handling, and shared dependency changes require owner review and real-image runtime validation beyond the available source-only checks.

No open issues 🎉

Review effort: Balanced

stacked auto-merge was automatically disabled November 24, 2026 14:51

Auto-merge was disabled for another pull request in the stack

@basvandijk
basvandijk enabled stacked auto-merge November 24, 2026 15:29
@basvandijk
basvandijk added this pull request to the merge queue Nov 24, 2026
Merged via the queue into master with commit cc9a664 Nov 24, 2026
44 checks passed
@basvandijk
basvandijk deleted the bas/bump-ratatui-assert-cmd-libnss branch November 24, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants