Repository navigation
fix(verify-package): read Hopper installer applicability from its owner - #2973
Conversation
packageSetupSupport derived hopperSetupSupported from the general doctor host check plus a non-Windows condition, so a Debian-family host REA supports but the Hopper package never tested reported an automated installer the packaged setup never offers. verifySetupApply then expected needs_confirmation for the explicit --install-hopper request and failed at verify-package-setup.mjs:403. Applicability now comes from readLinuxDistribution() in the built application, so the verifier follows the predicate the package ships, and it stays unknown when no distribution can be read instead of collapsing into a known-unsupported host. Generic agent configuration and idempotence assertions stay independent of installer applicability, and the expected status is still derived from the host rather than from the request being asserted. Verified on Kali 2026.3, a Debian-family host with an installer-untested distribution and the simulated Hopper package environment: before the change npm run verify:package fails at verify-package-setup.mjs:403 with the packaged setup correctly returning needs_human; after it the same run passes every stage. Both applicability branches are covered by tests/evaluation/package/packageSetupSupport.test.ts, which runs in the source lane without a build. No real Hopper installation was exercised, so no engine compatibility claim follows. Refs morluto#2939
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Note on reproducing #2939 locally (observation only, no code change proposed here) While reproducing the report on Kali 2026.3 I hit a second, unrelated host dependence in the same verifier, worth recording in case others on Ghidra hosts try to reproduce this.
That masks #2939 on exactly the hosts where it is easiest to hit: the run stops early, so the env -u GHIDRA_INSTALL_DIR -u JAVA_HOME npm run verify:packageWith that, |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f3924a701
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…installs it packageSetupSupport required doctor Hopper readiness on every Linux host whose host check passed, including installer-untested distributions and, after the architecture gate, arm64 hosts where setup never provides Hopper. On Linux, readiness now also requires automated installer applicability; macOS is unchanged. This narrows the readiness assertion from morluto#2973 on hosts outside the installer matrix, such as Kali and ubuntu-24.04-arm.
* fix(hopper): keep automated Linux setup off non-x86_64 hosts Every pinned Linux Hopper package (deb, rpm, Arch) is x86_64-only, but hopperSetupSupported was derived from os-release alone. Setup therefore planned and confirmed an amd64 package install on arm64 Ubuntu 24.04 and the other tested distributions. Classify installer support with the host architecture where the distribution is parsed, so setup planning, preflight, installation and package verification share one decision. Setup now takes its Linux distribution from the doctor host, as it already does for the macOS version, and the supported-host remediation text has a single owner. Fixes #3419 * fix(hopper): install Linux Hopper from the setup host's distribution facts systemLinuxHopperInstallHost read os-release with process.arch on its own, while setup planning used the doctor host's injected architecture. Both agree in production, but a doctor host composed with another architecture could plan one answer and install with another. The install host now takes its distribution reader from the caller, and systemSetupHost passes the doctor host's, so planning, preflight and installation share one host-fact owner. The unused default host on installLinuxHopper, the other ambient reader, is removed. * fix(verify-package): require Hopper readiness only where Linux setup installs it packageSetupSupport required doctor Hopper readiness on every Linux host whose host check passed, including installer-untested distributions and, after the architecture gate, arm64 hosts where setup never provides Hopper. On Linux, readiness now also requires automated installer applicability; macOS is unchanged. This narrows the readiness assertion from #2973 on hosts outside the installer matrix, such as Kali and ubuntu-24.04-arm. --------- Co-authored-by: DavidFB-creator <[email protected]> Co-authored-by: Kaoru0822 <[email protected]>
What
npm run verify:packagefails on Debian-family hosts that REA supports but the automatic Hopper installer never tested — Debian 12 in the report, Kali 2026.3 here. The packaged setup correctly answersneeds_humanto--install-hopper; the verifier expectedneeds_confirmation.Root cause
packageSetupSupportderivedhopperSetupSupportedfrom the general doctorhostcheck plus a non-Windows condition. After #2073 that check means "REA runs here", which is a different fact from "the Hopper package was tested on this distribution", so on Kali and Debian both flags came backtruewhile the owningreadLinuxDistribution()reportshopperSetupSupported: false.Change
scripts/verify-package-discovery.mjs— installer applicability now comes fromreadLinuxDistribution()in the built application, so the verifier follows the predicate the package ships instead of restating it. An unreadable distribution staysundefinedrather than collapsing into a known-unsupported host, nothing is inferred frompackageFamily, and doctor prose is never parsed. The distribution is imported lazily, which also keeps the derivation testable without a build.scripts/verify-package-setup.mjs— the expected status for the explicit--install-hopperrequest isneeds_confirmationonly when applicability is explicitlytrue. The generic configuration and idempotence assertions (first,aligned) are untouched and remain independent of installer applicability; the expectation is still derived from the host rather than from the request being asserted.scripts/verify-package-discovery.d.mts— contract updated. It is the source of truth for this script's types, and the previous one still declaredplatform: NodeJS.Platform.tests/evaluation/package/packageSetupSupport.test.ts— positive/negative applicability selection: a Kali fixture (REA-supported, installer-untested) selectsfalse; Ubuntu 24 selectstrueeven when the doctor host check fails; an unreadable distribution staysundefined; macOS follows the owner's predicate; Windows selectsfalse; agent setup support still comes from thenodecheck alone. Fixtures are derived from whatreadLinuxDistribution()actually returns for those os-release files.Verification
On Kali 2026.3 (Debian-family,
hopperSetupSupported: false), with the packaged fixture's simulated Hopper environment and no other deep provider — the reporter's host profile:npm run verify:packageverify-package-setup.mjs:403; packaged setup returnsneeds_humanwith aninstall_hopperplan and nothing applied0npm run test:local -- tests/evaluation/package/packageSetupSupport.test.ts tests/evaluation/package/packagePlatformDiagnostics.test.ts→ 12 passed, and the new file needs no build.npm run typecheckandnpm run lint(includingverify:module-boundaries) clean.Native package baselinejob runsnpm run verify:packageonubuntu-latestandubuntu-24.04-arm, where applicability istrue, so the positive branch stays exercised. Debian 12 itself was not re-run here.Closes #2939