Skip to content

fix(hopper): keep installed apt dependencies at their versions during Linux setup - #6974

Merged
morluto merged 5 commits into
morluto:mainfrom
Adolanium:fix/linux-setup-no-dependency-upgrade
Oct 24, 2026
Merged

morluto merged 5 commits into
morluto:mainfrom
Adolanium:fix/linux-setup-no-dependency-upgrade

Conversation

@Adolanium

@Adolanium Adolanium commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #6975.

On Debian and Ubuntu, rea setup installed Hopper with one apt-get install -y <hopper.deb> xvfb xauth python3 libx11-6 libxtst6 transaction. apt-get install upgrades every listed package that is already installed, so approving Hopper setup could also upgrade the system python3 and X11 libraries. Runtime dependencies are now requested with --no-upgrade in their own transaction, before the Hopper archive. This avoids explicitly naming already-installed dependencies as upgrade targets; apt can still upgrade packages when the Hopper archive or Python library repair requires a newer version.

Problem and expected behavior

AGENTS.md: "Installers must not install or upgrade unrelated software." Hopper's runtime dependencies are disclosed and installed when missing, but packages that are already present belong to the user's system and should keep their versions. With the combined transaction, apt treats each listed package as an upgrade target.

Expected: missing dependencies are installed without explicitly requesting upgrades of already-installed runtime dependencies. The Hopper package may change version; version requirements of Hopper or the Python library repair can still require dependency upgrades.

Change and scope

  • src/application/LinuxHopper.ts, linuxPackageManagerCommands for deb: two transactions, apt-get install -y --no-upgrade <dependencies> then apt-get install -y <archive>. The approval disclosure lists both, because it is built from the same commands. Cancellation between transactions is honored as before: the next command is not started.
  • src/application/LinuxHopperPackageRuntime.test.ts: the expected command counts are derived from linuxPackageManagerCommands("deb", …) instead of assuming one install transaction.
  • docs/installation.md states the rule.

Not included: Arch's pacman -S --needed still updates an outdated dependency, and pacman has no equivalent flag; avoiding that would need a separate installed-package query. dnf install does not upgrade installed packages, so the Fedora path is unchanged. Both limits are stated in the docs.

Follow the contribution scope.
Unresolved scope, authority, side effects, or required verification block
integration. Link the required maintainer scope decision for new providers or
capabilities involving target execution, injection, mutation, or protection
recovery; ordinary fixes within existing boundaries may state "not applicable".
Draft PRs may leave the scope decision pending and the readiness and merge checklists
unchecked. Maintainers can help resolve open questions.

Contribution scope: not applicable. This is a fix inside the existing approved Linux setup flow.

Contract and boundary impact

  • Semantic owner and earliest changed stage: linuxPackageManagerCommands, which builds both the executed commands and the approval disclosure.
  • Contribution scope fit and linked maintainer decision: not applicable.
  • CLI and MCP/tool-catalog contract: rea setup's plan on apt systems lists one more command.
  • Provider, bridge, target-format, or platform compatibility: Debian and Ubuntu; Fedora and Arch unchanged.
  • Evidence, artifact, provenance, or reconstruction contract: none.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): setup no longer explicitly names already-installed runtime dependencies as upgrade targets on apt systems; dependency resolution can still require upgrades.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs and skills/; edit authored instructions in .agents/skills/reverse-engineer-anything/ and never commit build outputs): installation behavior as described; no package metadata change.

Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added or updated:
    • src/application/LinuxHopper.test.ts, "keeps installed apt dependencies at their versions while Hopper may upgrade (root: %s)": the exact deb commands, with and without pkexec.
    • src/application/LinuxHopperPackageRuntime.test.ts: the runtime, failure, cancellation and disclosure cases now take the deb transaction count from the command builder; their behavior assertions are unchanged.
  • Base reproduction or other evidence: with src/application/LinuxHopper.ts from upstream/main 3ce3117 and these tests, both new cases fail. The apt upgrade behavior itself is documented apt-get behavior (--no-upgrade: "do not upgrade packages; when used in conjunction with install, no-upgrade will prevent packages on the command line from being upgraded if they are already installed").
  • User-visible CLI/MCP output (if applicable): the Linux setup approval plan on apt systems.
  • Remaining proof gaps: no run against a real Debian or Ubuntu package database; the commands are verified as built.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

Current head 00da2d2e6 merges main 03ed0c63d and resolves both Evidence conflicts using the implementation and regressions already merged in #7036. The PR diff is the original four Hopper/setup files. The complete file tree matches the locally tested resolution. No CI gate, assertion, timeout, or retry was weakened.

Executed on macOS arm64 with pinned Node 24.22.1/npm 11.16.0:

  • npm run test:focused -- src/domain/evidence.test.ts src/domain/immutableJson.test.ts src/domain/analysisErrorProjection.test.ts src/domain/analysisSnapshot.test.ts tests/process-global/managedBundleReadGuards.test.ts tests/boundary/filesystem/directAnalysisSnapshotReplay.test.ts tests/boundary/filesystem/evidenceBundleFiles.test.ts tests/boundary/cli/managedMemberSummaryCli.test.ts src/application/LinuxHopper.test.ts src/application/LinuxHopperPackageRuntime.test.ts: 289 passed, 2 Windows-only cases skipped. Covers Hopper transactions and cancellation, the unchanged low-headroom regression, Evidence rebinding/error projection, replay, and compiled managed-summary CLI checks.
  • npm run check: passed (typecheck, lint, module boundaries, architecture guards).
  • npm run docs:check: passed, including 9 README consistency tests.

Earlier source CI failed on release-history typing and a JavaScript lifetime worker exit; the latter was reproduced locally. Both were resolved by upstream fixes brought into the branch. The later low-headroom Evidence failure was also reproduced and repaired; that repair now lives on main through #7036. Static and source CI passed after the first refresh. Required CI is rerunning on the conflict-free current head.

Earlier author validation used Linux/WSL Ubuntu on Node 24.22.1. No real Hopper install or Debian/Ubuntu package transaction was performed for this refresh; Linux-specific package verification remains for Linux CI.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: Linux unit and service tests only; no real Hopper install.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: setup changes fewer system packages than before.

Author readiness

Human owner: @Adolanium

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

… Linux setup

apt-get install upgrades every listed package that is already installed, so Linux setup could upgrade the system python3 and X11 libraries while installing Hopper. Runtime dependencies are now installed with --no-upgrade in a separate transaction before the Hopper archive, which may still upgrade. The setup approval plan lists both commands.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-24T08:37:25.849668Z
We couldn’t complete this review. Comment @codex review to try again.
07a908b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking issues were found.

Summary

Debian and Ubuntu setup now installs Hopper’s runtime dependencies with --no-upgrade, then installs the verified Hopper archive separately.

  • Hopper setup keeps installed apt dependencies off upgrade targets.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Verify Hopper archive] --> B[Install runtime dependencies with --no-upgrade]
  B --> C{Failed or cancelled?}
  C -->|Yes| D[Stop]
  C -->|No| E[Install Hopper archive]
  E --> F{Failed or cancelled?}
  F -->|Yes| D
  F -->|No| G[Check Python library and repair if needed]
Loading

Reviews (5) · Last reviewed commit: "Merge remote-tracking branch 'upstream/m..." · Reviewed by Greptile

Comment thread docs/installation.md Resolved
@morluto
morluto merged commit a5bfd04 into morluto:main Oct 24, 2026
42 checks passed
@morluto morluto mentioned this pull request Oct 25, 2026
3 tasks done
@Adolanium
Adolanium deleted the fix/linux-setup-no-dependency-upgrade branch October 25, 2026 04:23
@morluto morluto added area: setup Setup, packaging, upgrade, install, Doctor, and client registration bug Something isn't working provider: hopper Analysis provider / engine: hopper labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: setup Setup, packaging, upgrade, install, Doctor, and client registration bug Something isn't working provider: hopper Analysis provider / engine: hopper

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Linux Hopper setup upgrades already-installed apt packages

2 participants