Repository navigation
fix(target): say when no folder is granted - #14
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. |
|
Useful fix; CI/CD run 45717321221 executed the Rust test gate successfully, but live main 103ffaf is five commits ahead of the branch's merge base 8807647. Please rebase onto current main and rerun the full gate, including grant/revoke propagation and stderr-closed behavior. Automated review also failed due to quota; get a current-head review receipt or equivalent maintainer review. Holding merge under PR_CONVERGENCE.md. |
Symptom: a linked machine printed "ready for routed runs" with no folder granted, so no run from the web could work in the owner's files, and nothing said so. Cause: the beat kept each answer's granted folders in the Grants watch but never looked at whether there were any. Fix: the serving beat says so once, from its first answer, as a warning: no folder on this machine (<id>) is granted to the web: `hanzo link grant <folder>` grants one. A latch local to the beat loop keeps it to one per beat loop; a first answer with folders, or a later revoke, prints nothing. A beat nobody serves on (hanzo dev sessions) stays silent. target::sync now answers the whole Answer (id and folders) so the id is named. No extra requests; run admission is untouched. Testing: new unit tests (pure sentence; two empty answers give one notice; a first answer with a folder gives none, also after a revoke); lib 380 pass, clippy -D warnings clean, filesize ok. Risk: low. Warning goes to stderr; it may be hidden if the terminal is cleared afterwards (tmux attach). How to revert: git revert this commit. warn() no longer panics when stderr is closed, so a warning from the beat task cannot end the beat (found in review).
|
Rebased onto
|
3e14832 to
aa754b4
Compare
What a customer saw
A machine was linked and announced itself ready ("present and serving in the fleet … ready for routed runs"; in the CLI, "live runner active … ready for Dev runs"). No folder had been granted, so no run from the web or from a cloud agent could work in the owner's files. Nothing said so; finding
hanzo link granttook a day. Root cause (b) of the Carbon District problem log (25 Nov 2026), item 3.2.Root cause
The beat keeps each answer's granted folders in the
Grantswatch but never looks at whether there are any.Fix
The serving beat warns once, from its first answer, when that answer has no folders:
Same sentence as
hanzo link folders. One latch local to the beat loop; a first answer with folders, or a later revoke, prints nothing; a beat nobody serves on (hanzo dev) stays silent. No extra requests:target::syncnow returns the wholeAnswerso the id can be named. Run admission is untouched.warn()no longer panics on a closed stderr, so a warning from the beat task cannot end the beat.A first attempt in the CLI (re-reading the target file and asking the cloud again) was rejected in review: it raced the first heartbeat, delayed the terminal and made a second source for the grants. This uses the list the runner already holds.
Testing
cargo test --locked --lib: 380 passed. Three new tests pin: the sentence only when nothing is granted; two empty answers give one notice; a first answer with a folder gives none, also after a revoke.cargo clippy --locked --all-targets -- -D warnings: clean. File-size test passes.Not tested / known limits
8807647, so it appears only after the rev bump.target::sync(its one caller,link/folders.rs:106, discards the value), checked by reading, not by building.hanzo linkwith tmux the line can scroll away when tmux takes the terminal. The shell daemon sends stderr to/dev/null, so it never shows there.git merge-tree).Built by one agent, reviewed by a second. Nothing merged; production is Zach's call.
Risk: low. How to revert:
git revertthe commit.