Round two (778f1ab) · Round one (d225838)
Your draft PR, reviewed twice at d225838: Cody's process and ours, each by a fresh agent, one after the other, then merged and re-checked by me. Nothing was posted to GitHub and nothing was written to any cluster.
Preview: harvesterpr1261r.mf-created-dashboard.ui.rancher.space, built from d225838; backend .105 (Harvester v1.10.0-rc1 with the master API server, lists from the SQL cache, 9 VMs). Baseline: harvestermainr…, rebuilt from upstream main 97ce1e9 (the PR's base) on the same backend. Login admin, the usual lab password. Also checked: .118 (v1.9, old API) through a dev server, and extension mode in Rancher 2.16 on mf.
Both passes reviewed the two fix commits (c0f7463, 3de59dc) and the whole PR again, each as a fresh agent. Every round-one finding is addressed or answered. They each found one new regression on their own, from the restart-notice change. It's fixed in 778f1ab, proven live on three builds below, and covered by tests that fail when the fix is undone. CI is green on 778f1ab, and the preview is rebuilt at that commit. The PR is still a draft, waiting for your go.
| # | Round-one finding | Pass A (Cody) | Pass B (ours) | Evidence |
|---|---|---|---|---|
| 1 | Launcher pods matched by a label many VMs lack | Addressed | Addressed | Pods now come by kubevirt.io/created-by (the VMI UID). A: with every vmName label stripped from the responses in the browser, View Logs stayed enabled. B: same in extension mode on mf. Live start of an unlabelled VM earlier: pod found, View Logs on. |
| 2 | Restart notice covers the page only | Addressed | Partly | Documented and no longer re-shown on sort/refresh (A: 1 notice over 4 sort clicks vs 5 before). Both found the regression below, now fixed in 778f1ab. |
| 3 | Tests miss a full reload | Addressed | Addressed | Each regression from round 1 fails a test (A 3 mutations, B 6). |
| 4 | Description out of date | Addressed | Addressed | All four parts now match the code; B's wording point below is fixed too. |
| 5 | Console warning on search | Answered | Left by decision | Comes from a hard-coded field list in the shell (steve-pagination-utils.ts:663) that an extension can't extend. |
c0f7463 compared the VMs needing a restart with the watcher's previous value. Volumes and a VM's detail page load every VM into the store, so on the way back that previous value already held the same VMs, and the notice was skipped. That's the main flow it exists for: edit a VM, go back to the list. 778f1ab remembers what it notified on the component itself, so every visit starts fresh. It also compares by namespace and name, so a same-name VM in another namespace counts as a change (Pass B's second point). Live check: default/andy was marked as needing a restart in the browser only, then the same steps ran on all three builds:
| Step | main 97ce1e9 | PR 3de59dc | fix 778f1ab |
|---|---|---|---|
| Open the list | notice | notice | notice |
| Sort, same VMs on the page | none | none | none |
| Back from Volumes | notice | none | notice |
| Back from the VM's detail page | notice | none | notice |
| Page 1 → page 2 → page 1 (4 rows) | not paged | notice on return | notice on return |
Tests: 7 for the notice. Comparing with the watcher's previous value again fails the "new visit" test, and keying by name only fails 3 tests. The full suite passes: 445 tests, 1 skipped.
Harvester's VM importer (vm-import-controller, helper.go:51), restore to a new VM (restore.go:712) and its VM builder set it too. VMs from Forklift or a plain manifest lack it, like the forklift-vm-* on .105. The code comment and the description now say that. The pushed commit message of 3de59dc keeps the old wording.
Pass B asked whether the pod now shows one update later. It doesn't: the pods are fetched in the same refresh, right after that refresh's VMIs, and a row can only show a pod through its VMI anyway.
That's the shell's behaviour for every paged list. Paged tables offer namespace grouping as metadata.namespace, and unpaged ones as namespace, so a saved "group by namespace" doesn't match and the table falls back to its first option, none. Same in Rancher's own paged lists.
Pass B checked: during a live migration both launcher pods load and the list keeps the last, as main does; a VMI without a uid sends no request; a refresh racing a page change ends with the newest pods; the old, unpaged list behaves like main.
All 21 round-two sessions and tokens are logged out; an audit by name on .105, .118 and mf found none left. .105 again shows about 14 admin sessions from someone else (it looks like the session working on PR 1263), left alone. A Playwright Chrome has been running on the Mac since 12 November (PID 3171). It predates this review, so it's left for you to decide.
Round two cost: Pass B 23 min, 92 calls, 222k tokens; Pass A ran in two parts (the usage limit cut it off once), 177k tokens. Round one follows below, unchanged.
What holds up: 11 of 12 acceptance criteria are met (Pass A). Side by side with main on the same backend, sort, search, the namespace filter, group by namespace, the state/IP/node cells and Add Volume behave the same, apart from the limits the description lists (Pass B). The old API keeps the full list, and extension mode on Rancher 2.16 pages correctly. Both passes ran 48/48 unit tests.
| Finding | Pass A (Cody) | Pass B (ours) | After my re-check |
|---|---|---|---|
| 1 Pods matched by a label many VMs lack | C1 | B1 (blocker) | Holds. B's "6 of 9" is 5 |
| 2 Restart warning covers the page only | C2 | S1 | Holds, smaller than it reads |
| 3 Tests miss a full reload | – | S2 | Holds (mutation repeated) |
| 4 Description out of date | summary note | S3 (dialogs) | Holds, merged into one |
| 5 Console warning on search | – | N1 | Holds, optional |
| Stale pod page after a socket refresh | – | Q1 | FYI |
| Long filter URL through Rancher | checked standalone, dropped | Q2 | Dropped: 38.9k chars pass through mf |
Both found the main regression on their own and agreed on everything else they both looked at: paging, sort, search, the namespace filter, Add Volume and the gate on .118. Only A checked extension mode, built an acceptance table and recorded demos. Only B ran mutation tests, measured the per-page requests over 14 socket rounds and flagged the console warning. A's no-nits rule drops 5, which is why only B has it. Cost: A 24 min, 91 calls, 236k tokens; B 26 min, 107 calls, 276k tokens. B skipped extension mode for time; A did it.
The paged list loads the page's launcher pods with metadata.labels[harvesterhci.io/vmName] IN (…). The VM model then finds a VM's pod by its owner, the VMI. That label is only written by this UI's create/edit form, into the VM template (mixins/harvester-vm/index.js:1062). Harvester's VMI webhook doesn't add it, and neither does KubeVirt.
So a running VM created any other way has no pod on its row: kubectl, Terraform, the VM import, or the lab VM zz1209-nodeselector on .118 (Pass A). That disables View Logs, and the starting and launcher-pod error states never show. Main loads every pod and matches by owner, so it finds them all.
Data: on .105, 5 of the 9 VMs (the forklift-vm-* imports) have no such label in their template (Pass B said 6; I counted 5). All 5 are stopped today, so the broken row only appears once one of them runs, which needs a write. The two running VMs (andy, vm123) carry both harvesterhci.io/vmName and KubeVirt's vm.kubevirt.io/name.
For the fix (ours, since it's our PR): KubeVirt puts vm.kubevirt.io/name on every launcher pod, but it is deprecated and its value is the VMI's hostname, which can differ from the VM name. kubevirt.io/created-by is the VMI's UID, known once the page's VMIs are loaded. Both need checking before picking one.
vmRestartRequiredNames now reads the page's VMs, so the warning counts and names only VMs on the current page. A VM on page 2 that needs a restart after a hotplug is never mentioned. Main used every VM. The warning also pops up again on each page, sort or search change. Main already re-shows it whenever the VM list updates, so that part isn't new, but the new triggers make it noisier.
The PR description doesn't mention this limit (Pass A is right; the current body has no restart line). Seeing it needs a write: a VM that needs a restart, sitting on another page.
Removing the paged-mode check in created() makes the paged list load every VMI and migration again, which undoes the point of paging. All 14 list tests still pass; I repeated Pass B's mutation in a throwaway worktree. Pass B found the same for adding a full pod load to fetchSecondaryResources and for hard-coding force to false.
metadata.fields[N] check, a v1.10 cluster without the backend change stays on the full list. Both passes and I saw this on .118 with the version forced to v1.10. So merging no longer has to wait for the backport; the backport only decides when paging turns on. The flag at v1.10.0 was your call ("check properly before merging"), so it's still yours.The shell warns "Pagination API does not support filtering 'kubevirt.io.virtualmachine' by the requested fields: metadata.annotations[harvesterhci.io/vmDisplayName]" on each search, because the field isn't in the shell's list for that type. The API accepts it, and display-name search works (Pass A AC6). Seen in 4 of 4 searches by Pass B, and in my runs today.
Pass B asked about the proxy path. Through mf's cluster proxy, PV filters up to 38,869 characters (900 names) returned 200; Pass A saw 13,006 characters pass standalone. The real ceiling is the SQL cache's ~993 values per filter, which a page reaches only if its 100 VMs average 10+ volumes. Even then the other per-page requests still load.
Pass B saw it once in 14 rounds: an older pod request landed after a newer one, and the result was a superset (harmless). Same store pattern as the shell's own paged lists; not filed.
Main listed backups of any VM with the same name in any namespace. Now it lists only the VM's namespace, where its backups live (Pass A).
The PR 1196 nav counts, identical on main (both passes). Not this PR.
During the review, 16 short-lived "UI session" tokens appeared on .105 that belong to neither pass nor me. Each was used for 15 to 90 seconds and never logged out, the same pattern as a test browser whose logout lacks the CSRF header. They're left alone; they expire after 16 hours.
Opening Virtual Machines sends the full lists (pagesize=100000) for VMs, VMIs, pods, PVCs, PVs, restores, backups and migrations.
One VM page per request, then IN-filtered requests for that page's resources; 4 rows per page gives page 2 as "5 - 8 of 9".
| Id | Criterion | Result |
|---|---|---|
| AC1 | One page of VMs per request | Met |
| AC2 | Related resources only for the page, every VM gets what it needs | Partly met (finding 1) |
| AC3 | Sort, search, namespace filter on the server | Met |
| AC4 | CPU, Memory, IP, Node shown but not sortable/searchable | Met |
| AC5 | State sorts by printable status | Met |
| AC6 | Name sort; display name searchable | Met |
| AC7 | VMIs without a VM dropped and called out | Met (open question: called out to users?) |
| AC8 | No 422 from the paged requests | Met |
| AC9 | Labels filtered with metadata.labels[…] | Met |
| AC10 | Old API keeps the full list | Met (.118, also with v1.10 forced) |
| AC11 | Works as an extension in Rancher 2.16 | Met (mf, c-fwtnp) |
| AC12 | List intact after its dialogs | Met (Add Volume live; Restore and Migration by unit tests) |
11 met, 1 partly met. The slowness itself can't be shown with 9 VMs; the evidence is what each build requests.
forklift-vm-* VM, then stop it), so I'll ask first.harvester-pr1261 (+ its package host) built from d225838; harvester-main rebuilt from 97ce1e9.~/Projects/harvester-ssp read-only; their worktrees and dev servers are gone; the clone is still clean at d225838.