Repository navigation
feat(target): a beat states the machine's terminal, so a live link stays visible - #19
Merged
Merged
Conversation
Codex Review Summary: ❌ FailedThis 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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Member
|
Rebased onto
|
zeekay
force-pushed
the
feat/machine-terminal
branch
from
November 27, 2026 03:57
cb406b1 to
4c132af
Compare
zeekay
pushed a commit
to hanzoai/cli
that referenced
this pull request
Nov 27, 2026
The link's machine terminal needs Beat::terminal and Beat::withdraw from hanzoai/gen#19. Pinned to that PR's head so this builds now; re-pin to the merged commit when #19 lands. Testing: cargo test --bin hanzo link:: built against the pinned gen (Compiling hanzo-gen ...#cb406b1d), 44 passed; cargo clippy --all-targets -- -D warnings clean. Risk: low; the pin moves gen forward two commits, both in target.rs. How to revert: git revert this commit (and the link commit with it).
zeekay
added a commit
to hanzoai/cli
that referenced
this pull request
Nov 27, 2026
…108) * feat(link): publish the shell on the machine, not only on a session Cloud stops a session an hour after its last activity, so a linked machine vanished from Tabs while its shell was live. The link now states its url on the machine's own run-target through the heartbeat it already keeps, and withdraws it, waiting to be heard, when the link ends. The session row still carries the url for Tabs that predate the machine field. Depends on hanzo-gen cb406b1 (feat/machine-terminal): Cargo.toml still pins the old rev, so this commit does not compile in CI until the pin is bumped to the merged gen commit. `target::sync` now takes a `Register`. Testing: cargo test --bin hanzo link:: (44 pass) and cargo clippy --all-targets -- -D warnings, both with a local path override of hanzo-gen that is not committed. Risk: none until the gen pin moves; a cloud without the machine field ignores `terminal`. How to revert: git revert this commit. * chore(deps): pin hanzo-gen to the machine-terminal beat (cb406b1) The link's machine terminal needs Beat::terminal and Beat::withdraw from hanzoai/gen#19. Pinned to that PR's head so this builds now; re-pin to the merged commit when #19 lands. Testing: cargo test --bin hanzo link:: built against the pinned gen (Compiling hanzo-gen ...#cb406b1d), 44 passed; cargo clippy --all-targets -- -D warnings clean. Risk: low; the pin moves gen forward two commits, both in target.rs. How to revert: git revert this commit (and the link commit with it). * chore(deps): pin hanzo-gen c453984e and split link modules under 1k LOC --------- Co-authored-by: Zach Kelling <z@zeekay.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A laptop running
hanzo linkvanished from Hanzo Tabs about an hour after the link started, while its shell was live. The link publishes its terminal on an agent session, and cloud's reaper rightly stops a session with no activity for an hour. The terminal is a fact about the machine, which already beats. hanzo-inc/cloud#1047 adds an optionalterminalto the machine row.What
Register.terminal: Option<String>, sent only when set.Beat::terminal(Some(url) | None): every beat states the URL while it is set. Clearing sends""once, and again on the next beat if that send was lost. A beat that never had one sends no key, sohanzo devandhanzo shell, which beat the same row, never wipe a link's terminal.Beat::withdraw()clears the terminal and waits up to 5 s for cloud to hear it, because a link ends by dropping its beat.target::syncnow takes theRegisterbody, because clippy's argument limit was hit.src/runner/mod.rsand the CLI'slink/folders.rsare updated to match.Rollout
Cloud ignores an unknown field, so this can ship before hanzo-inc/cloud#1047. hanzoai/cli
feat/machine-terminaluses it and pins this branch's head until this merges.Testing
cargo test: 387 lib tests plus the integration targets pass.cargo clippy --all-targets -- -D warningsis clean. Both ran in an isolated build folder, withCompiling hanzo-genseen after the last edit.a_beat_states_the_terminal_it_was_givenandclearing_the_terminal_says_so_oncefailed with beats forced to state nothing.a_beat_with_no_terminal_sends_no_keypasses either way, by design.Known gap
If a link ends within one request round trip of starting, the clear can be missed. The URL then expires with cloud's 90 s liveness window.
How to revert
Revert the two commits.