Repository navigation
Review round: VNC password quoting, gc predicate cut, stdlib uuid, deps, docs - #52
Merged
Merged
Conversation
…github.com/gofrs/flock v0.13.0→v0.13.1, github.com/projecteru2/core v0.1.3→v0.1.5, oras.land/oras-go/v2 v2.6.1→v2.6.2
HMP parses an argument that starts with a double quote as a quoted string, so a password like "abcdef" was stored as abcdef.
Drop dead gosec/errcheck nolint directives, restated DataDisks and VNC proxy comments, and the nonexistent export op; cut the gc godocs to one fact each; the guest ignoring the power-down is a degraded stop, so it logs at warn like cocoon's stop escalation.
…partition wait predicate
vmInUse never matched: the collectors only ask about IDs Resolve left after dropping every recorded VMID, sweep holds the gc lock and every VM lock so no record appears before Collect, and the bridge collector passes an 8-char prefix. provisionNet's empty-result guard never fired: both Add backends return one config per spec on success and AddRange(0, 1) is one spec.
…rk rebuild, and the e2e script cli.md named overlay.qcow2 and a copied OpenCore; the VM dir holds disk.qcow2 and an OpenCore overlay. networking.md gains the #51 rebuild of lost owned networking. The e2e.sh header names the script it is.
cmd dropped error replies and EOF, so a failed screendump left OCR reading the previous /tmp/_ocr.ppm and a rejected key or click still exited 0.
Its only callers, the picker double-clicks in build-qemu-macos.sh, went away in 5ef9948; nothing in the workspace calls it.
…nd take f-strings
…mmand groups cocoon #264 made GroupCommand the one owner of the group contract (NoArgs + help); the two groups here now use it. Checked on the built binary: vm and image print help with rc 0, vm bogus and image bogus fail with unknown command.
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.
Whole-repo review round: dependency bump, one bug fix, comment and modern-Go review, two cuts, and docs that the code contradicted.
Commits
build:cocoon 22b7392 → 1951f35 (master: #262 TAP redirect verify, #261 image/doctor), flock v0.13.1, projecteru2/core v0.1.5, oras-go v2.6.2.recoverNet'sVerifyalso requires the TAP's ingress redirect filter. A TAP left without its filter by an interrupted add used to passVerify, so QEMU launched onto a dead data path. Nowvm startrebuilds it in one pass (CNI DEL+ADD with the recorded MAC; the qdisc and filter steps tolerate existing state).fix:reject a double quote in the VNC password."as a quoted string (monitor/hmp.cget_str;set_passwordtakespassword:s). So--vnc-password '"abcdef"'passed validation and was stored asabcdef: silently the wrong password.review:log the missed power-down at warn, as cocoon's stop escalation does.exportop; the three gc godocs cut to one fact each; three dead//nolint:gosec(G204/G304 are excluded in.golangci.yml) and five dead test//nolint:errcheck; restatedDataDisksand VNC proxy comments.review:stdlibuuid.NewV4()for the SMBIOS UUID (Go 1.27) replaces the hand-rolled v4. The partition-wait predicate is folded.cut:vmInUsepredicate never matched:Resolveleft after dropping every recorded VMID.sweepholds the gc lock exclusively plus every VM lock, so no record appears betweenReadDBandCollect.provisionNet's empty-Addguard never fired: both backends return one config per spec on success, andAddRange(0, 1)is one spec.docs:cli.mdnamesdisk.qcow2and the per-VM OpenCore overlay (both were wrong when written).networking.mdgains the vm: rebuild owned networking before launch when the host lost it #51 start-time rebuild of lost networking.scripts/e2e.shheader names the script it is.scripts/qmp-input.py(three commits):cmdnow fails on a QMPerrorreply or a closed monitor instead of returning it unchecked, so an OCR step no longer clicks on a stale/tmp/_ocr.ppmfrom a failed screendump; the deadocrdclickop goes (its callers left in 5ef9948); the usage text lists the ten live ops, theagree_buttondocstring is one line,%formatting becomes f-strings. Verified against a fake QMP server: click/dclick/key/chord/type/screendump exit 0; an error reply or EOF exits 1 (the old script exited 0 silently). Not run: ocrclick/ocrtext/agreebtn need tesseract + PIL.Numbers
Evidence (final HEAD)
The branch also builds, vets and passes the darwin race tests against the cocoon round branch through a scratch-only
replace.After cocoon #264
build:cocoon is pinned to the #264 squash commit dcec1fa (v0.6.9-0.20260924025202-dcec1fa3f056), and both command groups takecliutil.GroupCommand, which #264 made the one owner of the group contract (NoArgs+ help). On the built binary:vmandimageprint help with rc 0;vm bogusandimage bogusfail withunknown command "bogus" for "cocoon-macos vm"/"... image", rc 1.golangci-lint fmt --diffrc 0, asl clean on both, build+vet both, race tests on darwin and in the linux container all ok.Not in this PR
COCOON_MACOS_VNC_PASSWORDcheck accepts whitespace and double quotes that this repo rejects, so a bad value fails every macOS launch loudly instead of at vk-cocoon startup. That is a vk-cocoon change; its validator is being aligned in the vk-cocoon round.