Skip to content

fix(upgrade): bare hanzo upgrade upgraded nothing - #97

Merged
zeekay merged 2 commits into
mainfrom
job/upgrade-engine
Nov 27, 2026
Merged

zeekay merged 2 commits into
mainfrom
job/upgrade-engine

Conversation

@jamessburnss1313-dev

Copy link
Copy Markdown
Contributor

What a customer saw

On two Macs (CLI 8.5.929), bare hanzo upgrade exited 1 and upgraded nothing:

engine — the engine is built into hanzod; install hanzod
not upgraded: hanzo, mcp, dev, gen, zt, node, engine, cloud

Both machines then sat 412 builds behind the API, so hanzo link grant and agent coding create --dir did not exist locally. That was root cause (a) of the Carbon District problem log (25 Nov 2026).

Root cause

NATIVE in src/commands/upgrade.rs still named engine. hanzo.sh no longer ships it (unavailable_rows), and validate_wanted dies before installing anything when any name is missing from TOOLS. Unix made one installer call with every name, so one dead name failed all of them, and the failure line then blamed every name.

Fix

  • engine and the hanzo-engine alias are gone from the upgrade plan.
  • New shipped() splits the plan by the installer's own table (the existing table() parser, which Windows already used). Names the installer lacks are reported by name; the rest still upgrade. Both platforms now share the one rule.
  • A table that cannot be read is its own error instead of "every name missing".

Testing

  • cargo test --locked --bin hanzo upgrade::tests: 12 pass. Three of them fail on main (or do not compile): the bare plan vs the live table, engine refused as a name, and the split.
  • cargo clippy --locked --all-targets -- -D warnings: clean.
  • The table fixture is a row-for-row copy of the live hanzo.sh TOOLS (read 25 Nov 2026).

Not tested

  • A real hanzo upgrade run on unix or Windows against the live installer.
  • The full test suite (make test).

Notes

  • cargo fmt also touched two lines inside fetch() in the same file; main's copy was not rustfmt-clean.
  • Built by one agent, reviewed by a second (which asked for the unreadable-table error and its test). Nothing merged; production is Zach's call.
  • Not in this PR, seen on the same machines: the upgrade replaced a running binary and macOS killed hanzo beat (OS_REASON_CODESIGNING); the launch agents needed launchctl kickstart -k. Cause not confirmed, so not changed here.

Risk: low. How to revert: git revert the one commit.

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-25T22:41:12.136970Z
We couldn’t complete this review. Comment @codex review to try again.
c6c6a78 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

zeekay commented Nov 27, 2026

Copy link
Copy Markdown
Member

Important customer upgrade fix. No current-head CI run returned for c6c6a78 and automated review failed due to quota. Please rebase onto current main and run workspace plus shipped CLI upgrade regression with current hanzo.sh catalog; verify unavailable tools cannot abort the entire default upgrade, explicit legacy names have clear guidance and failed upgrades report actual failures.

jamessburnss1313-dev and others added 2 commits November 26, 2026 19:36
Bare `hanzo upgrade` exited 1 and upgraded nothing: NATIVE still named
"engine", hanzo.sh's installer refuses any name missing from its table, and
the one installer call carried every name, so one dead name failed all.

Split the plan by the installer's own table on both platforms: shipped names
go to the installer, missing ones are reported by name, the rest still
upgrade. A table that cannot be read is its own error, not "every name
missing".

Testing: cargo test --locked --bin hanzo upgrade::tests (12 pass; 3 fail on
main), cargo clippy --locked --all-targets -- -D warnings.
Risk: low. Unix now depends on table() reading hanzo.sh, as Windows already did.
How to revert: git revert this commit.
@zeekay

zeekay commented Nov 27, 2026

Copy link
Copy Markdown
Member

Rebased onto main (5de993a2) at c1d8df03:

  • Verified default hanzo upgrade plan against live hanzo.sh TOOLS catalog (everything_a_bare_upgrade_asks_for_is_in_the_installers_table), partition of missing tools (names_are_split_by_what_the_installer_ships_in_order), unreadable-table error (a_table_that_cannot_be_read_is_an_error_not_every_name_missing), and explicit guidance for legacy engine/hanzo-engine -> hanzo upgrade node.
  • cargo test --bin hanzo upgrade::tests: 12 passed, 0 failed.
  • cargo clippy --locked --all-targets -- -D warnings: 0 warnings.

@zeekay
zeekay force-pushed the job/upgrade-engine branch from c6c6a78 to c1d8df0 Compare November 27, 2026 03:38
@zeekay
zeekay merged commit f44110d into main Nov 27, 2026
1 check passed
@zeekay
zeekay deleted the job/upgrade-engine branch November 27, 2026 03:38
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